summaryrefslogtreecommitdiffstats
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/Makefile20
-rw-r--r--src/interfaces/ecpg/Makefile31
-rw-r--r--src/interfaces/ecpg/README.dynSQL11
-rw-r--r--src/interfaces/ecpg/compatlib/.gitignore3
-rw-r--r--src/interfaces/ecpg/compatlib/Makefile59
-rw-r--r--src/interfaces/ecpg/compatlib/exports.txt44
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c1027
-rw-r--r--src/interfaces/ecpg/ecpglib/.gitignore3
-rw-r--r--src/interfaces/ecpg/ecpglib/Makefile70
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c767
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c968
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c1002
-rw-r--r--src/interfaces/ecpg/ecpglib/ecpglib_extern.h257
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c346
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c2302
-rw-r--r--src/interfaces/ecpg/ecpglib/exports.txt31
-rw-r--r--src/interfaces/ecpg/ecpglib/memory.c174
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c594
-rw-r--r--src/interfaces/ecpg/ecpglib/nls.mk6
-rw-r--r--src/interfaces/ecpg/ecpglib/po/cs.po199
-rw-r--r--src/interfaces/ecpg/ecpglib/po/de.po206
-rw-r--r--src/interfaces/ecpg/ecpglib/po/el.po200
-rw-r--r--src/interfaces/ecpg/ecpglib/po/es.po200
-rw-r--r--src/interfaces/ecpg/ecpglib/po/fr.po209
-rw-r--r--src/interfaces/ecpg/ecpglib/po/it.po217
-rw-r--r--src/interfaces/ecpg/ecpglib/po/ja.po199
-rw-r--r--src/interfaces/ecpg/ecpglib/po/ko.po198
-rw-r--r--src/interfaces/ecpg/ecpglib/po/pl.po174
-rw-r--r--src/interfaces/ecpg/ecpglib/po/pt_BR.po199
-rw-r--r--src/interfaces/ecpg/ecpglib/po/ru.po204
-rw-r--r--src/interfaces/ecpg/ecpglib/po/sv.po199
-rw-r--r--src/interfaces/ecpg/ecpglib/po/tr.po205
-rw-r--r--src/interfaces/ecpg/ecpglib/po/uk.po200
-rw-r--r--src/interfaces/ecpg/ecpglib/po/vi.po200
-rw-r--r--src/interfaces/ecpg/ecpglib/po/zh_CN.po199
-rw-r--r--src/interfaces/ecpg/ecpglib/prepare.c602
-rw-r--r--src/interfaces/ecpg/ecpglib/sqlda.c592
-rw-r--r--src/interfaces/ecpg/ecpglib/typename.c144
-rw-r--r--src/interfaces/ecpg/include/.gitignore2
-rw-r--r--src/interfaces/ecpg/include/Makefile35
-rw-r--r--src/interfaces/ecpg/include/datetime.h14
-rw-r--r--src/interfaces/ecpg/include/decimal.h13
-rw-r--r--src/interfaces/ecpg/include/ecpg-pthread-win32.h58
-rw-r--r--src/interfaces/ecpg/include/ecpg_config.h.in18
-rw-r--r--src/interfaces/ecpg/include/ecpg_informix.h90
-rw-r--r--src/interfaces/ecpg/include/ecpgerrno.h79
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h103
-rw-r--r--src/interfaces/ecpg/include/ecpgtype.h109
-rw-r--r--src/interfaces/ecpg/include/pgtypes.h17
-rw-r--r--src/interfaces/ecpg/include/pgtypes_date.h32
-rw-r--r--src/interfaces/ecpg/include/pgtypes_error.h18
-rw-r--r--src/interfaces/ecpg/include/pgtypes_interval.h48
-rw-r--r--src/interfaces/ecpg/include/pgtypes_numeric.h69
-rw-r--r--src/interfaces/ecpg/include/pgtypes_timestamp.h31
-rw-r--r--src/interfaces/ecpg/include/sql3types.h43
-rw-r--r--src/interfaces/ecpg/include/sqlca.h66
-rw-r--r--src/interfaces/ecpg/include/sqlda-compat.h47
-rw-r--r--src/interfaces/ecpg/include/sqlda-native.h43
-rw-r--r--src/interfaces/ecpg/include/sqlda.h18
-rw-r--r--src/interfaces/ecpg/include/sqltypes.h57
-rw-r--r--src/interfaces/ecpg/pgtypeslib/.gitignore3
-rw-r--r--src/interfaces/ecpg/pgtypeslib/Makefile54
-rw-r--r--src/interfaces/ecpg/pgtypeslib/common.c148
-rw-r--r--src/interfaces/ecpg/pgtypeslib/datetime.c713
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt.h341
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt_common.c3003
-rw-r--r--src/interfaces/ecpg/pgtypeslib/exports.txt48
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c1093
-rw-r--r--src/interfaces/ecpg/pgtypeslib/numeric.c1594
-rw-r--r--src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h41
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c930
-rw-r--r--src/interfaces/ecpg/preproc/.gitignore8
-rw-r--r--src/interfaces/ecpg/preproc/Makefile102
-rw-r--r--src/interfaces/ecpg/preproc/README.parser42
-rw-r--r--src/interfaces/ecpg/preproc/c_keywords.c66
-rw-r--r--src/interfaces/ecpg/preproc/c_kwlist.h52
-rw-r--r--src/interfaces/ecpg/preproc/c_kwlist_d.h118
-rw-r--r--src/interfaces/ecpg/preproc/check_rules.pl191
-rw-r--r--src/interfaces/ecpg/preproc/descriptor.c367
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.addons590
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c504
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header626
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.tokens26
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.trailer1931
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.type146
-rw-r--r--src/interfaces/ecpg/preproc/ecpg_keywords.c54
-rw-r--r--src/interfaces/ecpg/preproc/ecpg_kwlist.h67
-rw-r--r--src/interfaces/ecpg/preproc/ecpg_kwlist_d.h152
-rw-r--r--src/interfaces/ecpg/preproc/keywords.c38
-rw-r--r--src/interfaces/ecpg/preproc/nls.mk6
-rw-r--r--src/interfaces/ecpg/preproc/output.c251
-rw-r--r--src/interfaces/ecpg/preproc/parse.pl698
-rw-r--r--src/interfaces/ecpg/preproc/parser.c231
-rw-r--r--src/interfaces/ecpg/preproc/pgc.c5005
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l1740
-rw-r--r--src/interfaces/ecpg/preproc/po/cs.po695
-rw-r--r--src/interfaces/ecpg/preproc/po/de.po700
-rw-r--r--src/interfaces/ecpg/preproc/po/el.po700
-rw-r--r--src/interfaces/ecpg/preproc/po/es.po706
-rw-r--r--src/interfaces/ecpg/preproc/po/fr.po757
-rw-r--r--src/interfaces/ecpg/preproc/po/it.po679
-rw-r--r--src/interfaces/ecpg/preproc/po/ja.po701
-rw-r--r--src/interfaces/ecpg/preproc/po/ko.po690
-rw-r--r--src/interfaces/ecpg/preproc/po/pl.po674
-rw-r--r--src/interfaces/ecpg/preproc/po/pt_BR.po653
-rw-r--r--src/interfaces/ecpg/preproc/po/ru.po741
-rw-r--r--src/interfaces/ecpg/preproc/po/sv.po699
-rw-r--r--src/interfaces/ecpg/preproc/po/tr.po699
-rw-r--r--src/interfaces/ecpg/preproc/po/uk.po683
-rw-r--r--src/interfaces/ecpg/preproc/po/vi.po684
-rw-r--r--src/interfaces/ecpg/preproc/po/zh_CN.po693
-rw-r--r--src/interfaces/ecpg/preproc/po/zh_TW.po645
-rw-r--r--src/interfaces/ecpg/preproc/preproc.c65497
-rw-r--r--src/interfaces/ecpg/preproc/preproc.h662
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y18828
-rw-r--r--src/interfaces/ecpg/preproc/preproc_extern.h128
-rw-r--r--src/interfaces/ecpg/preproc/type.c748
-rw-r--r--src/interfaces/ecpg/preproc/type.h216
-rw-r--r--src/interfaces/ecpg/preproc/variable.c625
-rw-r--r--src/interfaces/ecpg/test/.gitignore5
-rw-r--r--src/interfaces/ecpg/test/Makefile101
-rw-r--r--src/interfaces/ecpg/test/Makefile.regress31
-rw-r--r--src/interfaces/ecpg/test/compat_informix/.gitignore18
-rw-r--r--src/interfaces/ecpg/test/compat_informix/Makefile24
-rw-r--r--src/interfaces/ecpg/test/compat_informix/charfuncs.pgc31
-rw-r--r--src/interfaces/ecpg/test/compat_informix/dec_test.pgc238
-rw-r--r--src/interfaces/ecpg/test/compat_informix/describe.pgc199
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc175
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc73
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rnull.pgc97
-rw-r--r--src/interfaces/ecpg/test/compat_informix/sqlda.pgc250
-rw-r--r--src/interfaces/ecpg/test/compat_informix/test_informix.pgc95
-rw-r--r--src/interfaces/ecpg/test/compat_informix/test_informix2.pgc122
-rw-r--r--src/interfaces/ecpg/test/compat_oracle/.gitignore2
-rw-r--r--src/interfaces/ecpg/test/compat_oracle/Makefile11
-rw-r--r--src/interfaces/ecpg/test/compat_oracle/char_array.pgc64
-rw-r--r--src/interfaces/ecpg/test/connect/.gitignore10
-rw-r--r--src/interfaces/ecpg/test/connect/Makefile12
-rw-r--r--src/interfaces/ecpg/test/connect/README9
-rw-r--r--src/interfaces/ecpg/test/connect/test1.pgc65
-rw-r--r--src/interfaces/ecpg/test/connect/test2.pgc46
-rw-r--r--src/interfaces/ecpg/test/connect/test3.pgc52
-rw-r--r--src/interfaces/ecpg/test/connect/test4.pgc20
-rw-r--r--src/interfaces/ecpg/test/connect/test5.pgc76
-rw-r--r--src/interfaces/ecpg/test/ecpg_schedule61
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c42
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stdout6
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-dec_test.c291
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-dec_test.stderr2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout1293
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-describe.c467
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-describe.stderr112
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-describe.stdout24
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c186
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stderr2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stdout36
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c84
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stderr2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stdout10
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.c293
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr124
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.stdout22
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-sqlda.c530
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr340
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-sqlda.stdout48
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix.c259
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr133
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix.stdout10
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c290
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr64
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stdout2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_oracle-char_array.c223
-rw-r--r--src/interfaces/ecpg/test/expected/compat_oracle-char_array.stderr139
-rw-r--r--src/interfaces/ecpg/test/expected/compat_oracle-char_array.stdout10
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr73
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.c124
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.stderr73
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test2.c104
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test2.stderr52
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test2.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test3.c106
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test3.stderr38
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test3.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test4.c44
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test4.stderr6
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test4.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.c158
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.stderr80
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c469
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr48
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stdout52
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c186
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stderr2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout122
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c266
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr360
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stdout16
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c202
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr32
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stdout8
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c290
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stderr2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout1117
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.c288
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr86
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.stdout25
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-autoprep.c256
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-autoprep.stderr320
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-autoprep.stdout18
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-comment.c42
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-comment.stderr6
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-comment.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-cursor.c859
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-cursor.stderr412
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-cursor.stdout24
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-define.c184
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-define.stderr54
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-define.stdout2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-describe.c481
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-describe.stderr140
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-describe.stdout4
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-init.c261
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-init.stderr14
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-init.stdout10
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-outofscope.c372
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-outofscope.stderr114
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-outofscope.stdout3
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c293
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr86
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stdout25
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-strings.c82
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-strings.stderr56
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-strings.stdout2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-type.c170
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-type.stderr40
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-type.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-variable.c276
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-variable.stderr168
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-variable.stdout5
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever.c246
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever.stderr104
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.c164
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stderr112
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stdout2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-array.c355
-rw-r--r--src/interfaces/ecpg/test/expected/sql-array.stderr130
-rw-r--r--src/interfaces/ecpg/test/expected/sql-array.stdout13
-rw-r--r--src/interfaces/ecpg/test/expected/sql-binary.c230
-rw-r--r--src/interfaces/ecpg/test/expected/sql-binary.stderr102
-rw-r--r--src/interfaces/ecpg/test/expected/sql-binary.stdout3
-rw-r--r--src/interfaces/ecpg/test/expected/sql-bytea.c373
-rw-r--r--src/interfaces/ecpg/test/expected/sql-bytea.stderr191
-rw-r--r--src/interfaces/ecpg/test/expected/sql-bytea.stdout9
-rw-r--r--src/interfaces/ecpg/test/expected/sql-code100.c164
-rw-r--r--src/interfaces/ecpg/test/expected/sql-code100.stderr128
-rw-r--r--src/interfaces/ecpg/test/expected/sql-code100.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/sql-copystdout.c150
-rw-r--r--src/interfaces/ecpg/test/expected/sql-copystdout.stderr38
-rw-r--r--src/interfaces/ecpg/test/expected/sql-copystdout.stdout4
-rw-r--r--src/interfaces/ecpg/test/expected/sql-createtableas.c164
-rw-r--r--src/interfaces/ecpg/test/expected/sql-createtableas.stderr66
-rw-r--r--src/interfaces/ecpg/test/expected/sql-createtableas.stdout2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-declare.c618
-rw-r--r--src/interfaces/ecpg/test/expected/sql-declare.stderr266
-rw-r--r--src/interfaces/ecpg/test/expected/sql-declare.stdout18
-rw-r--r--src/interfaces/ecpg/test/expected/sql-define.c205
-rw-r--r--src/interfaces/ecpg/test/expected/sql-define.stderr52
-rw-r--r--src/interfaces/ecpg/test/expected/sql-define.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/sql-desc.c377
-rw-r--r--src/interfaces/ecpg/test/expected/sql-desc.stderr140
-rw-r--r--src/interfaces/ecpg/test/expected/sql-desc.stdout4
-rw-r--r--src/interfaces/ecpg/test/expected/sql-describe.c465
-rw-r--r--src/interfaces/ecpg/test/expected/sql-describe.stderr112
-rw-r--r--src/interfaces/ecpg/test/expected/sql-describe.stdout24
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc.c340
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc.stderr102
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc.stdout4
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc2.c256
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr98
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc2.stdout8
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dyntest.c486
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dyntest.stderr390
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dyntest.stdout43
-rw-r--r--src/interfaces/ecpg/test/expected/sql-execute.c331
-rw-r--r--src/interfaces/ecpg/test/expected/sql-execute.stderr172
-rw-r--r--src/interfaces/ecpg/test/expected/sql-execute.stdout12
-rw-r--r--src/interfaces/ecpg/test/expected/sql-fetch.c237
-rw-r--r--src/interfaces/ecpg/test/expected/sql-fetch.stderr142
-rw-r--r--src/interfaces/ecpg/test/expected/sql-fetch.stdout6
-rw-r--r--src/interfaces/ecpg/test/expected/sql-func.c170
-rw-r--r--src/interfaces/ecpg/test/expected/sql-func.stderr76
-rw-r--r--src/interfaces/ecpg/test/expected/sql-func.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/sql-indicators.c189
-rw-r--r--src/interfaces/ecpg/test/expected/sql-indicators.stderr88
-rw-r--r--src/interfaces/ecpg/test/expected/sql-indicators.stdout3
-rw-r--r--src/interfaces/ecpg/test/expected/sql-insupd.c145
-rw-r--r--src/interfaces/ecpg/test/expected/sql-insupd.stderr74
-rw-r--r--src/interfaces/ecpg/test/expected/sql-insupd.stdout7
-rw-r--r--src/interfaces/ecpg/test/expected/sql-oldexec.c251
-rw-r--r--src/interfaces/ecpg/test/expected/sql-oldexec.stderr154
-rw-r--r--src/interfaces/ecpg/test/expected/sql-oldexec.stdout11
-rw-r--r--src/interfaces/ecpg/test/expected/sql-parser.c126
-rw-r--r--src/interfaces/ecpg/test/expected/sql-parser.stderr50
-rw-r--r--src/interfaces/ecpg/test/expected/sql-parser.stdout3
-rw-r--r--src/interfaces/ecpg/test/expected/sql-prepareas.c664
-rw-r--r--src/interfaces/ecpg/test/expected/sql-prepareas.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/sql-prepareas.stdout66
-rw-r--r--src/interfaces/ecpg/test/expected/sql-quote.c230
-rw-r--r--src/interfaces/ecpg/test/expected/sql-quote.stderr135
-rw-r--r--src/interfaces/ecpg/test/expected/sql-quote.stdout6
-rw-r--r--src/interfaces/ecpg/test/expected/sql-show.c170
-rw-r--r--src/interfaces/ecpg/test/expected/sql-show.stderr76
-rw-r--r--src/interfaces/ecpg/test/expected/sql-show.stdout5
-rw-r--r--src/interfaces/ecpg/test/expected/sql-sqlda.c545
-rw-r--r--src/interfaces/ecpg/test/expected/sql-sqlda.stderr460
-rw-r--r--src/interfaces/ecpg/test/expected/sql-sqlda.stdout84
-rw-r--r--src/interfaces/ecpg/test/expected/sql-twophase.c114
-rw-r--r--src/interfaces/ecpg/test/expected/sql-twophase.stderr34
-rw-r--r--src/interfaces/ecpg/test/expected/sql-twophase.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-alloc.c218
-rw-r--r--src/interfaces/ecpg/test/expected/thread-alloc.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-alloc.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-alloc_2.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/thread-descriptor.c161
-rw-r--r--src/interfaces/ecpg/test/expected/thread-descriptor.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-descriptor.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-prep.c259
-rw-r--r--src/interfaces/ecpg/test/expected/thread-prep.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-prep.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/thread-prep_2.stdout0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread.c216
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_2.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.c216
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.stderr0
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.stdout1
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit_2.stdout1
-rw-r--r--src/interfaces/ecpg/test/performance/perftest.pgc144
-rw-r--r--src/interfaces/ecpg/test/pg_regress_ecpg.c261
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/.gitignore10
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/Makefile12
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc385
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc151
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc87
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/num_test.pgc105
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc239
-rw-r--r--src/interfaces/ecpg/test/preproc/.gitignore26
-rw-r--r--src/interfaces/ecpg/test/preproc/Makefile33
-rw-r--r--src/interfaces/ecpg/test/preproc/array_of_struct.pgc95
-rw-r--r--src/interfaces/ecpg/test/preproc/autoprep.pgc72
-rw-r--r--src/interfaces/ecpg/test/preproc/comment.pgc21
-rw-r--r--src/interfaces/ecpg/test/preproc/cursor.pgc256
-rw-r--r--src/interfaces/ecpg/test/preproc/define.pgc78
-rw-r--r--src/interfaces/ecpg/test/preproc/init.pgc100
-rw-r--r--src/interfaces/ecpg/test/preproc/outofscope.pgc116
-rw-r--r--src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc100
-rw-r--r--src/interfaces/ecpg/test/preproc/strings.h8
-rw-r--r--src/interfaces/ecpg/test/preproc/strings.pgc32
-rw-r--r--src/interfaces/ecpg/test/preproc/struct.h19
-rw-r--r--src/interfaces/ecpg/test/preproc/type.pgc80
-rw-r--r--src/interfaces/ecpg/test/preproc/variable.pgc101
-rw-r--r--src/interfaces/ecpg/test/preproc/whenever.pgc67
-rw-r--r--src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc63
-rw-r--r--src/interfaces/ecpg/test/printf_hack.h29
-rw-r--r--src/interfaces/ecpg/test/regression.h5
-rw-r--r--src/interfaces/ecpg/test/sql/.gitignore50
-rw-r--r--src/interfaces/ecpg/test/sql/Makefile36
-rw-r--r--src/interfaces/ecpg/test/sql/array.pgc111
-rw-r--r--src/interfaces/ecpg/test/sql/binary.pgc70
-rw-r--r--src/interfaces/ecpg/test/sql/bytea.pgc120
-rw-r--r--src/interfaces/ecpg/test/sql/code100.pgc52
-rw-r--r--src/interfaces/ecpg/test/sql/copystdout.pgc25
-rw-r--r--src/interfaces/ecpg/test/sql/createtableas.pgc41
-rw-r--r--src/interfaces/ecpg/test/sql/declare.pgc212
-rw-r--r--src/interfaces/ecpg/test/sql/define.pgc58
-rw-r--r--src/interfaces/ecpg/test/sql/desc.pgc89
-rw-r--r--src/interfaces/ecpg/test/sql/describe.pgc199
-rw-r--r--src/interfaces/ecpg/test/sql/dynalloc.pgc89
-rw-r--r--src/interfaces/ecpg/test/sql/dynalloc2.pgc55
-rw-r--r--src/interfaces/ecpg/test/sql/dyntest.pgc199
-rw-r--r--src/interfaces/ecpg/test/sql/execute.pgc113
-rw-r--r--src/interfaces/ecpg/test/sql/fetch.pgc58
-rw-r--r--src/interfaces/ecpg/test/sql/func.pgc47
-rw-r--r--src/interfaces/ecpg/test/sql/indicators.pgc50
-rw-r--r--src/interfaces/ecpg/test/sql/insupd.pgc36
-rw-r--r--src/interfaces/ecpg/test/sql/oldexec.pgc90
-rw-r--r--src/interfaces/ecpg/test/sql/parser.pgc39
-rw-r--r--src/interfaces/ecpg/test/sql/prepareas.pgc198
-rw-r--r--src/interfaces/ecpg/test/sql/quote.pgc61
-rw-r--r--src/interfaces/ecpg/test/sql/show.pgc41
-rw-r--r--src/interfaces/ecpg/test/sql/sqlda.pgc266
-rw-r--r--src/interfaces/ecpg/test/sql/twophase.pgc44
-rw-r--r--src/interfaces/ecpg/test/thread/.gitignore10
-rw-r--r--src/interfaces/ecpg/test/thread/Makefile13
-rw-r--r--src/interfaces/ecpg/test/thread/alloc.pgc90
-rw-r--r--src/interfaces/ecpg/test/thread/descriptor.pgc68
-rw-r--r--src/interfaces/ecpg/test/thread/prep.pgc96
-rw-r--r--src/interfaces/ecpg/test/thread/thread.pgc136
-rw-r--r--src/interfaces/ecpg/test/thread/thread_implicit.pgc136
-rw-r--r--src/interfaces/libpq/.gitignore1
-rw-r--r--src/interfaces/libpq/Makefile142
-rw-r--r--src/interfaces/libpq/README3
-rw-r--r--src/interfaces/libpq/exports.txt188
-rw-r--r--src/interfaces/libpq/fe-auth-scram.c905
-rw-r--r--src/interfaces/libpq/fe-auth.c1285
-rw-r--r--src/interfaces/libpq/fe-auth.h36
-rw-r--r--src/interfaces/libpq/fe-connect.c7367
-rw-r--r--src/interfaces/libpq/fe-exec.c4451
-rw-r--r--src/interfaces/libpq/fe-gssapi-common.c130
-rw-r--r--src/interfaces/libpq/fe-gssapi-common.h28
-rw-r--r--src/interfaces/libpq/fe-lobj.c1084
-rw-r--r--src/interfaces/libpq/fe-misc.c1289
-rw-r--r--src/interfaces/libpq/fe-print.c781
-rw-r--r--src/interfaces/libpq/fe-protocol3.c2254
-rw-r--r--src/interfaces/libpq/fe-secure-common.c211
-rw-r--r--src/interfaces/libpq/fe-secure-common.h26
-rw-r--r--src/interfaces/libpq/fe-secure-gssapi.c731
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c1884
-rw-r--r--src/interfaces/libpq/fe-secure.c552
-rw-r--r--src/interfaces/libpq/fe-trace.c729
-rw-r--r--src/interfaces/libpq/legacy-pqsignal.c57
-rw-r--r--src/interfaces/libpq/libpq-events.c209
-rw-r--r--src/interfaces/libpq/libpq-events.h94
-rw-r--r--src/interfaces/libpq/libpq-fe.h672
-rw-r--r--src/interfaces/libpq/libpq-int.h866
-rw-r--r--src/interfaces/libpq/nls.mk6
-rw-r--r--src/interfaces/libpq/pg_service.conf.sample17
-rw-r--r--src/interfaces/libpq/po/cs.po1334
-rw-r--r--src/interfaces/libpq/po/de.po1221
-rw-r--r--src/interfaces/libpq/po/el.po1314
-rw-r--r--src/interfaces/libpq/po/es.po1227
-rw-r--r--src/interfaces/libpq/po/fr.po1461
-rw-r--r--src/interfaces/libpq/po/ja.po1231
-rw-r--r--src/interfaces/libpq/po/ko.po1340
-rw-r--r--src/interfaces/libpq/po/ru.po1465
-rw-r--r--src/interfaces/libpq/po/sv.po1225
-rw-r--r--src/interfaces/libpq/po/uk.po1212
-rw-r--r--src/interfaces/libpq/po/zh_CN.po1193
-rw-r--r--src/interfaces/libpq/pqexpbuffer.c414
-rw-r--r--src/interfaces/libpq/pqexpbuffer.h182
-rw-r--r--src/interfaces/libpq/pthread-win32.c60
-rw-r--r--src/interfaces/libpq/test/.gitignore3
-rw-r--r--src/interfaces/libpq/test/Makefile22
-rw-r--r--src/interfaces/libpq/test/README7
-rw-r--r--src/interfaces/libpq/test/expected.out171
-rw-r--r--src/interfaces/libpq/test/regress.in57
-rw-r--r--src/interfaces/libpq/test/regress.pl65
-rw-r--r--src/interfaces/libpq/test/uri-regress.c84
-rw-r--r--src/interfaces/libpq/win32.c324
-rw-r--r--src/interfaces/libpq/win32.h23
455 files changed, 208891 insertions, 0 deletions
diff --git a/src/interfaces/Makefile b/src/interfaces/Makefile
new file mode 100644
index 0000000..7d56b29
--- /dev/null
+++ b/src/interfaces/Makefile
@@ -0,0 +1,20 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# src/interfaces/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+
+SUBDIRS = libpq ecpg
+
+$(recurse)
+
+all-ecpg-recurse: all-libpq-recurse
+install-ecpg-recurse: install-libpq-recurse
diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile
new file mode 100644
index 0000000..e4bbf7b
--- /dev/null
+++ b/src/interfaces/ecpg/Makefile
@@ -0,0 +1,31 @@
+subdir = src/interfaces/ecpg
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+SUBDIRS = include pgtypeslib ecpglib compatlib preproc
+
+# Suppress parallel build of subdirectories to avoid a bug in GNU make 3.82, cf
+# https://savannah.gnu.org/bugs/?30653
+# https://bugzilla.redhat.com/show_bug.cgi?id=835424
+# (There are some other parallelism bugs in the subdirectory makefiles
+# themselves, but there's little point in fixing them as long as we have
+# to use this big hammer.)
+ifeq ($(MAKE_VERSION),3.82)
+.NOTPARALLEL:
+endif
+
+$(recurse)
+
+all-pgtypeslib-recurse all-ecpglib-recurse all-compatlib-recurse all-preproc-recurse: all-include-recurse
+all-compatlib-recurse: all-ecpglib-recurse
+all-ecpglib-recurse: all-pgtypeslib-recurse
+install-pgtypeslib-recurse install-ecpglib-recurse install-compatlib-recurse install-preproc-recurse: install-include-recurse
+install-compatlib-recurse: install-ecpglib-recurse
+install-ecpglib-recurse: install-pgtypeslib-recurse
+
+clean distclean maintainer-clean:
+ $(MAKE) -C test clean
+
+checktcp: | temp-install
+check checktcp installcheck:
+ $(MAKE) -C test $@
diff --git a/src/interfaces/ecpg/README.dynSQL b/src/interfaces/ecpg/README.dynSQL
new file mode 100644
index 0000000..b021f4b
--- /dev/null
+++ b/src/interfaces/ecpg/README.dynSQL
@@ -0,0 +1,11 @@
+src/interfaces/ecpg/README.dynSQL
+
+descriptor statements have the following shortcomings
+
+- input descriptors (USING DESCRIPTOR <name>) are not supported
+
+ Reason: to fully support dynamic SQL the frontend/backend communication
+ should change to recognize input parameters.
+ Since this is not likely to happen in the near future and you
+ can cover the same functionality with the existing infrastructure
+ (using s[n]printf), I'll leave the work to someone else.
diff --git a/src/interfaces/ecpg/compatlib/.gitignore b/src/interfaces/ecpg/compatlib/.gitignore
new file mode 100644
index 0000000..926385c
--- /dev/null
+++ b/src/interfaces/ecpg/compatlib/.gitignore
@@ -0,0 +1,3 @@
+/compatlib.def
+/blibecpg_compatdll.def
+/exports.list
diff --git a/src/interfaces/ecpg/compatlib/Makefile b/src/interfaces/ecpg/compatlib/Makefile
new file mode 100644
index 0000000..1c2866f
--- /dev/null
+++ b/src/interfaces/ecpg/compatlib/Makefile
@@ -0,0 +1,59 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg compatibility library
+#
+# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/interfaces/ecpg/compatlib/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces/ecpg/compatlib
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+PGFILEDESC = "ECPG compat - compatibility library for ECPG"
+NAME= ecpg_compat
+SO_MAJOR_VERSION= 3
+SO_MINOR_VERSION= $(MAJORVERSION)
+
+override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+SHLIB_LINK_INTERNAL = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq_pgport_shlib)
+SHLIB_LINK = $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS)
+SHLIB_PREREQS = submake-ecpglib submake-pgtypeslib
+
+SHLIB_EXPORTS = exports.txt
+
+OBJS = \
+ $(WIN32RES) \
+ informix.o
+
+PKG_CONFIG_REQUIRES_PRIVATE = libecpg libpgtypes
+
+all: all-lib
+
+.PHONY: submake-ecpglib submake-pgtypeslib
+
+submake-ecpglib:
+ $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/ecpglib all
+
+submake-pgtypeslib:
+ $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all
+
+# Shared library stuff
+include $(top_srcdir)/src/Makefile.shlib
+
+install: all installdirs install-lib
+
+installdirs: installdirs-lib
+
+uninstall: uninstall-lib
+
+clean distclean: clean-lib
+ rm -f $(OBJS)
+
+maintainer-clean: distclean
diff --git a/src/interfaces/ecpg/compatlib/exports.txt b/src/interfaces/ecpg/compatlib/exports.txt
new file mode 100644
index 0000000..86e9ca1
--- /dev/null
+++ b/src/interfaces/ecpg/compatlib/exports.txt
@@ -0,0 +1,44 @@
+# src/interfaces/ecpg/compatlib/exports.txt
+# Functions to be exported by libecpg_compat DLL
+ECPG_informix_get_var 1
+ECPG_informix_set_var 2
+decadd 3
+deccmp 4
+deccopy 5
+deccvasc 6
+deccvdbl 7
+deccvint 8
+deccvlong 9
+decdiv 10
+decmul 11
+decsub 12
+dectoasc 13
+dectodbl 14
+dectoint 15
+dectolong 16
+dtcurrent 17
+dtcvasc 18
+dtcvfmtasc 19
+dtsub 20
+dttoasc 21
+dttofmtasc 22
+intoasc 23
+rdatestr 24
+rdayofweek 25
+rdefmtdate 26
+rfmtdate 27
+rfmtlong 28
+rgetmsg 29
+risnull 30
+rjulmdy 31
+rmdyjul 32
+rsetnull 33
+rstrdate 34
+rtoday 35
+rtypalign 36
+rtypmsize 37
+rtypwidth 38
+rupshift 39
+ldchar 40
+byleng 41
+ECPG_informix_reset_sqlca 42
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
new file mode 100644
index 0000000..dccf395
--- /dev/null
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -0,0 +1,1027 @@
+/* src/interfaces/ecpg/compatlib/informix.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include <math.h>
+#include <ctype.h>
+#include <limits.h>
+
+#include "ecpg_informix.h"
+#include "ecpgerrno.h"
+#include "ecpgtype.h"
+#include "pgtypes_date.h"
+#include "pgtypes_error.h"
+#include "pgtypes_numeric.h"
+#include "sqlca.h"
+#include "sqltypes.h"
+
+/* this is also defined in ecpglib/misc.c, by defining it twice we don't have to export the symbol */
+
+static struct sqlca_t sqlca_init =
+{
+ {
+ 'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
+ },
+ sizeof(struct sqlca_t),
+ 0,
+ {
+ 0,
+ {
+ 0
+ }
+ },
+ {
+ 'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
+ },
+ {
+ 0, 0, 0, 0, 0, 0
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ {
+ '0', '0', '0', '0', '0'
+ }
+};
+static int
+deccall2(decimal *arg1, decimal *arg2, int (*ptr) (numeric *, numeric *))
+{
+ numeric *a1,
+ *a2;
+ int i;
+
+ if ((a1 = PGTYPESnumeric_new()) == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if ((a2 = PGTYPESnumeric_new()) == NULL)
+ {
+ PGTYPESnumeric_free(a1);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if (PGTYPESnumeric_from_decimal(arg1, a1) != 0)
+ {
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if (PGTYPESnumeric_from_decimal(arg2, a2) != 0)
+ {
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ i = (*ptr) (a1, a2);
+
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+
+ return i;
+}
+
+static int
+deccall3(decimal *arg1, decimal *arg2, decimal *result, int (*ptr) (numeric *, numeric *, numeric *))
+{
+ numeric *a1,
+ *a2,
+ *nres;
+ int i;
+
+ /*
+ * we must NOT set the result to NULL here because it may be the same
+ * variable as one of the arguments
+ */
+ if (risnull(CDECIMALTYPE, (char *) arg1) || risnull(CDECIMALTYPE, (char *) arg2))
+ return 0;
+
+ if ((a1 = PGTYPESnumeric_new()) == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if ((a2 = PGTYPESnumeric_new()) == NULL)
+ {
+ PGTYPESnumeric_free(a1);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if ((nres = PGTYPESnumeric_new()) == NULL)
+ {
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if (PGTYPESnumeric_from_decimal(arg1, a1) != 0)
+ {
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if (PGTYPESnumeric_from_decimal(arg2, a2) != 0)
+ {
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ i = (*ptr) (a1, a2, nres);
+
+ if (i == 0) /* No error */
+ {
+
+ /* set the result to null in case it errors out later */
+ rsetnull(CDECIMALTYPE, (char *) result);
+ PGTYPESnumeric_to_decimal(nres, result);
+ }
+
+ PGTYPESnumeric_free(nres);
+ PGTYPESnumeric_free(a1);
+ PGTYPESnumeric_free(a2);
+
+ return i;
+}
+
+/* we start with the numeric functions */
+int
+decadd(decimal *arg1, decimal *arg2, decimal *sum)
+{
+ errno = 0;
+ deccall3(arg1, arg2, sum, PGTYPESnumeric_add);
+
+ if (errno == PGTYPES_NUM_OVERFLOW)
+ return ECPG_INFORMIX_NUM_OVERFLOW;
+ else if (errno == PGTYPES_NUM_UNDERFLOW)
+ return ECPG_INFORMIX_NUM_UNDERFLOW;
+ else if (errno != 0)
+ return -1;
+ else
+ return 0;
+}
+
+int
+deccmp(decimal *arg1, decimal *arg2)
+{
+ return deccall2(arg1, arg2, PGTYPESnumeric_cmp);
+}
+
+void
+deccopy(decimal *src, decimal *target)
+{
+ memcpy(target, src, sizeof(decimal));
+}
+
+int
+deccvasc(const char *cp, int len, decimal *np)
+{
+ char *str;
+ int ret = 0;
+ numeric *result;
+
+ rsetnull(CDECIMALTYPE, (char *) np);
+ if (risnull(CSTRINGTYPE, cp))
+ return 0;
+
+ str = pnstrdup(cp, len); /* decimal_in always converts the complete
+ * string */
+ if (!str)
+ ret = ECPG_INFORMIX_NUM_UNDERFLOW;
+ else
+ {
+ errno = 0;
+ result = PGTYPESnumeric_from_asc(str, NULL);
+ if (!result)
+ {
+ switch (errno)
+ {
+ case PGTYPES_NUM_OVERFLOW:
+ ret = ECPG_INFORMIX_NUM_OVERFLOW;
+ break;
+ case PGTYPES_NUM_BAD_NUMERIC:
+ ret = ECPG_INFORMIX_BAD_NUMERIC;
+ break;
+ default:
+ ret = ECPG_INFORMIX_BAD_EXPONENT;
+ break;
+ }
+ }
+ else
+ {
+ int i = PGTYPESnumeric_to_decimal(result, np);
+
+ PGTYPESnumeric_free(result);
+ if (i != 0)
+ ret = ECPG_INFORMIX_NUM_OVERFLOW;
+ }
+ }
+
+ free(str);
+ return ret;
+}
+
+int
+deccvdbl(double dbl, decimal *np)
+{
+ numeric *nres;
+ int result = 1;
+
+ rsetnull(CDECIMALTYPE, (char *) np);
+ if (risnull(CDOUBLETYPE, (char *) &dbl))
+ return 0;
+
+ nres = PGTYPESnumeric_new();
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ result = PGTYPESnumeric_from_double(dbl, nres);
+ if (result == 0)
+ result = PGTYPESnumeric_to_decimal(nres, np);
+
+ PGTYPESnumeric_free(nres);
+ return result;
+}
+
+int
+deccvint(int in, decimal *np)
+{
+ numeric *nres;
+ int result = 1;
+
+ rsetnull(CDECIMALTYPE, (char *) np);
+ if (risnull(CINTTYPE, (char *) &in))
+ return 0;
+
+ nres = PGTYPESnumeric_new();
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ result = PGTYPESnumeric_from_int(in, nres);
+ if (result == 0)
+ result = PGTYPESnumeric_to_decimal(nres, np);
+
+ PGTYPESnumeric_free(nres);
+ return result;
+}
+
+int
+deccvlong(long lng, decimal *np)
+{
+ numeric *nres;
+ int result = 1;
+
+ rsetnull(CDECIMALTYPE, (char *) np);
+ if (risnull(CLONGTYPE, (char *) &lng))
+ return 0;
+
+ nres = PGTYPESnumeric_new();
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ result = PGTYPESnumeric_from_long(lng, nres);
+ if (result == 0)
+ result = PGTYPESnumeric_to_decimal(nres, np);
+
+ PGTYPESnumeric_free(nres);
+ return result;
+}
+
+int
+decdiv(decimal *n1, decimal *n2, decimal *result)
+{
+ int i;
+
+ errno = 0;
+ i = deccall3(n1, n2, result, PGTYPESnumeric_div);
+
+ if (i != 0)
+ switch (errno)
+ {
+ case PGTYPES_NUM_DIVIDE_ZERO:
+ return ECPG_INFORMIX_DIVIDE_ZERO;
+ break;
+ case PGTYPES_NUM_OVERFLOW:
+ return ECPG_INFORMIX_NUM_OVERFLOW;
+ break;
+ default:
+ return ECPG_INFORMIX_NUM_UNDERFLOW;
+ break;
+ }
+
+ return 0;
+}
+
+int
+decmul(decimal *n1, decimal *n2, decimal *result)
+{
+ int i;
+
+ errno = 0;
+ i = deccall3(n1, n2, result, PGTYPESnumeric_mul);
+
+ if (i != 0)
+ switch (errno)
+ {
+ case PGTYPES_NUM_OVERFLOW:
+ return ECPG_INFORMIX_NUM_OVERFLOW;
+ break;
+ default:
+ return ECPG_INFORMIX_NUM_UNDERFLOW;
+ break;
+ }
+
+ return 0;
+}
+
+int
+decsub(decimal *n1, decimal *n2, decimal *result)
+{
+ int i;
+
+ errno = 0;
+ i = deccall3(n1, n2, result, PGTYPESnumeric_sub);
+
+ if (i != 0)
+ switch (errno)
+ {
+ case PGTYPES_NUM_OVERFLOW:
+ return ECPG_INFORMIX_NUM_OVERFLOW;
+ break;
+ default:
+ return ECPG_INFORMIX_NUM_UNDERFLOW;
+ break;
+ }
+
+ return 0;
+}
+
+int
+dectoasc(decimal *np, char *cp, int len, int right)
+{
+ char *str;
+ numeric *nres;
+
+ rsetnull(CSTRINGTYPE, (char *) cp);
+ if (risnull(CDECIMALTYPE, (char *) np))
+ return 0;
+
+ nres = PGTYPESnumeric_new();
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if (PGTYPESnumeric_from_decimal(np, nres) != 0)
+ {
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ if (right >= 0)
+ str = PGTYPESnumeric_to_asc(nres, right);
+ else
+ str = PGTYPESnumeric_to_asc(nres, nres->dscale);
+
+ PGTYPESnumeric_free(nres);
+ if (!str)
+ return -1;
+
+ /*
+ * TODO: have to take care of len here and create exponential notation if
+ * necessary
+ */
+ if ((int) (strlen(str) + 1) > len)
+ {
+ if (len > 1)
+ {
+ cp[0] = '*';
+ cp[1] = '\0';
+ }
+ free(str);
+ return -1;
+ }
+ else
+ {
+ strcpy(cp, str);
+ free(str);
+ return 0;
+ }
+}
+
+int
+dectodbl(decimal *np, double *dblp)
+{
+ int i;
+ numeric *nres = PGTYPESnumeric_new();
+
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if (PGTYPESnumeric_from_decimal(np, nres) != 0)
+ {
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ i = PGTYPESnumeric_to_double(nres, dblp);
+ PGTYPESnumeric_free(nres);
+
+ return i;
+}
+
+int
+dectoint(decimal *np, int *ip)
+{
+ int ret;
+ numeric *nres = PGTYPESnumeric_new();
+
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if (PGTYPESnumeric_from_decimal(np, nres) != 0)
+ {
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ ret = PGTYPESnumeric_to_int(nres, ip);
+ PGTYPESnumeric_free(nres);
+
+ if (ret == PGTYPES_NUM_OVERFLOW)
+ ret = ECPG_INFORMIX_NUM_OVERFLOW;
+
+ return ret;
+}
+
+int
+dectolong(decimal *np, long *lngp)
+{
+ int ret;
+ numeric *nres = PGTYPESnumeric_new();
+
+ if (nres == NULL)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ if (PGTYPESnumeric_from_decimal(np, nres) != 0)
+ {
+ PGTYPESnumeric_free(nres);
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+ }
+
+ ret = PGTYPESnumeric_to_long(nres, lngp);
+ PGTYPESnumeric_free(nres);
+
+ if (ret == PGTYPES_NUM_OVERFLOW)
+ ret = ECPG_INFORMIX_NUM_OVERFLOW;
+
+ return ret;
+}
+
+/* Now the date functions */
+int
+rdatestr(date d, char *str)
+{
+ char *tmp = PGTYPESdate_to_asc(d);
+
+ if (!tmp)
+ return ECPG_INFORMIX_DATE_CONVERT;
+
+ /* move to user allocated buffer */
+ strcpy(str, tmp);
+ free(tmp);
+
+ return 0;
+}
+
+/*
+*
+* the input for this function is mmddyyyy and any non-numeric
+* character can be used as a separator
+*
+*/
+int
+rstrdate(const char *str, date * d)
+{
+ return rdefmtdate(d, "mm/dd/yyyy", str);
+}
+
+void
+rtoday(date * d)
+{
+ PGTYPESdate_today(d);
+}
+
+int
+rjulmdy(date d, short *mdy)
+{
+ int mdy_int[3];
+
+ PGTYPESdate_julmdy(d, mdy_int);
+ mdy[0] = (short) mdy_int[0];
+ mdy[1] = (short) mdy_int[1];
+ mdy[2] = (short) mdy_int[2];
+ return 0;
+}
+
+int
+rdefmtdate(date * d, const char *fmt, const char *str)
+{
+ /* TODO: take care of DBCENTURY environment variable */
+ /* PGSQL functions allow all centuries */
+
+ errno = 0;
+ if (PGTYPESdate_defmt_asc(d, fmt, str) == 0)
+ return 0;
+
+ switch (errno)
+ {
+ case PGTYPES_DATE_ERR_ENOSHORTDATE:
+ return ECPG_INFORMIX_ENOSHORTDATE;
+ case PGTYPES_DATE_ERR_EARGS:
+ case PGTYPES_DATE_ERR_ENOTDMY:
+ return ECPG_INFORMIX_ENOTDMY;
+ case PGTYPES_DATE_BAD_DAY:
+ return ECPG_INFORMIX_BAD_DAY;
+ case PGTYPES_DATE_BAD_MONTH:
+ return ECPG_INFORMIX_BAD_MONTH;
+ default:
+ return ECPG_INFORMIX_BAD_YEAR;
+ }
+}
+
+int
+rfmtdate(date d, const char *fmt, char *str)
+{
+ errno = 0;
+ if (PGTYPESdate_fmt_asc(d, fmt, str) == 0)
+ return 0;
+
+ if (errno == ENOMEM)
+ return ECPG_INFORMIX_OUT_OF_MEMORY;
+
+ return ECPG_INFORMIX_DATE_CONVERT;
+}
+
+int
+rmdyjul(short *mdy, date * d)
+{
+ int mdy_int[3];
+
+ mdy_int[0] = mdy[0];
+ mdy_int[1] = mdy[1];
+ mdy_int[2] = mdy[2];
+ PGTYPESdate_mdyjul(mdy_int, d);
+ return 0;
+}
+
+int
+rdayofweek(date d)
+{
+ return PGTYPESdate_dayofweek(d);
+}
+
+/* And the datetime stuff */
+
+void
+dtcurrent(timestamp * ts)
+{
+ PGTYPEStimestamp_current(ts);
+}
+
+int
+dtcvasc(char *str, timestamp * ts)
+{
+ timestamp ts_tmp;
+ int i;
+ char **endptr = &str;
+
+ errno = 0;
+ ts_tmp = PGTYPEStimestamp_from_asc(str, endptr);
+ i = errno;
+ if (i)
+ /* TODO: rewrite to Informix error codes */
+ return i;
+ if (**endptr)
+ {
+ /* extra characters exist at the end */
+ return ECPG_INFORMIX_EXTRA_CHARS;
+ }
+ /* TODO: other Informix error codes missing */
+
+ /* everything went fine */
+ *ts = ts_tmp;
+
+ return 0;
+}
+
+int
+dtcvfmtasc(char *inbuf, char *fmtstr, timestamp * dtvalue)
+{
+ return PGTYPEStimestamp_defmt_asc(inbuf, fmtstr, dtvalue);
+}
+
+int
+dtsub(timestamp * ts1, timestamp * ts2, interval * iv)
+{
+ return PGTYPEStimestamp_sub(ts1, ts2, iv);
+}
+
+int
+dttoasc(timestamp * ts, char *output)
+{
+ char *asctime = PGTYPEStimestamp_to_asc(*ts);
+
+ strcpy(output, asctime);
+ free(asctime);
+ return 0;
+}
+
+int
+dttofmtasc(timestamp * ts, char *output, int str_len, char *fmtstr)
+{
+ return PGTYPEStimestamp_fmt_asc(ts, output, str_len, fmtstr);
+}
+
+int
+intoasc(interval * i, char *str)
+{
+ char *tmp;
+
+ errno = 0;
+ tmp = PGTYPESinterval_to_asc(i);
+
+ if (!tmp)
+ return -errno;
+
+ memcpy(str, tmp, strlen(tmp));
+ free(tmp);
+ return 0;
+}
+
+static struct
+{
+ long val;
+ int maxdigits;
+ int digits;
+ int remaining;
+ char sign;
+ char *val_string;
+} value;
+
+/**
+ * initialize the struct, which holds the different forms
+ * of the long value
+ */
+static int
+initValue(long lng_val)
+{
+ int i,
+ j;
+ long l,
+ dig;
+
+ /* set some obvious things */
+ value.val = lng_val >= 0 ? lng_val : lng_val * (-1);
+ value.sign = lng_val >= 0 ? '+' : '-';
+ value.maxdigits = log10(2) * (8 * sizeof(long) - 1);
+
+ /* determine the number of digits */
+ i = 0;
+ l = 1;
+ do
+ {
+ i++;
+ l *= 10;
+ }
+ while ((l - 1) < value.val && l <= LONG_MAX / 10);
+
+ if (l <= LONG_MAX / 10)
+ {
+ value.digits = i;
+ l /= 10;
+ }
+ else
+ value.digits = i + 1;
+
+ value.remaining = value.digits;
+
+ /* convert the long to string */
+ if ((value.val_string = (char *) malloc(value.digits + 1)) == NULL)
+ return -1;
+ dig = value.val;
+ for (i = value.digits, j = 0; i > 0; i--, j++)
+ {
+ value.val_string[j] = dig / l + '0';
+ dig = dig % l;
+ l /= 10;
+ }
+ value.val_string[value.digits] = '\0';
+ return 0;
+}
+
+/* return the position of the right-most dot in some string */
+static int
+getRightMostDot(const char *str)
+{
+ size_t len = strlen(str);
+ int i,
+ j;
+
+ j = 0;
+ for (i = len - 1; i >= 0; i--)
+ {
+ if (str[i] == '.')
+ return len - j - 1;
+ j++;
+ }
+ return -1;
+}
+
+/* And finally some misc functions */
+int
+rfmtlong(long lng_val, const char *fmt, char *outbuf)
+{
+ size_t fmt_len = strlen(fmt);
+ size_t temp_len;
+ int i,
+ j, /* position in temp */
+ k,
+ dotpos;
+ int leftalign = 0,
+ blank = 0,
+ sign = 0,
+ entitydone = 0,
+ signdone = 0,
+ brackets_ok = 0;
+ char *temp;
+ char tmp[2] = " ";
+ char lastfmt = ' ',
+ fmtchar = ' ';
+
+ temp = (char *) malloc(fmt_len + 1);
+ if (!temp)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* put all info about the long in a struct */
+ if (initValue(lng_val) == -1)
+ {
+ free(temp);
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* '<' is the only format, where we have to align left */
+ if (strchr(fmt, (int) '<'))
+ leftalign = 1;
+
+ /* '(' requires ')' */
+ if (strchr(fmt, (int) '(') && strchr(fmt, (int) ')'))
+ brackets_ok = 1;
+
+ /* get position of the right-most dot in the format-string */
+ /* and fill the temp-string wit '0's up to there. */
+ dotpos = getRightMostDot(fmt);
+
+ /* start to parse the format-string */
+ temp[0] = '\0';
+ k = value.digits - 1; /* position in the value_string */
+ for (i = fmt_len - 1, j = 0; i >= 0; i--, j++)
+ {
+ /* qualify, where we are in the value_string */
+ if (k < 0)
+ {
+ blank = 1;
+ if (k == -1)
+ sign = 1;
+ if (leftalign)
+ {
+ /* can't use strncat(,,0) here, Solaris would freak out */
+ if (sign)
+ if (signdone)
+ {
+ temp[j] = '\0';
+ break;
+ }
+ }
+ }
+ /* if we're right side of the right-most dot, print '0' */
+ if (dotpos >= 0 && dotpos <= i)
+ {
+ if (dotpos < i)
+ {
+ if (fmt[i] == ')')
+ tmp[0] = value.sign == '-' ? ')' : ' ';
+ else
+ tmp[0] = '0';
+ }
+ else
+ tmp[0] = '.';
+ strcat(temp, tmp);
+ continue;
+ }
+ /* the ',' needs special attention, if it is in the blank area */
+ if (blank && fmt[i] == ',')
+ fmtchar = lastfmt;
+ else
+ fmtchar = fmt[i];
+ /* waiting for the sign */
+ if (k < 0 && leftalign && sign && !signdone && fmtchar != '+' && fmtchar != '-')
+ continue;
+ /* analyse this format-char */
+ switch (fmtchar)
+ {
+ case ',':
+ tmp[0] = ',';
+ k++;
+ break;
+ case '*':
+ if (blank)
+ tmp[0] = '*';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '&':
+ if (blank)
+ tmp[0] = '0';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '#':
+ if (blank)
+ tmp[0] = ' ';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '-':
+ if (sign && value.sign == '-' && !signdone)
+ {
+ tmp[0] = '-';
+ signdone = 1;
+ }
+ else if (blank)
+ tmp[0] = ' ';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '+':
+ if (sign && !signdone)
+ {
+ tmp[0] = value.sign;
+ signdone = 1;
+ }
+ else if (blank)
+ tmp[0] = ' ';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '(':
+ if (sign && brackets_ok && value.sign == '-')
+ tmp[0] = '(';
+ else if (blank)
+ tmp[0] = ' ';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case ')':
+ if (brackets_ok && value.sign == '-')
+ tmp[0] = ')';
+ else
+ tmp[0] = ' ';
+ break;
+ case '$':
+ if (blank && !entitydone)
+ {
+ tmp[0] = '$';
+ entitydone = 1;
+ }
+ else if (blank)
+ tmp[0] = ' ';
+ else
+ tmp[0] = value.val_string[k];
+ break;
+ case '<':
+ tmp[0] = value.val_string[k];
+ break;
+ default:
+ tmp[0] = fmt[i];
+ }
+ strcat(temp, tmp);
+ lastfmt = fmt[i];
+ k--;
+ }
+ /* safety-net */
+ temp[fmt_len] = '\0';
+
+ /* reverse the temp-string and put it into the outbuf */
+ temp_len = strlen(temp);
+ outbuf[0] = '\0';
+ for (i = temp_len - 1; i >= 0; i--)
+ {
+ tmp[0] = temp[i];
+ strcat(outbuf, tmp);
+ }
+ outbuf[temp_len] = '\0';
+
+ /* cleaning up */
+ free(temp);
+ free(value.val_string);
+
+ return 0;
+}
+
+void
+rupshift(char *str)
+{
+ for (; *str != '\0'; str++)
+ if (islower((unsigned char) *str))
+ *str = toupper((unsigned char) *str);
+}
+
+int
+byleng(char *str, int len)
+{
+ for (len--; str[len] && str[len] == ' '; len--);
+ return (len + 1);
+}
+
+void
+ldchar(char *src, int len, char *dest)
+{
+ int dlen = byleng(src, len);
+
+ memmove(dest, src, dlen);
+ dest[dlen] = '\0';
+}
+
+int
+rgetmsg(int msgnum, char *s, int maxsize)
+{
+ (void) msgnum; /* keep the compiler quiet */
+ (void) s; /* keep the compiler quiet */
+ (void) maxsize; /* keep the compiler quiet */
+ return 0;
+}
+
+int
+rtypalign(int offset, int type)
+{
+ (void) offset; /* keep the compiler quiet */
+ (void) type; /* keep the compiler quiet */
+ return 0;
+}
+
+int
+rtypmsize(int type, int len)
+{
+ (void) type; /* keep the compiler quiet */
+ (void) len; /* keep the compiler quiet */
+ return 0;
+}
+
+int
+rtypwidth(int sqltype, int sqllen)
+{
+ (void) sqltype; /* keep the compiler quiet */
+ (void) sqllen; /* keep the compiler quiet */
+ return 0;
+}
+
+void
+ECPG_informix_set_var(int number, void *pointer, int lineno)
+{
+ ECPGset_var(number, pointer, lineno);
+}
+
+void *
+ECPG_informix_get_var(int number)
+{
+ return ECPGget_var(number);
+}
+
+void
+ECPG_informix_reset_sqlca(void)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ return;
+
+ memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
+}
+
+int
+rsetnull(int t, char *ptr)
+{
+ ECPGset_noind_null(t, ptr);
+ return 0;
+}
+
+int
+risnull(int t, const char *ptr)
+{
+ return ECPGis_noind_null(t, ptr);
+}
diff --git a/src/interfaces/ecpg/ecpglib/.gitignore b/src/interfaces/ecpg/ecpglib/.gitignore
new file mode 100644
index 0000000..f2bf3e7
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/.gitignore
@@ -0,0 +1,3 @@
+/ecpglib.def
+/blibecpgdll.def
+/exports.list
diff --git a/src/interfaces/ecpg/ecpglib/Makefile b/src/interfaces/ecpg/ecpglib/Makefile
new file mode 100644
index 0000000..13c4beb
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/Makefile
@@ -0,0 +1,70 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg library
+#
+# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/interfaces/ecpg/ecpglib/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces/ecpg/ecpglib
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+PGFILEDESC = "ECPG - embedded SQL in C"
+NAME= ecpg
+SO_MAJOR_VERSION= 6
+SO_MINOR_VERSION= $(MAJORVERSION)
+
+override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I$(libpq_srcdir) -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+OBJS = \
+ $(WIN32RES) \
+ connect.o \
+ data.o \
+ descriptor.o \
+ error.o \
+ execute.o \
+ memory.o \
+ misc.o \
+ prepare.o \
+ sqlda.o \
+ typename.o
+
+SHLIB_LINK_INTERNAL = -L../pgtypeslib -lpgtypes $(libpq_pgport_shlib)
+SHLIB_LINK = $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS)
+SHLIB_PREREQS = submake-libpq submake-pgtypeslib
+
+SHLIB_EXPORTS = exports.txt
+
+PKG_CONFIG_REQUIRES_PRIVATE = libpq libpgtypes
+
+all: all-lib
+
+.PHONY: submake-pgtypeslib
+submake-pgtypeslib:
+ $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all
+
+# Shared library stuff
+include $(top_srcdir)/src/Makefile.shlib
+
+# Make dependency on pg_config_paths.h visible.
+misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
+
+$(top_builddir)/src/port/pg_config_paths.h:
+ $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
+
+install: all installdirs install-lib
+
+installdirs: installdirs-lib
+
+uninstall: uninstall-lib
+
+clean distclean: clean-lib
+ rm -f $(OBJS)
+
+maintainer-clean: distclean
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
new file mode 100644
index 0000000..056940c
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -0,0 +1,767 @@
+/* src/interfaces/ecpg/ecpglib/connect.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "ecpg-pthread-win32.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sqlca.h"
+
+#ifdef HAVE_USELOCALE
+locale_t ecpg_clocale = (locale_t) 0;
+#endif
+
+#ifdef ENABLE_THREAD_SAFETY
+static pthread_mutex_t connections_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_key_t actual_connection_key;
+static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT;
+#endif
+static struct connection *actual_connection = NULL;
+static struct connection *all_connections = NULL;
+
+#ifdef ENABLE_THREAD_SAFETY
+static void
+ecpg_actual_connection_init(void)
+{
+ pthread_key_create(&actual_connection_key, NULL);
+}
+
+void
+ecpg_pthreads_init(void)
+{
+ pthread_once(&actual_connection_key_once, ecpg_actual_connection_init);
+}
+#endif
+
+static struct connection *
+ecpg_get_connection_nr(const char *connection_name)
+{
+ struct connection *ret = NULL;
+
+ if ((connection_name == NULL) || (strcmp(connection_name, "CURRENT") == 0))
+ {
+#ifdef ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init(); /* ensure actual_connection_key is valid */
+
+ ret = pthread_getspecific(actual_connection_key);
+
+ /*
+ * if no connection in TSD for this thread, get the global default
+ * connection and hope the user knows what they're doing (i.e. using
+ * their own mutex to protect that connection from concurrent accesses
+ */
+ if (ret == NULL)
+ /* no TSD connection, going for global */
+ ret = actual_connection;
+#else
+ ret = actual_connection;
+#endif
+ }
+ else
+ {
+ struct connection *con;
+
+ for (con = all_connections; con != NULL; con = con->next)
+ {
+ if (strcmp(connection_name, con->name) == 0)
+ break;
+ }
+ ret = con;
+ }
+
+ return ret;
+}
+
+struct connection *
+ecpg_get_connection(const char *connection_name)
+{
+ struct connection *ret = NULL;
+
+ if ((connection_name == NULL) || (strcmp(connection_name, "CURRENT") == 0))
+ {
+#ifdef ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init(); /* ensure actual_connection_key is valid */
+
+ ret = pthread_getspecific(actual_connection_key);
+
+ /*
+ * if no connection in TSD for this thread, get the global default
+ * connection and hope the user knows what they're doing (i.e. using
+ * their own mutex to protect that connection from concurrent accesses
+ */
+ if (ret == NULL)
+ /* no TSD connection here either, using global */
+ ret = actual_connection;
+#else
+ ret = actual_connection;
+#endif
+ }
+ else
+ {
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&connections_mutex);
+#endif
+
+ ret = ecpg_get_connection_nr(connection_name);
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+ }
+
+ return ret;
+}
+
+static void
+ecpg_finish(struct connection *act)
+{
+ if (act != NULL)
+ {
+ struct ECPGtype_information_cache *cache,
+ *ptr;
+
+ ecpg_deallocate_all_conn(0, ECPG_COMPAT_PGSQL, act);
+ PQfinish(act->connection);
+
+ /*
+ * no need to lock connections_mutex - we're always called by
+ * ECPGdisconnect or ECPGconnect, which are holding the lock
+ */
+
+ /* remove act from the list */
+ if (act == all_connections)
+ all_connections = act->next;
+ else
+ {
+ struct connection *con;
+
+ for (con = all_connections; con->next && con->next != act; con = con->next);
+ if (con->next)
+ con->next = act->next;
+ }
+
+#ifdef ENABLE_THREAD_SAFETY
+ if (pthread_getspecific(actual_connection_key) == act)
+ pthread_setspecific(actual_connection_key, all_connections);
+#endif
+ if (actual_connection == act)
+ actual_connection = all_connections;
+
+ ecpg_log("ecpg_finish: connection %s closed\n", act->name ? act->name : "(null)");
+
+ for (cache = act->cache_head; cache; ptr = cache, cache = cache->next, ecpg_free(ptr));
+ ecpg_free(act->name);
+ ecpg_free(act);
+ /* delete cursor variables when last connection gets closed */
+ if (all_connections == NULL)
+ {
+ struct var_list *iv_ptr;
+
+ for (; ivlist; iv_ptr = ivlist, ivlist = ivlist->next, ecpg_free(iv_ptr));
+ }
+ }
+ else
+ ecpg_log("ecpg_finish: called an extra time\n");
+}
+
+bool
+ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
+{
+ struct connection *con = ecpg_get_connection(connection_name);
+ PGresult *results;
+
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
+
+ if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)
+ {
+ if (PQtransactionStatus(con->connection) == PQTRANS_IDLE)
+ {
+ results = PQexec(con->connection, "begin transaction");
+ if (!ecpg_check_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL))
+ return false;
+ PQclear(results);
+ }
+ con->autocommit = false;
+ }
+ else if (!con->autocommit && strncmp(mode, "on", strlen("on")) == 0)
+ {
+ if (PQtransactionStatus(con->connection) != PQTRANS_IDLE)
+ {
+ results = PQexec(con->connection, "commit");
+ if (!ecpg_check_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL))
+ return false;
+ PQclear(results);
+ }
+ con->autocommit = true;
+ }
+
+ return true;
+}
+
+bool
+ECPGsetconn(int lineno, const char *connection_name)
+{
+ struct connection *con = ecpg_get_connection(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_setspecific(actual_connection_key, con);
+#else
+ actual_connection = con;
+#endif
+ return true;
+}
+
+
+static void
+ECPGnoticeReceiver(void *arg, const PGresult *result)
+{
+ char *sqlstate = PQresultErrorField(result, PG_DIAG_SQLSTATE);
+ char *message = PQresultErrorField(result, PG_DIAG_MESSAGE_PRIMARY);
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ int sqlcode;
+
+ if (sqlca == NULL)
+ {
+ ecpg_log("out of memory");
+ return;
+ }
+
+ (void) arg; /* keep the compiler quiet */
+ if (sqlstate == NULL)
+ sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
+
+ if (message == NULL) /* Shouldn't happen, but need to be sure */
+ message = ecpg_gettext("empty message text");
+
+ /* these are not warnings */
+ if (strncmp(sqlstate, "00", 2) == 0)
+ return;
+
+ ecpg_log("ECPGnoticeReceiver: %s\n", message);
+
+ /* map to SQLCODE for backward compatibility */
+ if (strcmp(sqlstate, ECPG_SQLSTATE_INVALID_CURSOR_NAME) == 0)
+ sqlcode = ECPG_WARNING_UNKNOWN_PORTAL;
+ else if (strcmp(sqlstate, ECPG_SQLSTATE_ACTIVE_SQL_TRANSACTION) == 0)
+ sqlcode = ECPG_WARNING_IN_TRANSACTION;
+ else if (strcmp(sqlstate, ECPG_SQLSTATE_NO_ACTIVE_SQL_TRANSACTION) == 0)
+ sqlcode = ECPG_WARNING_NO_TRANSACTION;
+ else if (strcmp(sqlstate, ECPG_SQLSTATE_DUPLICATE_CURSOR) == 0)
+ sqlcode = ECPG_WARNING_PORTAL_EXISTS;
+ else
+ sqlcode = 0;
+
+ strncpy(sqlca->sqlstate, sqlstate, sizeof(sqlca->sqlstate));
+ sqlca->sqlcode = sqlcode;
+ sqlca->sqlwarn[2] = 'W';
+ sqlca->sqlwarn[0] = 'W';
+
+ strncpy(sqlca->sqlerrm.sqlerrmc, message, sizeof(sqlca->sqlerrm.sqlerrmc));
+ sqlca->sqlerrm.sqlerrmc[sizeof(sqlca->sqlerrm.sqlerrmc) - 1] = 0;
+ sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
+
+ ecpg_log("raising sqlcode %d\n", sqlcode);
+}
+
+/* this contains some quick hacks, needs to be cleaned up, but it works */
+bool
+ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ enum COMPAT_MODE compat = c;
+ struct connection *this;
+ int i,
+ connect_params = 0;
+ char *dbname = name ? ecpg_strdup(name, lineno) : NULL,
+ *host = NULL,
+ *tmp,
+ *port = NULL,
+ *realname = NULL,
+ *options = NULL;
+ const char **conn_keywords;
+ const char **conn_values;
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ ecpg_free(dbname);
+ return false;
+ }
+
+ ecpg_init_sqlca(sqlca);
+
+ /*
+ * clear auto_mem structure because some error handling functions might
+ * access it
+ */
+ ecpg_clear_auto_mem();
+
+ if (INFORMIX_MODE(compat))
+ {
+ char *envname;
+
+ /*
+ * Informix uses an environment variable DBPATH that overrides the
+ * connection parameters given here. We do the same with PG_DBPATH as
+ * the syntax is different.
+ */
+ envname = getenv("PG_DBPATH");
+ if (envname)
+ {
+ ecpg_free(dbname);
+ dbname = ecpg_strdup(envname, lineno);
+ }
+
+ }
+
+ if (dbname == NULL && connection_name == NULL)
+ connection_name = "DEFAULT";
+
+#if ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init();
+#endif
+
+ /* check if the identifier is unique */
+ if (ecpg_get_connection(connection_name))
+ {
+ ecpg_free(dbname);
+ ecpg_log("ECPGconnect: connection identifier %s is already in use\n",
+ connection_name);
+ return false;
+ }
+
+ if ((this = (struct connection *) ecpg_alloc(sizeof(struct connection), lineno)) == NULL)
+ {
+ ecpg_free(dbname);
+ return false;
+ }
+
+ if (dbname != NULL)
+ {
+ /* get the detail information from dbname */
+ if (strncmp(dbname, "tcp:", 4) == 0 || strncmp(dbname, "unix:", 5) == 0)
+ {
+ int offset = 0;
+
+ /*
+ * only allow protocols tcp and unix
+ */
+ if (strncmp(dbname, "tcp:", 4) == 0)
+ offset = 4;
+ else if (strncmp(dbname, "unix:", 5) == 0)
+ offset = 5;
+
+ if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0)
+ {
+
+ /*------
+ * new style:
+ * <tcp|unix>:postgresql://server[:port][/db-name][?options]
+ *------
+ */
+ offset += strlen("postgresql://");
+
+ tmp = strrchr(dbname + offset, '?');
+ if (tmp != NULL) /* options given */
+ {
+ options = ecpg_strdup(tmp + 1, lineno);
+ *tmp = '\0';
+ }
+
+ tmp = last_dir_separator(dbname + offset);
+ if (tmp != NULL) /* database name given */
+ {
+ if (tmp[1] != '\0') /* non-empty database name */
+ {
+ realname = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ }
+ *tmp = '\0';
+ }
+
+ tmp = strrchr(dbname + offset, ':');
+ if (tmp != NULL) /* port number given */
+ {
+ *tmp = '\0';
+ port = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ }
+
+ if (strncmp(dbname, "unix:", 5) == 0)
+ {
+ /*
+ * The alternative of using "127.0.0.1" here is deprecated
+ * and undocumented; we'll keep it for backward
+ * compatibility's sake, but not extend it to allow IPv6.
+ */
+ if (strcmp(dbname + offset, "localhost") != 0 &&
+ strcmp(dbname + offset, "127.0.0.1") != 0)
+ {
+ ecpg_log("ECPGconnect: non-localhost access via sockets on line %d\n", lineno);
+ ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ecpg_gettext("<DEFAULT>"));
+ if (host)
+ ecpg_free(host);
+ if (port)
+ ecpg_free(port);
+ if (options)
+ ecpg_free(options);
+ if (realname)
+ ecpg_free(realname);
+ if (dbname)
+ ecpg_free(dbname);
+ free(this);
+ return false;
+ }
+ }
+ else
+ {
+ if (*(dbname + offset) != '\0')
+ {
+ host = ecpg_strdup(dbname + offset, lineno);
+ connect_params++;
+ }
+ }
+ }
+ }
+ else
+ {
+ /* old style: dbname[@server][:port] */
+ tmp = strrchr(dbname, ':');
+ if (tmp != NULL) /* port number given */
+ {
+ port = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ *tmp = '\0';
+ }
+
+ tmp = strrchr(dbname, '@');
+ if (tmp != NULL) /* host name given */
+ {
+ host = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ *tmp = '\0';
+ }
+
+ if (strlen(dbname) > 0)
+ {
+ realname = ecpg_strdup(dbname, lineno);
+ connect_params++;
+ }
+ else
+ realname = NULL;
+ }
+ }
+ else
+ realname = NULL;
+
+ /*
+ * Count options for the allocation done below (this may produce an
+ * overestimate, it's ok).
+ */
+ if (options)
+ for (i = 0; options[i]; i++)
+ if (options[i] == '=')
+ connect_params++;
+
+ if (user && strlen(user) > 0)
+ connect_params++;
+ if (passwd && strlen(passwd) > 0)
+ connect_params++;
+
+ /*
+ * Allocate enough space for all connection parameters. These allocations
+ * are done before manipulating the list of connections to ease the error
+ * handling on failure.
+ */
+ conn_keywords = (const char **) ecpg_alloc((connect_params + 1) * sizeof(char *), lineno);
+ conn_values = (const char **) ecpg_alloc(connect_params * sizeof(char *), lineno);
+ if (conn_keywords == NULL || conn_values == NULL)
+ {
+ if (host)
+ ecpg_free(host);
+ if (port)
+ ecpg_free(port);
+ if (options)
+ ecpg_free(options);
+ if (realname)
+ ecpg_free(realname);
+ if (dbname)
+ ecpg_free(dbname);
+ if (conn_keywords)
+ ecpg_free(conn_keywords);
+ if (conn_values)
+ ecpg_free(conn_values);
+ free(this);
+ return false;
+ }
+
+ /* add connection to our list */
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&connections_mutex);
+#endif
+
+ /*
+ * ... but first, make certain we have created ecpg_clocale. Rely on
+ * holding connections_mutex to ensure this is done by only one thread.
+ */
+#ifdef HAVE_USELOCALE
+ if (!ecpg_clocale)
+ {
+ ecpg_clocale = newlocale(LC_NUMERIC_MASK, "C", (locale_t) 0);
+ if (!ecpg_clocale)
+ {
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ if (host)
+ ecpg_free(host);
+ if (port)
+ ecpg_free(port);
+ if (options)
+ ecpg_free(options);
+ if (realname)
+ ecpg_free(realname);
+ if (dbname)
+ ecpg_free(dbname);
+ if (conn_keywords)
+ ecpg_free(conn_keywords);
+ if (conn_values)
+ ecpg_free(conn_values);
+ free(this);
+ return false;
+ }
+ }
+#endif
+
+ if (connection_name != NULL)
+ this->name = ecpg_strdup(connection_name, lineno);
+ else
+ this->name = ecpg_strdup(realname, lineno);
+
+ this->cache_head = NULL;
+ this->prep_stmts = NULL;
+
+ if (all_connections == NULL)
+ this->next = NULL;
+ else
+ this->next = all_connections;
+
+ all_connections = this;
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_setspecific(actual_connection_key, all_connections);
+#endif
+ actual_connection = all_connections;
+
+ ecpg_log("ECPGconnect: opening database %s on %s port %s %s%s %s%s\n",
+ realname ? realname : "<DEFAULT>",
+ host ? host : "<DEFAULT>",
+ port ? (ecpg_internal_regression_mode ? "<REGRESSION_PORT>" : port) : "<DEFAULT>",
+ options ? "with options " : "", options ? options : "",
+ (user && strlen(user) > 0) ? "for user " : "", user ? user : "");
+
+ i = 0;
+ if (realname)
+ {
+ conn_keywords[i] = "dbname";
+ conn_values[i] = realname;
+ i++;
+ }
+ if (host)
+ {
+ conn_keywords[i] = "host";
+ conn_values[i] = host;
+ i++;
+ }
+ if (port)
+ {
+ conn_keywords[i] = "port";
+ conn_values[i] = port;
+ i++;
+ }
+ if (user && strlen(user) > 0)
+ {
+ conn_keywords[i] = "user";
+ conn_values[i] = user;
+ i++;
+ }
+ if (passwd && strlen(passwd) > 0)
+ {
+ conn_keywords[i] = "password";
+ conn_values[i] = passwd;
+ i++;
+ }
+ if (options)
+ {
+ char *str;
+
+ /*
+ * The options string contains "keyword=value" pairs separated by
+ * '&'s. We must break this up into keywords and values to pass to
+ * libpq (it's okay to scribble on the options string). We ignore
+ * spaces just before each keyword or value.
+ */
+ for (str = options; *str;)
+ {
+ int e,
+ a;
+ char *token1,
+ *token2;
+
+ /* Skip spaces before keyword */
+ for (token1 = str; *token1 == ' '; token1++)
+ /* skip */ ;
+ /* Find end of keyword */
+ for (e = 0; token1[e] && token1[e] != '='; e++)
+ /* skip */ ;
+ if (token1[e]) /* found "=" */
+ {
+ token1[e] = '\0';
+ /* Skip spaces before value */
+ for (token2 = token1 + e + 1; *token2 == ' '; token2++)
+ /* skip */ ;
+ /* Find end of value */
+ for (a = 0; token2[a] && token2[a] != '&'; a++)
+ /* skip */ ;
+ if (token2[a]) /* found "&" => another option follows */
+ {
+ token2[a] = '\0';
+ str = token2 + a + 1;
+ }
+ else
+ str = token2 + a;
+
+ conn_keywords[i] = token1;
+ conn_values[i] = token2;
+ i++;
+ }
+ else
+ {
+ /* Bogus options syntax ... ignore trailing garbage */
+ str = token1 + e;
+ }
+ }
+ }
+
+ Assert(i <= connect_params);
+ conn_keywords[i] = NULL; /* terminator */
+
+ this->connection = PQconnectdbParams(conn_keywords, conn_values, 0);
+
+ if (host)
+ ecpg_free(host);
+ if (port)
+ ecpg_free(port);
+ if (options)
+ ecpg_free(options);
+ if (dbname)
+ ecpg_free(dbname);
+ ecpg_free(conn_values);
+ ecpg_free(conn_keywords);
+
+ if (PQstatus(this->connection) == CONNECTION_BAD)
+ {
+ const char *errmsg = PQerrorMessage(this->connection);
+ const char *db = realname ? realname : ecpg_gettext("<DEFAULT>");
+
+ /* PQerrorMessage's result already has a trailing newline */
+ ecpg_log("ECPGconnect: %s", errmsg);
+
+ ecpg_finish(this);
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+
+ ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, db);
+ if (realname)
+ ecpg_free(realname);
+
+ return false;
+ }
+
+ if (realname)
+ ecpg_free(realname);
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+
+ this->autocommit = autocommit;
+
+ PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, (void *) this);
+
+ return true;
+}
+
+bool
+ECPGdisconnect(int lineno, const char *connection_name)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ struct connection *con;
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&connections_mutex);
+#endif
+
+ if (strcmp(connection_name, "ALL") == 0)
+ {
+ ecpg_init_sqlca(sqlca);
+ for (con = all_connections; con;)
+ {
+ struct connection *f = con;
+
+ con = con->next;
+ ecpg_finish(f);
+ }
+ }
+ else
+ {
+ con = ecpg_get_connection_nr(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ {
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+ return false;
+ }
+ else
+ ecpg_finish(con);
+ }
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&connections_mutex);
+#endif
+
+ return true;
+}
+
+PGconn *
+ECPGget_PGconn(const char *connection_name)
+{
+ struct connection *con;
+
+ con = ecpg_get_connection(connection_name);
+ if (con == NULL)
+ return NULL;
+
+ return con->connection;
+}
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
new file mode 100644
index 0000000..6bc91ef
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -0,0 +1,968 @@
+/* src/interfaces/ecpg/ecpglib/data.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include <math.h>
+
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "pgtypes_date.h"
+#include "pgtypes_interval.h"
+#include "pgtypes_numeric.h"
+#include "pgtypes_timestamp.h"
+#include "sqlca.h"
+
+/* returns true if character c is a delimiter for the given array type */
+static bool
+array_delimiter(enum ARRAY_TYPE isarray, char c)
+{
+ if (isarray == ECPG_ARRAY_ARRAY && c == ',')
+ return true;
+
+ if (isarray == ECPG_ARRAY_VECTOR && c == ' ')
+ return true;
+
+ return false;
+}
+
+/* returns true if character c marks the boundary for the given array type */
+static bool
+array_boundary(enum ARRAY_TYPE isarray, char c)
+{
+ if (isarray == ECPG_ARRAY_ARRAY && c == '}')
+ return true;
+
+ if (isarray == ECPG_ARRAY_VECTOR && c == '\0')
+ return true;
+
+ return false;
+}
+
+/* returns true if some garbage is found at the end of the scanned string */
+static bool
+garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compat)
+{
+ /*
+ * INFORMIX allows for selecting a numeric into an int, the result is
+ * truncated
+ */
+ if (isarray == ECPG_ARRAY_NONE)
+ {
+ if (INFORMIX_MODE(compat) && **scan_length == '.')
+ {
+ /* skip invalid characters */
+ do
+ {
+ (*scan_length)++;
+ } while (isdigit((unsigned char) **scan_length));
+ }
+
+ if (**scan_length != ' ' && **scan_length != '\0')
+ return true;
+ }
+ else if (ECPG_IS_ARRAY(isarray) && !array_delimiter(isarray, **scan_length) && !array_boundary(isarray, **scan_length))
+ return true;
+
+ return false;
+}
+
+/* stolen code from src/backend/utils/adt/float.c */
+#if defined(WIN32) && !defined(NAN)
+static const uint32 nan[2] = {0xffffffff, 0x7fffffff};
+
+#define NAN (*(const double *) nan)
+#endif
+
+static double
+get_float8_infinity(void)
+{
+#ifdef INFINITY
+ return (double) INFINITY;
+#else
+ return (double) (HUGE_VAL * HUGE_VAL);
+#endif
+}
+
+static double
+get_float8_nan(void)
+{
+ /* (double) NAN doesn't work on some NetBSD/MIPS releases */
+#if defined(NAN) && !(defined(__NetBSD__) && defined(__mips__))
+ return (double) NAN;
+#else
+ return (double) (0.0 / 0.0);
+#endif
+}
+
+static bool
+check_special_value(char *ptr, double *retval, char **endptr)
+{
+ if (pg_strncasecmp(ptr, "NaN", 3) == 0)
+ {
+ *retval = get_float8_nan();
+ *endptr = ptr + 3;
+ return true;
+ }
+ else if (pg_strncasecmp(ptr, "Infinity", 8) == 0)
+ {
+ *retval = get_float8_infinity();
+ *endptr = ptr + 8;
+ return true;
+ }
+ else if (pg_strncasecmp(ptr, "-Infinity", 9) == 0)
+ {
+ *retval = -get_float8_infinity();
+ *endptr = ptr + 9;
+ return true;
+ }
+
+ return false;
+}
+
+/* imported from src/backend/utils/adt/encode.c */
+
+unsigned
+ecpg_hex_enc_len(unsigned srclen)
+{
+ return srclen << 1;
+}
+
+unsigned
+ecpg_hex_dec_len(unsigned srclen)
+{
+ return srclen >> 1;
+}
+
+static inline char
+get_hex(char c)
+{
+ static const int8 hexlookup[128] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ };
+ int res = -1;
+
+ if (c > 0 && c < 127)
+ res = hexlookup[(unsigned char) c];
+
+ return (char) res;
+}
+
+static unsigned
+hex_decode(const char *src, unsigned len, char *dst)
+{
+ const char *s,
+ *srcend;
+ char v1,
+ v2,
+ *p;
+
+ srcend = src + len;
+ s = src;
+ p = dst;
+ while (s < srcend)
+ {
+ if (*s == ' ' || *s == '\n' || *s == '\t' || *s == '\r')
+ {
+ s++;
+ continue;
+ }
+ v1 = get_hex(*s++) << 4;
+ if (s >= srcend)
+ return -1;
+
+ v2 = get_hex(*s++);
+ *p++ = v1 | v2;
+ }
+
+ return p - dst;
+}
+
+unsigned
+ecpg_hex_encode(const char *src, unsigned len, char *dst)
+{
+ static const char hextbl[] = "0123456789abcdef";
+ const char *end = src + len;
+
+ while (src < end)
+ {
+ *dst++ = hextbl[(*src >> 4) & 0xF];
+ *dst++ = hextbl[*src & 0xF];
+ src++;
+ }
+ return len * 2;
+}
+
+bool
+ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
+ enum ECPGttype type, enum ECPGttype ind_type,
+ char *var, char *ind, long varcharsize, long offset,
+ long ind_offset, enum ARRAY_TYPE isarray, enum COMPAT_MODE compat, bool force_indicator)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ char *pval = (char *) PQgetvalue(results, act_tuple, act_field);
+ int binary = PQfformat(results, act_field);
+ int size = PQgetlength(results, act_tuple, act_field);
+ int value_for_indicator = 0;
+ long log_offset;
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ /*
+ * If we are running in a regression test, do not log the offset variable,
+ * it depends on the machine's alignment.
+ */
+ if (ecpg_internal_regression_mode)
+ log_offset = -1;
+ else
+ log_offset = offset;
+
+ ecpg_log("ecpg_get_data on line %d: RESULT: %s offset: %ld; array: %s\n", lineno, pval ? (binary ? "BINARY" : pval) : "EMPTY", log_offset, ECPG_IS_ARRAY(isarray) ? "yes" : "no");
+
+ /* pval is a pointer to the value */
+ if (!pval)
+ {
+ /*
+ * This should never happen because we already checked that we found
+ * at least one tuple, but let's play it safe.
+ */
+ ecpg_raise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL);
+ return false;
+ }
+
+ /* We will have to decode the value */
+
+ /*
+ * check for null value and set indicator accordingly, i.e. -1 if NULL and
+ * 0 if not
+ */
+ if (PQgetisnull(results, act_tuple, act_field))
+ value_for_indicator = -1;
+
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = value_for_indicator;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = value_for_indicator;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = value_for_indicator;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = value_for_indicator;
+ break;
+ case ECPGt_NO_INDICATOR:
+ if (value_for_indicator == -1)
+ {
+ if (force_indicator == false)
+ {
+ /*
+ * Informix has an additional way to specify NULLs note
+ * that this uses special values to denote NULL
+ */
+ ECPGset_noind_null(type, var + offset * act_tuple);
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_MISSING_INDICATOR,
+ ECPG_SQLSTATE_NULL_VALUE_NO_INDICATOR_PARAMETER,
+ NULL);
+ return false;
+ }
+ }
+ break;
+ default:
+ ecpg_raise(lineno, ECPG_UNSUPPORTED,
+ ECPG_SQLSTATE_ECPG_INTERNAL_ERROR,
+ ecpg_type_name(ind_type));
+ return false;
+ break;
+ }
+
+ if (value_for_indicator == -1)
+ return true;
+
+ /* let's check if it really is an array if it should be one */
+ if (isarray == ECPG_ARRAY_ARRAY)
+ {
+ if (*pval != '{')
+ {
+ ecpg_raise(lineno, ECPG_DATA_NOT_ARRAY,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
+ return false;
+ }
+
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_varchar:
+ case ECPGt_string:
+ break;
+
+ default:
+ pval++;
+ break;
+ }
+ }
+
+ do
+ {
+ if (binary)
+ {
+ if (varcharsize == 0 || varcharsize * offset >= size)
+ memcpy(var + offset * act_tuple, pval, size);
+ else
+ {
+ memcpy(var + offset * act_tuple, pval, varcharsize * offset);
+
+ if (varcharsize * offset < size)
+ {
+ /* truncation */
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ default:
+ break;
+ }
+ sqlca->sqlwarn[0] = sqlca->sqlwarn[1] = 'W';
+ }
+ }
+ pval += size;
+ }
+ else
+ {
+ switch (type)
+ {
+ long res;
+ unsigned long ures;
+ double dres;
+ char *scan_length;
+ numeric *nres;
+ date ddres;
+ timestamp tres;
+ interval *ires;
+ char *endptr,
+ endchar;
+
+ case ECPGt_short:
+ case ECPGt_int:
+ case ECPGt_long:
+ res = strtol(pval, &scan_length, 10);
+ if (garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_INT_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ pval = scan_length;
+
+ switch (type)
+ {
+ case ECPGt_short:
+ *((short *) (var + offset * act_tuple)) = (short) res;
+ break;
+ case ECPGt_int:
+ *((int *) (var + offset * act_tuple)) = (int) res;
+ break;
+ case ECPGt_long:
+ *((long *) (var + offset * act_tuple)) = (long) res;
+ break;
+ default:
+ /* Cannot happen */
+ break;
+ }
+ break;
+
+ case ECPGt_unsigned_short:
+ case ECPGt_unsigned_int:
+ case ECPGt_unsigned_long:
+ ures = strtoul(pval, &scan_length, 10);
+ if (garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_UINT_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ pval = scan_length;
+
+ switch (type)
+ {
+ case ECPGt_unsigned_short:
+ *((unsigned short *) (var + offset * act_tuple)) = (unsigned short) ures;
+ break;
+ case ECPGt_unsigned_int:
+ *((unsigned int *) (var + offset * act_tuple)) = (unsigned int) ures;
+ break;
+ case ECPGt_unsigned_long:
+ *((unsigned long *) (var + offset * act_tuple)) = (unsigned long) ures;
+ break;
+ default:
+ /* Cannot happen */
+ break;
+ }
+ break;
+
+#ifdef HAVE_STRTOLL
+ case ECPGt_long_long:
+ *((long long int *) (var + offset * act_tuple)) = strtoll(pval, &scan_length, 10);
+ if (garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_INT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ pval = scan_length;
+
+ break;
+#endif /* HAVE_STRTOLL */
+#ifdef HAVE_STRTOULL
+ case ECPGt_unsigned_long_long:
+ *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10);
+ if (garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ pval = scan_length;
+
+ break;
+#endif /* HAVE_STRTOULL */
+
+ case ECPGt_float:
+ case ECPGt_double:
+ if (isarray && *pval == '"')
+ pval++;
+
+ if (!check_special_value(pval, &dres, &scan_length))
+ dres = strtod(pval, &scan_length);
+
+ if (isarray && *scan_length == '"')
+ scan_length++;
+
+ /* no special INFORMIX treatment for floats */
+ if (garbage_left(isarray, &scan_length, ECPG_COMPAT_PGSQL))
+ {
+ ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ pval = scan_length;
+
+ switch (type)
+ {
+ case ECPGt_float:
+ *((float *) (var + offset * act_tuple)) = dres;
+ break;
+ case ECPGt_double:
+ *((double *) (var + offset * act_tuple)) = dres;
+ break;
+ default:
+ /* Cannot happen */
+ break;
+ }
+ break;
+
+ case ECPGt_bool:
+ if (pval[0] == 'f' && pval[1] == '\0')
+ {
+ *((bool *) (var + offset * act_tuple)) = false;
+ pval++;
+ break;
+ }
+ else if (pval[0] == 't' && pval[1] == '\0')
+ {
+ *((bool *) (var + offset * act_tuple)) = true;
+ pval++;
+ break;
+ }
+ else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
+ {
+ /* NULL is valid */
+ break;
+ }
+
+ ecpg_raise(lineno, ECPG_CONVERT_BOOL,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ break;
+
+ case ECPGt_bytea:
+ {
+ struct ECPGgeneric_bytea *variable =
+ (struct ECPGgeneric_bytea *) (var + offset * act_tuple);
+ long dst_size,
+ src_size,
+ dec_size;
+
+ dst_size = ecpg_hex_enc_len(varcharsize);
+ src_size = size - 2; /* exclude backslash + 'x' */
+ dec_size = src_size < dst_size ? src_size : dst_size;
+ variable->len = hex_decode(pval + 2, dec_size, variable->arr);
+
+ if (dst_size < src_size)
+ {
+ long rcv_size = ecpg_hex_dec_len(size - 2);
+
+ /* truncation */
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = rcv_size;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = rcv_size;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = rcv_size;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = rcv_size;
+ break;
+ default:
+ break;
+ }
+ sqlca->sqlwarn[0] = sqlca->sqlwarn[1] = 'W';
+ }
+
+ pval += size;
+
+ }
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ {
+ char *str = (char *) (var + offset * act_tuple);
+
+ /*
+ * If varcharsize is unknown and the offset is that of
+ * char *, then this variable represents the array of
+ * character pointers. So, use extra indirection.
+ */
+ if (varcharsize == 0 && offset == sizeof(char *))
+ str = *(char **) str;
+
+ if (varcharsize == 0 || varcharsize > size)
+ {
+ /*
+ * compatibility mode, blank pad and null
+ * terminate char array
+ */
+ if (ORACLE_MODE(compat) && (type == ECPGt_char || type == ECPGt_unsigned_char))
+ {
+ memset(str, ' ', varcharsize);
+ memcpy(str, pval, size);
+ str[varcharsize - 1] = '\0';
+
+ /*
+ * compatibility mode empty string gets -1
+ * indicator but no warning
+ */
+ if (size == 0)
+ {
+ /* truncation */
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = -1;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = -1;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = -1;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = -1;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ strncpy(str, pval, size + 1);
+ }
+ /* do the rtrim() */
+ if (type == ECPGt_string)
+ {
+ char *last = str + size;
+
+ while (last > str && (*last == ' ' || *last == '\0'))
+ {
+ *last = '\0';
+ last--;
+ }
+ }
+ }
+ else
+ {
+ strncpy(str, pval, varcharsize);
+
+ /* compatibility mode, null terminate char array */
+ if (ORACLE_MODE(compat) && (varcharsize - 1) < size)
+ {
+ if (type == ECPGt_char || type == ECPGt_unsigned_char)
+ str[varcharsize - 1] = '\0';
+ }
+
+ if (varcharsize < size || (ORACLE_MODE(compat) && (varcharsize - 1) < size))
+ {
+ /* truncation */
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = size;
+ break;
+ default:
+ break;
+ }
+ sqlca->sqlwarn[0] = sqlca->sqlwarn[1] = 'W';
+ }
+ }
+ pval += size;
+ }
+ break;
+
+ case ECPGt_varchar:
+ {
+ struct ECPGgeneric_varchar *variable =
+ (struct ECPGgeneric_varchar *) (var + offset * act_tuple);
+
+ variable->len = size;
+ if (varcharsize == 0)
+ strncpy(variable->arr, pval, variable->len);
+ else
+ {
+ strncpy(variable->arr, pval, varcharsize);
+
+ if (variable->len > varcharsize)
+ {
+ /* truncation */
+ switch (ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short *) (ind + ind_offset * act_tuple)) = variable->len;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) (ind + ind_offset * act_tuple)) = variable->len;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ *((long *) (ind + ind_offset * act_tuple)) = variable->len;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long int *) (ind + ind_offset * act_tuple)) = variable->len;
+ break;
+ default:
+ break;
+ }
+ sqlca->sqlwarn[0] = sqlca->sqlwarn[1] = 'W';
+
+ variable->len = varcharsize;
+ }
+ }
+ pval += size;
+ }
+ break;
+
+ case ECPGt_decimal:
+ case ECPGt_numeric:
+ for (endptr = pval; *endptr && *endptr != ',' && *endptr != '}'; endptr++);
+ endchar = *endptr;
+ *endptr = '\0';
+ nres = PGTYPESnumeric_from_asc(pval, &scan_length);
+ *endptr = endchar;
+
+ /* did we get an error? */
+ if (nres == NULL)
+ {
+ ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
+ lineno, pval, errno);
+
+ if (INFORMIX_MODE(compat))
+ {
+ /*
+ * Informix wants its own NULL value here instead
+ * of an error
+ */
+ nres = PGTYPESnumeric_new();
+ if (nres)
+ ECPGset_noind_null(ECPGt_numeric, nres);
+ else
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_NUMERIC_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ else
+ {
+ if (!isarray && garbage_left(isarray, &scan_length, compat))
+ {
+ free(nres);
+ ecpg_raise(lineno, ECPG_NUMERIC_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ pval = scan_length;
+
+ if (type == ECPGt_numeric)
+ PGTYPESnumeric_copy(nres, (numeric *) (var + offset * act_tuple));
+ else
+ PGTYPESnumeric_to_decimal(nres, (decimal *) (var + offset * act_tuple));
+
+ PGTYPESnumeric_free(nres);
+ break;
+
+ case ECPGt_interval:
+ if (*pval == '"')
+ pval++;
+
+ for (endptr = pval; *endptr && *endptr != ',' && *endptr != '"' && *endptr != '}'; endptr++);
+ endchar = *endptr;
+ *endptr = '\0';
+ ires = PGTYPESinterval_from_asc(pval, &scan_length);
+ *endptr = endchar;
+
+ /* did we get an error? */
+ if (ires == NULL)
+ {
+ ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
+ lineno, pval, errno);
+
+ if (INFORMIX_MODE(compat))
+ {
+ /*
+ * Informix wants its own NULL value here instead
+ * of an error
+ */
+ ires = (interval *) ecpg_alloc(sizeof(interval), lineno);
+ if (!ires)
+ return false;
+
+ ECPGset_noind_null(ECPGt_interval, ires);
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_INTERVAL_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ else
+ {
+ if (*scan_length == '"')
+ scan_length++;
+
+ if (!isarray && garbage_left(isarray, &scan_length, compat))
+ {
+ free(ires);
+ ecpg_raise(lineno, ECPG_INTERVAL_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ pval = scan_length;
+
+ PGTYPESinterval_copy(ires, (interval *) (var + offset * act_tuple));
+ free(ires);
+ break;
+
+ case ECPGt_date:
+ if (*pval == '"')
+ pval++;
+
+ for (endptr = pval; *endptr && *endptr != ',' && *endptr != '"' && *endptr != '}'; endptr++);
+ endchar = *endptr;
+ *endptr = '\0';
+ ddres = PGTYPESdate_from_asc(pval, &scan_length);
+ *endptr = endchar;
+
+ /* did we get an error? */
+ if (errno != 0)
+ {
+ ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
+ lineno, pval, errno);
+
+ if (INFORMIX_MODE(compat))
+ {
+ /*
+ * Informix wants its own NULL value here instead
+ * of an error
+ */
+ ECPGset_noind_null(ECPGt_date, &ddres);
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_DATE_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ else
+ {
+ if (*scan_length == '"')
+ scan_length++;
+
+ if (!isarray && garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_DATE_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+
+ *((date *) (var + offset * act_tuple)) = ddres;
+ pval = scan_length;
+ break;
+
+ case ECPGt_timestamp:
+ if (*pval == '"')
+ pval++;
+
+ for (endptr = pval; *endptr && *endptr != ',' && *endptr != '"' && *endptr != '}'; endptr++);
+ endchar = *endptr;
+ *endptr = '\0';
+ tres = PGTYPEStimestamp_from_asc(pval, &scan_length);
+ *endptr = endchar;
+
+ /* did we get an error? */
+ if (errno != 0)
+ {
+ ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
+ lineno, pval, errno);
+
+ if (INFORMIX_MODE(compat))
+ {
+ /*
+ * Informix wants its own NULL value here instead
+ * of an error
+ */
+ ECPGset_noind_null(ECPGt_timestamp, &tres);
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+ else
+ {
+ if (*scan_length == '"')
+ scan_length++;
+
+ if (!isarray && garbage_left(isarray, &scan_length, compat))
+ {
+ ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT,
+ ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
+ return false;
+ }
+ }
+
+ *((timestamp *) (var + offset * act_tuple)) = tres;
+ pval = scan_length;
+ break;
+
+ default:
+ ecpg_raise(lineno, ECPG_UNSUPPORTED,
+ ECPG_SQLSTATE_ECPG_INTERNAL_ERROR,
+ ecpg_type_name(type));
+ return false;
+ break;
+ }
+ if (ECPG_IS_ARRAY(isarray))
+ {
+ bool string = false;
+
+ /* set array to next entry */
+ ++act_tuple;
+
+ /* set pval to the next entry */
+
+ /*
+ * *pval != '\0' should not be needed, but is used as a safety
+ * guard
+ */
+ for (; *pval != '\0' && (string || (!array_delimiter(isarray, *pval) && !array_boundary(isarray, *pval))); ++pval)
+ if (*pval == '"')
+ string = string ? false : true;
+
+ if (array_delimiter(isarray, *pval))
+ ++pval;
+ }
+ }
+ } while (*pval != '\0' && !array_boundary(isarray, *pval));
+
+ return true;
+}
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
new file mode 100644
index 0000000..f1898de
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -0,0 +1,1002 @@
+/* dynamic SQL support routines
+ *
+ * src/interfaces/ecpg/ecpglib/descriptor.c
+ */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "catalog/pg_type_d.h"
+#include "ecpg-pthread-win32.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sql3types.h"
+#include "sqlca.h"
+#include "sqlda.h"
+
+static void descriptor_free(struct descriptor *desc);
+
+/* We manage descriptors separately for each thread. */
+#ifdef ENABLE_THREAD_SAFETY
+static pthread_key_t descriptor_key;
+static pthread_once_t descriptor_once = PTHREAD_ONCE_INIT;
+
+static void descriptor_deallocate_all(struct descriptor *list);
+
+static void
+descriptor_destructor(void *arg)
+{
+ descriptor_deallocate_all(arg);
+}
+
+static void
+descriptor_key_init(void)
+{
+ pthread_key_create(&descriptor_key, descriptor_destructor);
+}
+
+static struct descriptor *
+get_descriptors(void)
+{
+ pthread_once(&descriptor_once, descriptor_key_init);
+ return (struct descriptor *) pthread_getspecific(descriptor_key);
+}
+
+static void
+set_descriptors(struct descriptor *value)
+{
+ pthread_setspecific(descriptor_key, value);
+}
+#else
+static struct descriptor *all_descriptors = NULL;
+
+#define get_descriptors() (all_descriptors)
+#define set_descriptors(value) do { all_descriptors = (value); } while(0)
+#endif
+
+/* old internal convenience function that might go away later */
+static PGresult *
+ecpg_result_by_descriptor(int line, const char *name)
+{
+ struct descriptor *desc = ecpg_find_desc(line, name);
+
+ if (desc == NULL)
+ return NULL;
+ return desc->result;
+}
+
+static unsigned int
+ecpg_dynamic_type_DDT(Oid type)
+{
+ switch (type)
+ {
+ case DATEOID:
+ return SQL3_DDT_DATE;
+ case TIMEOID:
+ return SQL3_DDT_TIME;
+ case TIMESTAMPOID:
+ return SQL3_DDT_TIMESTAMP;
+ case TIMESTAMPTZOID:
+ return SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE;
+ case TIMETZOID:
+ return SQL3_DDT_TIME_WITH_TIME_ZONE;
+ default:
+ return SQL3_DDT_ILLEGAL;
+ }
+}
+
+bool
+ECPGget_desc_header(int lineno, const char *desc_name, int *count)
+{
+ PGresult *ECPGresult;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ ecpg_init_sqlca(sqlca);
+ ECPGresult = ecpg_result_by_descriptor(lineno, desc_name);
+ if (!ECPGresult)
+ return false;
+
+ *count = PQnfields(ECPGresult);
+ sqlca->sqlerrd[2] = 1;
+ ecpg_log("ECPGget_desc_header: found %d attributes\n", *count);
+ return true;
+}
+
+static bool
+get_int_item(int lineno, void *var, enum ECPGttype vartype, int value)
+{
+ switch (vartype)
+ {
+ case ECPGt_short:
+ *(short *) var = (short) value;
+ break;
+ case ECPGt_int:
+ *(int *) var = (int) value;
+ break;
+ case ECPGt_long:
+ *(long *) var = (long) value;
+ break;
+ case ECPGt_unsigned_short:
+ *(unsigned short *) var = (unsigned short) value;
+ break;
+ case ECPGt_unsigned_int:
+ *(unsigned int *) var = (unsigned int) value;
+ break;
+ case ECPGt_unsigned_long:
+ *(unsigned long *) var = (unsigned long) value;
+ break;
+ case ECPGt_long_long:
+ *(long long int *) var = (long long int) value;
+ break;
+ case ECPGt_unsigned_long_long:
+ *(unsigned long long int *) var = (unsigned long long int) value;
+ break;
+ case ECPGt_float:
+ *(float *) var = (float) value;
+ break;
+ case ECPGt_double:
+ *(double *) var = (double) value;
+ break;
+ default:
+ ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype)
+{
+ switch (vartype)
+ {
+ case ECPGt_short:
+ *target = *(const short *) var;
+ break;
+ case ECPGt_int:
+ *target = *(const int *) var;
+ break;
+ case ECPGt_long:
+ *target = *(const long *) var;
+ break;
+ case ECPGt_unsigned_short:
+ *target = *(const unsigned short *) var;
+ break;
+ case ECPGt_unsigned_int:
+ *target = *(const unsigned int *) var;
+ break;
+ case ECPGt_unsigned_long:
+ *target = *(const unsigned long *) var;
+ break;
+ case ECPGt_long_long:
+ *target = *(const long long int *) var;
+ break;
+ case ECPGt_unsigned_long_long:
+ *target = *(const unsigned long long int *) var;
+ break;
+ case ECPGt_float:
+ *target = *(const float *) var;
+ break;
+ case ECPGt_double:
+ *target = *(const double *) var;
+ break;
+ default:
+ ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+get_char_item(int lineno, void *var, enum ECPGttype vartype, char *value, int varcharsize)
+{
+ switch (vartype)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ strncpy((char *) var, value, varcharsize);
+ break;
+ case ECPGt_varchar:
+ {
+ struct ECPGgeneric_varchar *variable =
+ (struct ECPGgeneric_varchar *) var;
+
+ if (varcharsize == 0)
+ memcpy(variable->arr, value, strlen(value));
+ else
+ strncpy(variable->arr, value, varcharsize);
+
+ variable->len = strlen(value);
+ if (varcharsize > 0 && variable->len > varcharsize)
+ variable->len = varcharsize;
+ }
+ break;
+ default:
+ ecpg_raise(lineno, ECPG_VAR_NOT_CHAR, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
+ return false;
+ }
+
+ return true;
+}
+
+#define RETURN_IF_NO_DATA if (ntuples < 1) \
+ { \
+ va_end(args); \
+ ecpg_raise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); \
+ return false; \
+ }
+
+bool
+ECPGget_desc(int lineno, const char *desc_name, int index,...)
+{
+ va_list args;
+ PGresult *ECPGresult;
+ enum ECPGdtype type;
+ int ntuples,
+ act_tuple;
+ struct variable data_var;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ va_start(args, index);
+ ecpg_init_sqlca(sqlca);
+ ECPGresult = ecpg_result_by_descriptor(lineno, desc_name);
+ if (!ECPGresult)
+ {
+ va_end(args);
+ return false;
+ }
+
+ ntuples = PQntuples(ECPGresult);
+
+ if (index < 1 || index > PQnfields(ECPGresult))
+ {
+ ecpg_raise(lineno, ECPG_INVALID_DESCRIPTOR_INDEX, ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX, NULL);
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: reading items for tuple %d\n", index);
+ --index;
+
+ type = va_arg(args, enum ECPGdtype);
+
+ memset(&data_var, 0, sizeof data_var);
+ data_var.type = ECPGt_EORT;
+ data_var.ind_type = ECPGt_NO_INDICATOR;
+
+ while (type != ECPGd_EODT)
+ {
+ char type_str[20];
+ long varcharsize;
+ long offset;
+ long arrsize;
+ enum ECPGttype vartype;
+ void *var;
+
+ vartype = va_arg(args, enum ECPGttype);
+ var = va_arg(args, void *);
+ varcharsize = va_arg(args, long);
+ arrsize = va_arg(args, long);
+ offset = va_arg(args, long);
+
+ switch (type)
+ {
+ case (ECPGd_indicator):
+ RETURN_IF_NO_DATA;
+ data_var.ind_type = vartype;
+ data_var.ind_pointer = var;
+ data_var.ind_varcharsize = varcharsize;
+ data_var.ind_arrsize = arrsize;
+ data_var.ind_offset = offset;
+ if (data_var.ind_arrsize == 0 || data_var.ind_varcharsize == 0)
+ data_var.ind_value = *((void **) (data_var.ind_pointer));
+ else
+ data_var.ind_value = data_var.ind_pointer;
+ break;
+
+ case ECPGd_data:
+ RETURN_IF_NO_DATA;
+ data_var.type = vartype;
+ data_var.pointer = var;
+ data_var.varcharsize = varcharsize;
+ data_var.arrsize = arrsize;
+ data_var.offset = offset;
+ if (data_var.arrsize == 0 || data_var.varcharsize == 0)
+ data_var.value = *((void **) (data_var.pointer));
+ else
+ data_var.value = data_var.pointer;
+ break;
+
+ case ECPGd_name:
+ if (!get_char_item(lineno, var, vartype, PQfname(ECPGresult, index), varcharsize))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: NAME = %s\n", PQfname(ECPGresult, index));
+ break;
+
+ case ECPGd_nullable:
+ if (!get_int_item(lineno, var, vartype, 1))
+ {
+ va_end(args);
+ return false;
+ }
+
+ break;
+
+ case ECPGd_key_member:
+ if (!get_int_item(lineno, var, vartype, 0))
+ {
+ va_end(args);
+ return false;
+ }
+
+ break;
+
+ case ECPGd_scale:
+ if (!get_int_item(lineno, var, vartype, (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: SCALE = %d\n", (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff);
+ break;
+
+ case ECPGd_precision:
+ if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) >> 16))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: PRECISION = %d\n", PQfmod(ECPGresult, index) >> 16);
+ break;
+
+ case ECPGd_octet:
+ if (!get_int_item(lineno, var, vartype, PQfsize(ECPGresult, index)))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: OCTET_LENGTH = %d\n", PQfsize(ECPGresult, index));
+ break;
+
+ case ECPGd_length:
+ if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) - VARHDRSZ))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: LENGTH = %d\n", PQfmod(ECPGresult, index) - VARHDRSZ);
+ break;
+
+ case ECPGd_type:
+ if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type(PQftype(ECPGresult, index))))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type(PQftype(ECPGresult, index)));
+ break;
+
+ case ECPGd_di_code:
+ if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type_DDT(PQftype(ECPGresult, index))))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type_DDT(PQftype(ECPGresult, index)));
+ break;
+
+ case ECPGd_cardinality:
+ if (!get_int_item(lineno, var, vartype, PQntuples(ECPGresult)))
+ {
+ va_end(args);
+ return false;
+ }
+
+ ecpg_log("ECPGget_desc: CARDINALITY = %d\n", PQntuples(ECPGresult));
+ break;
+
+ case ECPGd_ret_length:
+ case ECPGd_ret_octet:
+
+ RETURN_IF_NO_DATA;
+
+ /*
+ * this is like ECPGstore_result
+ */
+ if (arrsize > 0 && ntuples > arrsize)
+ {
+ ecpg_log("ECPGget_desc on line %d: incorrect number of matches; %d don't fit into array of %ld\n",
+ lineno, ntuples, arrsize);
+ ecpg_raise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL);
+ va_end(args);
+ return false;
+ }
+ /* allocate storage if needed */
+ if (arrsize == 0 && *(void **) var == NULL)
+ {
+ void *mem = (void *) ecpg_auto_alloc(offset * ntuples, lineno);
+
+ if (!mem)
+ {
+ va_end(args);
+ return false;
+ }
+ *(void **) var = mem;
+ var = mem;
+ }
+
+ for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
+ {
+ if (!get_int_item(lineno, var, vartype, PQgetlength(ECPGresult, act_tuple, index)))
+ {
+ va_end(args);
+ return false;
+ }
+ var = (char *) var + offset;
+ ecpg_log("ECPGget_desc: RETURNED[%d] = %d\n", act_tuple, PQgetlength(ECPGresult, act_tuple, index));
+ }
+ break;
+
+ default:
+ snprintf(type_str, sizeof(type_str), "%d", type);
+ ecpg_raise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str);
+ va_end(args);
+ return false;
+ }
+
+ type = va_arg(args, enum ECPGdtype);
+ }
+
+ if (data_var.type != ECPGt_EORT)
+ {
+ struct statement stmt;
+
+ memset(&stmt, 0, sizeof stmt);
+ stmt.lineno = lineno;
+
+ /* Make sure we do NOT honor the locale for numeric input */
+ /* since the database gives the standard decimal point */
+ /* (see comments in execute.c) */
+#ifdef HAVE_USELOCALE
+
+ /*
+ * To get here, the above PQnfields() test must have found nonzero
+ * fields. One needs a connection to create such a descriptor. (EXEC
+ * SQL SET DESCRIPTOR can populate the descriptor's "items", but it
+ * can't change the descriptor's PQnfields().) Any successful
+ * connection initializes ecpg_clocale.
+ */
+ Assert(ecpg_clocale);
+ stmt.oldlocale = uselocale(ecpg_clocale);
+#else
+#ifdef HAVE__CONFIGTHREADLOCALE
+ stmt.oldthreadlocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
+#endif
+ stmt.oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno);
+ setlocale(LC_NUMERIC, "C");
+#endif
+
+ /* desperate try to guess something sensible */
+ stmt.connection = ecpg_get_connection(NULL);
+ ecpg_store_result(ECPGresult, index, &stmt, &data_var);
+
+#ifdef HAVE_USELOCALE
+ if (stmt.oldlocale != (locale_t) 0)
+ uselocale(stmt.oldlocale);
+#else
+ if (stmt.oldlocale)
+ {
+ setlocale(LC_NUMERIC, stmt.oldlocale);
+ ecpg_free(stmt.oldlocale);
+ }
+#ifdef HAVE__CONFIGTHREADLOCALE
+ if (stmt.oldthreadlocale != -1)
+ (void) _configthreadlocale(stmt.oldthreadlocale);
+#endif
+#endif
+ }
+ else if (data_var.ind_type != ECPGt_NO_INDICATOR && data_var.ind_pointer != NULL)
+
+ /*
+ * ind_type != NO_INDICATOR should always have ind_pointer != NULL but
+ * since this might be changed manually in the .c file let's play it
+ * safe
+ */
+ {
+ /*
+ * this is like ECPGstore_result but since we don't have a data
+ * variable at hand, we can't call it
+ */
+ if (data_var.ind_arrsize > 0 && ntuples > data_var.ind_arrsize)
+ {
+ ecpg_log("ECPGget_desc on line %d: incorrect number of matches (indicator); %d don't fit into array of %ld\n",
+ lineno, ntuples, data_var.ind_arrsize);
+ ecpg_raise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL);
+ va_end(args);
+ return false;
+ }
+
+ /* allocate storage if needed */
+ if (data_var.ind_arrsize == 0 && data_var.ind_value == NULL)
+ {
+ void *mem = (void *) ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
+
+ if (!mem)
+ {
+ va_end(args);
+ return false;
+ }
+ *(void **) data_var.ind_pointer = mem;
+ data_var.ind_value = mem;
+ }
+
+ for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
+ {
+ if (!get_int_item(lineno, data_var.ind_value, data_var.ind_type, -PQgetisnull(ECPGresult, act_tuple, index)))
+ {
+ va_end(args);
+ return false;
+ }
+ data_var.ind_value = (char *) data_var.ind_value + data_var.ind_offset;
+ ecpg_log("ECPGget_desc: INDICATOR[%d] = %d\n", act_tuple, -PQgetisnull(ECPGresult, act_tuple, index));
+ }
+ }
+ sqlca->sqlerrd[2] = ntuples;
+ va_end(args);
+ return true;
+}
+
+#undef RETURN_IF_NO_DATA
+
+bool
+ECPGset_desc_header(int lineno, const char *desc_name, int count)
+{
+ struct descriptor *desc = ecpg_find_desc(lineno, desc_name);
+
+ if (desc == NULL)
+ return false;
+ desc->count = count;
+ return true;
+}
+
+static void
+set_desc_attr(struct descriptor_item *desc_item, struct variable *var,
+ char *tobeinserted)
+{
+ if (var->type != ECPGt_bytea)
+ desc_item->is_binary = false;
+
+ else
+ {
+ struct ECPGgeneric_bytea *variable =
+ (struct ECPGgeneric_bytea *) (var->value);
+
+ desc_item->is_binary = true;
+ desc_item->data_len = variable->len;
+ }
+
+ ecpg_free(desc_item->data); /* free() takes care of a potential NULL value */
+ desc_item->data = (char *) tobeinserted;
+}
+
+
+bool
+ECPGset_desc(int lineno, const char *desc_name, int index,...)
+{
+ va_list args;
+ struct descriptor *desc;
+ struct descriptor_item *desc_item;
+ struct variable *var;
+
+ desc = ecpg_find_desc(lineno, desc_name);
+ if (desc == NULL)
+ return false;
+
+ for (desc_item = desc->items; desc_item; desc_item = desc_item->next)
+ {
+ if (desc_item->num == index)
+ break;
+ }
+
+ if (desc_item == NULL)
+ {
+ desc_item = (struct descriptor_item *) ecpg_alloc(sizeof(*desc_item), lineno);
+ if (!desc_item)
+ return false;
+ desc_item->num = index;
+ if (desc->count < index)
+ desc->count = index;
+ desc_item->next = desc->items;
+ desc->items = desc_item;
+ }
+
+ if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno)))
+ return false;
+
+ va_start(args, index);
+
+ for (;;)
+ {
+ enum ECPGdtype itemtype;
+ char *tobeinserted = NULL;
+
+ itemtype = va_arg(args, enum ECPGdtype);
+
+ if (itemtype == ECPGd_EODT)
+ break;
+
+ var->type = va_arg(args, enum ECPGttype);
+ var->pointer = va_arg(args, char *);
+
+ var->varcharsize = va_arg(args, long);
+ var->arrsize = va_arg(args, long);
+ var->offset = va_arg(args, long);
+
+ if (var->arrsize == 0 || var->varcharsize == 0)
+ var->value = *((char **) (var->pointer));
+ else
+ var->value = var->pointer;
+
+ /*
+ * negative values are used to indicate an array without given bounds
+ */
+ /* reset to zero for us */
+ if (var->arrsize < 0)
+ var->arrsize = 0;
+ if (var->varcharsize < 0)
+ var->varcharsize = 0;
+
+ var->next = NULL;
+
+ switch (itemtype)
+ {
+ case ECPGd_data:
+ {
+ if (!ecpg_store_input(lineno, true, var, &tobeinserted, false))
+ {
+ ecpg_free(var);
+ va_end(args);
+ return false;
+ }
+
+ set_desc_attr(desc_item, var, tobeinserted);
+ tobeinserted = NULL;
+ break;
+ }
+
+ case ECPGd_indicator:
+ set_int_item(lineno, &desc_item->indicator, var->pointer, var->type);
+ break;
+
+ case ECPGd_length:
+ set_int_item(lineno, &desc_item->length, var->pointer, var->type);
+ break;
+
+ case ECPGd_precision:
+ set_int_item(lineno, &desc_item->precision, var->pointer, var->type);
+ break;
+
+ case ECPGd_scale:
+ set_int_item(lineno, &desc_item->scale, var->pointer, var->type);
+ break;
+
+ case ECPGd_type:
+ set_int_item(lineno, &desc_item->type, var->pointer, var->type);
+ break;
+
+ default:
+ {
+ char type_str[20];
+
+ snprintf(type_str, sizeof(type_str), "%d", itemtype);
+ ecpg_raise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str);
+ ecpg_free(var);
+ va_end(args);
+ return false;
+ }
+ }
+ }
+ ecpg_free(var);
+ va_end(args);
+
+ return true;
+}
+
+/* Free the descriptor and items in it. */
+static void
+descriptor_free(struct descriptor *desc)
+{
+ struct descriptor_item *desc_item;
+
+ for (desc_item = desc->items; desc_item;)
+ {
+ struct descriptor_item *di;
+
+ ecpg_free(desc_item->data);
+ di = desc_item;
+ desc_item = desc_item->next;
+ ecpg_free(di);
+ }
+
+ ecpg_free(desc->name);
+ PQclear(desc->result);
+ ecpg_free(desc);
+}
+
+bool
+ECPGdeallocate_desc(int line, const char *name)
+{
+ struct descriptor *desc;
+ struct descriptor *prev;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(line, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ ecpg_init_sqlca(sqlca);
+ for (desc = get_descriptors(), prev = NULL; desc; prev = desc, desc = desc->next)
+ {
+ if (strcmp(name, desc->name) == 0)
+ {
+ if (prev)
+ prev->next = desc->next;
+ else
+ set_descriptors(desc->next);
+ descriptor_free(desc);
+ return true;
+ }
+ }
+ ecpg_raise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name);
+ return false;
+}
+
+#ifdef ENABLE_THREAD_SAFETY
+
+/* Deallocate all descriptors in the list */
+static void
+descriptor_deallocate_all(struct descriptor *list)
+{
+ while (list)
+ {
+ struct descriptor *next = list->next;
+
+ descriptor_free(list);
+ list = next;
+ }
+}
+#endif /* ENABLE_THREAD_SAFETY */
+
+bool
+ECPGallocate_desc(int line, const char *name)
+{
+ struct descriptor *new;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(line, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ ecpg_init_sqlca(sqlca);
+ new = (struct descriptor *) ecpg_alloc(sizeof(struct descriptor), line);
+ if (!new)
+ return false;
+ new->next = get_descriptors();
+ new->name = ecpg_alloc(strlen(name) + 1, line);
+ if (!new->name)
+ {
+ ecpg_free(new);
+ return false;
+ }
+ new->count = -1;
+ new->items = NULL;
+ new->result = PQmakeEmptyPGresult(NULL, 0);
+ if (!new->result)
+ {
+ ecpg_free(new->name);
+ ecpg_free(new);
+ ecpg_raise(line, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+ strcpy(new->name, name);
+ set_descriptors(new);
+ return true;
+}
+
+/* Find descriptor with name in the connection. */
+struct descriptor *
+ecpg_find_desc(int line, const char *name)
+{
+ struct descriptor *desc;
+
+ for (desc = get_descriptors(); desc; desc = desc->next)
+ {
+ if (strcmp(name, desc->name) == 0)
+ return desc;
+ }
+
+ ecpg_raise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name);
+ return NULL; /* not found */
+}
+
+bool
+ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name,...)
+{
+ bool ret = false;
+ struct connection *con;
+ struct prepared_statement *prep;
+ PGresult *res;
+ va_list args;
+
+ /* DESCRIBE INPUT is not yet supported */
+ if (input)
+ {
+ ecpg_raise(line, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, "DESCRIBE INPUT");
+ return ret;
+ }
+
+ con = ecpg_get_connection(connection_name);
+ if (!con)
+ {
+ ecpg_raise(line, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
+ connection_name ? connection_name : ecpg_gettext("NULL"));
+ return ret;
+ }
+ prep = ecpg_find_prepared_statement(stmt_name, con, NULL);
+ if (!prep)
+ {
+ ecpg_raise(line, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt_name);
+ return ret;
+ }
+
+ va_start(args, stmt_name);
+
+ for (;;)
+ {
+ enum ECPGttype type;
+ void *ptr;
+
+ /* variable type */
+ type = va_arg(args, enum ECPGttype);
+
+ if (type == ECPGt_EORT)
+ break;
+
+ /* rest of variable parameters */
+ ptr = va_arg(args, void *);
+ (void) va_arg(args, long); /* skip args */
+ (void) va_arg(args, long);
+ (void) va_arg(args, long);
+
+ /* variable indicator */
+ (void) va_arg(args, enum ECPGttype);
+ (void) va_arg(args, void *); /* skip args */
+ (void) va_arg(args, long);
+ (void) va_arg(args, long);
+ (void) va_arg(args, long);
+
+ switch (type)
+ {
+ case ECPGt_descriptor:
+ {
+ char *name = ptr;
+ struct descriptor *desc = ecpg_find_desc(line, name);
+
+ if (desc == NULL)
+ break;
+
+ res = PQdescribePrepared(con->connection, stmt_name);
+ if (!ecpg_check_PQresult(res, line, con->connection, compat))
+ break;
+
+ if (desc->result != NULL)
+ PQclear(desc->result);
+
+ desc->result = res;
+ ret = true;
+ break;
+ }
+ case ECPGt_sqlda:
+ {
+ if (INFORMIX_MODE(compat))
+ {
+ struct sqlda_compat **_sqlda = ptr;
+ struct sqlda_compat *sqlda;
+
+ res = PQdescribePrepared(con->connection, stmt_name);
+ if (!ecpg_check_PQresult(res, line, con->connection, compat))
+ break;
+
+ sqlda = ecpg_build_compat_sqlda(line, res, -1, compat);
+ if (sqlda)
+ {
+ struct sqlda_compat *sqlda_old = *_sqlda;
+ struct sqlda_compat *sqlda_old1;
+
+ while (sqlda_old)
+ {
+ sqlda_old1 = sqlda_old->desc_next;
+ free(sqlda_old);
+ sqlda_old = sqlda_old1;
+ }
+
+ *_sqlda = sqlda;
+ ret = true;
+ }
+
+ PQclear(res);
+ }
+ else
+ {
+ struct sqlda_struct **_sqlda = ptr;
+ struct sqlda_struct *sqlda;
+
+ res = PQdescribePrepared(con->connection, stmt_name);
+ if (!ecpg_check_PQresult(res, line, con->connection, compat))
+ break;
+
+ sqlda = ecpg_build_native_sqlda(line, res, -1, compat);
+ if (sqlda)
+ {
+ struct sqlda_struct *sqlda_old = *_sqlda;
+ struct sqlda_struct *sqlda_old1;
+
+ while (sqlda_old)
+ {
+ sqlda_old1 = sqlda_old->desc_next;
+ free(sqlda_old);
+ sqlda_old = sqlda_old1;
+ }
+
+ *_sqlda = sqlda;
+ ret = true;
+ }
+
+ PQclear(res);
+ }
+ break;
+ }
+ default:
+ /* nothing else may come */
+ ;
+ }
+ }
+
+ va_end(args);
+
+ return ret;
+}
diff --git a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
new file mode 100644
index 0000000..c438cfb
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -0,0 +1,257 @@
+/* src/interfaces/ecpg/ecpglib/ecpglib_extern.h */
+
+#ifndef _ECPG_ECPGLIB_EXTERN_H
+#define _ECPG_ECPGLIB_EXTERN_H
+
+#include "ecpg_config.h"
+#include "ecpgtype.h"
+#include "libpq-fe.h"
+#include "sqlca.h"
+#include "sqlda-compat.h"
+#include "sqlda-native.h"
+
+#ifndef CHAR_BIT
+#include <limits.h>
+#endif
+#ifdef LOCALE_T_IN_XLOCALE
+#include <xlocale.h>
+#endif
+
+enum COMPAT_MODE
+{
+ ECPG_COMPAT_PGSQL = 0, ECPG_COMPAT_INFORMIX, ECPG_COMPAT_INFORMIX_SE, ECPG_COMPAT_ORACLE
+};
+
+extern bool ecpg_internal_regression_mode;
+
+#define INFORMIX_MODE(X) ((X) == ECPG_COMPAT_INFORMIX || (X) == ECPG_COMPAT_INFORMIX_SE)
+#define ORACLE_MODE(X) ((X) == ECPG_COMPAT_ORACLE)
+
+enum ARRAY_TYPE
+{
+ ECPG_ARRAY_ERROR, ECPG_ARRAY_NOT_SET, ECPG_ARRAY_ARRAY, ECPG_ARRAY_VECTOR, ECPG_ARRAY_NONE
+};
+
+#define ECPG_IS_ARRAY(X) ((X) == ECPG_ARRAY_ARRAY || (X) == ECPG_ARRAY_VECTOR)
+
+/* A generic varchar type. */
+struct ECPGgeneric_varchar
+{
+ int len;
+ char arr[FLEXIBLE_ARRAY_MEMBER];
+};
+
+/* A generic bytea type. */
+struct ECPGgeneric_bytea
+{
+ int len;
+ char arr[FLEXIBLE_ARRAY_MEMBER];
+};
+
+/*
+ * type information cache
+ */
+
+struct ECPGtype_information_cache
+{
+ struct ECPGtype_information_cache *next;
+ int oid;
+ enum ARRAY_TYPE isarray;
+};
+
+#ifdef HAVE_USELOCALE
+extern locale_t ecpg_clocale; /* LC_NUMERIC=C */
+#endif
+
+/* structure to store one statement */
+struct statement
+{
+ int lineno;
+ char *command;
+ char *name;
+ struct connection *connection;
+ enum COMPAT_MODE compat;
+ bool force_indicator;
+ enum ECPG_statement_type statement_type;
+ bool questionmarks;
+ struct variable *inlist;
+ struct variable *outlist;
+#ifdef HAVE_USELOCALE
+ locale_t oldlocale;
+#else
+ char *oldlocale;
+#ifdef HAVE__CONFIGTHREADLOCALE
+ int oldthreadlocale;
+#endif
+#endif
+ int nparams;
+ char **paramvalues;
+ int *paramlengths;
+ int *paramformats;
+ PGresult *results;
+};
+
+/* structure to store prepared statements for a connection */
+struct prepared_statement
+{
+ char *name;
+ bool prepared;
+ struct statement *stmt;
+ struct prepared_statement *next;
+};
+
+/* structure to store connections */
+struct connection
+{
+ char *name;
+ PGconn *connection;
+ bool autocommit;
+ struct ECPGtype_information_cache *cache_head;
+ struct prepared_statement *prep_stmts;
+ struct connection *next;
+};
+
+/* structure to store descriptors */
+struct descriptor
+{
+ char *name;
+ PGresult *result;
+ struct descriptor *next;
+ int count;
+ struct descriptor_item *items;
+};
+
+struct descriptor_item
+{
+ int num;
+ char *data;
+ int indicator;
+ int length;
+ int precision;
+ int scale;
+ int type;
+ bool is_binary;
+ int data_len;
+ struct descriptor_item *next;
+};
+
+struct variable
+{
+ enum ECPGttype type;
+ void *value;
+ void *pointer;
+ long varcharsize;
+ long arrsize;
+ long offset;
+ enum ECPGttype ind_type;
+ void *ind_value;
+ void *ind_pointer;
+ long ind_varcharsize;
+ long ind_arrsize;
+ long ind_offset;
+ struct variable *next;
+};
+
+struct var_list
+{
+ int number;
+ void *pointer;
+ struct var_list *next;
+};
+
+extern struct var_list *ivlist;
+
+/* Here are some methods used by the lib. */
+
+bool ecpg_add_mem(void *ptr, int lineno);
+
+bool ecpg_get_data(const PGresult *, int, int, int, enum ECPGttype type,
+ enum ECPGttype, char *, char *, long, long, long,
+ enum ARRAY_TYPE, enum COMPAT_MODE, bool);
+
+#ifdef ENABLE_THREAD_SAFETY
+void ecpg_pthreads_init(void);
+#endif
+struct connection *ecpg_get_connection(const char *);
+char *ecpg_alloc(long, int);
+char *ecpg_auto_alloc(long, int);
+char *ecpg_realloc(void *, long, int);
+void ecpg_free(void *);
+bool ecpg_init(const struct connection *, const char *, const int);
+char *ecpg_strdup(const char *, int);
+const char *ecpg_type_name(enum ECPGttype);
+int ecpg_dynamic_type(Oid);
+int sqlda_dynamic_type(Oid, enum COMPAT_MODE);
+void ecpg_clear_auto_mem(void);
+
+struct descriptor *ecpg_find_desc(int line, const char *name);
+
+struct prepared_statement *ecpg_find_prepared_statement(const char *,
+ struct connection *, struct prepared_statement **);
+
+bool ecpg_store_result(const PGresult *results, int act_field,
+ const struct statement *stmt, struct variable *var);
+bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool);
+void ecpg_free_params(struct statement *stmt, bool print);
+bool ecpg_do_prologue(int, const int, const int, const char *, const bool,
+ enum ECPG_statement_type, const char *, va_list,
+ struct statement **);
+bool ecpg_build_params(struct statement *);
+bool ecpg_autostart_transaction(struct statement *stmt);
+bool ecpg_execute(struct statement *stmt);
+bool ecpg_process_output(struct statement *, bool);
+void ecpg_do_epilogue(struct statement *);
+bool ecpg_do(const int, const int, const int, const char *, const bool,
+ const int, const char *, va_list);
+
+bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE);
+void ecpg_raise(int line, int code, const char *sqlstate, const char *str);
+void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat);
+char *ecpg_prepared(const char *, struct connection *);
+bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *conn);
+void ecpg_log(const char *format,...) pg_attribute_printf(1, 2);
+bool ecpg_auto_prepare(int, const char *, const int, char **, const char *);
+bool ecpg_register_prepared_stmt(struct statement *);
+void ecpg_init_sqlca(struct sqlca_t *sqlca);
+
+struct sqlda_compat *ecpg_build_compat_sqlda(int, PGresult *, int, enum COMPAT_MODE);
+void ecpg_set_compat_sqlda(int, struct sqlda_compat **, const PGresult *, int, enum COMPAT_MODE);
+struct sqlda_struct *ecpg_build_native_sqlda(int, PGresult *, int, enum COMPAT_MODE);
+void ecpg_set_native_sqlda(int, struct sqlda_struct **, const PGresult *, int, enum COMPAT_MODE);
+unsigned ecpg_hex_dec_len(unsigned srclen);
+unsigned ecpg_hex_enc_len(unsigned srclen);
+unsigned ecpg_hex_encode(const char *src, unsigned len, char *dst);
+
+#ifdef ENABLE_NLS
+extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1);
+#else
+#define ecpg_gettext(x) (x)
+#endif
+
+/* SQLSTATE values generated or processed by ecpglib (intentionally
+ * not exported -- users should refer to the codes directly) */
+
+#define ECPG_SQLSTATE_NO_DATA "02000"
+#define ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS "07001"
+#define ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS "07002"
+#define ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION "07006"
+#define ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX "07009"
+#define ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION "08001"
+#define ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST "08003"
+#define ECPG_SQLSTATE_TRANSACTION_RESOLUTION_UNKNOWN "08007"
+#define ECPG_SQLSTATE_CARDINALITY_VIOLATION "21000"
+#define ECPG_SQLSTATE_NULL_VALUE_NO_INDICATOR_PARAMETER "22002"
+#define ECPG_SQLSTATE_ACTIVE_SQL_TRANSACTION "25001"
+#define ECPG_SQLSTATE_NO_ACTIVE_SQL_TRANSACTION "25P01"
+#define ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME "26000"
+#define ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME "33000"
+#define ECPG_SQLSTATE_INVALID_CURSOR_NAME "34000"
+#define ECPG_SQLSTATE_SYNTAX_ERROR "42601"
+#define ECPG_SQLSTATE_DATATYPE_MISMATCH "42804"
+#define ECPG_SQLSTATE_DUPLICATE_CURSOR "42P03"
+
+/* implementation-defined internal errors of ecpg */
+#define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR "YE000"
+#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001"
+
+#endif /* _ECPG_ECPGLIB_EXTERN_H */
diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
new file mode 100644
index 0000000..26fdcdb
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -0,0 +1,346 @@
+/* src/interfaces/ecpg/ecpglib/error.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sqlca.h"
+
+void
+ecpg_raise(int line, int code, const char *sqlstate, const char *str)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_log("out of memory");
+ ECPGfree_auto_mem();
+ return;
+ }
+
+ sqlca->sqlcode = code;
+ strncpy(sqlca->sqlstate, sqlstate, sizeof(sqlca->sqlstate));
+
+ switch (code)
+ {
+ case ECPG_NOT_FOUND:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("no data found on line %d"), line);
+ break;
+
+ case ECPG_OUT_OF_MEMORY:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("out of memory on line %d"), line);
+ break;
+
+ case ECPG_UNSUPPORTED:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("unsupported type \"%s\" on line %d"), str, line);
+ break;
+
+ case ECPG_TOO_MANY_ARGUMENTS:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("too many arguments on line %d"), line);
+ break;
+
+ case ECPG_TOO_FEW_ARGUMENTS:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("too few arguments on line %d"), line);
+ break;
+
+ case ECPG_INT_FORMAT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("invalid input syntax for type int: \"%s\", on line %d"), str, line);
+ break;
+
+ case ECPG_UINT_FORMAT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("invalid input syntax for type unsigned int: \"%s\", on line %d"), str, line);
+ break;
+
+ case ECPG_FLOAT_FORMAT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("invalid input syntax for floating-point type: \"%s\", on line %d"), str, line);
+ break;
+
+ case ECPG_CONVERT_BOOL:
+ if (str)
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("invalid syntax for type boolean: \"%s\", on line %d"), str, line);
+ else
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("could not convert boolean value: size mismatch, on line %d"), line);
+ break;
+
+ case ECPG_EMPTY:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("empty query on line %d"), line);
+ break;
+
+ case ECPG_MISSING_INDICATOR:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("null value without indicator on line %d"), line);
+ break;
+
+ case ECPG_NO_ARRAY:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("variable does not have an array type on line %d"), line);
+ break;
+
+ case ECPG_DATA_NOT_ARRAY:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("data read from server is not an array on line %d"), line);
+ break;
+
+ case ECPG_ARRAY_INSERT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("inserting an array of variables is not supported on line %d"), line);
+ break;
+
+ case ECPG_NO_CONN:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("connection \"%s\" does not exist on line %d"), str, line);
+ break;
+
+ case ECPG_NOT_CONN:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("not connected to connection \"%s\" on line %d"), str, line);
+ break;
+
+ case ECPG_INVALID_STMT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("invalid statement name \"%s\" on line %d"), str, line);
+ break;
+
+ case ECPG_UNKNOWN_DESCRIPTOR:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("descriptor \"%s\" not found on line %d"), str, line);
+ break;
+
+ case ECPG_INVALID_DESCRIPTOR_INDEX:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("descriptor index out of range on line %d"), line);
+ break;
+
+ case ECPG_UNKNOWN_DESCRIPTOR_ITEM:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("unrecognized descriptor item \"%s\" on line %d"), str, line);
+ break;
+
+ case ECPG_VAR_NOT_NUMERIC:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("variable does not have a numeric type on line %d"), line);
+ break;
+
+ case ECPG_VAR_NOT_CHAR:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("variable does not have a character type on line %d"), line);
+ break;
+
+ case ECPG_TRANS:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("error in transaction processing on line %d"), line);
+ break;
+
+ case ECPG_CONNECT:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("could not connect to database \"%s\" on line %d"), str, line);
+ break;
+
+ default:
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+ /*------
+ translator: this string will be truncated at 149 characters expanded. */
+ ecpg_gettext("SQL error %d on line %d"), code, line);
+ break;
+ }
+
+ sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
+ ecpg_log("raising sqlcode %d on line %d: %s\n", code, line, sqlca->sqlerrm.sqlerrmc);
+
+ /* free all memory we have allocated for the user */
+ ECPGfree_auto_mem();
+}
+
+void
+ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ char *sqlstate;
+ char *message;
+
+ if (sqlca == NULL)
+ {
+ ecpg_log("out of memory");
+ ECPGfree_auto_mem();
+ return;
+ }
+
+ /*
+ * PQresultErrorField will return NULL if "result" is NULL, or if there is
+ * no such field, which will happen for libpq-generated errors. Fall back
+ * to PQerrorMessage in such cases.
+ */
+ sqlstate = PQresultErrorField(result, PG_DIAG_SQLSTATE);
+ if (sqlstate == NULL)
+ sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
+ message = PQresultErrorField(result, PG_DIAG_MESSAGE_PRIMARY);
+ if (message == NULL)
+ message = PQerrorMessage(conn);
+
+ if (strcmp(sqlstate, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR) == 0)
+ {
+ /*
+ * we might get here if the connection breaks down, so let's check for
+ * this instead of giving just the generic internal error
+ */
+ if (PQstatus(conn) == CONNECTION_BAD)
+ {
+ sqlstate = "57P02";
+ message = ecpg_gettext("the connection to the server was lost");
+ }
+ }
+
+ /* copy error message */
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "%s on line %d", message, line);
+ sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
+
+ /* copy SQLSTATE */
+ strncpy(sqlca->sqlstate, sqlstate, sizeof(sqlca->sqlstate));
+
+ /* assign SQLCODE for backward compatibility */
+ if (strncmp(sqlca->sqlstate, "23505", sizeof(sqlca->sqlstate)) == 0)
+ sqlca->sqlcode = INFORMIX_MODE(compat) ? ECPG_INFORMIX_DUPLICATE_KEY : ECPG_DUPLICATE_KEY;
+ else if (strncmp(sqlca->sqlstate, "21000", sizeof(sqlca->sqlstate)) == 0)
+ sqlca->sqlcode = INFORMIX_MODE(compat) ? ECPG_INFORMIX_SUBSELECT_NOT_ONE : ECPG_SUBSELECT_NOT_ONE;
+ else
+ sqlca->sqlcode = ECPG_PGSQL;
+
+ ecpg_log("raising sqlstate %.*s (sqlcode %ld): %s\n",
+ (int) sizeof(sqlca->sqlstate), sqlca->sqlstate, sqlca->sqlcode, sqlca->sqlerrm.sqlerrmc);
+
+ /* free all memory we have allocated for the user */
+ ECPGfree_auto_mem();
+}
+
+/* filter out all error codes */
+bool
+ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat)
+{
+ if (results == NULL)
+ {
+ ecpg_log("ecpg_check_PQresult on line %d: no result - %s", lineno, PQerrorMessage(connection));
+ ecpg_raise_backend(lineno, NULL, connection, compat);
+ return false;
+ }
+
+ switch (PQresultStatus(results))
+ {
+
+ case PGRES_TUPLES_OK:
+ return true;
+ break;
+ case PGRES_EMPTY_QUERY:
+ /* do nothing */
+ ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL);
+ PQclear(results);
+ return false;
+ break;
+ case PGRES_COMMAND_OK:
+ return true;
+ break;
+ case PGRES_NONFATAL_ERROR:
+ case PGRES_FATAL_ERROR:
+ case PGRES_BAD_RESPONSE:
+ ecpg_log("ecpg_check_PQresult on line %d: bad response - %s", lineno, PQresultErrorMessage(results));
+ ecpg_raise_backend(lineno, results, connection, compat);
+ PQclear(results);
+ return false;
+ break;
+ case PGRES_COPY_OUT:
+ return true;
+ break;
+ case PGRES_COPY_IN:
+ ecpg_log("ecpg_check_PQresult on line %d: COPY IN data transfer in progress\n", lineno);
+ PQendcopy(connection);
+ PQclear(results);
+ return false;
+ break;
+ default:
+ ecpg_log("ecpg_check_PQresult on line %d: unknown execution status type\n",
+ lineno);
+ ecpg_raise_backend(lineno, results, connection, compat);
+ PQclear(results);
+ return false;
+ break;
+ }
+}
+
+/* print out an error message */
+void
+sqlprint(void)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_log("out of memory");
+ return;
+ }
+
+ sqlca->sqlerrm.sqlerrmc[sqlca->sqlerrm.sqlerrml] = '\0';
+ fprintf(stderr, ecpg_gettext("SQL error: %s\n"), sqlca->sqlerrm.sqlerrmc);
+}
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
new file mode 100644
index 0000000..e8e8fb2
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -0,0 +1,2302 @@
+/* src/interfaces/ecpg/ecpglib/execute.c */
+
+/*
+ * The aim is to get a simpler interface to the database routines.
+ * All the tedious messing around with tuples is supposed to be hidden
+ * by this function.
+ */
+/* Author: Linus Tolke
+ (actually most if the code is "borrowed" from the distribution and just
+ slightly modified)
+ */
+
+/* Taken over as part of PostgreSQL by Michael Meskes <meskes@postgresql.org>
+ on Feb. 5th, 1998 */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include <math.h>
+
+#include "catalog/pg_type_d.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "pgtypes_date.h"
+#include "pgtypes_interval.h"
+#include "pgtypes_numeric.h"
+#include "pgtypes_timestamp.h"
+#include "sql3types.h"
+#include "sqlca.h"
+#include "sqlda-compat.h"
+#include "sqlda-native.h"
+
+/*
+ * This function returns a newly malloced string that has ' and \
+ * escaped.
+ */
+static char *
+quote_postgres(char *arg, bool quote, int lineno)
+{
+ char *res;
+ size_t length;
+ size_t escaped_len;
+ size_t buffer_len;
+
+ /*
+ * if quote is false we just need to store things in a descriptor they
+ * will be quoted once they are inserted in a statement
+ */
+ if (!quote)
+ return arg;
+ else
+ {
+ length = strlen(arg);
+ buffer_len = 2 * length + 1;
+ res = (char *) ecpg_alloc(buffer_len + 3, lineno);
+ if (!res)
+ return res;
+ escaped_len = PQescapeString(res + 1, arg, buffer_len);
+ if (length == escaped_len)
+ {
+ res[0] = res[escaped_len + 1] = '\'';
+ res[escaped_len + 2] = '\0';
+ }
+ else
+ {
+ /*
+ * We don't know if the target database is using
+ * standard_conforming_strings, so we always use E'' strings.
+ */
+ memmove(res + 2, res + 1, escaped_len);
+ res[0] = ESCAPE_STRING_SYNTAX;
+ res[1] = res[escaped_len + 2] = '\'';
+ res[escaped_len + 3] = '\0';
+ }
+ ecpg_free(arg);
+ return res;
+ }
+}
+
+static void
+free_variable(struct variable *var)
+{
+ struct variable *var_next;
+
+ while (var)
+ {
+ var_next = var->next;
+ ecpg_free(var);
+ var = var_next;
+ }
+}
+
+static void
+free_statement(struct statement *stmt)
+{
+ if (stmt == NULL)
+ return;
+ free_variable(stmt->inlist);
+ free_variable(stmt->outlist);
+ ecpg_free(stmt->command);
+ ecpg_free(stmt->name);
+#ifndef HAVE_USELOCALE
+ ecpg_free(stmt->oldlocale);
+#endif
+ ecpg_free(stmt);
+}
+
+static int
+next_insert(char *text, int pos, bool questionmarks, bool std_strings)
+{
+ bool string = false;
+ int p = pos;
+
+ for (; text[p] != '\0'; p++)
+ {
+ if (string && !std_strings && text[p] == '\\') /* escape character */
+ p++;
+ else if (text[p] == '\'')
+ string = string ? false : true;
+ else if (!string)
+ {
+ if (text[p] == '$' && isdigit((unsigned char) text[p + 1]))
+ {
+ /* this can be either a dollar quote or a variable */
+ int i;
+
+ for (i = p + 1; isdigit((unsigned char) text[i]); i++)
+ /* empty loop body */ ;
+ if (!isalpha((unsigned char) text[i]) &&
+ isascii((unsigned char) text[i]) && text[i] != '_')
+ /* not dollar delimited quote */
+ return p;
+ }
+ else if (questionmarks && text[p] == '?')
+ {
+ /* also allow old style placeholders */
+ return p;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static bool
+ecpg_type_infocache_push(struct ECPGtype_information_cache **cache, int oid, enum ARRAY_TYPE isarray, int lineno)
+{
+ struct ECPGtype_information_cache *new_entry
+ = (struct ECPGtype_information_cache *) ecpg_alloc(sizeof(struct ECPGtype_information_cache), lineno);
+
+ if (new_entry == NULL)
+ return false;
+
+ new_entry->oid = oid;
+ new_entry->isarray = isarray;
+ new_entry->next = *cache;
+ *cache = new_entry;
+ return true;
+}
+
+static enum ARRAY_TYPE
+ecpg_is_type_an_array(int type, const struct statement *stmt, const struct variable *var)
+{
+ char *array_query;
+ enum ARRAY_TYPE isarray = ECPG_ARRAY_NOT_SET;
+ PGresult *query;
+ struct ECPGtype_information_cache *cache_entry;
+
+ if ((stmt->connection->cache_head) == NULL)
+ {
+ /*
+ * Text like types are not an array for ecpg, but postgres counts them
+ * as an array. This define reminds you to not 'correct' these values.
+ */
+#define not_an_array_in_ecpg ECPG_ARRAY_NONE
+
+ /* populate cache with well known types to speed things up */
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOOLOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BYTEAOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CHAROID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NAMEOID, not_an_array_in_ecpg, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT8OID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2OID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2VECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT4OID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), REGPROCOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TEXTOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIDOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), XIDOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDVECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POINTOID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LSEGOID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), PATHOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOXOID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POLYGONOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LINEOID, ECPG_ARRAY_VECTOR, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT4OID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT8OID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), UNKNOWNOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIRCLEOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), MONEYOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INETOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDROID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BPCHAROID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARCHAROID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), DATEOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPTZOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INTERVALOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMETZOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BITOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARBITOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NUMERICOID, ECPG_ARRAY_NONE, stmt->lineno))
+ return ECPG_ARRAY_ERROR;
+ }
+
+ for (cache_entry = (stmt->connection->cache_head); cache_entry != NULL; cache_entry = cache_entry->next)
+ {
+ if (cache_entry->oid == type)
+ return cache_entry->isarray;
+ }
+
+ array_query = (char *) ecpg_alloc(strlen("select typlen from pg_type where oid= and typelem<>0") + 11, stmt->lineno);
+ if (array_query == NULL)
+ return ECPG_ARRAY_ERROR;
+
+ sprintf(array_query, "select typlen from pg_type where oid=%d and typelem<>0", type);
+ query = PQexec(stmt->connection->connection, array_query);
+ ecpg_free(array_query);
+ if (!ecpg_check_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat))
+ return ECPG_ARRAY_ERROR;
+ else if (PQresultStatus(query) == PGRES_TUPLES_OK)
+ {
+ if (PQntuples(query) == 0)
+ isarray = ECPG_ARRAY_NONE;
+ else
+ {
+ isarray = (atol((char *) PQgetvalue(query, 0, 0)) == -1) ? ECPG_ARRAY_ARRAY : ECPG_ARRAY_VECTOR;
+ if (ecpg_dynamic_type(type) == SQL3_CHARACTER ||
+ ecpg_dynamic_type(type) == SQL3_CHARACTER_VARYING)
+ {
+ /*
+ * arrays of character strings are not yet implemented
+ */
+ isarray = ECPG_ARRAY_NONE;
+ }
+ }
+ PQclear(query);
+ }
+ else
+ return ECPG_ARRAY_ERROR;
+
+ ecpg_type_infocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno);
+ ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, ECPG_IS_ARRAY(isarray) ? "yes" : "no");
+ return isarray;
+}
+
+
+bool
+ecpg_store_result(const PGresult *results, int act_field,
+ const struct statement *stmt, struct variable *var)
+{
+ enum ARRAY_TYPE isarray;
+ int act_tuple,
+ ntuples = PQntuples(results);
+ bool status = true;
+
+ if ((isarray = ecpg_is_type_an_array(PQftype(results, act_field), stmt, var)) == ECPG_ARRAY_ERROR)
+ {
+ ecpg_raise(stmt->lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ if (isarray == ECPG_ARRAY_NONE)
+ {
+ /*
+ * if we don't have enough space, we cannot read all tuples
+ */
+ if ((var->arrsize > 0 && ntuples > var->arrsize) || (var->ind_arrsize > 0 && ntuples > var->ind_arrsize))
+ {
+ ecpg_log("ecpg_store_result on line %d: incorrect number of matches; %d don't fit into array of %ld\n",
+ stmt->lineno, ntuples, var->arrsize);
+ ecpg_raise(stmt->lineno, INFORMIX_MODE(stmt->compat) ? ECPG_INFORMIX_SUBSELECT_NOT_ONE : ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL);
+ return false;
+ }
+ }
+ else
+ {
+ /*
+ * since we read an array, the variable has to be an array too
+ */
+ if (var->arrsize == 0)
+ {
+ ecpg_raise(stmt->lineno, ECPG_NO_ARRAY, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
+ return false;
+ }
+ }
+
+ /*
+ * allocate memory for NULL pointers
+ */
+ if ((var->arrsize == 0 || var->varcharsize == 0) && var->value == NULL)
+ {
+ int len = 0;
+
+ if (!PQfformat(results, act_field))
+ {
+ switch (var->type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (!var->varcharsize && !var->arrsize)
+ {
+ /* special mode for handling char**foo=0 */
+ for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
+ len += strlen(PQgetvalue(results, act_tuple, act_field)) + 1;
+ len *= var->offset; /* should be 1, but YMNK */
+ len += (ntuples + 1) * sizeof(char *);
+ }
+ else
+ {
+ var->varcharsize = 0;
+ /* check strlen for each tuple */
+ for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
+ {
+ int len = strlen(PQgetvalue(results, act_tuple, act_field)) + 1;
+
+ if (len > var->varcharsize)
+ var->varcharsize = len;
+ }
+ var->offset *= var->varcharsize;
+ len = var->offset * ntuples;
+ }
+ break;
+ case ECPGt_varchar:
+ len = ntuples * (var->varcharsize + sizeof(int));
+ break;
+ default:
+ len = var->offset * ntuples;
+ break;
+ }
+ }
+ else
+ {
+ for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
+ len += PQgetlength(results, act_tuple, act_field);
+ }
+
+ ecpg_log("ecpg_store_result on line %d: allocating memory for %d tuples\n", stmt->lineno, ntuples);
+ var->value = (char *) ecpg_auto_alloc(len, stmt->lineno);
+ if (!var->value)
+ return false;
+ *((char **) var->pointer) = var->value;
+ }
+
+ /* allocate indicator variable if needed */
+ if ((var->ind_arrsize == 0 || var->ind_varcharsize == 0) && var->ind_value == NULL && var->ind_pointer != NULL)
+ {
+ int len = var->ind_offset * ntuples;
+
+ var->ind_value = (char *) ecpg_auto_alloc(len, stmt->lineno);
+ if (!var->ind_value)
+ return false;
+ *((char **) var->ind_pointer) = var->ind_value;
+ }
+
+ /* fill the variable with the tuple(s) */
+ if (!var->varcharsize && !var->arrsize &&
+ (var->type == ECPGt_char || var->type == ECPGt_unsigned_char || var->type == ECPGt_string))
+ {
+ /* special mode for handling char**foo=0 */
+
+ /* filling the array of (char*)s */
+ char **current_string = (char **) var->value;
+
+ /* storing the data (after the last array element) */
+ char *current_data_location = (char *) &current_string[ntuples + 1];
+
+ for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)
+ {
+ int len = strlen(PQgetvalue(results, act_tuple, act_field)) + 1;
+
+ if (!ecpg_get_data(results, act_tuple, act_field, stmt->lineno,
+ var->type, var->ind_type, current_data_location,
+ var->ind_value, len, 0, var->ind_offset, isarray, stmt->compat, stmt->force_indicator))
+ status = false;
+ else
+ {
+ *current_string = current_data_location;
+ current_data_location += len;
+ current_string++;
+ }
+ }
+
+ /* terminate the list */
+ *current_string = NULL;
+ }
+ else
+ {
+ for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)
+ {
+ if (!ecpg_get_data(results, act_tuple, act_field, stmt->lineno,
+ var->type, var->ind_type, var->value,
+ var->ind_value, var->varcharsize, var->offset, var->ind_offset, isarray, stmt->compat, stmt->force_indicator))
+ status = false;
+ }
+ }
+ return status;
+}
+
+static void
+sprintf_double_value(char *ptr, double value, const char *delim)
+{
+ if (isnan(value))
+ sprintf(ptr, "%s%s", "NaN", delim);
+ else if (isinf(value))
+ {
+ if (value < 0)
+ sprintf(ptr, "%s%s", "-Infinity", delim);
+ else
+ sprintf(ptr, "%s%s", "Infinity", delim);
+ }
+ else
+ sprintf(ptr, "%.15g%s", value, delim);
+}
+
+static void
+sprintf_float_value(char *ptr, float value, const char *delim)
+{
+ if (isnan(value))
+ sprintf(ptr, "%s%s", "NaN", delim);
+ else if (isinf(value))
+ {
+ if (value < 0)
+ sprintf(ptr, "%s%s", "-Infinity", delim);
+ else
+ sprintf(ptr, "%s%s", "Infinity", delim);
+ }
+ else
+ sprintf(ptr, "%.15g%s", value, delim);
+}
+
+static char *
+convert_bytea_to_string(char *from_data, int from_len, int lineno)
+{
+ char *to_data;
+ int to_len = ecpg_hex_enc_len(from_len) + 4 + 1; /* backslash + 'x' +
+ * quote + quote */
+
+ to_data = ecpg_alloc(to_len, lineno);
+ if (!to_data)
+ return NULL;
+
+ strcpy(to_data, "'\\x");
+ ecpg_hex_encode(from_data, from_len, to_data + 3);
+ strcpy(to_data + 3 + ecpg_hex_enc_len(from_len), "\'");
+
+ return to_data;
+}
+
+bool
+ecpg_store_input(const int lineno, const bool force_indicator, const struct variable *var,
+ char **tobeinserted_p, bool quote)
+{
+ char *mallocedval = NULL;
+ char *newcopy = NULL;
+
+ /*
+ * arrays are not possible unless the column is an array, too FIXME: we do
+ * not know if the column is an array here array input to singleton column
+ * will result in a runtime error
+ */
+
+ /*
+ * Some special treatment is needed for records since we want their
+ * contents to arrive in a comma-separated list on insert (I think).
+ */
+
+ *tobeinserted_p = "";
+
+ /* check for null value and set input buffer accordingly */
+ switch (var->ind_type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ if (*(short *) var->ind_value < 0)
+ *tobeinserted_p = NULL;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ if (*(int *) var->ind_value < 0)
+ *tobeinserted_p = NULL;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ if (*(long *) var->ind_value < 0L)
+ *tobeinserted_p = NULL;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ if (*(long long int *) var->ind_value < (long long) 0)
+ *tobeinserted_p = NULL;
+ break;
+ case ECPGt_NO_INDICATOR:
+ if (force_indicator == false)
+ {
+ if (ECPGis_noind_null(var->type, var->value))
+ *tobeinserted_p = NULL;
+ }
+ break;
+ default:
+ break;
+ }
+ if (*tobeinserted_p != NULL)
+ {
+ int asize = var->arrsize ? var->arrsize : 1;
+
+ switch (var->type)
+ {
+ int element;
+
+ case ECPGt_short:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%hd,", ((short *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%hd", *((short *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_int:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%d,", ((int *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%d", *((int *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_unsigned_short:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%hu,", ((unsigned short *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%hu", *((unsigned short *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_unsigned_int:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%u,", ((unsigned int *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%u", *((unsigned int *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_long:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%ld,", ((long *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%ld", *((long *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_unsigned_long:
+ if (!(mallocedval = ecpg_alloc(asize * 20, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%lu,", ((unsigned long *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%lu", *((unsigned long *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_long_long:
+ if (!(mallocedval = ecpg_alloc(asize * 30, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%lld,", ((long long int *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%lld", *((long long int *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_unsigned_long_long:
+ if (!(mallocedval = ecpg_alloc(asize * 30, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%llu,", ((unsigned long long int *) var->value)[element]);
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf(mallocedval, "%llu", *((unsigned long long int *) var->value));
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_float:
+ if (!(mallocedval = ecpg_alloc(asize * 25, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf_float_value(mallocedval + strlen(mallocedval), ((float *) var->value)[element], ",");
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf_float_value(mallocedval, *((float *) var->value), "");
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_double:
+ if (!(mallocedval = ecpg_alloc(asize * 25, lineno)))
+ return false;
+
+ if (asize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf_double_value(mallocedval + strlen(mallocedval), ((double *) var->value)[element], ",");
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ sprintf_double_value(mallocedval, *((double *) var->value), "");
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_bool:
+ if (!(mallocedval = ecpg_alloc(var->arrsize + sizeof("{}"), lineno)))
+ return false;
+
+ if (var->arrsize > 1)
+ {
+ strcpy(mallocedval, "{");
+
+ for (element = 0; element < asize; element++)
+ sprintf(mallocedval + strlen(mallocedval), "%c,", (((bool *) var->value)[element]) ? 't' : 'f');
+
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+ }
+ else
+ {
+ if (var->offset == sizeof(char))
+ sprintf(mallocedval, "%c", (*((char *) var->value)) ? 't' : 'f');
+ else if (var->offset == sizeof(int))
+ sprintf(mallocedval, "%c", (*((int *) var->value)) ? 't' : 'f');
+ else
+ ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
+ }
+
+ *tobeinserted_p = mallocedval;
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ {
+ /* set slen to string length if type is char * */
+ int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : (unsigned int) var->varcharsize;
+
+ if (!(newcopy = ecpg_alloc(slen + 1, lineno)))
+ return false;
+
+ strncpy(newcopy, (char *) var->value, slen);
+ newcopy[slen] = '\0';
+
+ mallocedval = quote_postgres(newcopy, quote, lineno);
+ if (!mallocedval)
+ {
+ ecpg_free(newcopy);
+ return false;
+ }
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+ case ECPGt_const:
+ case ECPGt_char_variable:
+ {
+ int slen = strlen((char *) var->value);
+
+ if (!(mallocedval = ecpg_alloc(slen + 1, lineno)))
+ return false;
+
+ strncpy(mallocedval, (char *) var->value, slen);
+ mallocedval[slen] = '\0';
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_bytea:
+ {
+ struct ECPGgeneric_bytea *variable =
+ (struct ECPGgeneric_bytea *) (var->value);
+
+ if (!(mallocedval = (char *) ecpg_alloc(variable->len, lineno)))
+ return false;
+
+ memcpy(mallocedval, variable->arr, variable->len);
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_varchar:
+ {
+ struct ECPGgeneric_varchar *variable =
+ (struct ECPGgeneric_varchar *) (var->value);
+
+ if (!(newcopy = (char *) ecpg_alloc(variable->len + 1, lineno)))
+ return false;
+
+ strncpy(newcopy, variable->arr, variable->len);
+ newcopy[variable->len] = '\0';
+
+ mallocedval = quote_postgres(newcopy, quote, lineno);
+ if (!mallocedval)
+ {
+ ecpg_free(newcopy);
+ return false;
+ }
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_decimal:
+ case ECPGt_numeric:
+ {
+ char *str = NULL;
+ int slen;
+ numeric *nval;
+
+ if (var->arrsize > 1)
+ mallocedval = ecpg_strdup("{", lineno);
+ else
+ mallocedval = ecpg_strdup("", lineno);
+
+ if (!mallocedval)
+ return false;
+
+ for (element = 0; element < asize; element++)
+ {
+ int result;
+
+ nval = PGTYPESnumeric_new();
+ if (!nval)
+ {
+ ecpg_free(mallocedval);
+ return false;
+ }
+
+ if (var->type == ECPGt_numeric)
+ result = PGTYPESnumeric_copy(&(((numeric *) (var->value))[element]), nval);
+ else
+ result = PGTYPESnumeric_from_decimal(&(((decimal *) (var->value))[element]), nval);
+
+ if (result != 0)
+ {
+ PGTYPESnumeric_free(nval);
+ ecpg_free(mallocedval);
+ return false;
+ }
+
+ str = PGTYPESnumeric_to_asc(nval, nval->dscale);
+ slen = strlen(str);
+ PGTYPESnumeric_free(nval);
+
+ if (!(newcopy = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + 2, lineno)))
+ {
+ ecpg_free(mallocedval);
+ ecpg_free(str);
+ return false;
+ }
+ mallocedval = newcopy;
+
+ /* also copy trailing '\0' */
+ memcpy(mallocedval + strlen(mallocedval), str, slen + 1);
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval), ",");
+
+ ecpg_free(str);
+ }
+
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_interval:
+ {
+ char *str = NULL;
+ int slen;
+
+ if (var->arrsize > 1)
+ mallocedval = ecpg_strdup("{", lineno);
+ else
+ mallocedval = ecpg_strdup("", lineno);
+
+ if (!mallocedval)
+ return false;
+
+ for (element = 0; element < asize; element++)
+ {
+ str = quote_postgres(PGTYPESinterval_to_asc(&(((interval *) (var->value))[element])), quote, lineno);
+ if (!str)
+ {
+ ecpg_free(mallocedval);
+ return false;
+ }
+
+ slen = strlen(str);
+
+ if (!(newcopy = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + 2, lineno)))
+ {
+ ecpg_free(mallocedval);
+ ecpg_free(str);
+ return false;
+ }
+ mallocedval = newcopy;
+
+ /* also copy trailing '\0' */
+ memcpy(mallocedval + strlen(mallocedval), str, slen + 1);
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval), ",");
+
+ ecpg_free(str);
+ }
+
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_date:
+ {
+ char *str = NULL;
+ int slen;
+
+ if (var->arrsize > 1)
+ mallocedval = ecpg_strdup("{", lineno);
+ else
+ mallocedval = ecpg_strdup("", lineno);
+
+ if (!mallocedval)
+ return false;
+
+ for (element = 0; element < asize; element++)
+ {
+ str = quote_postgres(PGTYPESdate_to_asc(((date *) (var->value))[element]), quote, lineno);
+ if (!str)
+ {
+ ecpg_free(mallocedval);
+ return false;
+ }
+
+ slen = strlen(str);
+
+ if (!(newcopy = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + 2, lineno)))
+ {
+ ecpg_free(mallocedval);
+ ecpg_free(str);
+ return false;
+ }
+ mallocedval = newcopy;
+
+ /* also copy trailing '\0' */
+ memcpy(mallocedval + strlen(mallocedval), str, slen + 1);
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval), ",");
+
+ ecpg_free(str);
+ }
+
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_timestamp:
+ {
+ char *str = NULL;
+ int slen;
+
+ if (var->arrsize > 1)
+ mallocedval = ecpg_strdup("{", lineno);
+ else
+ mallocedval = ecpg_strdup("", lineno);
+
+ if (!mallocedval)
+ return false;
+
+ for (element = 0; element < asize; element++)
+ {
+ str = quote_postgres(PGTYPEStimestamp_to_asc(((timestamp *) (var->value))[element]), quote, lineno);
+ if (!str)
+ {
+ ecpg_free(mallocedval);
+ return false;
+ }
+
+ slen = strlen(str);
+
+ if (!(newcopy = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + 2, lineno)))
+ {
+ ecpg_free(mallocedval);
+ ecpg_free(str);
+ return false;
+ }
+ mallocedval = newcopy;
+
+ /* also copy trailing '\0' */
+ memcpy(mallocedval + strlen(mallocedval), str, slen + 1);
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval), ",");
+
+ ecpg_free(str);
+ }
+
+ if (var->arrsize > 1)
+ strcpy(mallocedval + strlen(mallocedval) - 1, "}");
+
+ *tobeinserted_p = mallocedval;
+ }
+ break;
+
+ case ECPGt_descriptor:
+ case ECPGt_sqlda:
+ break;
+
+ default:
+ /* Not implemented yet */
+ ecpg_raise(lineno, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, ecpg_type_name(var->type));
+ return false;
+ break;
+ }
+ }
+ return true;
+}
+
+static void
+print_param_value(char *value, int len, int is_binary, int lineno, int nth)
+{
+ char *value_s;
+ bool malloced = false;
+
+ if (value == NULL)
+ value_s = "null";
+ else if (!is_binary)
+ value_s = value;
+ else
+ {
+ value_s = ecpg_alloc(ecpg_hex_enc_len(len) + 1, lineno);
+ if (value_s != NULL)
+ {
+ ecpg_hex_encode(value, len, value_s);
+ value_s[ecpg_hex_enc_len(len)] = '\0';
+ malloced = true;
+ }
+ else
+ value_s = "no memory for logging of parameter";
+ }
+
+ ecpg_log("ecpg_free_params on line %d: parameter %d = %s\n",
+ lineno, nth, value_s);
+
+ if (malloced)
+ ecpg_free(value_s);
+}
+
+void
+ecpg_free_params(struct statement *stmt, bool print)
+{
+ int n;
+
+ for (n = 0; n < stmt->nparams; n++)
+ {
+ if (print)
+ print_param_value(stmt->paramvalues[n], stmt->paramlengths[n],
+ stmt->paramformats[n], stmt->lineno, n + 1);
+ ecpg_free(stmt->paramvalues[n]);
+ }
+ ecpg_free(stmt->paramvalues);
+ ecpg_free(stmt->paramlengths);
+ ecpg_free(stmt->paramformats);
+ stmt->paramvalues = NULL;
+ stmt->paramlengths = NULL;
+ stmt->paramformats = NULL;
+ stmt->nparams = 0;
+}
+
+static bool
+insert_tobeinserted(int position, int ph_len, struct statement *stmt, char *tobeinserted)
+{
+ char *newcopy;
+
+ if (!(newcopy = (char *) ecpg_alloc(strlen(stmt->command)
+ + strlen(tobeinserted)
+ + 1, stmt->lineno)))
+ {
+ ecpg_free(tobeinserted);
+ return false;
+ }
+
+ strcpy(newcopy, stmt->command);
+ strcpy(newcopy + position - 1, tobeinserted);
+
+ /*
+ * The strange thing in the second argument is the rest of the string from
+ * the old string
+ */
+ strcat(newcopy,
+ stmt->command
+ + position
+ + ph_len - 1);
+
+ ecpg_free(stmt->command);
+ stmt->command = newcopy;
+
+ ecpg_free(tobeinserted);
+ return true;
+}
+
+static bool
+store_input_from_desc(struct statement *stmt, struct descriptor_item *desc_item,
+ char **tobeinserted)
+{
+ struct variable var;
+
+ /*
+ * In case of binary data, only allocate memory and memcpy because binary
+ * data have been already stored into desc_item->data with
+ * ecpg_store_input() at ECPGset_desc().
+ */
+ if (desc_item->is_binary)
+ {
+ if (!(*tobeinserted = ecpg_alloc(desc_item->data_len, stmt->lineno)))
+ return false;
+ memcpy(*tobeinserted, desc_item->data, desc_item->data_len);
+ return true;
+ }
+
+ var.type = ECPGt_char;
+ var.varcharsize = strlen(desc_item->data);
+ var.value = desc_item->data;
+ var.pointer = &(desc_item->data);
+ var.arrsize = 1;
+ var.offset = 0;
+
+ if (!desc_item->indicator)
+ {
+ var.ind_type = ECPGt_NO_INDICATOR;
+ var.ind_value = var.ind_pointer = NULL;
+ var.ind_varcharsize = var.ind_arrsize = var.ind_offset = 0;
+ }
+ else
+ {
+ var.ind_type = ECPGt_int;
+ var.ind_value = &(desc_item->indicator);
+ var.ind_pointer = &(var.ind_value);
+ var.ind_varcharsize = var.ind_arrsize = 1;
+ var.ind_offset = 0;
+ }
+
+ if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, &var, tobeinserted, false))
+ return false;
+
+ return true;
+}
+
+/*
+ * ecpg_build_params
+ * Build statement parameters
+ *
+ * The input values are taken from user variables, and the results are stored
+ * in arrays which can be used by PQexecParams().
+ */
+bool
+ecpg_build_params(struct statement *stmt)
+{
+ struct variable *var;
+ int desc_counter = 0;
+ int position = 0;
+ const char *value;
+ bool std_strings = false;
+
+ /* Get standard_conforming_strings setting. */
+ value = PQparameterStatus(stmt->connection->connection, "standard_conforming_strings");
+ if (value && strcmp(value, "on") == 0)
+ std_strings = true;
+
+ /*
+ * If the type is one of the fill in types then we take the argument and
+ * enter it to our parameter array at the first position. Then if there
+ * are any more fill in types we add more parameters.
+ */
+ var = stmt->inlist;
+ while (var)
+ {
+ char *tobeinserted;
+ int counter = 1;
+ bool binary_format;
+ int binary_length;
+
+
+ tobeinserted = NULL;
+ binary_length = 0;
+ binary_format = false;
+
+ /*
+ * A descriptor is a special case since it contains many variables but
+ * is listed only once.
+ */
+ if (var->type == ECPGt_descriptor)
+ {
+ /*
+ * We create an additional variable list here, so the same logic
+ * applies.
+ */
+ struct descriptor *desc;
+ struct descriptor_item *desc_item;
+
+ desc = ecpg_find_desc(stmt->lineno, var->pointer);
+ if (desc == NULL)
+ return false;
+
+ desc_counter++;
+ for (desc_item = desc->items; desc_item; desc_item = desc_item->next)
+ {
+ if (desc_item->num != desc_counter)
+ continue;
+
+ if (!store_input_from_desc(stmt, desc_item, &tobeinserted))
+ return false;
+
+ if (desc_item->is_binary)
+ {
+ binary_length = desc_item->data_len;
+ binary_format = true;
+ }
+ break;
+ }
+ if (desc->count == desc_counter)
+ desc_counter = 0;
+ }
+ else if (var->type == ECPGt_sqlda)
+ {
+ if (INFORMIX_MODE(stmt->compat))
+ {
+ struct sqlda_compat *sqlda = *(struct sqlda_compat **) var->pointer;
+ struct variable desc_inlist;
+ int i;
+
+ if (sqlda == NULL)
+ return false;
+
+ desc_counter++;
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ if (i + 1 == desc_counter)
+ {
+ desc_inlist.type = sqlda->sqlvar[i].sqltype;
+ desc_inlist.value = sqlda->sqlvar[i].sqldata;
+ desc_inlist.pointer = &(sqlda->sqlvar[i].sqldata);
+ switch (desc_inlist.type)
+ {
+ case ECPGt_char:
+ case ECPGt_varchar:
+ desc_inlist.varcharsize = strlen(sqlda->sqlvar[i].sqldata);
+ break;
+ default:
+ desc_inlist.varcharsize = 0;
+ break;
+ }
+ desc_inlist.arrsize = 1;
+ desc_inlist.offset = 0;
+ if (sqlda->sqlvar[i].sqlind)
+ {
+ desc_inlist.ind_type = ECPGt_short;
+ /* ECPG expects indicator value < 0 */
+ if (*(sqlda->sqlvar[i].sqlind))
+ *(sqlda->sqlvar[i].sqlind) = -1;
+ desc_inlist.ind_value = sqlda->sqlvar[i].sqlind;
+ desc_inlist.ind_pointer = &(sqlda->sqlvar[i].sqlind);
+ desc_inlist.ind_varcharsize = desc_inlist.ind_arrsize = 1;
+ desc_inlist.ind_offset = 0;
+ }
+ else
+ {
+ desc_inlist.ind_type = ECPGt_NO_INDICATOR;
+ desc_inlist.ind_value = desc_inlist.ind_pointer = NULL;
+ desc_inlist.ind_varcharsize = desc_inlist.ind_arrsize = desc_inlist.ind_offset = 0;
+ }
+ if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, &desc_inlist, &tobeinserted, false))
+ return false;
+
+ break;
+ }
+ }
+ if (sqlda->sqld == desc_counter)
+ desc_counter = 0;
+ }
+ else
+ {
+ struct sqlda_struct *sqlda = *(struct sqlda_struct **) var->pointer;
+ struct variable desc_inlist;
+ int i;
+
+ if (sqlda == NULL)
+ return false;
+
+ desc_counter++;
+ for (i = 0; i < sqlda->sqln; i++)
+ {
+ if (i + 1 == desc_counter)
+ {
+ desc_inlist.type = sqlda->sqlvar[i].sqltype;
+ desc_inlist.value = sqlda->sqlvar[i].sqldata;
+ desc_inlist.pointer = &(sqlda->sqlvar[i].sqldata);
+ switch (desc_inlist.type)
+ {
+ case ECPGt_char:
+ case ECPGt_varchar:
+ desc_inlist.varcharsize = strlen(sqlda->sqlvar[i].sqldata);
+ break;
+ default:
+ desc_inlist.varcharsize = 0;
+ break;
+ }
+ desc_inlist.arrsize = 1;
+ desc_inlist.offset = 0;
+ if (sqlda->sqlvar[i].sqlind)
+ {
+ desc_inlist.ind_type = ECPGt_short;
+ /* ECPG expects indicator value < 0 */
+ if (*(sqlda->sqlvar[i].sqlind))
+ *(sqlda->sqlvar[i].sqlind) = -1;
+ desc_inlist.ind_value = sqlda->sqlvar[i].sqlind;
+ desc_inlist.ind_pointer = &(sqlda->sqlvar[i].sqlind);
+ desc_inlist.ind_varcharsize = desc_inlist.ind_arrsize = 1;
+ desc_inlist.ind_offset = 0;
+ }
+ else
+ {
+ desc_inlist.ind_type = ECPGt_NO_INDICATOR;
+ desc_inlist.ind_value = desc_inlist.ind_pointer = NULL;
+ desc_inlist.ind_varcharsize = desc_inlist.ind_arrsize = desc_inlist.ind_offset = 0;
+ }
+ if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, &desc_inlist, &tobeinserted, false))
+ return false;
+
+ break;
+ }
+ }
+ if (sqlda->sqln == desc_counter)
+ desc_counter = 0;
+ }
+
+ }
+ else
+ {
+ if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, var, &tobeinserted, false))
+ return false;
+
+ if (var->type == ECPGt_bytea)
+ {
+ binary_length = ((struct ECPGgeneric_bytea *) (var->value))->len;
+ binary_format = true;
+ }
+ }
+
+ /*
+ * now tobeinserted points to an area that contains the next
+ * parameter; now find the position in the string where it belongs
+ */
+ if ((position = next_insert(stmt->command, position, stmt->questionmarks, std_strings) + 1) == 0)
+ {
+ /*
+ * We have an argument but we don't have the matched up
+ * placeholder in the string
+ */
+ ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS,
+ ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS,
+ NULL);
+ ecpg_free_params(stmt, false);
+ ecpg_free(tobeinserted);
+ return false;
+ }
+
+ /*
+ * if var->type=ECPGt_char_variable we have a dynamic cursor we have
+ * to simulate a dynamic cursor because there is no backend
+ * functionality for it
+ */
+ if (var->type == ECPGt_char_variable)
+ {
+ int ph_len = (stmt->command[position] == '?') ? strlen("?") : strlen("$1");
+
+ if (!insert_tobeinserted(position, ph_len, stmt, tobeinserted))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ tobeinserted = NULL;
+ }
+
+ /*
+ * if the placeholder is '$0' we have to replace it on the client side
+ * this is for places we want to support variables at that are not
+ * supported in the backend
+ */
+ else if (stmt->command[position] == '0')
+ {
+ if (stmt->statement_type == ECPGst_prepare ||
+ stmt->statement_type == ECPGst_exec_with_exprlist)
+ {
+ /* Need to double-quote the inserted statement name. */
+ char *str = ecpg_alloc(strlen(tobeinserted) + 2 + 1,
+ stmt->lineno);
+
+ if (!str)
+ {
+ ecpg_free(tobeinserted);
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ sprintf(str, "\"%s\"", tobeinserted);
+ ecpg_free(tobeinserted);
+ tobeinserted = str;
+ }
+
+ if (!insert_tobeinserted(position, 2, stmt, tobeinserted))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ tobeinserted = NULL;
+ }
+ else if (stmt->statement_type == ECPGst_exec_with_exprlist)
+ {
+ if (binary_format)
+ {
+ char *p = convert_bytea_to_string(tobeinserted,
+ binary_length,
+ stmt->lineno);
+
+ ecpg_free(tobeinserted);
+ if (!p)
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ tobeinserted = p;
+ }
+
+ if (!insert_tobeinserted(position, 2, stmt, tobeinserted))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ tobeinserted = NULL;
+ }
+ else
+ {
+ bool realloc_failed = false;
+ char **newparamvalues;
+ int *newparamlengths;
+ int *newparamformats;
+
+ /* enlarge all the param arrays */
+ if ((newparamvalues = (char **) ecpg_realloc(stmt->paramvalues, sizeof(char *) * (stmt->nparams + 1), stmt->lineno)))
+ stmt->paramvalues = newparamvalues;
+ else
+ realloc_failed = true;
+
+ if ((newparamlengths = (int *) ecpg_realloc(stmt->paramlengths, sizeof(int) * (stmt->nparams + 1), stmt->lineno)))
+ stmt->paramlengths = newparamlengths;
+ else
+ realloc_failed = true;
+
+ if ((newparamformats = (int *) ecpg_realloc(stmt->paramformats, sizeof(int) * (stmt->nparams + 1), stmt->lineno)))
+ stmt->paramformats = newparamformats;
+ else
+ realloc_failed = true;
+
+ if (realloc_failed)
+ {
+ ecpg_free_params(stmt, false);
+ ecpg_free(tobeinserted);
+ return false;
+ }
+
+ /* only now can we assign ownership of "tobeinserted" to stmt */
+ stmt->paramvalues[stmt->nparams] = tobeinserted;
+ stmt->paramlengths[stmt->nparams] = binary_length;
+ stmt->paramformats[stmt->nparams] = (binary_format ? 1 : 0);
+ stmt->nparams++;
+
+ /* let's see if this was an old style placeholder */
+ if (stmt->command[position] == '?')
+ {
+ /* yes, replace with new style */
+ int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the
+ * size we need */
+
+ if (!(tobeinserted = (char *) ecpg_alloc(buffersize, stmt->lineno)))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+
+ snprintf(tobeinserted, buffersize, "$%d", counter++);
+
+ if (!insert_tobeinserted(position, 2, stmt, tobeinserted))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ tobeinserted = NULL;
+ }
+ }
+
+ if (desc_counter == 0)
+ var = var->next;
+ }
+
+ /*
+ * Check if there are unmatched things left. PREPARE AS has no parameter.
+ * Check other statement.
+ */
+ if (stmt->statement_type != ECPGst_prepare &&
+ next_insert(stmt->command, position, stmt->questionmarks, std_strings) >= 0)
+ {
+ ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS,
+ ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL);
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * ecpg_autostart_transaction
+ * If we are in non-autocommit mode, automatically start a transaction.
+ */
+bool
+ecpg_autostart_transaction(struct statement *stmt)
+{
+ if (PQtransactionStatus(stmt->connection->connection) == PQTRANS_IDLE && !stmt->connection->autocommit)
+ {
+ stmt->results = PQexec(stmt->connection->connection, "begin transaction");
+ if (!ecpg_check_PQresult(stmt->results, stmt->lineno, stmt->connection->connection, stmt->compat))
+ {
+ ecpg_free_params(stmt, false);
+ return false;
+ }
+ PQclear(stmt->results);
+ stmt->results = NULL;
+ }
+ return true;
+}
+
+/*
+ * ecpg_execute
+ * Execute the SQL statement.
+ */
+bool
+ecpg_execute(struct statement *stmt)
+{
+ ecpg_log("ecpg_execute on line %d: query: %s; with %d parameter(s) on connection %s\n", stmt->lineno, stmt->command, stmt->nparams, stmt->connection->name);
+ if (stmt->statement_type == ECPGst_execute)
+ {
+ stmt->results = PQexecPrepared(stmt->connection->connection,
+ stmt->name,
+ stmt->nparams,
+ (const char *const *) stmt->paramvalues,
+ (const int *) stmt->paramlengths,
+ (const int *) stmt->paramformats,
+ 0);
+ ecpg_log("ecpg_execute on line %d: using PQexecPrepared for \"%s\"\n", stmt->lineno, stmt->command);
+ }
+ else
+ {
+ if (stmt->nparams == 0)
+ {
+ stmt->results = PQexec(stmt->connection->connection, stmt->command);
+ ecpg_log("ecpg_execute on line %d: using PQexec\n", stmt->lineno);
+ }
+ else
+ {
+ stmt->results = PQexecParams(stmt->connection->connection,
+ stmt->command, stmt->nparams, NULL,
+ (const char *const *) stmt->paramvalues,
+ (const int *) stmt->paramlengths,
+ (const int *) stmt->paramformats,
+ 0);
+
+ ecpg_log("ecpg_execute on line %d: using PQexecParams\n", stmt->lineno);
+ }
+
+ if (stmt->statement_type == ECPGst_prepare)
+ {
+ if (!ecpg_register_prepared_stmt(stmt))
+ {
+ ecpg_free_params(stmt, true);
+ return false;
+ }
+ }
+ }
+
+ ecpg_free_params(stmt, true);
+
+ if (!ecpg_check_PQresult(stmt->results, stmt->lineno, stmt->connection->connection, stmt->compat))
+ return false;
+
+ return true;
+}
+
+/*-------
+ * ecpg_process_output
+ *
+ * Process the statement result and store it into application variables. This
+ * function can be called repeatedly during the same statement in case cursor
+ * readahead is used and the application does FETCH N which overflows the
+ * readahead window.
+ *
+ * Parameters
+ * stmt statement structure holding the PGresult and
+ * the list of output variables
+ * clear_result
+ * PQclear() the result upon returning from this function
+ *
+ * Returns success as boolean. Also an SQL error is raised in case of failure.
+ *-------
+ */
+bool
+ecpg_process_output(struct statement *stmt, bool clear_result)
+{
+ struct variable *var;
+ bool status = false;
+ char *cmdstat;
+ PGnotify *notify;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ int nfields,
+ ntuples,
+ act_field;
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(stmt->lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return false;
+ }
+
+ var = stmt->outlist;
+ switch (PQresultStatus(stmt->results))
+ {
+ case PGRES_TUPLES_OK:
+ nfields = PQnfields(stmt->results);
+ sqlca->sqlerrd[2] = ntuples = PQntuples(stmt->results);
+
+ ecpg_log("ecpg_process_output on line %d: correctly got %d tuples with %d fields\n", stmt->lineno, ntuples, nfields);
+ status = true;
+
+ if (ntuples < 1)
+ {
+ if (ntuples)
+ ecpg_log("ecpg_process_output on line %d: incorrect number of matches (%d)\n",
+ stmt->lineno, ntuples);
+ ecpg_raise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL);
+ status = false;
+ break;
+ }
+
+ if (var != NULL && var->type == ECPGt_descriptor)
+ {
+ struct descriptor *desc = ecpg_find_desc(stmt->lineno, var->pointer);
+
+ if (desc == NULL)
+ status = false;
+ else
+ {
+ if (desc->result)
+ PQclear(desc->result);
+ desc->result = stmt->results;
+ clear_result = false;
+ ecpg_log("ecpg_process_output on line %d: putting result (%d tuples) into descriptor %s\n",
+ stmt->lineno, PQntuples(stmt->results), (const char *) var->pointer);
+ }
+ var = var->next;
+ }
+ else if (var != NULL && var->type == ECPGt_sqlda)
+ {
+ if (INFORMIX_MODE(stmt->compat))
+ {
+ struct sqlda_compat **_sqlda = (struct sqlda_compat **) var->pointer;
+ struct sqlda_compat *sqlda = *_sqlda;
+ struct sqlda_compat *sqlda_new;
+ int i;
+
+ /*
+ * If we are passed in a previously existing sqlda (chain)
+ * then free it.
+ */
+ while (sqlda)
+ {
+ sqlda_new = sqlda->desc_next;
+ free(sqlda);
+ sqlda = sqlda_new;
+ }
+ *_sqlda = sqlda = sqlda_new = NULL;
+ for (i = ntuples - 1; i >= 0; i--)
+ {
+ /*
+ * Build a new sqlda structure. Note that only
+ * fetching 1 record is supported
+ */
+ sqlda_new = ecpg_build_compat_sqlda(stmt->lineno, stmt->results, i, stmt->compat);
+
+ if (!sqlda_new)
+ {
+ /* cleanup all SQLDAs we created up */
+ while (sqlda)
+ {
+ sqlda_new = sqlda->desc_next;
+ free(sqlda);
+ sqlda = sqlda_new;
+ }
+ *_sqlda = NULL;
+
+ ecpg_log("ecpg_process_output on line %d: out of memory allocating a new sqlda\n", stmt->lineno);
+ status = false;
+ break;
+ }
+ else
+ {
+ ecpg_log("ecpg_process_output on line %d: new sqlda was built\n", stmt->lineno);
+
+ *_sqlda = sqlda_new;
+
+ ecpg_set_compat_sqlda(stmt->lineno, _sqlda, stmt->results, i, stmt->compat);
+ ecpg_log("ecpg_process_output on line %d: putting result (1 tuple %d fields) into sqlda descriptor\n",
+ stmt->lineno, PQnfields(stmt->results));
+
+ sqlda_new->desc_next = sqlda;
+ sqlda = sqlda_new;
+ }
+ }
+ }
+ else
+ {
+ struct sqlda_struct **_sqlda = (struct sqlda_struct **) var->pointer;
+ struct sqlda_struct *sqlda = *_sqlda;
+ struct sqlda_struct *sqlda_new;
+ int i;
+
+ /*
+ * If we are passed in a previously existing sqlda (chain)
+ * then free it.
+ */
+ while (sqlda)
+ {
+ sqlda_new = sqlda->desc_next;
+ free(sqlda);
+ sqlda = sqlda_new;
+ }
+ *_sqlda = sqlda = sqlda_new = NULL;
+ for (i = ntuples - 1; i >= 0; i--)
+ {
+ /*
+ * Build a new sqlda structure. Note that only
+ * fetching 1 record is supported
+ */
+ sqlda_new = ecpg_build_native_sqlda(stmt->lineno, stmt->results, i, stmt->compat);
+
+ if (!sqlda_new)
+ {
+ /* cleanup all SQLDAs we created up */
+ while (sqlda)
+ {
+ sqlda_new = sqlda->desc_next;
+ free(sqlda);
+ sqlda = sqlda_new;
+ }
+ *_sqlda = NULL;
+
+ ecpg_log("ecpg_process_output on line %d: out of memory allocating a new sqlda\n", stmt->lineno);
+ status = false;
+ break;
+ }
+ else
+ {
+ ecpg_log("ecpg_process_output on line %d: new sqlda was built\n", stmt->lineno);
+
+ *_sqlda = sqlda_new;
+
+ ecpg_set_native_sqlda(stmt->lineno, _sqlda, stmt->results, i, stmt->compat);
+ ecpg_log("ecpg_process_output on line %d: putting result (1 tuple %d fields) into sqlda descriptor\n",
+ stmt->lineno, PQnfields(stmt->results));
+
+ sqlda_new->desc_next = sqlda;
+ sqlda = sqlda_new;
+ }
+ }
+ }
+
+ var = var->next;
+ }
+ else
+ for (act_field = 0; act_field < nfields && status; act_field++)
+ {
+ if (var != NULL)
+ {
+ status = ecpg_store_result(stmt->results, act_field, stmt, var);
+ var = var->next;
+ }
+ else if (!INFORMIX_MODE(stmt->compat))
+ {
+ ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL);
+ return false;
+ }
+ }
+
+ if (status && var != NULL)
+ {
+ ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL);
+ status = false;
+ }
+
+ break;
+ case PGRES_COMMAND_OK:
+ status = true;
+ cmdstat = PQcmdStatus(stmt->results);
+ sqlca->sqlerrd[1] = PQoidValue(stmt->results);
+ sqlca->sqlerrd[2] = atol(PQcmdTuples(stmt->results));
+ ecpg_log("ecpg_process_output on line %d: OK: %s\n", stmt->lineno, cmdstat);
+ if (stmt->compat != ECPG_COMPAT_INFORMIX_SE &&
+ !sqlca->sqlerrd[2] &&
+ (strncmp(cmdstat, "UPDATE", 6) == 0
+ || strncmp(cmdstat, "INSERT", 6) == 0
+ || strncmp(cmdstat, "DELETE", 6) == 0))
+ ecpg_raise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL);
+ break;
+ case PGRES_COPY_OUT:
+ {
+ char *buffer;
+ int res;
+
+ ecpg_log("ecpg_process_output on line %d: COPY OUT data transfer in progress\n", stmt->lineno);
+ while ((res = PQgetCopyData(stmt->connection->connection,
+ &buffer, 0)) > 0)
+ {
+ printf("%s", buffer);
+ PQfreemem(buffer);
+ }
+ if (res == -1)
+ {
+ /* COPY done */
+ PQclear(stmt->results);
+ stmt->results = PQgetResult(stmt->connection->connection);
+ if (PQresultStatus(stmt->results) == PGRES_COMMAND_OK)
+ ecpg_log("ecpg_process_output on line %d: got PGRES_COMMAND_OK after PGRES_COPY_OUT\n", stmt->lineno);
+ else
+ ecpg_log("ecpg_process_output on line %d: got error after PGRES_COPY_OUT: %s", stmt->lineno, PQresultErrorMessage(stmt->results));
+ }
+ break;
+ }
+ default:
+
+ /*
+ * execution should never reach this code because it is already
+ * handled in ecpg_check_PQresult()
+ */
+ ecpg_log("ecpg_process_output on line %d: unknown execution status type\n",
+ stmt->lineno);
+ ecpg_raise_backend(stmt->lineno, stmt->results, stmt->connection->connection, stmt->compat);
+ status = false;
+ break;
+ }
+
+ if (clear_result)
+ {
+ PQclear(stmt->results);
+ stmt->results = NULL;
+ }
+
+ /* check for asynchronous returns */
+ PQconsumeInput(stmt->connection->connection);
+ while ((notify = PQnotifies(stmt->connection->connection)) != NULL)
+ {
+ ecpg_log("ecpg_process_output on line %d: asynchronous notification of \"%s\" from backend PID %d received\n",
+ stmt->lineno, notify->relname, notify->be_pid);
+ PQfreemem(notify);
+ PQconsumeInput(stmt->connection->connection);
+ }
+
+ return status;
+}
+
+/*
+ * ecpg_do_prologue
+ *
+ * Initialize various infrastructure elements for executing the statement:
+ *
+ * - create the statement structure
+ * - set the C numeric locale for communicating with the backend
+ * - preprocess the variable list of input/output parameters into
+ * linked lists
+ */
+bool
+ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
+ const char *connection_name, const bool questionmarks,
+ enum ECPG_statement_type statement_type, const char *query,
+ va_list args, struct statement **stmt_out)
+{
+ struct statement *stmt = NULL;
+ struct connection *con;
+ enum ECPGttype type;
+ struct variable **list;
+ char *prepname;
+ bool is_prepared_name_set;
+
+ *stmt_out = NULL;
+
+ if (!query)
+ {
+ ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL);
+ return false;
+ }
+
+#ifdef ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init();
+#endif
+
+ con = ecpg_get_connection(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno);
+
+ if (stmt == NULL)
+ return false;
+
+ /*
+ * Make sure we do NOT honor the locale for numeric input/output since the
+ * database wants the standard decimal point. If available, use
+ * uselocale() for this because it's thread-safe. Windows doesn't have
+ * that, but it usually does have _configthreadlocale(). In some versions
+ * of MinGW, _configthreadlocale() exists but always returns -1 --- so
+ * treat that situation as if the function doesn't exist.
+ */
+#ifdef HAVE_USELOCALE
+
+ /*
+ * Since ecpg_init() succeeded, we have a connection. Any successful
+ * connection initializes ecpg_clocale.
+ */
+ Assert(ecpg_clocale);
+ stmt->oldlocale = uselocale(ecpg_clocale);
+ if (stmt->oldlocale == (locale_t) 0)
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+#else
+#ifdef HAVE__CONFIGTHREADLOCALE
+ stmt->oldthreadlocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
+#endif
+ stmt->oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno);
+ if (stmt->oldlocale == NULL)
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+ setlocale(LC_NUMERIC, "C");
+#endif
+
+ /*
+ * If statement type is ECPGst_prepnormal we are supposed to prepare the
+ * statement before executing them
+ */
+ if (statement_type == ECPGst_prepnormal)
+ {
+ if (!ecpg_auto_prepare(lineno, connection_name, compat, &prepname, query))
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ /*
+ * statement is now prepared, so instead of the query we have to
+ * execute the name
+ */
+ stmt->command = prepname;
+ statement_type = ECPGst_execute;
+ }
+ else
+ stmt->command = ecpg_strdup(query, lineno);
+
+ stmt->name = NULL;
+
+ if (statement_type == ECPGst_execute)
+ {
+ /* if we have an EXECUTE command, only the name is send */
+ char *command = ecpg_prepared(stmt->command, con);
+
+ if (command)
+ {
+ stmt->name = stmt->command;
+ stmt->command = ecpg_strdup(command, lineno);
+ }
+ else
+ {
+ ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+ }
+ /* name of PREPARE AS will be set in loop of inlist */
+
+ stmt->connection = con;
+ stmt->lineno = lineno;
+ stmt->compat = compat;
+ stmt->force_indicator = force_indicator;
+ stmt->questionmarks = questionmarks;
+ stmt->statement_type = statement_type;
+
+ /*------
+ * create a list of variables
+ *
+ * The variables are listed with input variables preceding output
+ * variables. The end of each group is marked by an end marker.
+ * Per variable we list:
+ *
+ * type - as defined in ecpgtype.h
+ * value - where to store the data
+ * varcharsize - length of string in case we have a stringvariable, else 0
+ * arraysize - 0 for pointer (we don't know the size of the array), 1 for
+ * simple variable, size for arrays
+ * offset - offset between ith and (i+1)th entry in an array, normally
+ * that means sizeof(type)
+ * ind_type - type of indicator variable
+ * ind_pointer - pointer to indicator variable
+ * ind_varcharsize - empty
+ * ind_arrsize - arraysize of indicator array
+ * ind_offset - indicator offset
+ *------
+ */
+
+ is_prepared_name_set = false;
+
+ list = &(stmt->inlist);
+
+ type = va_arg(args, enum ECPGttype);
+
+ while (type != ECPGt_EORT)
+ {
+ if (type == ECPGt_EOIT)
+ list = &(stmt->outlist);
+ else
+ {
+ struct variable *var,
+ *ptr;
+
+ if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno)))
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ var->type = type;
+ var->pointer = va_arg(args, char *);
+
+ var->varcharsize = va_arg(args, long);
+ var->arrsize = va_arg(args, long);
+ var->offset = va_arg(args, long);
+
+ /*
+ * Unknown array size means pointer to an array. Unknown
+ * varcharsize usually also means pointer. But if the type is
+ * character and the array size is known, it is an array of
+ * pointers to char, so use var->pointer as it is.
+ */
+ if (var->arrsize == 0 ||
+ (var->varcharsize == 0 && ((var->type != ECPGt_char && var->type != ECPGt_unsigned_char) || (var->arrsize <= 1))))
+ var->value = *((char **) (var->pointer));
+ else
+ var->value = var->pointer;
+
+ /*
+ * negative values are used to indicate an array without given
+ * bounds
+ */
+ /* reset to zero for us */
+ if (var->arrsize < 0)
+ var->arrsize = 0;
+ if (var->varcharsize < 0)
+ var->varcharsize = 0;
+
+ var->next = NULL;
+
+ var->ind_type = va_arg(args, enum ECPGttype);
+ var->ind_pointer = va_arg(args, char *);
+ var->ind_varcharsize = va_arg(args, long);
+ var->ind_arrsize = va_arg(args, long);
+ var->ind_offset = va_arg(args, long);
+
+ if (var->ind_type != ECPGt_NO_INDICATOR
+ && (var->ind_arrsize == 0 || var->ind_varcharsize == 0))
+ var->ind_value = *((char **) (var->ind_pointer));
+ else
+ var->ind_value = var->ind_pointer;
+
+ /*
+ * negative values are used to indicate an array without given
+ * bounds
+ */
+ /* reset to zero for us */
+ if (var->ind_arrsize < 0)
+ var->ind_arrsize = 0;
+ if (var->ind_varcharsize < 0)
+ var->ind_varcharsize = 0;
+
+ /* if variable is NULL, the statement hasn't been prepared */
+ if (var->pointer == NULL)
+ {
+ ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, NULL);
+ ecpg_free(var);
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ for (ptr = *list; ptr && ptr->next; ptr = ptr->next)
+ ;
+
+ if (ptr == NULL)
+ *list = var;
+ else
+ ptr->next = var;
+
+ if (!is_prepared_name_set && stmt->statement_type == ECPGst_prepare)
+ {
+ stmt->name = ecpg_strdup(var->value, lineno);
+ is_prepared_name_set = true;
+ }
+ }
+
+ type = va_arg(args, enum ECPGttype);
+ }
+
+ /* are we connected? */
+ if (con == NULL || con->connection == NULL)
+ {
+ ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ecpg_gettext("<empty>"));
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ if (!is_prepared_name_set && stmt->statement_type == ECPGst_prepare)
+ {
+ ecpg_raise(lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ecpg_gettext("<empty>"));
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ /* initialize auto_mem struct */
+ ecpg_clear_auto_mem();
+
+ *stmt_out = stmt;
+
+ return true;
+}
+
+/*
+ * ecpg_do_epilogue
+ * Restore the application locale and free the statement structure.
+ */
+void
+ecpg_do_epilogue(struct statement *stmt)
+{
+ if (stmt == NULL)
+ return;
+
+#ifdef HAVE_USELOCALE
+ if (stmt->oldlocale != (locale_t) 0)
+ uselocale(stmt->oldlocale);
+#else
+ if (stmt->oldlocale)
+ setlocale(LC_NUMERIC, stmt->oldlocale);
+#ifdef HAVE__CONFIGTHREADLOCALE
+
+ /*
+ * This is a bit trickier than it looks: if we failed partway through
+ * statement initialization, oldthreadlocale could still be 0. But that's
+ * okay because a call with 0 is defined to be a no-op.
+ */
+ if (stmt->oldthreadlocale != -1)
+ (void) _configthreadlocale(stmt->oldthreadlocale);
+#endif
+#endif
+
+ free_statement(stmt);
+}
+
+/*
+ * Execute SQL statements in the backend.
+ * The input/output parameters (variable argument list) are passed
+ * in a va_list, so other functions can use this interface.
+ */
+bool
+ecpg_do(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query, va_list args)
+{
+ struct statement *stmt = NULL;
+
+ if (!ecpg_do_prologue(lineno, compat, force_indicator, connection_name,
+ questionmarks, (enum ECPG_statement_type) st,
+ query, args, &stmt))
+ goto fail;
+
+ if (!ecpg_build_params(stmt))
+ goto fail;
+
+ if (!ecpg_autostart_transaction(stmt))
+ goto fail;
+
+ if (!ecpg_execute(stmt))
+ goto fail;
+
+ if (!ecpg_process_output(stmt, true))
+ goto fail;
+
+ ecpg_do_epilogue(stmt);
+ return true;
+
+fail:
+ ecpg_do_epilogue(stmt);
+ return false;
+}
+
+/*
+ * Execute SQL statements in the backend.
+ * The input/output parameters are passed as variable-length argument list.
+ */
+bool
+ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
+{
+ va_list args;
+ bool ret;
+
+ va_start(args, query);
+ ret = ecpg_do(lineno, compat, force_indicator, connection_name,
+ questionmarks, st, query, args);
+ va_end(args);
+
+ return ret;
+}
+
+/* old descriptor interface */
+bool
+ECPGdo_descriptor(int line, const char *connection,
+ const char *descriptor, const char *query)
+{
+ return ECPGdo(line, ECPG_COMPAT_PGSQL, true, connection, '\0', 0, query, ECPGt_EOIT,
+ ECPGt_descriptor, descriptor, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
+}
diff --git a/src/interfaces/ecpg/ecpglib/exports.txt b/src/interfaces/ecpg/ecpglib/exports.txt
new file mode 100644
index 0000000..69e9617
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/exports.txt
@@ -0,0 +1,31 @@
+# src/interfaces/ecpg/ecpglib/exports.txt
+# Functions to be exported by ecpglib DLL
+ECPGallocate_desc 1
+ECPGconnect 2
+ECPGdeallocate 3
+ECPGdeallocate_all 4
+ECPGdeallocate_desc 5
+ECPGdebug 6
+ECPGdescribe 7
+ECPGdisconnect 8
+ECPGdo 9
+ECPGdo_descriptor 10
+ECPGfree_auto_mem 11
+ECPGget_desc 12
+ECPGget_desc_header 13
+ECPGget_sqlca 14
+ECPGis_noind_null 15
+ECPGprepare 16
+ECPGprepared_statement 17
+ECPGset_desc 18
+ECPGset_desc_header 19
+ECPGset_noind_null 20
+ECPGsetcommit 21
+ECPGsetconn 22
+ECPGstatus 23
+ECPGtrans 24
+sqlprint 25
+ECPGget_PGconn 26
+ECPGtransactionStatus 27
+ECPGset_var 28
+ECPGget_var 29
diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c
new file mode 100644
index 0000000..bd81251
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/memory.c
@@ -0,0 +1,174 @@
+/* src/interfaces/ecpg/ecpglib/memory.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "ecpg-pthread-win32.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+
+void
+ecpg_free(void *ptr)
+{
+ free(ptr);
+}
+
+char *
+ecpg_alloc(long size, int lineno)
+{
+ char *new = (char *) calloc(1L, size);
+
+ if (!new)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return NULL;
+ }
+
+ return new;
+}
+
+char *
+ecpg_realloc(void *ptr, long size, int lineno)
+{
+ char *new = (char *) realloc(ptr, size);
+
+ if (!new)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return NULL;
+ }
+
+ return new;
+}
+
+char *
+ecpg_strdup(const char *string, int lineno)
+{
+ char *new;
+
+ if (string == NULL)
+ return NULL;
+
+ new = strdup(string);
+ if (!new)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return NULL;
+ }
+
+ return new;
+}
+
+/* keep a list of memory we allocated for the user */
+struct auto_mem
+{
+ void *pointer;
+ struct auto_mem *next;
+};
+
+#ifdef ENABLE_THREAD_SAFETY
+static pthread_key_t auto_mem_key;
+static pthread_once_t auto_mem_once = PTHREAD_ONCE_INIT;
+
+static void
+auto_mem_destructor(void *arg)
+{
+ (void) arg; /* keep the compiler quiet */
+ ECPGfree_auto_mem();
+}
+
+static void
+auto_mem_key_init(void)
+{
+ pthread_key_create(&auto_mem_key, auto_mem_destructor);
+}
+
+static struct auto_mem *
+get_auto_allocs(void)
+{
+ pthread_once(&auto_mem_once, auto_mem_key_init);
+ return (struct auto_mem *) pthread_getspecific(auto_mem_key);
+}
+
+static void
+set_auto_allocs(struct auto_mem *am)
+{
+ pthread_setspecific(auto_mem_key, am);
+}
+#else
+static struct auto_mem *auto_allocs = NULL;
+
+#define get_auto_allocs() (auto_allocs)
+#define set_auto_allocs(am) do { auto_allocs = (am); } while(0)
+#endif
+
+char *
+ecpg_auto_alloc(long size, int lineno)
+{
+ void *ptr = (void *) ecpg_alloc(size, lineno);
+
+ if (!ptr)
+ return NULL;
+
+ if (!ecpg_add_mem(ptr, lineno))
+ {
+ ecpg_free(ptr);
+ return NULL;
+ }
+ return ptr;
+}
+
+bool
+ecpg_add_mem(void *ptr, int lineno)
+{
+ struct auto_mem *am = (struct auto_mem *) ecpg_alloc(sizeof(struct auto_mem), lineno);
+
+ if (!am)
+ return false;
+
+ am->pointer = ptr;
+ am->next = get_auto_allocs();
+ set_auto_allocs(am);
+ return true;
+}
+
+void
+ECPGfree_auto_mem(void)
+{
+ struct auto_mem *am = get_auto_allocs();
+
+ /* free all memory we have allocated for the user */
+ if (am)
+ {
+ do
+ {
+ struct auto_mem *act = am;
+
+ am = am->next;
+ ecpg_free(act->pointer);
+ ecpg_free(act);
+ } while (am);
+ set_auto_allocs(NULL);
+ }
+}
+
+void
+ecpg_clear_auto_mem(void)
+{
+ struct auto_mem *am = get_auto_allocs();
+
+ /* only free our own structure */
+ if (am)
+ {
+ do
+ {
+ struct auto_mem *act = am;
+
+ am = am->next;
+ ecpg_free(act);
+ } while (am);
+ set_auto_allocs(NULL);
+ }
+}
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
new file mode 100644
index 0000000..b8dbe5e
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -0,0 +1,594 @@
+/* src/interfaces/ecpg/ecpglib/misc.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include <limits.h>
+#include <unistd.h>
+
+#include "ecpg-pthread-win32.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "pg_config_paths.h"
+#include "pgtypes_date.h"
+#include "pgtypes_interval.h"
+#include "pgtypes_numeric.h"
+#include "pgtypes_timestamp.h"
+#include "sqlca.h"
+
+#ifndef LONG_LONG_MIN
+#ifdef LLONG_MIN
+#define LONG_LONG_MIN LLONG_MIN
+#else
+#define LONG_LONG_MIN LONGLONG_MIN
+#endif /* LLONG_MIN */
+#endif /* LONG_LONG_MIN */
+
+bool ecpg_internal_regression_mode = false;
+
+static struct sqlca_t sqlca_init =
+{
+ {
+ 'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
+ },
+ sizeof(struct sqlca_t),
+ 0,
+ {
+ 0,
+ {
+ 0
+ }
+ },
+ {
+ 'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
+ },
+ {
+ 0, 0, 0, 0, 0, 0
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ {
+ '0', '0', '0', '0', '0'
+ }
+};
+
+#ifdef ENABLE_THREAD_SAFETY
+static pthread_key_t sqlca_key;
+static pthread_once_t sqlca_key_once = PTHREAD_ONCE_INIT;
+#else
+static struct sqlca_t sqlca =
+{
+ {
+ 'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
+ },
+ sizeof(struct sqlca_t),
+ 0,
+ {
+ 0,
+ {
+ 0
+ }
+ },
+ {
+ 'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
+ },
+ {
+ 0, 0, 0, 0, 0, 0
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ {
+ '0', '0', '0', '0', '0'
+ }
+};
+#endif
+
+#ifdef ENABLE_THREAD_SAFETY
+static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t debug_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
+static int simple_debug = 0;
+static FILE *debugstream = NULL;
+
+void
+ecpg_init_sqlca(struct sqlca_t *sqlca)
+{
+ memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
+}
+
+bool
+ecpg_init(const struct connection *con, const char *connection_name, const int lineno)
+{
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY,
+ NULL);
+ return false;
+ }
+
+ ecpg_init_sqlca(sqlca);
+ if (con == NULL)
+ {
+ ecpg_raise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
+ connection_name ? connection_name : ecpg_gettext("NULL"));
+ return false;
+ }
+
+ return true;
+}
+
+#ifdef ENABLE_THREAD_SAFETY
+static void
+ecpg_sqlca_key_destructor(void *arg)
+{
+ free(arg); /* sqlca structure allocated in ECPGget_sqlca */
+}
+
+static void
+ecpg_sqlca_key_init(void)
+{
+ pthread_key_create(&sqlca_key, ecpg_sqlca_key_destructor);
+}
+#endif
+
+struct sqlca_t *
+ECPGget_sqlca(void)
+{
+#ifdef ENABLE_THREAD_SAFETY
+ struct sqlca_t *sqlca;
+
+ pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
+
+ sqlca = pthread_getspecific(sqlca_key);
+ if (sqlca == NULL)
+ {
+ sqlca = malloc(sizeof(struct sqlca_t));
+ if (sqlca == NULL)
+ return NULL;
+ ecpg_init_sqlca(sqlca);
+ pthread_setspecific(sqlca_key, sqlca);
+ }
+ return sqlca;
+#else
+ return &sqlca;
+#endif
+}
+
+bool
+ECPGstatus(int lineno, const char *connection_name)
+{
+ struct connection *con = ecpg_get_connection(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ /* are we connected? */
+ if (con->connection == NULL)
+ {
+ ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, con->name);
+ return false;
+ }
+
+ return true;
+}
+
+PGTransactionStatusType
+ECPGtransactionStatus(const char *connection_name)
+{
+ const struct connection *con;
+
+ con = ecpg_get_connection(connection_name);
+ if (con == NULL)
+ {
+ /* transaction status is unknown */
+ return PQTRANS_UNKNOWN;
+ }
+
+ return PQtransactionStatus(con->connection);
+
+}
+
+bool
+ECPGtrans(int lineno, const char *connection_name, const char *transaction)
+{
+ PGresult *res;
+ struct connection *con = ecpg_get_connection(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
+
+ /* if we have no connection we just simulate the command */
+ if (con && con->connection)
+ {
+ /*
+ * If we got a transaction command but have no open transaction, we
+ * have to start one, unless we are in autocommit, where the
+ * developers have to take care themselves. However, if the command is
+ * a begin statement, we just execute it once. And if the command is
+ * commit or rollback prepared, we don't execute it.
+ */
+ if (PQtransactionStatus(con->connection) == PQTRANS_IDLE &&
+ !con->autocommit &&
+ strncmp(transaction, "begin", 5) != 0 &&
+ strncmp(transaction, "start", 5) != 0 &&
+ strncmp(transaction, "commit prepared", 15) != 0 &&
+ strncmp(transaction, "rollback prepared", 17) != 0)
+ {
+ res = PQexec(con->connection, "begin transaction");
+ if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
+ return false;
+ PQclear(res);
+ }
+
+ res = PQexec(con->connection, transaction);
+ if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
+ return false;
+ PQclear(res);
+ }
+
+ return true;
+}
+
+
+void
+ECPGdebug(int n, FILE *dbgs)
+{
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&debug_init_mutex);
+#endif
+
+ if (n > 100)
+ {
+ ecpg_internal_regression_mode = true;
+ simple_debug = n - 100;
+ }
+ else
+ simple_debug = n;
+
+ debugstream = dbgs;
+
+ ecpg_log("ECPGdebug: set to %d\n", simple_debug);
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&debug_init_mutex);
+#endif
+}
+
+void
+ecpg_log(const char *format,...)
+{
+ va_list ap;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+ const char *intl_format;
+ int bufsize;
+ char *fmt;
+
+ if (!simple_debug)
+ return;
+
+ /* localize the error message string */
+ intl_format = ecpg_gettext(format);
+
+ /*
+ * Insert PID into the format, unless ecpg_internal_regression_mode is set
+ * (regression tests want unchanging output).
+ */
+ bufsize = strlen(intl_format) + 100;
+ fmt = (char *) malloc(bufsize);
+ if (fmt == NULL)
+ return;
+
+ if (ecpg_internal_regression_mode)
+ snprintf(fmt, bufsize, "[NO_PID]: %s", intl_format);
+ else
+ snprintf(fmt, bufsize, "[%d]: %s", (int) getpid(), intl_format);
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&debug_mutex);
+#endif
+
+ va_start(ap, format);
+ vfprintf(debugstream, fmt, ap);
+ va_end(ap);
+
+ /* dump out internal sqlca variables */
+ if (ecpg_internal_regression_mode && sqlca != NULL)
+ {
+ fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
+ sqlca->sqlcode, sqlca->sqlstate);
+ }
+
+ fflush(debugstream);
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&debug_mutex);
+#endif
+
+ free(fmt);
+}
+
+void
+ECPGset_noind_null(enum ECPGttype type, void *ptr)
+{
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ *((char *) ptr) = '\0';
+ break;
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ *((short int *) ptr) = SHRT_MIN;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ *((int *) ptr) = INT_MIN;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ case ECPGt_date:
+ *((long *) ptr) = LONG_MIN;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ *((long long *) ptr) = LONG_LONG_MIN;
+ break;
+ case ECPGt_float:
+ memset((char *) ptr, 0xff, sizeof(float));
+ break;
+ case ECPGt_double:
+ memset((char *) ptr, 0xff, sizeof(double));
+ break;
+ case ECPGt_varchar:
+ *(((struct ECPGgeneric_varchar *) ptr)->arr) = 0x00;
+ ((struct ECPGgeneric_varchar *) ptr)->len = 0;
+ break;
+ case ECPGt_bytea:
+ ((struct ECPGgeneric_bytea *) ptr)->len = 0;
+ break;
+ case ECPGt_decimal:
+ memset((char *) ptr, 0, sizeof(decimal));
+ ((decimal *) ptr)->sign = NUMERIC_NULL;
+ break;
+ case ECPGt_numeric:
+ memset((char *) ptr, 0, sizeof(numeric));
+ ((numeric *) ptr)->sign = NUMERIC_NULL;
+ break;
+ case ECPGt_interval:
+ memset((char *) ptr, 0xff, sizeof(interval));
+ break;
+ case ECPGt_timestamp:
+ memset((char *) ptr, 0xff, sizeof(timestamp));
+ break;
+ default:
+ break;
+ }
+}
+
+static bool
+_check(const unsigned char *ptr, int length)
+{
+ for (length--; length >= 0; length--)
+ if (ptr[length] != 0xff)
+ return false;
+
+ return true;
+}
+
+bool
+ECPGis_noind_null(enum ECPGttype type, const void *ptr)
+{
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (*((const char *) ptr) == '\0')
+ return true;
+ break;
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ if (*((const short int *) ptr) == SHRT_MIN)
+ return true;
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ if (*((const int *) ptr) == INT_MIN)
+ return true;
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ case ECPGt_date:
+ if (*((const long *) ptr) == LONG_MIN)
+ return true;
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ if (*((const long long *) ptr) == LONG_LONG_MIN)
+ return true;
+ break;
+ case ECPGt_float:
+ return _check(ptr, sizeof(float));
+ break;
+ case ECPGt_double:
+ return _check(ptr, sizeof(double));
+ break;
+ case ECPGt_varchar:
+ if (*(((const struct ECPGgeneric_varchar *) ptr)->arr) == 0x00)
+ return true;
+ break;
+ case ECPGt_bytea:
+ if (((const struct ECPGgeneric_bytea *) ptr)->len == 0)
+ return true;
+ break;
+ case ECPGt_decimal:
+ if (((const decimal *) ptr)->sign == NUMERIC_NULL)
+ return true;
+ break;
+ case ECPGt_numeric:
+ if (((const numeric *) ptr)->sign == NUMERIC_NULL)
+ return true;
+ break;
+ case ECPGt_interval:
+ return _check(ptr, sizeof(interval));
+ break;
+ case ECPGt_timestamp:
+ return _check(ptr, sizeof(timestamp));
+ break;
+ default:
+ break;
+ }
+
+ return false;
+}
+
+#ifdef WIN32
+#ifdef ENABLE_THREAD_SAFETY
+
+void
+win32_pthread_mutex(volatile pthread_mutex_t *mutex)
+{
+ if (mutex->handle == NULL)
+ {
+ while (InterlockedExchange((LONG *) &mutex->initlock, 1) == 1)
+ Sleep(0);
+ if (mutex->handle == NULL)
+ mutex->handle = CreateMutex(NULL, FALSE, NULL);
+ InterlockedExchange((LONG *) &mutex->initlock, 0);
+ }
+}
+
+static pthread_mutex_t win32_pthread_once_lock = PTHREAD_MUTEX_INITIALIZER;
+
+void
+win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void))
+{
+ if (!*once)
+ {
+ pthread_mutex_lock(&win32_pthread_once_lock);
+ if (!*once)
+ {
+ fn();
+ *once = true;
+ }
+ pthread_mutex_unlock(&win32_pthread_once_lock);
+ }
+}
+#endif /* ENABLE_THREAD_SAFETY */
+#endif /* WIN32 */
+
+#ifdef ENABLE_NLS
+
+char *
+ecpg_gettext(const char *msgid)
+{
+ /*
+ * If multiple threads come through here at about the same time, it's okay
+ * for more than one of them to call bindtextdomain(). But it's not okay
+ * for any of them to reach dgettext() before bindtextdomain() is
+ * complete, so don't set the flag till that's done. Use "volatile" just
+ * to be sure the compiler doesn't try to get cute.
+ */
+ static volatile bool already_bound = false;
+
+ if (!already_bound)
+ {
+ /* dgettext() preserves errno, but bindtextdomain() doesn't */
+#ifdef WIN32
+ int save_errno = GetLastError();
+#else
+ int save_errno = errno;
+#endif
+ const char *ldir;
+
+ /* No relocatable lookup here because the binary could be anywhere */
+ ldir = getenv("PGLOCALEDIR");
+ if (!ldir)
+ ldir = LOCALEDIR;
+ bindtextdomain(PG_TEXTDOMAIN("ecpglib"), ldir);
+ already_bound = true;
+#ifdef WIN32
+ SetLastError(save_errno);
+#else
+ errno = save_errno;
+#endif
+ }
+
+ return dgettext(PG_TEXTDOMAIN("ecpglib"), msgid);
+}
+#endif /* ENABLE_NLS */
+
+struct var_list *ivlist = NULL;
+
+void
+ECPGset_var(int number, void *pointer, int lineno)
+{
+ struct var_list *ptr;
+
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return;
+ }
+
+ ecpg_init_sqlca(sqlca);
+
+ for (ptr = ivlist; ptr != NULL; ptr = ptr->next)
+ {
+ if (ptr->number == number)
+ {
+ /* already known => just change pointer value */
+ ptr->pointer = pointer;
+ return;
+ }
+ }
+
+ /* a new one has to be added */
+ ptr = (struct var_list *) calloc(1L, sizeof(struct var_list));
+ if (!ptr)
+ {
+ struct sqlca_t *sqlca = ECPGget_sqlca();
+
+ if (sqlca == NULL)
+ {
+ ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
+ ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
+ return;
+ }
+
+ sqlca->sqlcode = ECPG_OUT_OF_MEMORY;
+ strncpy(sqlca->sqlstate, "YE001", sizeof(sqlca->sqlstate));
+ snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "out of memory on line %d", lineno);
+ sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
+ /* free all memory we have allocated for the user */
+ ECPGfree_auto_mem();
+ }
+ else
+ {
+ ptr->number = number;
+ ptr->pointer = pointer;
+ ptr->next = ivlist;
+ ivlist = ptr;
+ }
+}
+
+void *
+ECPGget_var(int number)
+{
+ struct var_list *ptr;
+
+ for (ptr = ivlist; ptr != NULL && ptr->number != number; ptr = ptr->next);
+ return (ptr) ? ptr->pointer : NULL;
+}
diff --git a/src/interfaces/ecpg/ecpglib/nls.mk b/src/interfaces/ecpg/ecpglib/nls.mk
new file mode 100644
index 0000000..2f6b089
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/nls.mk
@@ -0,0 +1,6 @@
+# src/interfaces/ecpg/ecpglib/nls.mk
+CATALOG_NAME = ecpglib
+AVAIL_LANGUAGES = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
+GETTEXT_FILES = connect.c descriptor.c error.c execute.c misc.c
+GETTEXT_TRIGGERS = ecpg_gettext
+GETTEXT_FLAGS = ecpg_gettext:1:pass-c-format
diff --git a/src/interfaces/ecpg/ecpglib/po/cs.po b/src/interfaces/ecpg/ecpglib/po/cs.po
new file mode 100644
index 0000000..bc09566
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/cs.po
@@ -0,0 +1,199 @@
+# Czech message translation file for ecpglib
+# Copyright (C) 2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Tomáš Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2018-07-13 19:38+0000\n"
+"PO-Revision-Date: 2018-07-13 23:44+0200\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.7\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "prázdný text zprávy"
+
+#: connect.c:401 connect.c:430 connect.c:638
+msgid "<DEFAULT>"
+msgstr "<VÝCHOZÍ>"
+
+#: descriptor.c:834 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "na řádce %d nenalezena žádná data"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "nedostatek paměti na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "nepodporovaný typ \"%s\" na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "příliš mnoho argumentů na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "příliš málo argumentů na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "chybná vstupní syntaxe pro typ int: \"%s\", na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "chybná vstupní syntaxe pro typ unsigned int: \"%s\", na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "chybná vstupní syntaxe pro typ floating-point: \"%s\", na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "chybná vstupní syntaxe pro typ boolean: \"%s\", na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "nelze zkonvertovat boolean hodnotu: nesprávná velikost, na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "prázdný dotaz na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "null hodnota bez indikátoru na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "proměnná nemá datový typ pole na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "data načtená ze serveru nejsou pole na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "vkládání pole proměnných není podporováno na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "spojení \"%s\" neexistuje na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "neotevřené spojení \"%s\" na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "neplatný název příkazu \"%s\" na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "deskriptor \"%s\" nenalezen na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "index deskriptoru mimo rozsah na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "nerozpoznaná položka deskriptoru \"%s\" na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "proměnná nemá číselný datový typ na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "proměnná nemá znakový datový typ na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "chyba v transakčním zpracování na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "nelze se spojit s databází \"%s\" na řádce %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL chyba %d na řádce %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "spojení se serverem bylo ztraceno"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL chyba: %s\n"
+
+#: execute.c:1968
+msgid "<empty>"
+msgstr "<prázdný>"
diff --git a/src/interfaces/ecpg/ecpglib/po/de.po b/src/interfaces/ecpg/ecpglib/po/de.po
new file mode 100644
index 0000000..94daa83
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/de.po
@@ -0,0 +1,206 @@
+# German message translation file for ecpglib
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Peter Eisentraut, 2009 - 2019.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-09-07 23:08+0000\n"
+"PO-Revision-Date: 2019-09-08 08:48+0200\n"
+"Last-Translator: Peter Eisentraut <peter@eisentraut.org>\n"
+"Language-Team: German <pgsql-translators@postgresql.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "leerer Nachrichtentext"
+
+#: connect.c:403 connect.c:432 connect.c:640
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: cursor.c:195 descriptor.c:887 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "keine Daten gefunden auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "Speicher aufgebraucht auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "nicht unterstützter Typ »%s« auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "zu viele Argumente auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "zu wenige Argumente auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "ungültige Eingabesyntax für Typ int: »%s«, auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "ungültige Eingabesyntax für Typ unsigned int: »%s«, auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "ungültige Eingabesyntax für Gleitkommatyp: »%s«, auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "ungültige Syntax für Typ boolean: »%s«, auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "konnte boolean-Wert nicht umwandeln: Größe stimmt nicht überein, auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "leere Anfrage auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "NULL-Wert ohne Indikator auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "Variable hat keinen Array-Typ auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "vom Server gelesene Daten sind kein Array auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "Einfügen in ein Array aus Variablen wird nicht unterstützt auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "Verbindung »%s« existiert nicht auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "nicht mit Verbindung »%s« verbunden auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "ungültiger Anweisungsname »%s« auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "Deskriptor »%s« nicht gefunden auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "Deskriptorindex außerhalb des gültigen Bereichs auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "unbekanntes Deskriptorelement »%s« auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "Variable hat keinen numerischen Typ auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "Variable hat keinen Zeichentyp auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "Fehler bei der Transaktionsverarbeitung auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "konnte nicht mit Datenbank »%s« verbinden auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "cursor is invalid on line %d"
+msgstr "Cursor ist ungültig auf Zeile %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:214
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL-Fehler %d auf Zeile %d"
+
+#: error.c:261
+msgid "the connection to the server was lost"
+msgstr "die Verbindung zum Server wurde verloren"
+
+#: error.c:354
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL-Fehler: %s\n"
+
+#: execute.c:2187 execute.c:2194
+msgid "<empty>"
+msgstr "<leer>"
diff --git a/src/interfaces/ecpg/ecpglib/po/el.po b/src/interfaces/ecpg/ecpglib/po/el.po
new file mode 100644
index 0000000..1aa9583
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/el.po
@@ -0,0 +1,200 @@
+# Greek message translation file for ecpglib
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the ecpglib (PostgreSQL) package.
+# Georgios Kokolatos <gkokolatos@pm.me>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-20 09:09+0000\n"
+"PO-Revision-Date: 2021-08-23 10:40+0200\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+"Last-Translator: Georgios Kokolatos <gkokolatos@pm.me>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: el\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "κενό κείμενο μηνύματος"
+
+#: connect.c:405 connect.c:627
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "δεν βρέθηκαν δεδομένα στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "έλλειψη μνήμης στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "μη υποστηριζόμενος τύπος «%s» στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "πάρα πολλές παράμετροι στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "πολύ λίγες παράμετροι στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "μη έγκυρη σύνταξη εισόδου για τύπο int: «%s», στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "μη έγκυρη σύνταξη εισόδου για τύπο unsigned int: «%s», στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "μη έγκυρη σύνταξη εισόδου για τύπο floating-point: «%s», on-line %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "μη έγκυρη σύνταξη για τύπο boolean: «%s», στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "δεν ήταν δυνατή η μετατροπή της δυαδικής τιμής: αναντιστοιχία μεγέθους, στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "άδειο ερώτημα στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "τιμή null χωρίς ένδειξη στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "η μεταβλητή δεν έχει τύπο συστάδας στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "τα δεδομένα που διαβάζονται από το διακομιστή δεν είναι μία συστάδα στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "η εισαγωγή μίας συστάδας μεταβλητών δεν υποστηρίζεται στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "η σύνδεση «%s» δεν υπάρχει στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "δεν έχει συνδεθεί στη σύνδεση «%s» στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "μη έγκυρο όνομα δήλωσης «%s» στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "περιγραφέας «%s» δεν βρέθηκε στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "ευρετήριο περιγραφέα εκτός εύρους στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "μη αναγνωρίσιμο στοιχείο περιγραφέα «%s» στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "η μεταβλητή δεν έχει αριθμητικό τύπο στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "η μεταβλητή δεν έχει τύπο χαρακτήρα στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "σφάλμα κατά την επεξεργασία συναλλαγής στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "δεν ήταν δυνατή η σύνδεση στη βάση δεδομένων «%s» στη γραμμή %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL σφάλμα %d στη γραμμή %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "η σύνδεση στον διακομιστή χάθηκε"
+
+#: error.c:346
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL σφάλμα: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<empty>"
diff --git a/src/interfaces/ecpg/ecpglib/po/es.po b/src/interfaces/ecpg/ecpglib/po/es.po
new file mode 100644
index 0000000..7d236e2
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/es.po
@@ -0,0 +1,200 @@
+# Spanish message translation file for ecpglib
+#
+# Copyright (c) 2009-2021, PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Emanuel Calvo Franco <postgres.arg@gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-07 20:26+0000\n"
+"PO-Revision-Date: 2019-06-06 17:20-0400\n"
+"Last-Translator: Emanuel Calvo Franco <postgres-arg@gmail.com>\n"
+"Language-Team: PgSQL-es-Ayuda <pgsql-es-ayuda@lists.postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: connect.c:243
+msgid "empty message text"
+msgstr "mensaje de texto vacío"
+
+#: connect.c:411 connect.c:676
+msgid "<DEFAULT>"
+msgstr "<POR OMISIÓN>"
+
+#: descriptor.c:876 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "no se encontraron datos en la línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "memoria agotada en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "tipo no soportado «%s» en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "demasiados argumentos en la línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "muy pocos argumentos en la línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "sintaxis de entrada no válida para el tipo entero: «%s», en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "sintaxis de entrada no válida para el tipo entero sin signo: «%s», en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "sintaxis de entrada no válida para el tipo de coma flotante: «%s», en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "sintaxis no válida para el tipo booleano: «%s», en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "no se puede convertir el valor booleano: tamaño incorrecto, en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "consulta vacía en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "valor nulo sin indicador en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "la variable no tiene tipo array en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "el dato leído del servidor no es un array en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "la inserción de un array de variables no está soportado en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "conexión «%s» no existe en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "no conectada a la conexión «%s» en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "nombre sentencia no válida «%s» en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "descriptor «%s» no encontrado en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "índice de descriptor fuera de rango en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "elemento de descriptor no reconocido «%s» en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "la variable no tiene un tipo numérico en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "la variable no tiene un tipo textual en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "error en el procesamiento de transacción en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "no se pudo conectar a la base de datos «%s» en línea %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "error SQL %d en línea %d"
+
+#: error.c:253
+msgid "the connection to the server was lost"
+msgstr "se ha perdido la conexión al servidor"
+
+#: error.c:345
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "error SQL: %s\n"
+
+#: execute.c:2190 execute.c:2197
+msgid "<empty>"
+msgstr "<vacío>"
diff --git a/src/interfaces/ecpg/ecpglib/po/fr.po b/src/interfaces/ecpg/ecpglib/po/fr.po
new file mode 100644
index 0000000..5f6c7d7
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/fr.po
@@ -0,0 +1,209 @@
+# translation of ecpglib.po to fr_fr
+# french message translation file for ecpglib
+#
+# Use these quotes: « %s »
+#
+# Guillaume Lelarge <guillaume@lelarge.info>, 2009.
+# Stéphane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-09-20 12:38+0000\n"
+"PO-Revision-Date: 2019-09-20 15:13+0200\n"
+"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
+"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.3\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "texte du message vide"
+
+#: connect.c:403 connect.c:432 connect.c:640
+msgid "<DEFAULT>"
+msgstr "<DÉFAUT>"
+
+#: cursor.c:195 descriptor.c:887 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "aucune donnée trouvée sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "mémoire épuisée à la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "type « %s » non supporté sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "trop d'arguments sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "trop peu d'arguments sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "syntaxe invalide en entrée pour le type int : « %s » sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "syntaxe invalide en entrée pour le type unisgned int : « %s » sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "syntaxe invalide en entrée pour le type float : « %s » sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "syntaxe invalide en entrée pour le type booléen : « %s » sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr ""
+"n'a pas pu convertir la valeur booléenne : différence de taille sur la\n"
+"ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "requête vide sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "valeur NULL sans indicateur sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "la valeur n'a pas de type tableau sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "la donnée lue du serveur n'est pas un tableau sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "l'insertion d'un tableau de variables n'est pas supportée, sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "la connexion « %s » n'existe pas en ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "non connecté à la connexion « %s » en ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "nom d'instruction « %s » invalide sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "descripteur « %s » introuvable sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "index de descripteur hors d'échelle sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "élément descripteur « %s » non reconnu sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "la variable n'est pas de type numeric sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "la variable n'est pas de type caractère sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "erreur dans le traitement de la transaction en ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "n'a pas pu se connecter à la base de données « %s » en ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "cursor is invalid on line %d"
+msgstr "le curseur est invalide sur la ligne %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:214
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "erreur SQL %d en ligne %d"
+
+#: error.c:261
+msgid "the connection to the server was lost"
+msgstr "la connexion au serveur a été perdue"
+
+#: error.c:354
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "erreur SQL : %s\n"
+
+#: execute.c:2187 execute.c:2194
+msgid "<empty>"
+msgstr "<vide>"
diff --git a/src/interfaces/ecpg/ecpglib/po/it.po b/src/interfaces/ecpg/ecpglib/po/it.po
new file mode 100644
index 0000000..24d7435
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/it.po
@@ -0,0 +1,217 @@
+#
+# ecpglib.po
+# Italian message translation file for ecpglib
+#
+# For development and bug report please use:
+# https://github.com/dvarrazzo/postgresql-it
+#
+# Copyright (C) 2012-2017 PostgreSQL Global Development Group
+# Copyright (C) 2010, Associazione Culturale ITPUG
+#
+# Daniele Varrazzo <daniele.varrazzo@gmail.com>, 2012-2017
+# Maurizio Totti <maurizio.totti@gmail.com>, 2010
+#
+# This file is distributed under the same license as the PostgreSQL package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 10\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-17 00:07+0000\n"
+"PO-Revision-Date: 2012-10-30 13:08+0100\n"
+"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
+"Language-Team: https://github.com/dvarrazzo/postgresql-it\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "messaggio di testo vuoto"
+
+#: connect.c:401 connect.c:430 connect.c:638
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: descriptor.c:833 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "non ci sono dati alla riga %d"
+
+# Utilizzerei 'memoria esaurita' al posto di 'errore di memoria' (GB)
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "memoria esaurita alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "tipo \"%s\" non supportato alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "troppi argomenti alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "numero di argomenti non sufficiente alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "sintassi in input non valida per il tipo int: \"%s\", alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "sintassi in input non valida per il tipo unsigned int: \"%s\", alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "sintassi in input non valida per il tipo floating-point: \"%s\", alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "sintassi in input non valida per il tipo boolean: \"%s\", alla riga %d"
+
+# Originariamente da MT: non si può convertire il valore booleano: la dimensione è sbagliata (disallineata), alla riga %d
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "conversione fallita per il valore booleano: dimensione incompatibile, alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "query vuota alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "valore nullo senza variabile 'indicatore' alla riga %d"
+
+# è difficile da tradurre diversamente (GB)
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "la variabile non è di tipo array alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "i dati letti dal server non sono di tipo array alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "inserire un array di variabili non è supportato alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "la connessione \"%s\" non esiste alla riga %d"
+
+# Inizialmente (MT): non si è connessi alla connessione \"%s\" alla riga %d
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "connessione \"%s\" non attiva alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "nome di istruzione non valido \"%s\" alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "il descrittore \"%s\" non esiste alla riga %d"
+
+# userei intervallo al posto di range (GB)
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "l'indice del descrittore è fuori intervallo alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "elemento del descrittore \"%s\" sconosciuto alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "la variabile non è di tipo numerico alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "la variabile non è di tipo carattere alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "errore nel processare la transazione alla riga %d"
+
+# Inizialmente (MT): non posso connettermi al database \"%s\" alla riga %d
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "connessione fallita al database \"%s\" alla riga %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "errore SQL %d alla riga %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "la connessione con il server è andata persa"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "errore SQL: %s\n"
+
+#: execute.c:1962
+msgid "<empty>"
+msgstr "<empty>"
diff --git a/src/interfaces/ecpg/ecpglib/po/ja.po b/src/interfaces/ecpg/ecpglib/po/ja.po
new file mode 100644
index 0000000..895a46a
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/ja.po
@@ -0,0 +1,199 @@
+# Japanese message translation file for ecpglib
+# Copyright (C) 2022 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_archivecleanup (PostgreSQL) package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL 14)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-20 15:39+0900\n"
+"PO-Revision-Date: 2021-08-19 15:13+0900\n"
+"Last-Translator: Kyotaro Horiguchi <horikyota.ntt@gmail.com>\n"
+"Language-Team: Japan PostgreSQL Users Group <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.13\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "空のメッセージテキスト"
+
+#: connect.c:405 connect.c:627
+msgid "<DEFAULT>"
+msgstr "<デフォルト>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "ヌル"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "行番号%dにおいてデータがありませんでした"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "行番号%dにおいてメモリ不足です"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "行番号%2$dにおいて非サポートのデータ型\"%1$s\"があります"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "行番号%dにおいて引数が多すぎます"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "行番号%dにおいて引数が少なすぎます"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "行番号%2$dにおいて、整数型に対して無効な入力構文があります:\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "行番号%2$dにおいて、符号無し整数型に対して無効な入力構文があります:\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "行番号%2$dにおいて、浮動小数点型に対して無効な入力構文があります:\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "行番号%2$dにおいて、論理型に対して無効な入力構文があります:\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "行番号%dにおいて、論理型に変換できませんでした。サイズが合っていません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "行番号%dにおいて問い合わせが空です"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "行番号%dにおいて、指示子が無いヌル値です"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "行番号%dにおいて、変数は配列型ではありません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "行番号%dにおいて、サーバから読み込んだデータは配列ではありません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "行番号%dにおいて、変数の配列への挿入はサポートされません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "行番号%2$dにおいて、接続\"%1$s\"は存在しません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "行番号%2$dにおいて、接続\"%1$s\"に接続していません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "行番号%2$dにおいて、文の名前\"%1$s\"が無効です"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "行番号%2$dにおいて、記述子\"%1$s\"がありません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "行番号%dにおいて、記述子のインデックスが範囲外です"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "行番号%2$dにおいて、記述子項目\"%1$s\"が認識できません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "行番号%dにおいて、変数は数値型ではありません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "行番号%dにおいて、変数は文字型ではありません"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "行番号%dにおいて、トランザクション処理がエラーになりました"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "行番号%2$dにおいて、データベース\"%1$s\"に接続できませんでした"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "行番号%2$dにおいて、SQLエラー%1$dがあります"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "サーバへの接続が切れました"
+
+#: error.c:346
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQLエラー: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<空>"
diff --git a/src/interfaces/ecpg/ecpglib/po/ko.po b/src/interfaces/ecpg/ecpglib/po/ko.po
new file mode 100644
index 0000000..e798653
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/ko.po
@@ -0,0 +1,198 @@
+# LANGUAGE message translation file for ecpglib
+# Copyright (C) 2015 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Ioseph Kim <ioseph@uri.sarang.net>, 2015
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-02-09 20:09+0000\n"
+"PO-Revision-Date: 2020-02-10 09:54+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean <pgsql-kr@postgresql.kr>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "빈 메시지 텍스트"
+
+#: connect.c:401 connect.c:430 connect.c:638
+msgid "<DEFAULT>"
+msgstr "<초기값>"
+
+#: descriptor.c:876 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "자료 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "메모리 부족: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "\"%s\" 형 지원하지 않음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "너무 많은 인자: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "너무 적은 인자: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "int 형에 대한 입력 구문 오류: \"%s\", %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "unsigned int 형에 대한 입력 구문 오류: \"%s\", %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "floating-point 형에 대한 입력 구문 오류: \"%s\", %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "boolean 형에 대한 입력 구문 오류: \"%s\", %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "boolean 값 변환 실패: 크기 다름, %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "빈 쿼리: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "지시자 없는 null 값: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "variable 형에서 배열형을 사용하고 있지 않음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "서버에서 읽은 자료가 배열형이 아님: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "변수들의 배열을 삽입하는 기능을 제공하지 않음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "\"%s\" 연결이 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "\"%s\" 연결이 현재 끊겼음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "\"%s\" 이름은 잘못된 쿼리구문 이름: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "\"%s\" 이름의 기술자가 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "기술자 색인 범위를 벗어남: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "\"%s\" 이름은 알 수 없는 기술자 항목: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "변수에 numeric 형이 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "변수에 character 형이 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "트랜잭션 처리 중 실패: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "\"%s\" 데이터베이스로 접속할 수 없음: %d 번째 줄"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL 오류 %d: %d 번째 줄"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "서버 연결 끊김"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL 오류: %s\n"
+
+#: execute.c:2198 execute.c:2205
+msgid "<empty>"
+msgstr "<empty>"
diff --git a/src/interfaces/ecpg/ecpglib/po/pl.po b/src/interfaces/ecpg/ecpglib/po/pl.po
new file mode 100644
index 0000000..0d5554b
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/pl.po
@@ -0,0 +1,174 @@
+# Polish message translation file for ecpglib
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Begina Felicysym <begina.felicysym@wp.eu>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL 9.1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2013-01-29 13:40+0000\n"
+"PO-Revision-Date: 2011-09-30 09:51-0300\n"
+"Last-Translator: Begina Felicysym <begina.felicysym@wp.eu>\n"
+"Language-Team: Begina Felicysym\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.7.1-beta1\n"
+
+#: connect.c:231
+msgid "empty message text"
+msgstr "pusty tekst komunikatu"
+
+#: connect.c:384 connect.c:413 connect.c:618
+msgid "<DEFAULT>"
+msgstr "<DOMYŚLNIE>"
+
+#: descriptor.c:807 misc.c:113
+msgid "NULL"
+msgstr "NULL"
+
+#: error.c:29
+#, c-format
+msgid "no data found on line %d"
+msgstr "nie znaleziono danych, linia %d"
+
+#: error.c:39
+#, c-format
+msgid "out of memory on line %d"
+msgstr "brak pamięci, linia %d"
+
+#: error.c:49
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "nieobsługiwany typ \"%s\", linia %d"
+
+#: error.c:59
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "zbyt wiele argumentów, linia %d"
+
+#: error.c:69
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "zbyt mało argumentów, linia %d"
+
+#: error.c:79
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "niepoprawna składnia wejścia dla typu int: \"%s\", linia %d"
+
+#: error.c:89
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "niepoprawna składnia wejścia dla typu unsigned int: \"%s\", linia %d"
+
+#: error.c:99
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "niepoprawna składnia wejścia dla typu floating-point: \"%s\", linia %d"
+
+#: error.c:110
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "niepoprawna składnia wejścia dla typu boolean: \"%s\", linia %d"
+
+#: error.c:118
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "nie można przekształcić wartości logicznej: niepoprawny rozmiar, linia %d"
+
+#: error.c:128
+#, c-format
+msgid "empty query on line %d"
+msgstr "puste zapytanie, linia %d"
+
+#: error.c:138
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "wartość null bez wskaźnika, linia %d"
+
+#: error.c:148
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "zmienna nie ma typu array, linia %d"
+
+#: error.c:158
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "dane odczytane z serwera nie są tablicą, linia %d"
+
+#: error.c:168
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "wstawienie tablicy zmiennych nie jest obsługiwane, linia %d"
+
+#: error.c:178
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "połączenie \"%s\" nie istnieje, linia %d"
+
+#: error.c:188
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "nie wykonano połączenia z \"%s\", linia %d"
+
+#: error.c:198
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "niepoprawna nazwa wyrażenia \"%s\", linia %d"
+
+#: error.c:208
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "nie odnaleziono deskryptora \"%s\", linia %d"
+
+#: error.c:218
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "indeks deskryptora poza zakresem, linia %d"
+
+#: error.c:228
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "niezrozumiały element deskryptora \"%s\", linia %d"
+
+#: error.c:238
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "zmienna nie ma typu typu numeric, linia %d"
+
+#: error.c:248
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "zmienna nie ma typu typu character, linia %d"
+
+#: error.c:258
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "błąd w przetwarzaniu transakcji, linia %d"
+
+#: error.c:268
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "nie można połączyć się z bazą danych \"%s\", linia %d"
+
+#: error.c:278
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "błąd SQL %d, linia %d"
+
+#: error.c:318
+msgid "the connection to the server was lost"
+msgstr "połączenie z serwerem zostało przerwane"
+
+#: error.c:405
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "błąd SQL: %s\n"
+
+#: execute.c:1921
+msgid "<empty>"
+msgstr "<pusty>"
diff --git a/src/interfaces/ecpg/ecpglib/po/pt_BR.po b/src/interfaces/ecpg/ecpglib/po/pt_BR.po
new file mode 100644
index 0000000..cc54e74
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/pt_BR.po
@@ -0,0 +1,199 @@
+# Brazilian Portuguese message translation file for ecpglib
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Fernando Ike de Oliveira <fike@midstorm.org>, 2009.
+# Euler Taveira de Oliveira <euler@timbira.com>, 2010-2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.5\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2015-09-17 22:32-0300\n"
+"PO-Revision-Date: 2009-02-09 13:00-0200\n"
+"Last-Translator: Fernando Ike de Oliveira <fike@midstorm.org>\n"
+"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "mensagem vazia"
+
+#: connect.c:401 connect.c:430 connect.c:638
+msgid "<DEFAULT>"
+msgstr "<PADRÃO>"
+
+#: descriptor.c:833 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "nenhum dado encontrado na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "sem memória na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "tipo \"%s\" não é suportado na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "muitos argumentos na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "poucos argumentos na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "sintaxe de entrada é inválida para tipo inteiro: \"%s\", na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "sintaxe de entrada é inválida para tipo inteiro não-sinalizado: \"%s\", na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "sintaxe de entrada é inválida para tipo ponto flutuante: \"%s\", na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "sintaxe de entrada é inválida par tipo booleano: \"%s\", na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "não pôde converter valor booleano: tamanho não corresponde, na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "consulta vazia na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "valor nulo sem indicador na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "variável não tem um tipo matriz na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "dado lido do servidor não é uma matriz na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "inserir uma matriz de variáveis não é suportado na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "conexão \"%s\" não existe na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "não está conectado a conexão \"%s\" na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "nome de comando \"%s\" é inválido na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "descritor \"%s\" não foi encontrado na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "índice do descritor está fora do intervalo na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "item do descritor \"%s\" é desconhecido na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "variável não tem um tipo numérico na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "variável não tem um tipo caracter na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "erro ao processar transação na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "não pôde connectar ao banco de dados \"%s\" na linha %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "Erro SQL %d na linha %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "a conexão com servidor foi perdida"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "Erro SQL: %s\n"
+
+#: execute.c:1972
+msgid "<empty>"
+msgstr "<vazio>"
diff --git a/src/interfaces/ecpg/ecpglib/po/ru.po b/src/interfaces/ecpg/ecpglib/po/ru.po
new file mode 100644
index 0000000..2133fff
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/ru.po
@@ -0,0 +1,204 @@
+# Russian message translation file for ecpglib
+# Copyright (C) 2012-2016 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Alexander Lakhin <exclusion@gmail.com>, 2012-2017, 2019.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-09-13 07:55+0300\n"
+"PO-Revision-Date: 2019-09-09 13:30+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "пустое сообщение"
+
+#: connect.c:405 connect.c:634
+msgid "<DEFAULT>"
+msgstr "<ПО_УМОЛЧАНИЮ>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "нет данных (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "нехватка памяти (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "неподдерживаемый тип \"%s\" в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "слишком много аргументов в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "недостаточно аргументов в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "неверный синтаксис для целого числа: \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "неверный синтаксис для беззнакового целого: \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "неверный синтаксис для числа с плавающей точкой: \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "неверный синтаксис для логического значения: \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr ""
+"не удалось преобразовать логическое значение: несовпадение размера (строка "
+"%d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "пустой запрос в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "значение NULL без индикатора в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "переменная должна иметь тип массива (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "полученные с сервера данные - не массив (%d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "добавление массива переменных не поддерживается (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "подключение \"%s\" не существует (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "подключение \"%s\" не установлено (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "неверный оператор \"%s\" в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "дескриптор \"%s\" не найден (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "индекс дескриптора вне диапазона (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "нераспознанный элемент дескриптора \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "переменная должна быть числовой (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "переменная должна быть символьной (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "ошибка при обработке транзакции в строке %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "ошибка подключения к базе данных \"%s\" (строка %d)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL-ошибка %d в строке %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "подключение к серверу потеряно"
+
+#: error.c:346
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "ошибка SQL: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<>"
+
+#~ msgid "cursor is invalid on line %d"
+#~ msgstr "некорректный курсор в строке %d"
diff --git a/src/interfaces/ecpg/ecpglib/po/sv.po b/src/interfaces/ecpg/ecpglib/po/sv.po
new file mode 100644
index 0000000..7ccde10
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/sv.po
@@ -0,0 +1,199 @@
+# SWEDISH message translation file for ecpglib
+# Copyright (C) 2017 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Dennis Björklund <db@zigo.dhs.org>, 2017, 2018, 2019, 2020, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-04-10 02:39+0000\n"
+"PO-Revision-Date: 2021-11-07 10:36+0100\n"
+"Last-Translator: Dennis Björklund <db@zigo.dhs.org>\n"
+"Language-Team: Swedish <pgsql-translators@postgresql.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "tom meddelandetext"
+
+#: connect.c:401 connect.c:430 connect.c:653
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "ingen data hittad på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "slut på minne på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "ej stöd för typ \"%s\" på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "för många argument på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "för få argument på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "ogiltig inputsyntax för typ int: \"%s\", på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "ogiltig inputsyntax för typ unsigned int: \"%s\", på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "ogiltig inputsyntaxc för flyttalstyp: \"%s\", på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "ogiltig syntax för typ boolean: \"%s\", på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "kunde inte konvertera booleanskt värde: storlekarna matchar inte, på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "tom fråga på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "null-värde utan indikator på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "variabel har inte array-typ på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "data inläst från servern är inte en array på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "sätta in en array med variabler stöds inte på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "anslutning \"%s\" funns inte på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "ej ansluten till anslutning \"%s\" på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "ogiltigt satsnamn \"%s\" på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "deskriptor \"%s\" hittades inte på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "deskriptor-index utanför sitt intervall på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "okänd deskriptor-post \"%s\" på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "variabel har ej numerisk typ på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "variabel har ej character-typ på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "fel i transaktionsprocessande på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "kunde inte ansluta till databas \"%s\" på rad %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "SQL-fel %d på rad %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "anslutningen till servern tappades"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL-fel: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<tom>"
diff --git a/src/interfaces/ecpg/ecpglib/po/tr.po b/src/interfaces/ecpg/ecpglib/po/tr.po
new file mode 100644
index 0000000..38ac989
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/tr.po
@@ -0,0 +1,205 @@
+# LANGUAGE message translation file for ecpglib
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 8.4\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-04-26 13:38+0000\n"
+"PO-Revision-Date: 2019-06-14 10:40+0300\n"
+"Last-Translator: Devrim GÜNDÜZ <devrim@gunduz.org>\n"
+"Language-Team: TR <devrim@gunduz.org>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "boş mesaj metni"
+
+#: connect.c:403 connect.c:432 connect.c:640
+msgid "<DEFAULT>"
+msgstr "<ÖNTANIMLI>"
+
+#: descriptor.c:888 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "%d. satırda veri bulunamadı"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "%d. satırda yetersiz bellek"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "%2$d. satırda desteklenmeyen veri tipi \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "%d. satırda çok fazla argüman var"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "%d. satırda yetersiz argüman sayısı"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "%2$d. satırda int veri tipi için geçersiz girdi sözdizimi: \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "%2$d. satırda işaretsiz tamsayı tipi için geçersiz girdi sözdizimi: \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "%2$d. satırda kayan noktalı veri tipi için geçersiz girdi sözdizimi: \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "%2$d. satırda boolean veri tipi için geçersiz girdi sözdizimi: \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "boolean değer dönüştürülemedi: boyut uyuşmazlığı, %d. satırda"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "%d. satırda boş sorgu"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "%d. satırda belirteç olmadan null değer var"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "%d. satırda değişkenin veri tipi dizi değil"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "%d. satırda sunucudan okunan veri bir dizi değil"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "%d. satırda değişkenlerden oluşan dizinin eklenmesi (insert) desteklenmiyor"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "%2$d numaralı satırda \"%1$s\" bağlantısı yok"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "%2$d. satırda\"%1$s\" bağlantısına bağlanılmıyor"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "%2$d. satırda geçersiz ifade adı \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "%2$d. satırda tanımlayıcı \"%1$s\" bulunamadı"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "%d. satırdaki açıklayıcı indeks sınırların dışında"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "%2$d. satırda bilinmeyen tanımlayıcı öğe \"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "%d. satırdaki değişken sayısal tipte değil"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "%d. satırdaki değişkenin karakter tipi yok"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "%d. satırda tranaction'ı işlerken hata oluştu"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "%2$d. satırda \"%1$s\" veritabanına bağlanılamadı"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "The cursor is invalid on line %d"
+msgstr "%d. satırda geçersiz imleç (cursor)"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:214
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "%2$d. satırda SQL hatası %1$d"
+
+#: error.c:261
+msgid "the connection to the server was lost"
+msgstr "sunucuya bağlantı kesildi"
+
+#: error.c:354
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL hatası: %s\n"
+
+#: execute.c:2103
+msgid "<empty>"
+msgstr "<boş>"
diff --git a/src/interfaces/ecpg/ecpglib/po/uk.po b/src/interfaces/ecpg/ecpglib/po/uk.po
new file mode 100644
index 0000000..81526f9
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/uk.po
@@ -0,0 +1,200 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-06-16 03:55+0000\n"
+"PO-Revision-Date: 2022-06-19 10:10\n"
+"Last-Translator: \n"
+"Language-Team: Ukrainian\n"
+"Language: uk_UA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
+"X-Crowdin-Project: postgresql\n"
+"X-Crowdin-Project-ID: 324573\n"
+"X-Crowdin-Language: uk\n"
+"X-Crowdin-File: /REL_14_STABLE/ecpglib.pot\n"
+"X-Crowdin-File-ID: 746\n"
+
+#: connect.c:239
+msgid "empty message text"
+msgstr "пусте повідомлення"
+
+#: connect.c:407 connect.c:636
+msgid "<DEFAULT>"
+msgstr "<ЗА_ЗАМОВЧУВАННЯМ>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "в рядку %d не знайдено жодних даних"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "не вистачає пам'яті в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "непідтримуванний тип \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "забагато аргументів в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "недостатньо аргументів в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "неприпустимий синтаксис для цілочисельного типу: \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "неприпустимий синтаксис вводу для типу цілого числа без знаку: \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "неприпустимий синтаксис вводу для типу з плаваючою комою: \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "неприпустимий синтаксис для логічного типу: \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "не вдалося перетворити логічне значення: невідповідність розміру в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "пустий запит в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "значення NULL без індикатора в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "змінна не має типу масиву в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "дані, прочитані з сервера, не є масивом в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "вставлення масиву змінних не підтримується в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "підключення \"%s\" не існує в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "не підключено до підключення \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "неприпустимий оператор \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "дескриптор \"%s\" не знайдено в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "індекс дескриптора поза діапазоном в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "нерозпізнаний елемент дескриптора \"%s\" в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "змінна не має числового типу в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "змінна не має символьного типу в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "помилка в транзакції в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "неможливо під'єднатися до бази даних %s в рядку %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "помилка SQL %d в рядку %d"
+
+#: error.c:253
+msgid "the connection to the server was lost"
+msgstr "з'єднання із сервером втрачено"
+
+#: error.c:345
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "помилка SQL: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<пусто>"
+
diff --git a/src/interfaces/ecpg/ecpglib/po/vi.po b/src/interfaces/ecpg/ecpglib/po/vi.po
new file mode 100644
index 0000000..850b54f
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/vi.po
@@ -0,0 +1,200 @@
+# LANGUAGE message translation file for ecpglib
+# Copyright (C) 2018 PostgreSQL Global Development Group
+# This file is distributed under the same license as the ecpglib (PostgreSQL) package.
+# FIRST AUTHOR <kakalot49@gmail.com>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 11\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2018-04-22 12:08+0000\n"
+"PO-Revision-Date: 2018-04-23 21:34+0900\n"
+"Language-Team: <pgvn_translators@postgresql.vn>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.6\n"
+"Last-Translator: Dang Minh Huong <kakalot49@gmail.com>\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language: vi_VN\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "văn bản tin nhắn trống"
+
+#: connect.c:401 connect.c:430 connect.c:638
+msgid "<DEFAULT>"
+msgstr "<MẶC ĐỊNH>"
+
+#: descriptor.c:834 misc.c:120
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "không tìm thấy dữ liệu trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "hết bộ nhớ trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "không hỗ trợ kiểu \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "quá nhiều đối số trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "quá ít đối số trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "cú pháp nhập không hợp lệ cho kiểu int: \"%s\", trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "cú pháp nhập không hợp lệ cho kiểu unsigned int: \"%s\", trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "cú pháp nhập không hợp lệ cho kiểu dấu phẩy động: \"%s\", trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "cú pháp không hợp lệ cho kiểu boolean: \"%s\", trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "không thể chuyển đổi giá trị boolean: kích thước không khớp, trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "truy vấn trống trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "giá trị null không có chỉ báo (indicator) trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "biến không có kiểu mảng trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "dữ liệu đọc từ server không phải là một mảng trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "chèn một mảng các biến không được hỗ trợ trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "kết nối \"%s\" không tồn tại trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "chưa kết nối tới kết nối \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "tên statement không hợp lệ \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "không tìm thấy descriptor \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "chỉ mục của descriptor nằm ngoài phạm vi trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "không nhận ra descriptor item \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "biến số không có kiểu numeric trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "biến số không có kiểu ký tự trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "lỗi trong xử lý giao dịch trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "không thể kết nối với cơ sở dữ liệu \"%s\" trên dòng %d"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "lỗi SQL %d trên dòng %d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "kết nối với server bị mất"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "lỗi SQL: %s\n"
+
+#: execute.c:1968
+msgid "<empty>"
+msgstr "<trống>"
diff --git a/src/interfaces/ecpg/ecpglib/po/zh_CN.po b/src/interfaces/ecpg/ecpglib/po/zh_CN.po
new file mode 100644
index 0000000..d775d4f
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/zh_CN.po
@@ -0,0 +1,199 @@
+# LANGUAGE message translation file for ecpglib
+# Copyright (C) 2010 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpglib (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 05:39+0000\n"
+"PO-Revision-Date: 2021-08-15 18:50+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@fujitsu.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "消息文本为空"
+
+#: connect.c:405 connect.c:627
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: descriptor.c:871 misc.c:119
+msgid "NULL"
+msgstr "NULL"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:33
+#, c-format
+msgid "no data found on line %d"
+msgstr "在第%d行上没有找到数据"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:40
+#, c-format
+msgid "out of memory on line %d"
+msgstr "在第%d行上内存用尽"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:47
+#, c-format
+msgid "unsupported type \"%s\" on line %d"
+msgstr "在第%2$d上出现不支持的类型\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:54
+#, c-format
+msgid "too many arguments on line %d"
+msgstr "在第%d行上的参数多于指定的数量"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:61
+#, c-format
+msgid "too few arguments on line %d"
+msgstr "在第%d行上的参数少于指定的数量"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:68
+#, c-format
+msgid "invalid input syntax for type int: \"%s\", on line %d"
+msgstr "对于整数类型的输入语法无效: \"%s\" ,在第%d行"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:75
+#, c-format
+msgid "invalid input syntax for type unsigned int: \"%s\", on line %d"
+msgstr "对于无符号整数类型的输入语法无效: \"%s\" 在第%d行"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:82
+#, c-format
+msgid "invalid input syntax for floating-point type: \"%s\", on line %d"
+msgstr "对于浮点类型的输入语法无效: \"%s\",在第%d行"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:90
+#, c-format
+msgid "invalid syntax for type boolean: \"%s\", on line %d"
+msgstr "对于布尔类型语法无效: \"%s\",在第%d行上"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:95
+#, c-format
+msgid "could not convert boolean value: size mismatch, on line %d"
+msgstr "在第%d行上无法转换布尔类型值: 大小不匹配"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:102
+#, c-format
+msgid "empty query on line %d"
+msgstr "在第%d行上查询是空的"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:109
+#, c-format
+msgid "null value without indicator on line %d"
+msgstr "在第%d行上的空值没有标志"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:116
+#, c-format
+msgid "variable does not have an array type on line %d"
+msgstr "在第%d行上的变量没有数组类型"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:123
+#, c-format
+msgid "data read from server is not an array on line %d"
+msgstr "在第%d行上从服务器读取的数据不是数组"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:130
+#, c-format
+msgid "inserting an array of variables is not supported on line %d"
+msgstr "在第%d行上不支持正在插入一个的变量数组"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:137
+#, c-format
+msgid "connection \"%s\" does not exist on line %d"
+msgstr "在第%2$d行上连接\"%1$s\"不存在"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:144
+#, c-format
+msgid "not connected to connection \"%s\" on line %d"
+msgstr "在第%2$d行上没有连接到\"%1$s\"连接"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:151
+#, c-format
+msgid "invalid statement name \"%s\" on line %d"
+msgstr "在第%2$d行上的语句名称\"%1$s\"无效"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:158
+#, c-format
+msgid "descriptor \"%s\" not found on line %d"
+msgstr "在第%2$d行上没有找到描述符\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:165
+#, c-format
+msgid "descriptor index out of range on line %d"
+msgstr "在第%d行上的描述符索引超出范围"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:172
+#, c-format
+msgid "unrecognized descriptor item \"%s\" on line %d"
+msgstr "在第%2$d行上出现无法识别的描述符成员\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:179
+#, c-format
+msgid "variable does not have a numeric type on line %d"
+msgstr "在第%d上的变量没有数值类型"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:186
+#, c-format
+msgid "variable does not have a character type on line %d"
+msgstr "在第%d行上的变量没有字符类型"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:193
+#, c-format
+msgid "error in transaction processing on line %d"
+msgstr "在第%d行上的事务处理中发生错误"
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:200
+#, c-format
+msgid "could not connect to database \"%s\" on line %d"
+msgstr "在第%2$d行上无法连接数据库\"%1$s\""
+
+#. translator: this string will be truncated at 149 characters expanded.
+#: error.c:207
+#, c-format
+msgid "SQL error %d on line %d"
+msgstr "在第%2$d行上的SQL命令发生错误 代码%1$d"
+
+#: error.c:254
+msgid "the connection to the server was lost"
+msgstr "与服务器的连接丢失"
+
+#: error.c:346
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL语句错误: %s\n"
+
+#: execute.c:2196 execute.c:2203
+msgid "<empty>"
+msgstr "<空>"
+
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
new file mode 100644
index 0000000..ea1146f
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -0,0 +1,602 @@
+/* src/interfaces/ecpg/ecpglib/prepare.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include <ctype.h>
+
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sqlca.h"
+
+#define STMTID_SIZE 32
+
+/*
+ * The statement cache contains stmtCacheNBuckets hash buckets, each
+ * having stmtCacheEntPerBucket entries, which we recycle as needed,
+ * giving up the least-executed entry in the bucket.
+ * stmtCacheEntries[0] is never used, so that zero can be a "not found"
+ * indicator.
+ */
+#define stmtCacheNBuckets 2039 /* should be a prime number */
+#define stmtCacheEntPerBucket 8
+
+#define stmtCacheArraySize (stmtCacheNBuckets * stmtCacheEntPerBucket + 1)
+
+typedef struct
+{
+ int lineno;
+ char stmtID[STMTID_SIZE];
+ char *ecpgQuery;
+ long execs; /* # of executions */
+ const char *connection; /* connection for the statement */
+} stmtCacheEntry;
+
+static int nextStmtID = 1;
+static stmtCacheEntry *stmtCacheEntries = NULL;
+
+static bool deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con,
+ struct prepared_statement *prev, struct prepared_statement *this);
+
+static bool
+isvarchar(unsigned char c)
+{
+ if (isalnum(c))
+ return true;
+
+ if (c == '_' || c == '>' || c == '-' || c == '.')
+ return true;
+
+ if (c >= 128)
+ return true;
+
+ return false;
+}
+
+bool
+ecpg_register_prepared_stmt(struct statement *stmt)
+{
+ struct statement *prep_stmt;
+ struct prepared_statement *this;
+ struct connection *con = stmt->connection;
+ struct prepared_statement *prev = NULL;
+ int lineno = stmt->lineno;
+
+ /* check if we already have prepared this statement */
+ this = ecpg_find_prepared_statement(stmt->name, con, &prev);
+ if (this && !deallocate_one(lineno, ECPG_COMPAT_PGSQL, con, prev, this))
+ return false;
+
+ /* allocate new statement */
+ this = (struct prepared_statement *) ecpg_alloc(sizeof(struct prepared_statement), lineno);
+ if (!this)
+ return false;
+
+ prep_stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno);
+ if (!prep_stmt)
+ {
+ ecpg_free(this);
+ return false;
+ }
+ memset(prep_stmt, 0, sizeof(struct statement));
+
+ /* create statement */
+ prep_stmt->lineno = lineno;
+ prep_stmt->connection = con;
+ prep_stmt->command = ecpg_strdup(stmt->command, lineno);
+ prep_stmt->inlist = prep_stmt->outlist = NULL;
+ this->name = ecpg_strdup(stmt->name, lineno);
+ this->stmt = prep_stmt;
+ this->prepared = true;
+
+ if (con->prep_stmts == NULL)
+ this->next = NULL;
+ else
+ this->next = con->prep_stmts;
+
+ con->prep_stmts = this;
+ return true;
+}
+
+static bool
+replace_variables(char **text, int lineno)
+{
+ bool string = false;
+ int counter = 1,
+ ptr = 0;
+
+ for (; (*text)[ptr] != '\0'; ptr++)
+ {
+ if ((*text)[ptr] == '\'')
+ string = string ? false : true;
+
+ if (string || (((*text)[ptr] != ':') && ((*text)[ptr] != '?')))
+ continue;
+
+ if (((*text)[ptr] == ':') && ((*text)[ptr + 1] == ':'))
+ ptr += 2; /* skip '::' */
+ else
+ {
+ /* a rough guess of the size we need: */
+ int buffersize = sizeof(int) * CHAR_BIT * 10 / 3;
+ int len;
+ char *buffer,
+ *newcopy;
+
+ if (!(buffer = (char *) ecpg_alloc(buffersize, lineno)))
+ return false;
+
+ snprintf(buffer, buffersize, "$%d", counter++);
+
+ for (len = 1; (*text)[ptr + len] && isvarchar((*text)[ptr + len]); len++)
+ /* skip */ ;
+ if (!(newcopy = (char *) ecpg_alloc(strlen(*text) - len + strlen(buffer) + 1, lineno)))
+ {
+ ecpg_free(buffer);
+ return false;
+ }
+
+ memcpy(newcopy, *text, ptr);
+ strcpy(newcopy + ptr, buffer);
+ strcat(newcopy, (*text) +ptr + len);
+
+ ecpg_free(*text);
+ ecpg_free(buffer);
+
+ *text = newcopy;
+
+ if ((*text)[ptr] == '\0') /* we reached the end */
+ ptr--; /* since we will (*text)[ptr]++ in the top
+ * level for loop */
+ }
+ }
+ return true;
+}
+
+static bool
+prepare_common(int lineno, struct connection *con, const char *name, const char *variable)
+{
+ struct statement *stmt;
+ struct prepared_statement *this;
+ PGresult *query;
+
+ /* allocate new statement */
+ this = (struct prepared_statement *) ecpg_alloc(sizeof(struct prepared_statement), lineno);
+ if (!this)
+ return false;
+
+ stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno);
+ if (!stmt)
+ {
+ ecpg_free(this);
+ return false;
+ }
+
+ /* create statement */
+ stmt->lineno = lineno;
+ stmt->connection = con;
+ stmt->command = ecpg_strdup(variable, lineno);
+ stmt->inlist = stmt->outlist = NULL;
+
+ /* if we have C variables in our statement replace them with '?' */
+ replace_variables(&(stmt->command), lineno);
+
+ /* add prepared statement to our list */
+ this->name = ecpg_strdup(name, lineno);
+ this->stmt = stmt;
+
+ /* and finally really prepare the statement */
+ query = PQprepare(stmt->connection->connection, name, stmt->command, 0, NULL);
+ if (!ecpg_check_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat))
+ {
+ ecpg_free(stmt->command);
+ ecpg_free(this->name);
+ ecpg_free(this);
+ ecpg_free(stmt);
+ return false;
+ }
+
+ ecpg_log("prepare_common on line %d: name %s; query: \"%s\"\n", stmt->lineno, name, stmt->command);
+ PQclear(query);
+ this->prepared = true;
+
+ if (con->prep_stmts == NULL)
+ this->next = NULL;
+ else
+ this->next = con->prep_stmts;
+
+ con->prep_stmts = this;
+ return true;
+}
+
+/* handle the EXEC SQL PREPARE statement */
+/* questionmarks is not needed but remains in there for the time being to not change the API */
+bool
+ECPGprepare(int lineno, const char *connection_name, const bool questionmarks,
+ const char *name, const char *variable)
+{
+ struct connection *con;
+ struct prepared_statement *this,
+ *prev;
+
+ (void) questionmarks; /* quiet the compiler */
+
+ con = ecpg_get_connection(connection_name);
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ /* check if we already have prepared this statement */
+ this = ecpg_find_prepared_statement(name, con, &prev);
+ if (this && !deallocate_one(lineno, ECPG_COMPAT_PGSQL, con, prev, this))
+ return false;
+
+ return prepare_common(lineno, con, name, variable);
+}
+
+struct prepared_statement *
+ecpg_find_prepared_statement(const char *name,
+ struct connection *con, struct prepared_statement **prev_)
+{
+ struct prepared_statement *this,
+ *prev;
+
+ for (this = con->prep_stmts, prev = NULL;
+ this != NULL;
+ prev = this, this = this->next)
+ {
+ if (strcmp(this->name, name) == 0)
+ {
+ if (prev_)
+ *prev_ = prev;
+ return this;
+ }
+ }
+ return NULL;
+}
+
+static bool
+deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con,
+ struct prepared_statement *prev, struct prepared_statement *this)
+{
+ bool r = false;
+
+ ecpg_log("deallocate_one on line %d: name %s\n", lineno, this->name);
+
+ /* first deallocate the statement in the backend */
+ if (this->prepared)
+ {
+ char *text;
+ PGresult *query;
+
+ text = (char *) ecpg_alloc(strlen("deallocate \"\" ") + strlen(this->name), this->stmt->lineno);
+
+ if (text)
+ {
+ sprintf(text, "deallocate \"%s\"", this->name);
+ query = PQexec(this->stmt->connection->connection, text);
+ ecpg_free(text);
+ if (ecpg_check_PQresult(query, lineno,
+ this->stmt->connection->connection,
+ this->stmt->compat))
+ {
+ PQclear(query);
+ r = true;
+ }
+ }
+ }
+
+ /*
+ * Just ignore all errors since we do not know the list of cursors we are
+ * allowed to free. We have to trust the software.
+ */
+ if (!r && !INFORMIX_MODE(c))
+ {
+ ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, this->name);
+ return false;
+ }
+
+ /* okay, free all the resources */
+ ecpg_free(this->stmt->command);
+ ecpg_free(this->stmt);
+ ecpg_free(this->name);
+ if (prev != NULL)
+ prev->next = this->next;
+ else
+ con->prep_stmts = this->next;
+
+ ecpg_free(this);
+ return true;
+}
+
+/* handle the EXEC SQL DEALLOCATE PREPARE statement */
+bool
+ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
+{
+ struct connection *con;
+ struct prepared_statement *this,
+ *prev;
+
+ con = ecpg_get_connection(connection_name);
+ if (!ecpg_init(con, connection_name, lineno))
+ return false;
+
+ this = ecpg_find_prepared_statement(name, con, &prev);
+ if (this)
+ return deallocate_one(lineno, c, con, prev, this);
+
+ /* prepared statement is not found */
+ if (INFORMIX_MODE(c))
+ return true;
+ ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, name);
+ return false;
+}
+
+bool
+ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con)
+{
+ /* deallocate all prepared statements */
+ while (con->prep_stmts)
+ {
+ if (!deallocate_one(lineno, c, con, NULL, con->prep_stmts))
+ return false;
+ }
+
+ return true;
+}
+
+bool
+ECPGdeallocate_all(int lineno, int compat, const char *connection_name)
+{
+ return ecpg_deallocate_all_conn(lineno, compat,
+ ecpg_get_connection(connection_name));
+}
+
+char *
+ecpg_prepared(const char *name, struct connection *con)
+{
+ struct prepared_statement *this;
+
+ this = ecpg_find_prepared_statement(name, con, NULL);
+ return this ? this->stmt->command : NULL;
+}
+
+/* return the prepared statement */
+/* lineno is not used here, but kept in to not break API */
+char *
+ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
+{
+ (void) lineno; /* keep the compiler quiet */
+
+ return ecpg_prepared(name, ecpg_get_connection(connection_name));
+}
+
+/*
+ * hash a SQL statement - returns entry # of first entry in the bucket
+ */
+static int
+HashStmt(const char *ecpgQuery)
+{
+ int stmtIx,
+ bucketNo,
+ hashLeng,
+ stmtLeng;
+ uint64 hashVal,
+ rotVal;
+
+ stmtLeng = strlen(ecpgQuery);
+ hashLeng = 50; /* use 1st 50 characters of statement */
+ if (hashLeng > stmtLeng) /* if the statement isn't that long */
+ hashLeng = stmtLeng; /* use its actual length */
+
+ hashVal = 0;
+ for (stmtIx = 0; stmtIx < hashLeng; ++stmtIx)
+ {
+ hashVal = hashVal + (unsigned char) ecpgQuery[stmtIx];
+ /* rotate 32-bit hash value left 13 bits */
+ hashVal = hashVal << 13;
+ rotVal = (hashVal & UINT64CONST(0x1fff00000000)) >> 32;
+ hashVal = (hashVal & UINT64CONST(0xffffffff)) | rotVal;
+ }
+
+ bucketNo = hashVal % stmtCacheNBuckets;
+
+ /* Add 1 so that array entry 0 is never used */
+ return bucketNo * stmtCacheEntPerBucket + 1;
+}
+
+/*
+ * search the statement cache - search for entry with matching ECPG-format query
+ * Returns entry # in cache if found
+ * OR zero if not present (zero'th entry isn't used)
+ */
+static int
+SearchStmtCache(const char *ecpgQuery)
+{
+ int entNo,
+ entIx;
+
+ /* quick failure if cache not set up */
+ if (stmtCacheEntries == NULL)
+ return 0;
+
+ /* hash the statement */
+ entNo = HashStmt(ecpgQuery);
+
+ /* search the cache */
+ for (entIx = 0; entIx < stmtCacheEntPerBucket; ++entIx)
+ {
+ if (stmtCacheEntries[entNo].stmtID[0]) /* check if entry is in use */
+ {
+ if (strcmp(ecpgQuery, stmtCacheEntries[entNo].ecpgQuery) == 0)
+ break; /* found it */
+ }
+ ++entNo; /* incr entry # */
+ }
+
+ /* if entry wasn't found - set entry # to zero */
+ if (entIx >= stmtCacheEntPerBucket)
+ entNo = 0;
+
+ return entNo;
+}
+
+/*
+ * free an entry in the statement cache
+ * Returns entry # in cache used
+ * OR negative error code
+ */
+static int
+ecpg_freeStmtCacheEntry(int lineno, int compat,
+ int entNo) /* entry # to free */
+{
+ stmtCacheEntry *entry;
+ struct connection *con;
+ struct prepared_statement *this,
+ *prev;
+
+ /* fail if cache isn't set up */
+ if (stmtCacheEntries == NULL)
+ return -1;
+
+ entry = &stmtCacheEntries[entNo];
+ if (!entry->stmtID[0]) /* return if the entry isn't in use */
+ return 0;
+
+ con = ecpg_get_connection(entry->connection);
+
+ /* free the 'prepared_statement' list entry */
+ this = ecpg_find_prepared_statement(entry->stmtID, con, &prev);
+ if (this && !deallocate_one(lineno, compat, con, prev, this))
+ return -1;
+
+ entry->stmtID[0] = '\0';
+
+ /* free the memory used by the cache entry */
+ if (entry->ecpgQuery)
+ {
+ ecpg_free(entry->ecpgQuery);
+ entry->ecpgQuery = 0;
+ }
+
+ return entNo;
+}
+
+/*
+ * add an entry to the statement cache
+ * returns entry # in cache used OR negative error code
+ */
+static int
+AddStmtToCache(int lineno, /* line # of statement */
+ const char *stmtID, /* statement ID */
+ const char *connection, /* connection */
+ int compat, /* compatibility level */
+ const char *ecpgQuery) /* query */
+{
+ int ix,
+ initEntNo,
+ luEntNo,
+ entNo;
+ stmtCacheEntry *entry;
+
+ /* allocate and zero cache array if we haven't already */
+ if (stmtCacheEntries == NULL)
+ {
+ stmtCacheEntries = (stmtCacheEntry *)
+ ecpg_alloc(sizeof(stmtCacheEntry) * stmtCacheArraySize, lineno);
+ if (stmtCacheEntries == NULL)
+ return -1;
+ }
+
+ /* hash the statement */
+ initEntNo = HashStmt(ecpgQuery);
+
+ /* search for an unused entry */
+ entNo = initEntNo; /* start with the initial entry # for the
+ * bucket */
+ luEntNo = initEntNo; /* use it as the initial 'least used' entry */
+ for (ix = 0; ix < stmtCacheEntPerBucket; ++ix)
+ {
+ entry = &stmtCacheEntries[entNo];
+ if (!entry->stmtID[0]) /* unused entry - use it */
+ break;
+ if (entry->execs < stmtCacheEntries[luEntNo].execs)
+ luEntNo = entNo; /* save new 'least used' entry */
+ ++entNo; /* increment entry # */
+ }
+
+ /*
+ * if no unused entries were found, re-use the 'least used' entry found in
+ * the bucket
+ */
+ if (ix >= stmtCacheEntPerBucket)
+ entNo = luEntNo;
+
+ /* 'entNo' is the entry to use - make sure its free */
+ if (ecpg_freeStmtCacheEntry(lineno, compat, entNo) < 0)
+ return -1;
+
+ /* add the query to the entry */
+ entry = &stmtCacheEntries[entNo];
+ entry->lineno = lineno;
+ entry->ecpgQuery = ecpg_strdup(ecpgQuery, lineno);
+ entry->connection = connection;
+ entry->execs = 0;
+ memcpy(entry->stmtID, stmtID, sizeof(entry->stmtID));
+
+ return entNo;
+}
+
+/* handle cache and preparation of statements in auto-prepare mode */
+bool
+ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, char **name, const char *query)
+{
+ int entNo;
+
+ /* search the statement cache for this statement */
+ entNo = SearchStmtCache(query);
+
+ /* if not found - add the statement to the cache */
+ if (entNo)
+ {
+ char *stmtID;
+ struct connection *con;
+ struct prepared_statement *prep;
+
+ ecpg_log("ecpg_auto_prepare on line %d: statement found in cache; entry %d\n", lineno, entNo);
+
+ stmtID = stmtCacheEntries[entNo].stmtID;
+
+ con = ecpg_get_connection(connection_name);
+ prep = ecpg_find_prepared_statement(stmtID, con, NULL);
+ /* This prepared name doesn't exist on this connection. */
+ if (!prep && !prepare_common(lineno, con, stmtID, query))
+ return false;
+
+ *name = ecpg_strdup(stmtID, lineno);
+ }
+ else
+ {
+ char stmtID[STMTID_SIZE];
+
+ ecpg_log("ecpg_auto_prepare on line %d: statement not in cache; inserting\n", lineno);
+
+ /* generate a statement ID */
+ sprintf(stmtID, "ecpg%d", nextStmtID++);
+
+ if (!ECPGprepare(lineno, connection_name, 0, stmtID, query))
+ return false;
+
+ entNo = AddStmtToCache(lineno, stmtID, connection_name, compat, query);
+ if (entNo < 0)
+ return false;
+
+ *name = ecpg_strdup(stmtID, lineno);
+ }
+
+ /* increase usage counter */
+ stmtCacheEntries[entNo].execs++;
+
+ return true;
+}
diff --git a/src/interfaces/ecpg/ecpglib/sqlda.c b/src/interfaces/ecpg/ecpglib/sqlda.c
new file mode 100644
index 0000000..081e326
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/sqlda.c
@@ -0,0 +1,592 @@
+/*
+ * SQLDA support routines
+ *
+ * The allocated memory area pointed by an sqlda pointer
+ * contains both the metadata and the data, so freeing up
+ * is a simple free(sqlda) as expected by the ESQL/C examples.
+ */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "catalog/pg_type_d.h"
+#include "decimal.h"
+#include "ecpg-pthread-win32.h"
+#include "ecpgerrno.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sqlca.h"
+#include "sqlda-compat.h"
+#include "sqlda-native.h"
+
+/*
+ * Compute the next variable's offset with
+ * the current variable's size and alignment.
+ *
+ *
+ * Returns:
+ * - the current variable's offset in *current
+ * - the next variable's offset in *next
+ */
+static void
+ecpg_sqlda_align_add_size(long offset, int alignment, int size, long *current, long *next)
+{
+ if (offset % alignment)
+ offset += alignment - (offset % alignment);
+ if (current)
+ *current = offset;
+ offset += size;
+ if (next)
+ *next = offset;
+}
+
+static long
+sqlda_compat_empty_size(const PGresult *res)
+{
+ long offset;
+ int i;
+ int sqld = PQnfields(res);
+
+ /* Initial size to store main structure and field structures */
+ offset = sizeof(struct sqlda_compat) + sqld * sizeof(struct sqlvar_compat);
+
+ /* Add space for field names */
+ for (i = 0; i < sqld; i++)
+ offset += strlen(PQfname(res, i)) + 1;
+
+ /* Add padding to the first field value */
+ ecpg_sqlda_align_add_size(offset, sizeof(int), 0, &offset, NULL);
+
+ return offset;
+}
+
+static long
+sqlda_common_total_size(const PGresult *res, int row, enum COMPAT_MODE compat, long offset)
+{
+ int sqld = PQnfields(res);
+ int i;
+ long next_offset;
+
+ /* Add space for the field values */
+ for (i = 0; i < sqld; i++)
+ {
+ enum ECPGttype type = sqlda_dynamic_type(PQftype(res, i), compat);
+
+ switch (type)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ ecpg_sqlda_align_add_size(offset, sizeof(short), sizeof(short), &offset, &next_offset);
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(int), &offset, &next_offset);
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long), sizeof(long), &offset, &next_offset);
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long long), sizeof(long long), &offset, &next_offset);
+ break;
+ case ECPGt_bool:
+ ecpg_sqlda_align_add_size(offset, sizeof(bool), sizeof(bool), &offset, &next_offset);
+ break;
+ case ECPGt_float:
+ ecpg_sqlda_align_add_size(offset, sizeof(float), sizeof(float), &offset, &next_offset);
+ break;
+ case ECPGt_double:
+ ecpg_sqlda_align_add_size(offset, sizeof(double), sizeof(double), &offset, &next_offset);
+ break;
+ case ECPGt_decimal:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(decimal), &offset, &next_offset);
+ break;
+ case ECPGt_numeric:
+
+ /*
+ * We align the numeric struct to allow it to store a pointer,
+ * while the digits array is aligned to int (which seems like
+ * overkill, but let's keep compatibility here).
+ *
+ * Unfortunately we need to deconstruct the value twice to
+ * find out the digits array's size and then later fill it.
+ */
+ ecpg_sqlda_align_add_size(offset, sizeof(NumericDigit *), sizeof(numeric), &offset, &next_offset);
+ if (!PQgetisnull(res, row, i))
+ {
+ char *val = PQgetvalue(res, row, i);
+ numeric *num;
+
+ num = PGTYPESnumeric_from_asc(val, NULL);
+ if (!num)
+ break;
+ if (num->buf)
+ ecpg_sqlda_align_add_size(next_offset, sizeof(int), num->digits - num->buf + num->ndigits, &offset, &next_offset);
+ PGTYPESnumeric_free(num);
+ }
+ break;
+ case ECPGt_date:
+ ecpg_sqlda_align_add_size(offset, sizeof(date), sizeof(date), &offset, &next_offset);
+ break;
+ case ECPGt_timestamp:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(timestamp), &offset, &next_offset);
+ break;
+ case ECPGt_interval:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(interval), &offset, &next_offset);
+ break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ default:
+ {
+ long datalen = strlen(PQgetvalue(res, row, i)) + 1;
+
+ ecpg_sqlda_align_add_size(offset, sizeof(int), datalen, &offset, &next_offset);
+ break;
+ }
+ }
+ offset = next_offset;
+ }
+ return offset;
+}
+
+
+static long
+sqlda_compat_total_size(const PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ long offset;
+
+ offset = sqlda_compat_empty_size(res);
+
+ if (row < 0)
+ return offset;
+
+ offset = sqlda_common_total_size(res, row, compat, offset);
+ return offset;
+}
+
+static long
+sqlda_native_empty_size(const PGresult *res)
+{
+ long offset;
+ int sqld = PQnfields(res);
+
+ /* Initial size to store main structure and field structures */
+ offset = sizeof(struct sqlda_struct) + (sqld - 1) * sizeof(struct sqlvar_struct);
+
+ /* Add padding to the first field value */
+ ecpg_sqlda_align_add_size(offset, sizeof(int), 0, &offset, NULL);
+
+ return offset;
+}
+
+static long
+sqlda_native_total_size(const PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ long offset;
+
+ offset = sqlda_native_empty_size(res);
+
+ if (row < 0)
+ return offset;
+
+ offset = sqlda_common_total_size(res, row, compat, offset);
+ return offset;
+}
+
+/*
+ * Build "struct sqlda_compat" (metadata only) from PGresult
+ * leaving enough space for the field values in
+ * the given row number
+ */
+struct sqlda_compat *
+ecpg_build_compat_sqlda(int line, PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ struct sqlda_compat *sqlda;
+ struct sqlvar_compat *sqlvar;
+ char *fname;
+ long size;
+ int sqld;
+ int i;
+
+ size = sqlda_compat_total_size(res, row, compat);
+ sqlda = (struct sqlda_compat *) ecpg_alloc(size, line);
+ if (!sqlda)
+ return NULL;
+
+ memset(sqlda, 0, size);
+ sqlvar = (struct sqlvar_compat *) (sqlda + 1);
+ sqld = PQnfields(res);
+ fname = (char *) (sqlvar + sqld);
+
+ sqlda->sqld = sqld;
+ ecpg_log("ecpg_build_compat_sqlda on line %d sqld = %d\n", line, sqld);
+ sqlda->desc_occ = size; /* cheat here, keep the full allocated size */
+ sqlda->sqlvar = sqlvar;
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ sqlda->sqlvar[i].sqltype = sqlda_dynamic_type(PQftype(res, i), compat);
+ strcpy(fname, PQfname(res, i));
+ sqlda->sqlvar[i].sqlname = fname;
+ fname += strlen(sqlda->sqlvar[i].sqlname) + 1;
+
+ /*
+ * this is reserved for future use, so we leave it empty for the time
+ * being
+ */
+ /* sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i); */
+ sqlda->sqlvar[i].sqlxid = PQftype(res, i);
+ sqlda->sqlvar[i].sqltypelen = PQfsize(res, i);
+ }
+
+ return sqlda;
+}
+
+/*
+ * Sets values from PGresult.
+ */
+static int16 value_is_null = -1;
+static int16 value_is_not_null = 0;
+
+void
+ecpg_set_compat_sqlda(int lineno, struct sqlda_compat **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ struct sqlda_compat *sqlda = (*_sqlda);
+ int i;
+ long offset,
+ next_offset;
+
+ if (row < 0)
+ return;
+
+ /* Offset for the first field value */
+ offset = sqlda_compat_empty_size(res);
+
+ /*
+ * Set sqlvar[i]->sqldata pointers and convert values to correct format
+ */
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ int isnull;
+ int datalen;
+ bool set_data = true;
+
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ ecpg_sqlda_align_add_size(offset, sizeof(short), sizeof(short), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(short);
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(int), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(int);
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long), sizeof(long), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(long);
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long long), sizeof(long long), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(long long);
+ break;
+ case ECPGt_bool:
+ ecpg_sqlda_align_add_size(offset, sizeof(bool), sizeof(bool), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(bool);
+ break;
+ case ECPGt_float:
+ ecpg_sqlda_align_add_size(offset, sizeof(float), sizeof(float), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(float);
+ break;
+ case ECPGt_double:
+ ecpg_sqlda_align_add_size(offset, sizeof(double), sizeof(double), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(double);
+ break;
+ case ECPGt_decimal:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(decimal), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(decimal);
+ break;
+ case ECPGt_numeric:
+ {
+ numeric *num;
+ char *val;
+
+ set_data = false;
+
+ ecpg_sqlda_align_add_size(offset, sizeof(NumericDigit *), sizeof(numeric), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(numeric);
+
+ if (PQgetisnull(res, row, i))
+ {
+ ECPGset_noind_null(ECPGt_numeric, sqlda->sqlvar[i].sqldata);
+ break;
+ }
+
+ val = PQgetvalue(res, row, i);
+ num = PGTYPESnumeric_from_asc(val, NULL);
+ if (!num)
+ {
+ ECPGset_noind_null(ECPGt_numeric, sqlda->sqlvar[i].sqldata);
+ break;
+ }
+
+ memcpy(sqlda->sqlvar[i].sqldata, num, sizeof(numeric));
+
+ if (num->buf)
+ {
+ ecpg_sqlda_align_add_size(next_offset, sizeof(int), num->digits - num->buf + num->ndigits, &offset, &next_offset);
+ memcpy((char *) sqlda + offset, num->buf, num->digits - num->buf + num->ndigits);
+
+ ((numeric *) sqlda->sqlvar[i].sqldata)->buf = (NumericDigit *) sqlda + offset;
+ ((numeric *) sqlda->sqlvar[i].sqldata)->digits = (NumericDigit *) sqlda + offset + (num->digits - num->buf);
+ }
+
+ PGTYPESnumeric_free(num);
+
+ break;
+ }
+ case ECPGt_date:
+ ecpg_sqlda_align_add_size(offset, sizeof(date), sizeof(date), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(date);
+ break;
+ case ECPGt_timestamp:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(timestamp), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(timestamp);
+ break;
+ case ECPGt_interval:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(interval), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(interval);
+ break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ default:
+ datalen = strlen(PQgetvalue(res, row, i)) + 1;
+ ecpg_sqlda_align_add_size(offset, sizeof(int), datalen, &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = datalen;
+ if (datalen > 32768)
+ sqlda->sqlvar[i].sqlilongdata = sqlda->sqlvar[i].sqldata;
+ break;
+ }
+
+ isnull = PQgetisnull(res, row, i);
+ ecpg_log("ecpg_set_compat_sqlda on line %d row %d col %d %s\n", lineno, row, i, isnull ? "IS NULL" : "IS NOT NULL");
+ sqlda->sqlvar[i].sqlind = isnull ? &value_is_null : &value_is_not_null;
+ sqlda->sqlvar[i].sqlitype = ECPGt_short;
+ sqlda->sqlvar[i].sqlilen = sizeof(short);
+ if (!isnull)
+ {
+ if (set_data)
+ ecpg_get_data(res, row, i, lineno,
+ sqlda->sqlvar[i].sqltype, ECPGt_NO_INDICATOR,
+ sqlda->sqlvar[i].sqldata, NULL, 0, 0, 0,
+ ECPG_ARRAY_NONE, compat, false);
+ }
+ else
+ ECPGset_noind_null(sqlda->sqlvar[i].sqltype, sqlda->sqlvar[i].sqldata);
+
+ offset = next_offset;
+ }
+}
+
+struct sqlda_struct *
+ecpg_build_native_sqlda(int line, PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ struct sqlda_struct *sqlda;
+ long size;
+ int i;
+
+ size = sqlda_native_total_size(res, row, compat);
+ sqlda = (struct sqlda_struct *) ecpg_alloc(size, line);
+ if (!sqlda)
+ return NULL;
+
+ memset(sqlda, 0, size);
+
+ sprintf(sqlda->sqldaid, "SQLDA ");
+ sqlda->sqld = sqlda->sqln = PQnfields(res);
+ ecpg_log("ecpg_build_native_sqlda on line %d sqld = %d\n", line, sqlda->sqld);
+ sqlda->sqldabc = sizeof(struct sqlda_struct) + (sqlda->sqld - 1) * sizeof(struct sqlvar_struct);
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ char *fname;
+
+ sqlda->sqlvar[i].sqltype = sqlda_dynamic_type(PQftype(res, i), compat);
+ fname = PQfname(res, i);
+ sqlda->sqlvar[i].sqlname.length = strlen(fname);
+ strcpy(sqlda->sqlvar[i].sqlname.data, fname);
+ }
+
+ return sqlda;
+}
+
+void
+ecpg_set_native_sqlda(int lineno, struct sqlda_struct **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
+{
+ struct sqlda_struct *sqlda = (*_sqlda);
+ int i;
+ long offset,
+ next_offset;
+
+ if (row < 0)
+ return;
+
+ /* Offset for the first field value */
+ offset = sqlda_native_empty_size(res);
+
+ /*
+ * Set sqlvar[i]->sqldata pointers and convert values to correct format
+ */
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ int isnull;
+ int datalen;
+ bool set_data = true;
+
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case ECPGt_short:
+ case ECPGt_unsigned_short:
+ ecpg_sqlda_align_add_size(offset, sizeof(short), sizeof(short), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(short);
+ break;
+ case ECPGt_int:
+ case ECPGt_unsigned_int:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(int), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(int);
+ break;
+ case ECPGt_long:
+ case ECPGt_unsigned_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long), sizeof(long), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(long);
+ break;
+ case ECPGt_long_long:
+ case ECPGt_unsigned_long_long:
+ ecpg_sqlda_align_add_size(offset, sizeof(long long), sizeof(long long), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(long long);
+ break;
+ case ECPGt_bool:
+ ecpg_sqlda_align_add_size(offset, sizeof(bool), sizeof(bool), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(bool);
+ break;
+ case ECPGt_float:
+ ecpg_sqlda_align_add_size(offset, sizeof(float), sizeof(float), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(float);
+ break;
+ case ECPGt_double:
+ ecpg_sqlda_align_add_size(offset, sizeof(double), sizeof(double), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(double);
+ break;
+ case ECPGt_decimal:
+ ecpg_sqlda_align_add_size(offset, sizeof(int), sizeof(decimal), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(decimal);
+ break;
+ case ECPGt_numeric:
+ {
+ numeric *num;
+ char *val;
+
+ set_data = false;
+
+ ecpg_sqlda_align_add_size(offset, sizeof(NumericDigit *), sizeof(numeric), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(numeric);
+
+ if (PQgetisnull(res, row, i))
+ {
+ ECPGset_noind_null(ECPGt_numeric, sqlda->sqlvar[i].sqldata);
+ break;
+ }
+
+ val = PQgetvalue(res, row, i);
+ num = PGTYPESnumeric_from_asc(val, NULL);
+ if (!num)
+ {
+ ECPGset_noind_null(ECPGt_numeric, sqlda->sqlvar[i].sqldata);
+ break;
+ }
+
+ memcpy(sqlda->sqlvar[i].sqldata, num, sizeof(numeric));
+
+ if (num->buf)
+ {
+ ecpg_sqlda_align_add_size(next_offset, sizeof(int), num->digits - num->buf + num->ndigits, &offset, &next_offset);
+ memcpy((char *) sqlda + offset, num->buf, num->digits - num->buf + num->ndigits);
+
+ ((numeric *) sqlda->sqlvar[i].sqldata)->buf = (NumericDigit *) sqlda + offset;
+ ((numeric *) sqlda->sqlvar[i].sqldata)->digits = (NumericDigit *) sqlda + offset + (num->digits - num->buf);
+ }
+
+ PGTYPESnumeric_free(num);
+
+ break;
+ }
+ case ECPGt_date:
+ ecpg_sqlda_align_add_size(offset, sizeof(date), sizeof(date), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(date);
+ break;
+ case ECPGt_timestamp:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(timestamp), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(timestamp);
+ break;
+ case ECPGt_interval:
+ ecpg_sqlda_align_add_size(offset, sizeof(int64), sizeof(interval), &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = sizeof(interval);
+ break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ default:
+ datalen = strlen(PQgetvalue(res, row, i)) + 1;
+ ecpg_sqlda_align_add_size(offset, sizeof(int), datalen, &offset, &next_offset);
+ sqlda->sqlvar[i].sqldata = (char *) sqlda + offset;
+ sqlda->sqlvar[i].sqllen = datalen;
+ break;
+ }
+
+ isnull = PQgetisnull(res, row, i);
+ ecpg_log("ecpg_set_native_sqlda on line %d row %d col %d %s\n", lineno, row, i, isnull ? "IS NULL" : "IS NOT NULL");
+ sqlda->sqlvar[i].sqlind = isnull ? &value_is_null : &value_is_not_null;
+ if (!isnull)
+ {
+ if (set_data)
+ ecpg_get_data(res, row, i, lineno,
+ sqlda->sqlvar[i].sqltype, ECPGt_NO_INDICATOR,
+ sqlda->sqlvar[i].sqldata, NULL, 0, 0, 0,
+ ECPG_ARRAY_NONE, compat, false);
+ }
+
+ offset = next_offset;
+ }
+}
diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c
new file mode 100644
index 0000000..1d482c4
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/typename.c
@@ -0,0 +1,144 @@
+/* src/interfaces/ecpg/ecpglib/typename.c */
+
+#define POSTGRES_ECPG_INTERNAL
+#include "postgres_fe.h"
+
+#include "catalog/pg_type_d.h"
+#include "ecpglib.h"
+#include "ecpglib_extern.h"
+#include "ecpgtype.h"
+#include "sql3types.h"
+#include "sqltypes.h"
+
+/*
+ * This function is used to generate the correct type names.
+ */
+const char *
+ecpg_type_name(enum ECPGttype typ)
+{
+ switch (typ)
+ {
+ case ECPGt_char:
+ case ECPGt_string:
+ return "char";
+ case ECPGt_unsigned_char:
+ return "unsigned char";
+ case ECPGt_short:
+ return "short";
+ case ECPGt_unsigned_short:
+ return "unsigned short";
+ case ECPGt_int:
+ return "int";
+ case ECPGt_unsigned_int:
+ return "unsigned int";
+ case ECPGt_long:
+ return "long";
+ case ECPGt_unsigned_long:
+ return "unsigned long";
+ case ECPGt_long_long:
+ return "long long";
+ case ECPGt_unsigned_long_long:
+ return "unsigned long long";
+ case ECPGt_float:
+ return "float";
+ case ECPGt_double:
+ return "double";
+ case ECPGt_bool:
+ return "bool";
+ case ECPGt_varchar:
+ return "varchar";
+ case ECPGt_bytea:
+ return "bytea";
+ case ECPGt_char_variable:
+ return "char";
+ case ECPGt_decimal:
+ return "decimal";
+ case ECPGt_numeric:
+ return "numeric";
+ case ECPGt_date:
+ return "date";
+ case ECPGt_timestamp:
+ return "timestamp";
+ case ECPGt_interval:
+ return "interval";
+ case ECPGt_const:
+ return "Const";
+ default:
+ abort();
+ }
+ return ""; /* keep MSC compiler happy */
+}
+
+int
+ecpg_dynamic_type(Oid type)
+{
+ switch (type)
+ {
+ case BOOLOID:
+ return SQL3_BOOLEAN; /* bool */
+ case INT2OID:
+ return SQL3_SMALLINT; /* int2 */
+ case INT4OID:
+ return SQL3_INTEGER; /* int4 */
+ case TEXTOID:
+ return SQL3_CHARACTER; /* text */
+ case FLOAT4OID:
+ return SQL3_REAL; /* float4 */
+ case FLOAT8OID:
+ return SQL3_DOUBLE_PRECISION; /* float8 */
+ case BPCHAROID:
+ return SQL3_CHARACTER; /* bpchar */
+ case VARCHAROID:
+ return SQL3_CHARACTER_VARYING; /* varchar */
+ case DATEOID:
+ return SQL3_DATE_TIME_TIMESTAMP; /* date */
+ case TIMEOID:
+ return SQL3_DATE_TIME_TIMESTAMP; /* time */
+ case TIMESTAMPOID:
+ return SQL3_DATE_TIME_TIMESTAMP; /* datetime */
+ case NUMERICOID:
+ return SQL3_NUMERIC; /* numeric */
+ default:
+ return 0;
+ }
+}
+
+int
+sqlda_dynamic_type(Oid type, enum COMPAT_MODE compat)
+{
+ switch (type)
+ {
+ case CHAROID:
+ case VARCHAROID:
+ case BPCHAROID:
+ case TEXTOID:
+ return ECPGt_char;
+ case INT2OID:
+ return ECPGt_short;
+ case INT4OID:
+ return ECPGt_int;
+ case FLOAT8OID:
+ return ECPGt_double;
+ case FLOAT4OID:
+ return ECPGt_float;
+ case NUMERICOID:
+ return INFORMIX_MODE(compat) ? ECPGt_decimal : ECPGt_numeric;
+ case DATEOID:
+ return ECPGt_date;
+ case TIMESTAMPOID:
+ case TIMESTAMPTZOID:
+ return ECPGt_timestamp;
+ case INTERVALOID:
+ return ECPGt_interval;
+ case INT8OID:
+#ifdef HAVE_LONG_LONG_INT_64
+ return ECPGt_long_long;
+#endif
+#ifdef HAVE_LONG_INT_64
+ return ECPGt_long;
+#endif
+ /* Unhandled types always return a string */
+ default:
+ return ECPGt_char;
+ }
+}
diff --git a/src/interfaces/ecpg/include/.gitignore b/src/interfaces/ecpg/include/.gitignore
new file mode 100644
index 0000000..608493d
--- /dev/null
+++ b/src/interfaces/ecpg/include/.gitignore
@@ -0,0 +1,2 @@
+/ecpg_config.h
+/stamp-h
diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
new file mode 100644
index 0000000..9c68bf3
--- /dev/null
+++ b/src/interfaces/ecpg/include/Makefile
@@ -0,0 +1,35 @@
+subdir = src/interfaces/ecpg/include
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
+
+informix_esql_dir = $(pkgincludedir)/informix/esql
+ecpg_config_h = $(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h
+
+all: $(ecpg_config_h)
+
+install: all installdirs install-headers
+
+.PHONY: install-headers
+ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informix.h \
+ pgtypes_error.h pgtypes_numeric.h pgtypes_timestamp.h pgtypes_date.h pgtypes_interval.h pgtypes.h \
+ sqlda.h sqlda-compat.h sqlda-native.h
+informix_headers = datetime.h decimal.h sqltypes.h
+
+install-headers: $(ecpg_headers) $(informix_headers) installdirs
+ $(INSTALL_DATA) $(addprefix $(srcdir)/,$(ecpg_headers)) '$(DESTDIR)$(includedir)/'
+ $(INSTALL_DATA) $(addprefix $(srcdir)/,$(informix_headers)) '$(DESTDIR)$(informix_esql_dir)/'
+ $(INSTALL_DATA) $(ecpg_config_h) '$(DESTDIR)$(includedir)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(informix_esql_dir)'
+
+uninstall:
+ rm -f $(addprefix '$(DESTDIR)$(includedir)'/, $(ecpg_headers))
+ rm -f $(addprefix '$(DESTDIR)$(informix_esql_dir)'/, $(informix_headers))
+ rm -f '$(DESTDIR)$(includedir)'/$(notdir $(ecpg_config_h))
+
+distclean maintainer-clean:
+ rm -f ecpg_config.h stamp-h
diff --git a/src/interfaces/ecpg/include/datetime.h b/src/interfaces/ecpg/include/datetime.h
new file mode 100644
index 0000000..44b2422
--- /dev/null
+++ b/src/interfaces/ecpg/include/datetime.h
@@ -0,0 +1,14 @@
+/* src/interfaces/ecpg/include/datetime.h */
+
+#ifndef _ECPG_DATETIME_H
+#define _ECPG_DATETIME_H
+
+#include <ecpg_informix.h>
+
+/* source created by ecpg which defines these symbols */
+#ifndef _ECPGLIB_H
+typedef timestamp dtime_t;
+typedef interval intrvl_t;
+#endif /* ndef _ECPGLIB_H */
+
+#endif /* ndef _ECPG_DATETIME_H */
diff --git a/src/interfaces/ecpg/include/decimal.h b/src/interfaces/ecpg/include/decimal.h
new file mode 100644
index 0000000..6ac2962
--- /dev/null
+++ b/src/interfaces/ecpg/include/decimal.h
@@ -0,0 +1,13 @@
+/* src/interfaces/ecpg/include/decimal.h */
+
+#ifndef _ECPG_DECIMAL_H
+#define _ECPG_DECIMAL_H
+
+#include <ecpg_informix.h>
+
+/* source created by ecpg which defines this */
+#ifndef _ECPGLIB_H
+typedef decimal dec_t;
+#endif /* ndef _ECPGLIB_H */
+
+#endif /* ndef _ECPG_DECIMAL_H */
diff --git a/src/interfaces/ecpg/include/ecpg-pthread-win32.h b/src/interfaces/ecpg/include/ecpg-pthread-win32.h
new file mode 100644
index 0000000..33c897b
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpg-pthread-win32.h
@@ -0,0 +1,58 @@
+/* src/interfaces/ecpg/include/ecpg-pthread-win32.h */
+/*
+ * pthread mapping macros for win32 native thread implementation
+ */
+#ifndef _ECPG_PTHREAD_WIN32_H
+#define _ECPG_PTHREAD_WIN32_H
+
+#ifdef ENABLE_THREAD_SAFETY
+
+#ifndef WIN32
+
+#include <pthread.h>
+#else
+
+typedef struct pthread_mutex_t
+{
+ HANDLE handle;
+ LONG initlock;
+} pthread_mutex_t;
+
+typedef DWORD pthread_key_t;
+typedef bool pthread_once_t;
+
+#define PTHREAD_MUTEX_INITIALIZER { NULL, 0 }
+#define PTHREAD_ONCE_INIT false
+
+void win32_pthread_mutex(volatile pthread_mutex_t *mutex);
+void win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void));
+
+#define pthread_mutex_lock(mutex) \
+ do { \
+ if ((mutex)->handle == NULL) \
+ win32_pthread_mutex((mutex)); \
+ WaitForSingleObject((mutex)->handle, INFINITE); \
+ } while(0)
+
+#define pthread_mutex_unlock(mutex) \
+ ReleaseMutex((mutex)->handle)
+
+#define pthread_getspecific(key) \
+ TlsGetValue((key))
+
+#define pthread_setspecific(key, value) \
+ TlsSetValue((key), (value))
+
+/* FIXME: destructor is never called in Win32. */
+#define pthread_key_create(key, destructor) \
+ do { *(key) = TlsAlloc(); ((void)(destructor)); } while(0)
+
+#define pthread_once(once, fn) \
+ do { \
+ if (!*(once)) \
+ win32_pthread_once((once), (fn)); \
+ } while(0)
+#endif /* WIN32 */
+#endif /* ENABLE_THREAD_SAFETY */
+
+#endif /* _ECPG_PTHREAD_WIN32_H */
diff --git a/src/interfaces/ecpg/include/ecpg_config.h.in b/src/interfaces/ecpg/include/ecpg_config.h.in
new file mode 100644
index 0000000..17e93c4
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpg_config.h.in
@@ -0,0 +1,18 @@
+/* Define to 1 if the system has the type `int64'. */
+#undef HAVE_INT64
+
+/* Define to 1 if `long int' works and is 64 bits. */
+#undef HAVE_LONG_INT_64
+
+/* Define to 1 if the system has the type `long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if `long long int' works and is 64 bits. */
+#undef HAVE_LONG_LONG_INT_64
+
+/* Define to 1 to use <stdbool.h> to define type bool. */
+#undef PG_USE_STDBOOL
+
+/* Define to 1 to build client libraries as thread-safe code.
+ * (--enable-thread-safety) */
+#undef ENABLE_THREAD_SAFETY
diff --git a/src/interfaces/ecpg/include/ecpg_informix.h b/src/interfaces/ecpg/include/ecpg_informix.h
new file mode 100644
index 0000000..a5260a5
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpg_informix.h
@@ -0,0 +1,90 @@
+/*
+ * This file contains stuff needed to be as compatible to Informix as possible.
+ * src/interfaces/ecpg/include/ecpg_informix.h
+ */
+#ifndef _ECPG_INFORMIX_H
+#define _ECPG_INFORMIX_H
+
+#include <ecpglib.h>
+#include <pgtypes_date.h>
+#include <pgtypes_interval.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_timestamp.h>
+
+#define SQLNOTFOUND 100
+
+#define ECPG_INFORMIX_NUM_OVERFLOW -1200
+#define ECPG_INFORMIX_NUM_UNDERFLOW -1201
+#define ECPG_INFORMIX_DIVIDE_ZERO -1202
+#define ECPG_INFORMIX_BAD_YEAR -1204
+#define ECPG_INFORMIX_BAD_MONTH -1205
+#define ECPG_INFORMIX_BAD_DAY -1206
+#define ECPG_INFORMIX_ENOSHORTDATE -1209
+#define ECPG_INFORMIX_DATE_CONVERT -1210
+#define ECPG_INFORMIX_OUT_OF_MEMORY -1211
+#define ECPG_INFORMIX_ENOTDMY -1212
+#define ECPG_INFORMIX_BAD_NUMERIC -1213
+#define ECPG_INFORMIX_BAD_EXPONENT -1216
+#define ECPG_INFORMIX_BAD_DATE -1218
+#define ECPG_INFORMIX_EXTRA_CHARS -1264
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern int rdatestr(date, char *);
+extern void rtoday(date *);
+extern int rjulmdy(date, short *);
+extern int rdefmtdate(date *, const char *, const char *);
+extern int rfmtdate(date, const char *, char *);
+extern int rmdyjul(short *, date *);
+extern int rstrdate(const char *, date *);
+extern int rdayofweek(date);
+
+extern int rfmtlong(long, const char *, char *);
+extern int rgetmsg(int, char *, int);
+extern int risnull(int, const char *);
+extern int rsetnull(int, char *);
+extern int rtypalign(int, int);
+extern int rtypmsize(int, int);
+extern int rtypwidth(int, int);
+extern void rupshift(char *);
+
+extern int byleng(char *, int);
+extern void ldchar(char *, int, char *);
+
+extern void ECPG_informix_set_var(int, void *, int);
+extern void *ECPG_informix_get_var(int);
+extern void ECPG_informix_reset_sqlca(void);
+
+/* Informix defines these in decimal.h */
+int decadd(decimal *, decimal *, decimal *);
+int deccmp(decimal *, decimal *);
+void deccopy(decimal *, decimal *);
+int deccvasc(const char *, int, decimal *);
+int deccvdbl(double, decimal *);
+int deccvint(int, decimal *);
+int deccvlong(long, decimal *);
+int decdiv(decimal *, decimal *, decimal *);
+int decmul(decimal *, decimal *, decimal *);
+int decsub(decimal *, decimal *, decimal *);
+int dectoasc(decimal *, char *, int, int);
+int dectodbl(decimal *, double *);
+int dectoint(decimal *, int *);
+int dectolong(decimal *, long *);
+
+/* Informix defines these in datetime.h */
+extern void dtcurrent(timestamp *);
+extern int dtcvasc(char *, timestamp *);
+extern int dtsub(timestamp *, timestamp *, interval *);
+extern int dttoasc(timestamp *, char *);
+extern int dttofmtasc(timestamp *, char *, int, char *);
+extern int intoasc(interval *, char *);
+extern int dtcvfmtasc(char *, char *, timestamp *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ndef _ECPG_INFORMIX_H */
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h
new file mode 100644
index 0000000..c4bc526
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpgerrno.h
@@ -0,0 +1,79 @@
+/* src/interfaces/ecpg/include/ecpgerrno.h */
+
+#ifndef _ECPG_ERRNO_H
+#define _ECPG_ERRNO_H
+
+#include <errno.h>
+
+/* This is a list of all error codes the embedded SQL program can return */
+#define ECPG_NO_ERROR 0
+#define ECPG_NOT_FOUND 100
+
+/* system error codes returned by ecpglib get the correct number,
+ * but are made negative
+ */
+#define ECPG_OUT_OF_MEMORY -ENOMEM
+
+/* first we have a set of ecpg messages, they start at 200 */
+#define ECPG_UNSUPPORTED -200
+#define ECPG_TOO_MANY_ARGUMENTS -201
+#define ECPG_TOO_FEW_ARGUMENTS -202
+#define ECPG_TOO_MANY_MATCHES -203
+#define ECPG_INT_FORMAT -204
+#define ECPG_UINT_FORMAT -205
+#define ECPG_FLOAT_FORMAT -206
+#define ECPG_NUMERIC_FORMAT -207
+#define ECPG_INTERVAL_FORMAT -208
+#define ECPG_DATE_FORMAT -209
+#define ECPG_TIMESTAMP_FORMAT -210
+#define ECPG_CONVERT_BOOL -211
+#define ECPG_EMPTY -212
+#define ECPG_MISSING_INDICATOR -213
+#define ECPG_NO_ARRAY -214
+#define ECPG_DATA_NOT_ARRAY -215
+#define ECPG_ARRAY_INSERT -216
+
+#define ECPG_NO_CONN -220
+#define ECPG_NOT_CONN -221
+
+#define ECPG_INVALID_STMT -230
+
+/* dynamic SQL related */
+#define ECPG_UNKNOWN_DESCRIPTOR -240
+#define ECPG_INVALID_DESCRIPTOR_INDEX -241
+#define ECPG_UNKNOWN_DESCRIPTOR_ITEM -242
+#define ECPG_VAR_NOT_NUMERIC -243
+#define ECPG_VAR_NOT_CHAR -244
+
+/* finally the backend error messages, they start at 400 */
+#define ECPG_PGSQL -400
+#define ECPG_TRANS -401
+#define ECPG_CONNECT -402
+#define ECPG_DUPLICATE_KEY -403
+#define ECPG_SUBSELECT_NOT_ONE -404
+
+/* for compatibility we define some different error codes for the same error
+ * if adding a new one make sure to not double define it */
+#define ECPG_INFORMIX_DUPLICATE_KEY -239
+#define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
+
+/* backend WARNINGs, starting at 600 */
+#define ECPG_WARNING_UNRECOGNIZED -600
+ /* WARNING: (transaction aborted): queries ignored until END */
+
+ /*
+ * WARNING: current transaction is aborted, queries ignored until end of
+ * transaction block
+ */
+#define ECPG_WARNING_QUERY_IGNORED -601
+ /* WARNING: PerformPortalClose: portal "*" not found */
+#define ECPG_WARNING_UNKNOWN_PORTAL -602
+ /* WARNING: BEGIN: already a transaction in progress */
+#define ECPG_WARNING_IN_TRANSACTION -603
+ /* WARNING: AbortTransaction and not in in-progress state */
+ /* WARNING: COMMIT: no transaction in progress */
+#define ECPG_WARNING_NO_TRANSACTION -604
+ /* WARNING: BlankPortalAssignName: portal * already exists */
+#define ECPG_WARNING_PORTAL_EXISTS -605
+
+#endif /* !_ECPG_ERRNO_H */
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
new file mode 100644
index 0000000..0024010
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -0,0 +1,103 @@
+/*
+ * Client-visible declarations for ecpglib
+ *
+ * src/interfaces/ecpg/include/ecpglib.h
+ */
+
+#ifndef _ECPGLIB_H
+#define _ECPGLIB_H
+
+#include <string.h>
+
+#include "ecpg_config.h"
+#include "ecpgtype.h"
+#include "libpq-fe.h"
+#include "sqlca.h"
+
+/*
+ * This is a small extract from c.h since we don't want to leak all postgres
+ * definitions into ecpg programs; but we need to know what bool is.
+ */
+#ifndef __cplusplus
+
+#ifdef PG_USE_STDBOOL
+#include <stdbool.h>
+#else
+
+/*
+ * We assume bool has been defined if true and false are. This avoids
+ * duplicate-typedef errors if this file is included after c.h.
+ */
+#if !(defined(true) && defined(false))
+typedef unsigned char bool;
+#endif
+
+#ifndef true
+#define true ((bool) 1)
+#endif
+
+#ifndef false
+#define false ((bool) 0)
+#endif
+
+#endif /* not PG_USE_STDBOOL */
+#endif /* not C++ */
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void ECPGdebug(int, FILE *);
+bool ECPGstatus(int, const char *);
+bool ECPGsetcommit(int, const char *, const char *);
+bool ECPGsetconn(int, const char *);
+bool ECPGconnect(int, int, const char *, const char *, const char *, const char *, int);
+bool ECPGdo(const int, const int, const int, const char *, const bool, const int, const char *,...);
+bool ECPGtrans(int, const char *, const char *);
+bool ECPGdisconnect(int, const char *);
+bool ECPGprepare(int, const char *, const bool, const char *, const char *);
+bool ECPGdeallocate(int, int, const char *, const char *);
+bool ECPGdeallocate_all(int, int, const char *);
+char *ECPGprepared_statement(const char *, const char *, int);
+PGconn *ECPGget_PGconn(const char *);
+PGTransactionStatusType ECPGtransactionStatus(const char *);
+
+ /* print an error message */
+void sqlprint(void);
+
+/* define this for simplicity as well as compatibility */
+
+#define SQLCODE sqlca.sqlcode
+#define SQLSTATE sqlca.sqlstate
+
+/* dynamic SQL */
+
+bool ECPGdo_descriptor(int, const char *, const char *, const char *);
+bool ECPGdeallocate_desc(int, const char *);
+bool ECPGallocate_desc(int, const char *);
+bool ECPGget_desc_header(int, const char *, int *);
+bool ECPGget_desc(int, const char *, int,...);
+bool ECPGset_desc_header(int, const char *, int);
+bool ECPGset_desc(int, const char *, int,...);
+
+void ECPGset_noind_null(enum ECPGttype, void *);
+bool ECPGis_noind_null(enum ECPGttype, const void *);
+bool ECPGdescribe(int, int, bool, const char *, const char *,...);
+
+void ECPGset_var(int, void *, int);
+void *ECPGget_var(int number);
+
+/* dynamic result allocation */
+void ECPGfree_auto_mem(void);
+
+#ifdef ENABLE_THREAD_SAFETY
+void ecpg_pthreads_init(void);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ECPGLIB_H */
diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h
new file mode 100644
index 0000000..3a57508
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpgtype.h
@@ -0,0 +1,109 @@
+/*
+ * This file implements a data structure that is built and maintained by the
+ * preprocessor.
+ *
+ * All types that can be handled for host variable declarations has to
+ * be handled eventually.
+ *
+ * src/interfaces/ecpg/include/ecpgtype.h
+ */
+
+/*
+ * Here are all the types that we are to handle. Note that it is the type
+ * that is registered and that has nothing whatsoever to do with the storage
+ * class.
+ *
+ * Simple types
+ * integers: char, short, int, long (signed and unsigned)
+ * floats: float, double
+ *
+ * Complex types:
+ * VARCHAR, VARCHAR2 - Strings with length (maxlen is given in the declaration)
+ * Arrays of simple types and of VARCHAR, VARCHAR2 (size given in declaration)
+ * Records build of simple types, arrays and other structs.
+ *
+ * Complicating things:
+ * typedefs and struct names!
+ *
+ * Conclusion:
+ * This is a typically recursive definition. A structure of typed list elements
+ * would probably work fine:
+ */
+
+#ifndef _ECPGTYPE_H
+#define _ECPGTYPE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+enum ECPGttype
+{
+ ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
+ ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
+ ECPGt_long_long, ECPGt_unsigned_long_long,
+ ECPGt_bool,
+ ECPGt_float, ECPGt_double,
+ ECPGt_varchar, ECPGt_varchar2,
+ ECPGt_numeric, /* this is a decimal that stores its digits in
+ * a malloced array */
+ ECPGt_decimal, /* this is a decimal that stores its digits in
+ * a fixed array */
+ ECPGt_date,
+ ECPGt_timestamp,
+ ECPGt_interval,
+ ECPGt_array,
+ ECPGt_struct,
+ ECPGt_union,
+ ECPGt_descriptor, /* sql descriptor, no C variable */
+ ECPGt_char_variable,
+ ECPGt_const, /* a constant is needed sometimes */
+ ECPGt_EOIT, /* End of insert types. */
+ ECPGt_EORT, /* End of result types. */
+ ECPGt_NO_INDICATOR, /* no indicator */
+ ECPGt_string, /* trimmed (char *) type */
+ ECPGt_sqlda, /* C struct descriptor */
+ ECPGt_bytea
+};
+
+ /* descriptor items */
+enum ECPGdtype
+{
+ ECPGd_count = 1,
+ ECPGd_data,
+ ECPGd_di_code,
+ ECPGd_di_precision,
+ ECPGd_indicator,
+ ECPGd_key_member,
+ ECPGd_length,
+ ECPGd_name,
+ ECPGd_nullable,
+ ECPGd_octet,
+ ECPGd_precision,
+ ECPGd_ret_length,
+ ECPGd_ret_octet,
+ ECPGd_scale,
+ ECPGd_type,
+ ECPGd_EODT, /* End of descriptor types. */
+ ECPGd_cardinality
+};
+
+#define IS_SIMPLE_TYPE(type) (((type) >= ECPGt_char && (type) <= ECPGt_interval) || ((type) == ECPGt_string) || ((type) == ECPGt_bytea))
+
+/* we also have to handle different statement types */
+enum ECPG_statement_type
+{
+ ECPGst_normal,
+ ECPGst_execute,
+ ECPGst_exec_immediate,
+ ECPGst_prepnormal,
+ ECPGst_prepare,
+ ECPGst_exec_with_exprlist
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ECPGTYPE_H */
diff --git a/src/interfaces/ecpg/include/pgtypes.h b/src/interfaces/ecpg/include/pgtypes.h
new file mode 100644
index 0000000..dbf759b
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes.h
@@ -0,0 +1,17 @@
+/* src/interfaces/ecpg/include/pgtypes.h */
+
+#ifndef PGTYPES_H
+#define PGTYPES_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern void PGTYPESchar_free(char *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_H */
diff --git a/src/interfaces/ecpg/include/pgtypes_date.h b/src/interfaces/ecpg/include/pgtypes_date.h
new file mode 100644
index 0000000..c668097
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes_date.h
@@ -0,0 +1,32 @@
+/* src/interfaces/ecpg/include/pgtypes_date.h */
+
+#ifndef PGTYPES_DATETIME
+#define PGTYPES_DATETIME
+
+#include <pgtypes.h>
+#include <pgtypes_timestamp.h>
+
+typedef long date;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern date * PGTYPESdate_new(void);
+extern void PGTYPESdate_free(date *);
+extern date PGTYPESdate_from_asc(char *, char **);
+extern char *PGTYPESdate_to_asc(date);
+extern date PGTYPESdate_from_timestamp(timestamp);
+extern void PGTYPESdate_julmdy(date, int *);
+extern void PGTYPESdate_mdyjul(int *, date *);
+extern int PGTYPESdate_dayofweek(date);
+extern void PGTYPESdate_today(date *);
+extern int PGTYPESdate_defmt_asc(date *, const char *, const char *);
+extern int PGTYPESdate_fmt_asc(date, const char *, char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_DATETIME */
diff --git a/src/interfaces/ecpg/include/pgtypes_error.h b/src/interfaces/ecpg/include/pgtypes_error.h
new file mode 100644
index 0000000..9fc22a2
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes_error.h
@@ -0,0 +1,18 @@
+/* src/interfaces/ecpg/include/pgtypes_error.h */
+
+#define PGTYPES_NUM_OVERFLOW 301
+#define PGTYPES_NUM_BAD_NUMERIC 302
+#define PGTYPES_NUM_DIVIDE_ZERO 303
+#define PGTYPES_NUM_UNDERFLOW 304
+
+#define PGTYPES_DATE_BAD_DATE 310
+#define PGTYPES_DATE_ERR_EARGS 311
+#define PGTYPES_DATE_ERR_ENOSHORTDATE 312
+#define PGTYPES_DATE_ERR_ENOTDMY 313
+#define PGTYPES_DATE_BAD_DAY 314
+#define PGTYPES_DATE_BAD_MONTH 315
+
+#define PGTYPES_TS_BAD_TIMESTAMP 320
+#define PGTYPES_TS_ERR_EINFTIME 321
+
+#define PGTYPES_INTVL_BAD_INTERVAL 330
diff --git a/src/interfaces/ecpg/include/pgtypes_interval.h b/src/interfaces/ecpg/include/pgtypes_interval.h
new file mode 100644
index 0000000..3b17cd1
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes_interval.h
@@ -0,0 +1,48 @@
+/* src/interfaces/ecpg/include/pgtypes_interval.h */
+
+#ifndef PGTYPES_INTERVAL
+#define PGTYPES_INTERVAL
+
+#include <ecpg_config.h>
+#include <pgtypes.h>
+
+#ifndef C_H
+
+#ifdef HAVE_LONG_INT_64
+#ifndef HAVE_INT64
+typedef long int int64;
+#endif
+#elif defined(HAVE_LONG_LONG_INT_64)
+#ifndef HAVE_INT64
+typedef long long int int64;
+#endif
+#else
+/* neither HAVE_LONG_INT_64 nor HAVE_LONG_LONG_INT_64 */
+#error must have a working 64-bit integer datatype
+#endif
+
+#define HAVE_INT64_TIMESTAMP
+#endif /* C_H */
+
+typedef struct
+{
+ int64 time; /* all time units other than months and years */
+ long month; /* months and years, after time for alignment */
+} interval;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern interval * PGTYPESinterval_new(void);
+extern void PGTYPESinterval_free(interval *);
+extern interval * PGTYPESinterval_from_asc(char *, char **);
+extern char *PGTYPESinterval_to_asc(interval *);
+extern int PGTYPESinterval_copy(interval *, interval *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_INTERVAL */
diff --git a/src/interfaces/ecpg/include/pgtypes_numeric.h b/src/interfaces/ecpg/include/pgtypes_numeric.h
new file mode 100644
index 0000000..5c763a9
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes_numeric.h
@@ -0,0 +1,69 @@
+#ifndef PGTYPES_NUMERIC
+#define PGTYPES_NUMERIC
+
+#include <pgtypes.h>
+
+#define NUMERIC_POS 0x0000
+#define NUMERIC_NEG 0x4000
+#define NUMERIC_NAN 0xC000
+#define NUMERIC_NULL 0xF000
+#define NUMERIC_MAX_PRECISION 1000
+#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
+#define NUMERIC_MIN_DISPLAY_SCALE 0
+#define NUMERIC_MIN_SIG_DIGITS 16
+
+#define DECSIZE 30
+
+typedef unsigned char NumericDigit;
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit *buf; /* start of alloc'd space for digits[] */
+ NumericDigit *digits; /* decimal digits */
+} numeric;
+
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit digits[DECSIZE]; /* decimal digits */
+} decimal;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+numeric *PGTYPESnumeric_new(void);
+decimal *PGTYPESdecimal_new(void);
+void PGTYPESnumeric_free(numeric *);
+void PGTYPESdecimal_free(decimal *);
+numeric *PGTYPESnumeric_from_asc(char *, char **);
+char *PGTYPESnumeric_to_asc(numeric *, int);
+int PGTYPESnumeric_add(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_sub(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_mul(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_div(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_cmp(numeric *, numeric *);
+int PGTYPESnumeric_from_int(signed int, numeric *);
+int PGTYPESnumeric_from_long(signed long int, numeric *);
+int PGTYPESnumeric_copy(numeric *, numeric *);
+int PGTYPESnumeric_from_double(double, numeric *);
+int PGTYPESnumeric_to_double(numeric *, double *);
+int PGTYPESnumeric_to_int(numeric *, int *);
+int PGTYPESnumeric_to_long(numeric *, long *);
+int PGTYPESnumeric_to_decimal(numeric *, decimal *);
+int PGTYPESnumeric_from_decimal(decimal *, numeric *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_NUMERIC */
diff --git a/src/interfaces/ecpg/include/pgtypes_timestamp.h b/src/interfaces/ecpg/include/pgtypes_timestamp.h
new file mode 100644
index 0000000..3e29837
--- /dev/null
+++ b/src/interfaces/ecpg/include/pgtypes_timestamp.h
@@ -0,0 +1,31 @@
+/* src/interfaces/ecpg/include/pgtypes_timestamp.h */
+
+#ifndef PGTYPES_TIMESTAMP
+#define PGTYPES_TIMESTAMP
+
+#include <pgtypes.h>
+/* pgtypes_interval.h includes ecpg_config.h */
+#include <pgtypes_interval.h>
+
+typedef int64 timestamp;
+typedef int64 TimestampTz;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
+extern char *PGTYPEStimestamp_to_asc(timestamp);
+extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
+extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, const char *);
+extern void PGTYPEStimestamp_current(timestamp *);
+extern int PGTYPEStimestamp_defmt_asc(const char *, const char *, timestamp *);
+extern int PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout);
+extern int PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, timestamp * tout);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_TIMESTAMP */
diff --git a/src/interfaces/ecpg/include/sql3types.h b/src/interfaces/ecpg/include/sql3types.h
new file mode 100644
index 0000000..644b616
--- /dev/null
+++ b/src/interfaces/ecpg/include/sql3types.h
@@ -0,0 +1,43 @@
+#ifndef _ECPG_SQL3TYPES_H
+#define _ECPG_SQL3TYPES_H
+
+/* SQL3 dynamic type codes */
+
+/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
+
+enum
+{
+ SQL3_CHARACTER = 1,
+ SQL3_NUMERIC,
+ SQL3_DECIMAL,
+ SQL3_INTEGER,
+ SQL3_SMALLINT,
+ SQL3_FLOAT,
+ SQL3_REAL,
+ SQL3_DOUBLE_PRECISION,
+ SQL3_DATE_TIME_TIMESTAMP,
+ SQL3_INTERVAL, /* 10 */
+ SQL3_CHARACTER_VARYING = 12,
+ SQL3_ENUMERATED,
+ SQL3_BIT,
+ SQL3_BIT_VARYING,
+ SQL3_BOOLEAN,
+ SQL3_abstract
+ /* the rest is xLOB stuff */
+};
+
+/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */
+
+enum
+{
+ SQL3_DDT_DATE = 1,
+ SQL3_DDT_TIME,
+ SQL3_DDT_TIMESTAMP,
+ SQL3_DDT_TIME_WITH_TIME_ZONE,
+ SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE,
+
+ SQL3_DDT_ILLEGAL /* not a datetime data type (not part of
+ * standard) */
+};
+
+#endif /* !_ECPG_SQL3TYPES_H */
diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h
new file mode 100644
index 0000000..c5f107d
--- /dev/null
+++ b/src/interfaces/ecpg/include/sqlca.h
@@ -0,0 +1,66 @@
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/interfaces/ecpg/include/sqlda-compat.h b/src/interfaces/ecpg/include/sqlda-compat.h
new file mode 100644
index 0000000..7b0ac45
--- /dev/null
+++ b/src/interfaces/ecpg/include/sqlda-compat.h
@@ -0,0 +1,47 @@
+/*
+ * src/interfaces/ecpg/include/sqlda-compat.h
+ */
+
+#ifndef ECPG_SQLDA_COMPAT_H
+#define ECPG_SQLDA_COMPAT_H
+
+struct sqlvar_compat
+{
+ short sqltype; /* variable type */
+ int sqllen; /* length in bytes */
+ char *sqldata; /* pointer to data */
+ short *sqlind; /* pointer to indicator */
+ char *sqlname; /* variable name */
+ char *sqlformat; /* reserved for future use */
+ short sqlitype; /* ind variable type */
+ short sqlilen; /* ind length in bytes */
+ char *sqlidata; /* ind data pointer */
+ int sqlxid; /* extended id type */
+ char *sqltypename; /* extended type name */
+ short sqltypelen; /* length of extended type name */
+ short sqlownerlen; /* length of owner name */
+ short sqlsourcetype; /* source type for distinct of built-ins */
+ char *sqlownername; /* owner name */
+ int sqlsourceid; /* extended id of source type */
+
+ /*
+ * sqlilongdata is new. It supports data that exceeds the 32k limit.
+ * sqlilen and sqlidata are for backward compatibility and they have
+ * maximum value of <32K.
+ */
+ char *sqlilongdata; /* for data field beyond 32K */
+ int sqlflags; /* for internal use only */
+ void *sqlreserved; /* reserved for future use */
+};
+
+struct sqlda_compat
+{
+ short sqld;
+ struct sqlvar_compat *sqlvar;
+ char desc_name[19]; /* descriptor name */
+ short desc_occ; /* size of sqlda structure */
+ struct sqlda_compat *desc_next; /* pointer to next sqlda struct */
+ void *reserved; /* reserved for future use */
+};
+
+#endif /* ECPG_SQLDA_COMPAT_H */
diff --git a/src/interfaces/ecpg/include/sqlda-native.h b/src/interfaces/ecpg/include/sqlda-native.h
new file mode 100644
index 0000000..9e73f1f
--- /dev/null
+++ b/src/interfaces/ecpg/include/sqlda-native.h
@@ -0,0 +1,43 @@
+/*
+ * src/interfaces/ecpg/include/sqlda-native.h
+ */
+
+#ifndef ECPG_SQLDA_NATIVE_H
+#define ECPG_SQLDA_NATIVE_H
+
+/*
+ * Maximum length for identifiers (e.g. table names, column names,
+ * function names). Names actually are limited to one fewer byte than this,
+ * because the length must include a trailing zero byte.
+ *
+ * This should be at least as much as NAMEDATALEN of the database the
+ * applications run against.
+ */
+#define NAMEDATALEN 64
+
+struct sqlname
+{
+ short length;
+ char data[NAMEDATALEN];
+};
+
+struct sqlvar_struct
+{
+ short sqltype;
+ short sqllen;
+ char *sqldata;
+ short *sqlind;
+ struct sqlname sqlname;
+};
+
+struct sqlda_struct
+{
+ char sqldaid[8];
+ long sqldabc;
+ short sqln;
+ short sqld;
+ struct sqlda_struct *desc_next;
+ struct sqlvar_struct sqlvar[1];
+};
+
+#endif /* ECPG_SQLDA_NATIVE_H */
diff --git a/src/interfaces/ecpg/include/sqlda.h b/src/interfaces/ecpg/include/sqlda.h
new file mode 100644
index 0000000..d810e73
--- /dev/null
+++ b/src/interfaces/ecpg/include/sqlda.h
@@ -0,0 +1,18 @@
+#ifndef ECPG_SQLDA_H
+#define ECPG_SQLDA_H
+
+#ifdef _ECPG_INFORMIX_H
+
+#include "sqlda-compat.h"
+typedef struct sqlvar_compat sqlvar_t;
+typedef struct sqlda_compat sqlda_t;
+
+#else
+
+#include "sqlda-native.h"
+typedef struct sqlvar_struct sqlvar_t;
+typedef struct sqlda_struct sqlda_t;
+
+#endif
+
+#endif /* ECPG_SQLDA_H */
diff --git a/src/interfaces/ecpg/include/sqltypes.h b/src/interfaces/ecpg/include/sqltypes.h
new file mode 100644
index 0000000..e7cbfa4
--- /dev/null
+++ b/src/interfaces/ecpg/include/sqltypes.h
@@ -0,0 +1,57 @@
+#ifndef ECPG_SQLTYPES_H
+#define ECPG_SQLTYPES_H
+
+#include <limits.h>
+
+#define CCHARTYPE ECPGt_char
+#define CSHORTTYPE ECPGt_short
+#define CINTTYPE ECPGt_int
+#define CLONGTYPE ECPGt_long
+#define CFLOATTYPE ECPGt_float
+#define CDOUBLETYPE ECPGt_double
+#define CDECIMALTYPE ECPGt_decimal
+#define CFIXCHARTYPE 108
+#define CSTRINGTYPE ECPGt_char
+#define CDATETYPE ECPGt_date
+#define CMONEYTYPE 111
+#define CDTIMETYPE ECPGt_timestamp
+#define CLOCATORTYPE 113
+#define CVCHARTYPE ECPGt_varchar
+#define CINVTYPE 115
+#define CFILETYPE 116
+#define CINT8TYPE ECPGt_long_long
+#define CCOLLTYPE 118
+#define CLVCHARTYPE 119
+#define CFIXBINTYPE 120
+#define CVARBINTYPE 121
+#define CBOOLTYPE ECPGt_bool
+#define CROWTYPE 123
+#define CLVCHARPTRTYPE 124
+#define CTYPEMAX 25
+
+/*
+ * Values used in sqlda->sqlvar[i]->sqltype
+ */
+#define SQLCHAR ECPGt_char
+#define SQLSMINT ECPGt_short
+#define SQLINT ECPGt_int
+#define SQLFLOAT ECPGt_double
+#define SQLSMFLOAT ECPGt_float
+#define SQLDECIMAL ECPGt_decimal
+#define SQLSERIAL ECPGt_int
+#define SQLDATE ECPGt_date
+#define SQLDTIME ECPGt_timestamp
+#define SQLTEXT ECPGt_char
+#define SQLVCHAR ECPGt_char
+#define SQLINTERVAL ECPGt_interval
+#define SQLNCHAR ECPGt_char
+#define SQLNVCHAR ECPGt_char
+#ifdef HAVE_LONG_LONG_INT_64
+#define SQLINT8 ECPGt_long_long
+#define SQLSERIAL8 ECPGt_long_long
+#else
+#define SQLINT8 ECPGt_long
+#define SQLSERIAL8 ECPGt_long
+#endif
+
+#endif /* ndef ECPG_SQLTYPES_H */
diff --git a/src/interfaces/ecpg/pgtypeslib/.gitignore b/src/interfaces/ecpg/pgtypeslib/.gitignore
new file mode 100644
index 0000000..91402ad
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/.gitignore
@@ -0,0 +1,3 @@
+/pgtypeslib.def
+/blibpgtypesdll.def
+/exports.list
diff --git a/src/interfaces/ecpg/pgtypeslib/Makefile b/src/interfaces/ecpg/pgtypeslib/Makefile
new file mode 100644
index 0000000..513af51
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/Makefile
@@ -0,0 +1,54 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg pgtypes library
+#
+# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/interfaces/ecpg/pgtypeslib/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces/ecpg/pgtypeslib
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+PGFILEDESC = "pgtypes - library for data type mapping"
+NAME= pgtypes
+SO_MAJOR_VERSION= 3
+SO_MINOR_VERSION= $(MAJORVERSION)
+
+override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -DFRONTEND $(CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+SHLIB_LINK_INTERNAL = -lpgcommon_shlib -lpgport_shlib
+SHLIB_LINK += $(filter -lintl -lm, $(LIBS))
+SHLIB_PREREQS = submake-libpgport
+
+SHLIB_EXPORTS = exports.txt
+
+OBJS = \
+ $(WIN32RES) \
+ common.o \
+ datetime.o \
+ dt_common.o \
+ interval.o \
+ numeric.o \
+ timestamp.o
+
+all: all-lib
+
+# Shared library stuff
+include $(top_srcdir)/src/Makefile.shlib
+
+install: all installdirs install-lib
+
+installdirs: installdirs-lib
+
+uninstall: uninstall-lib
+
+clean distclean: clean-lib
+ rm -f $(OBJS)
+
+maintainer-clean: distclean
diff --git a/src/interfaces/ecpg/pgtypeslib/common.c b/src/interfaces/ecpg/pgtypeslib/common.c
new file mode 100644
index 0000000..8972229
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/common.c
@@ -0,0 +1,148 @@
+/* src/interfaces/ecpg/pgtypeslib/common.c */
+
+#include "postgres_fe.h"
+
+#include "pgtypes.h"
+#include "pgtypeslib_extern.h"
+
+/* Return value is zero-filled. */
+char *
+pgtypes_alloc(long size)
+{
+ char *new = (char *) calloc(1L, size);
+
+ if (!new)
+ errno = ENOMEM;
+ return new;
+}
+
+char *
+pgtypes_strdup(const char *str)
+{
+ char *new = (char *) strdup(str);
+
+ if (!new)
+ errno = ENOMEM;
+ return new;
+}
+
+int
+pgtypes_fmt_replace(union un_fmt_comb replace_val, int replace_type, char **output, int *pstr_len)
+{
+ /*
+ * general purpose variable, set to 0 in order to fix compiler warning
+ */
+ int i = 0;
+
+ switch (replace_type)
+ {
+ case PGTYPES_TYPE_NOTHING:
+ break;
+ case PGTYPES_TYPE_STRING_CONSTANT:
+ case PGTYPES_TYPE_STRING_MALLOCED:
+ i = strlen(replace_val.str_val);
+ if (i + 1 <= *pstr_len)
+ {
+ /* include trailing terminator in what we copy */
+ memcpy(*output, replace_val.str_val, i + 1);
+ *pstr_len -= i;
+ *output += i;
+ if (replace_type == PGTYPES_TYPE_STRING_MALLOCED)
+ free(replace_val.str_val);
+ return 0;
+ }
+ else
+ return -1;
+ break;
+ case PGTYPES_TYPE_CHAR:
+ if (*pstr_len >= 2)
+ {
+ (*output)[0] = replace_val.char_val;
+ (*output)[1] = '\0';
+ (*pstr_len)--;
+ (*output)++;
+ return 0;
+ }
+ else
+ return -1;
+ break;
+ case PGTYPES_TYPE_DOUBLE_NF:
+ case PGTYPES_TYPE_INT64:
+ case PGTYPES_TYPE_UINT:
+ case PGTYPES_TYPE_UINT_2_LZ:
+ case PGTYPES_TYPE_UINT_2_LS:
+ case PGTYPES_TYPE_UINT_3_LZ:
+ case PGTYPES_TYPE_UINT_4_LZ:
+ {
+ char *t = pgtypes_alloc(PGTYPES_FMT_NUM_MAX_DIGITS);
+
+ if (!t)
+ return ENOMEM;
+ switch (replace_type)
+ {
+ case PGTYPES_TYPE_DOUBLE_NF:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%0.0g", replace_val.double_val);
+ break;
+ case PGTYPES_TYPE_INT64:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ INT64_FORMAT, replace_val.int64_val);
+ break;
+ case PGTYPES_TYPE_UINT:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%u", replace_val.uint_val);
+ break;
+ case PGTYPES_TYPE_UINT_2_LZ:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%02u", replace_val.uint_val);
+ break;
+ case PGTYPES_TYPE_UINT_2_LS:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%2u", replace_val.uint_val);
+ break;
+ case PGTYPES_TYPE_UINT_3_LZ:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%03u", replace_val.uint_val);
+ break;
+ case PGTYPES_TYPE_UINT_4_LZ:
+ i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
+ "%04u", replace_val.uint_val);
+ break;
+ }
+
+ if (i < 0 || i >= PGTYPES_FMT_NUM_MAX_DIGITS)
+ {
+ free(t);
+ return -1;
+ }
+ i = strlen(t);
+ *pstr_len -= i;
+
+ /*
+ * if *pstr_len == 0, we don't have enough space for the
+ * terminator and the conversion fails
+ */
+ if (*pstr_len <= 0)
+ {
+ free(t);
+ return -1;
+ }
+ strcpy(*output, t);
+ *output += i;
+ free(t);
+ }
+ break;
+ default:
+ break;
+ }
+ return 0;
+}
+
+/* Functions declared in pgtypes.h. */
+
+/* Just frees memory (mostly needed for Windows) */
+void
+PGTYPESchar_free(char *ptr)
+{
+ free(ptr);
+}
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
new file mode 100644
index 0000000..1b25374
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -0,0 +1,713 @@
+/* src/interfaces/ecpg/pgtypeslib/datetime.c */
+
+#include "postgres_fe.h"
+
+#include <time.h>
+#include <ctype.h>
+#include <limits.h>
+
+#include "dt.h"
+#include "pgtypes_date.h"
+#include "pgtypes_error.h"
+#include "pgtypeslib_extern.h"
+
+date *
+PGTYPESdate_new(void)
+{
+ date *result;
+
+ result = (date *) pgtypes_alloc(sizeof(date));
+ /* result can be NULL if we run out of memory */
+ return result;
+}
+
+void
+PGTYPESdate_free(date * d)
+{
+ free(d);
+}
+
+date
+PGTYPESdate_from_timestamp(timestamp dt)
+{
+ date dDate;
+
+ dDate = 0; /* suppress compiler warning */
+
+ if (!TIMESTAMP_NOT_FINITE(dt))
+ {
+ /* Microseconds to days */
+ dDate = (dt / USECS_PER_DAY);
+ }
+
+ return dDate;
+}
+
+date
+PGTYPESdate_from_asc(char *str, char **endptr)
+{
+ date dDate;
+ fsec_t fsec;
+ struct tm tt,
+ *tm = &tt;
+ int dtype;
+ int nf;
+ char *field[MAXDATEFIELDS];
+ int ftype[MAXDATEFIELDS];
+ char lowstr[MAXDATELEN + MAXDATEFIELDS];
+ char *realptr;
+ char **ptr = (endptr != NULL) ? endptr : &realptr;
+
+ bool EuroDates = false;
+
+ errno = 0;
+ if (strlen(str) > MAXDATELEN)
+ {
+ errno = PGTYPES_DATE_BAD_DATE;
+ return INT_MIN;
+ }
+
+ if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
+ DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, EuroDates) != 0)
+ {
+ errno = PGTYPES_DATE_BAD_DATE;
+ return INT_MIN;
+ }
+
+ switch (dtype)
+ {
+ case DTK_DATE:
+ break;
+
+ case DTK_EPOCH:
+ if (GetEpochTime(tm) < 0)
+ {
+ errno = PGTYPES_DATE_BAD_DATE;
+ return INT_MIN;
+ }
+ break;
+
+ default:
+ errno = PGTYPES_DATE_BAD_DATE;
+ return INT_MIN;
+ }
+
+ dDate = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
+
+ return dDate;
+}
+
+char *
+PGTYPESdate_to_asc(date dDate)
+{
+ struct tm tt,
+ *tm = &tt;
+ char buf[MAXDATELEN + 1];
+ int DateStyle = 1;
+ bool EuroDates = false;
+
+ j2date(dDate + date2j(2000, 1, 1), &(tm->tm_year), &(tm->tm_mon), &(tm->tm_mday));
+ EncodeDateOnly(tm, DateStyle, buf, EuroDates);
+ return pgtypes_strdup(buf);
+}
+
+void
+PGTYPESdate_julmdy(date jd, int *mdy)
+{
+ int y,
+ m,
+ d;
+
+ j2date((int) (jd + date2j(2000, 1, 1)), &y, &m, &d);
+ mdy[0] = m;
+ mdy[1] = d;
+ mdy[2] = y;
+}
+
+void
+PGTYPESdate_mdyjul(int *mdy, date * jdate)
+{
+ /* month is mdy[0] */
+ /* day is mdy[1] */
+ /* year is mdy[2] */
+
+ *jdate = (date) (date2j(mdy[2], mdy[0], mdy[1]) - date2j(2000, 1, 1));
+}
+
+int
+PGTYPESdate_dayofweek(date dDate)
+{
+ /*
+ * Sunday: 0 Monday: 1 Tuesday: 2 Wednesday: 3 Thursday: 4
+ * Friday: 5 Saturday: 6
+ */
+ return (int) (dDate + date2j(2000, 1, 1) + 1) % 7;
+}
+
+void
+PGTYPESdate_today(date * d)
+{
+ struct tm ts;
+
+ GetCurrentDateTime(&ts);
+ if (errno == 0)
+ *d = date2j(ts.tm_year, ts.tm_mon, ts.tm_mday) - date2j(2000, 1, 1);
+}
+
+#define PGTYPES_DATE_NUM_MAX_DIGITS 20 /* should suffice for most
+ * years... */
+
+#define PGTYPES_FMTDATE_DAY_DIGITS_LZ 1 /* LZ means "leading zeroes" */
+#define PGTYPES_FMTDATE_DOW_LITERAL_SHORT 2
+#define PGTYPES_FMTDATE_MONTH_DIGITS_LZ 3
+#define PGTYPES_FMTDATE_MONTH_LITERAL_SHORT 4
+#define PGTYPES_FMTDATE_YEAR_DIGITS_SHORT 5
+#define PGTYPES_FMTDATE_YEAR_DIGITS_LONG 6
+
+int
+PGTYPESdate_fmt_asc(date dDate, const char *fmtstring, char *outbuf)
+{
+ static struct
+ {
+ char *format;
+ int component;
+ } mapping[] =
+ {
+ /*
+ * format items have to be sorted according to their length, since the
+ * first pattern that matches gets replaced by its value
+ */
+ {
+ "ddd", PGTYPES_FMTDATE_DOW_LITERAL_SHORT
+ },
+ {
+ "dd", PGTYPES_FMTDATE_DAY_DIGITS_LZ
+ },
+ {
+ "mmm", PGTYPES_FMTDATE_MONTH_LITERAL_SHORT
+ },
+ {
+ "mm", PGTYPES_FMTDATE_MONTH_DIGITS_LZ
+ },
+ {
+ "yyyy", PGTYPES_FMTDATE_YEAR_DIGITS_LONG
+ },
+ {
+ "yy", PGTYPES_FMTDATE_YEAR_DIGITS_SHORT
+ },
+ {
+ NULL, 0
+ }
+ };
+
+ union un_fmt_comb replace_val;
+ int replace_type;
+
+ int i;
+ int dow;
+ char *start_pattern;
+ struct tm tm;
+
+ /* copy the string over */
+ strcpy(outbuf, fmtstring);
+
+ /* get the date */
+ j2date(dDate + date2j(2000, 1, 1), &(tm.tm_year), &(tm.tm_mon), &(tm.tm_mday));
+ dow = PGTYPESdate_dayofweek(dDate);
+
+ for (i = 0; mapping[i].format != NULL; i++)
+ {
+ while ((start_pattern = strstr(outbuf, mapping[i].format)) != NULL)
+ {
+ switch (mapping[i].component)
+ {
+ case PGTYPES_FMTDATE_DOW_LITERAL_SHORT:
+ replace_val.str_val = pgtypes_date_weekdays_short[dow];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ case PGTYPES_FMTDATE_DAY_DIGITS_LZ:
+ replace_val.uint_val = tm.tm_mday;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ case PGTYPES_FMTDATE_MONTH_LITERAL_SHORT:
+ replace_val.str_val = months[tm.tm_mon - 1];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ case PGTYPES_FMTDATE_MONTH_DIGITS_LZ:
+ replace_val.uint_val = tm.tm_mon;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ case PGTYPES_FMTDATE_YEAR_DIGITS_LONG:
+ replace_val.uint_val = tm.tm_year;
+ replace_type = PGTYPES_TYPE_UINT_4_LZ;
+ break;
+ case PGTYPES_FMTDATE_YEAR_DIGITS_SHORT:
+ replace_val.uint_val = tm.tm_year % 100;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ default:
+
+ /*
+ * should not happen, set something anyway
+ */
+ replace_val.str_val = " ";
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ }
+ switch (replace_type)
+ {
+ case PGTYPES_TYPE_STRING_MALLOCED:
+ case PGTYPES_TYPE_STRING_CONSTANT:
+ memcpy(start_pattern, replace_val.str_val,
+ strlen(replace_val.str_val));
+ if (replace_type == PGTYPES_TYPE_STRING_MALLOCED)
+ free(replace_val.str_val);
+ break;
+ case PGTYPES_TYPE_UINT:
+ {
+ char *t = pgtypes_alloc(PGTYPES_DATE_NUM_MAX_DIGITS);
+
+ if (!t)
+ return -1;
+ snprintf(t, PGTYPES_DATE_NUM_MAX_DIGITS,
+ "%u", replace_val.uint_val);
+ memcpy(start_pattern, t, strlen(t));
+ free(t);
+ }
+ break;
+ case PGTYPES_TYPE_UINT_2_LZ:
+ {
+ char *t = pgtypes_alloc(PGTYPES_DATE_NUM_MAX_DIGITS);
+
+ if (!t)
+ return -1;
+ snprintf(t, PGTYPES_DATE_NUM_MAX_DIGITS,
+ "%02u", replace_val.uint_val);
+ memcpy(start_pattern, t, strlen(t));
+ free(t);
+ }
+ break;
+ case PGTYPES_TYPE_UINT_4_LZ:
+ {
+ char *t = pgtypes_alloc(PGTYPES_DATE_NUM_MAX_DIGITS);
+
+ if (!t)
+ return -1;
+ snprintf(t, PGTYPES_DATE_NUM_MAX_DIGITS,
+ "%04u", replace_val.uint_val);
+ memcpy(start_pattern, t, strlen(t));
+ free(t);
+ }
+ break;
+ default:
+
+ /*
+ * doesn't happen (we set replace_type to
+ * PGTYPES_TYPE_STRING_CONSTANT in case of an error above)
+ */
+ break;
+ }
+ }
+ }
+ return 0;
+}
+
+
+/*
+ * PGTYPESdate_defmt_asc
+ *
+ * function works as follows:
+ * - first we analyze the parameters
+ * - if this is a special case with no delimiters, add delimiters
+ * - find the tokens. First we look for numerical values. If we have found
+ * less than 3 tokens, we check for the months' names and thereafter for
+ * the abbreviations of the months' names.
+ * - then we see which parameter should be the date, the month and the
+ * year and from these values we calculate the date
+ */
+
+#define PGTYPES_DATE_MONTH_MAXLENGTH 20 /* probably even less :-) */
+int
+PGTYPESdate_defmt_asc(date * d, const char *fmt, const char *str)
+{
+ /*
+ * token[2] = { 4,6 } means that token 2 starts at position 4 and ends at
+ * (including) position 6
+ */
+ int token[3][2];
+ int token_values[3] = {-1, -1, -1};
+ char *fmt_token_order;
+ char *fmt_ystart,
+ *fmt_mstart,
+ *fmt_dstart;
+ unsigned int i;
+ int reading_digit;
+ int token_count;
+ char *str_copy;
+ struct tm tm;
+
+ tm.tm_year = tm.tm_mon = tm.tm_mday = 0; /* keep compiler quiet */
+
+ if (!d || !str || !fmt)
+ {
+ errno = PGTYPES_DATE_ERR_EARGS;
+ return -1;
+ }
+
+ /* analyze the fmt string */
+ fmt_ystart = strstr(fmt, "yy");
+ fmt_mstart = strstr(fmt, "mm");
+ fmt_dstart = strstr(fmt, "dd");
+
+ if (!fmt_ystart || !fmt_mstart || !fmt_dstart)
+ {
+ errno = PGTYPES_DATE_ERR_EARGS;
+ return -1;
+ }
+
+ if (fmt_ystart < fmt_mstart)
+ {
+ /* y m */
+ if (fmt_dstart < fmt_ystart)
+ {
+ /* d y m */
+ fmt_token_order = "dym";
+ }
+ else if (fmt_dstart > fmt_mstart)
+ {
+ /* y m d */
+ fmt_token_order = "ymd";
+ }
+ else
+ {
+ /* y d m */
+ fmt_token_order = "ydm";
+ }
+ }
+ else
+ {
+ /* fmt_ystart > fmt_mstart */
+ /* m y */
+ if (fmt_dstart < fmt_mstart)
+ {
+ /* d m y */
+ fmt_token_order = "dmy";
+ }
+ else if (fmt_dstart > fmt_ystart)
+ {
+ /* m y d */
+ fmt_token_order = "myd";
+ }
+ else
+ {
+ /* m d y */
+ fmt_token_order = "mdy";
+ }
+ }
+
+ /*
+ * handle the special cases where there is no delimiter between the
+ * digits. If we see this:
+ *
+ * only digits, 6 or 8 bytes then it might be ddmmyy and ddmmyyyy (or
+ * similar)
+ *
+ * we reduce it to a string with delimiters and continue processing
+ */
+
+ /* check if we have only digits */
+ reading_digit = 1;
+ for (i = 0; str[i]; i++)
+ {
+ if (!isdigit((unsigned char) str[i]))
+ {
+ reading_digit = 0;
+ break;
+ }
+ }
+ if (reading_digit)
+ {
+ int frag_length[3];
+ int target_pos;
+
+ i = strlen(str);
+ if (i != 8 && i != 6)
+ {
+ errno = PGTYPES_DATE_ERR_ENOSHORTDATE;
+ return -1;
+ }
+ /* okay, this really is the special case */
+
+ /*
+ * as long as the string, one additional byte for the terminator and 2
+ * for the delimiters between the 3 fields
+ */
+ str_copy = pgtypes_alloc(strlen(str) + 1 + 2);
+ if (!str_copy)
+ return -1;
+
+ /* determine length of the fragments */
+ if (i == 6)
+ {
+ frag_length[0] = 2;
+ frag_length[1] = 2;
+ frag_length[2] = 2;
+ }
+ else
+ {
+ if (fmt_token_order[0] == 'y')
+ {
+ frag_length[0] = 4;
+ frag_length[1] = 2;
+ frag_length[2] = 2;
+ }
+ else if (fmt_token_order[1] == 'y')
+ {
+ frag_length[0] = 2;
+ frag_length[1] = 4;
+ frag_length[2] = 2;
+ }
+ else
+ {
+ frag_length[0] = 2;
+ frag_length[1] = 2;
+ frag_length[2] = 4;
+ }
+ }
+ target_pos = 0;
+
+ /*
+ * XXX: Here we could calculate the positions of the tokens and save
+ * the for loop down there where we again check with isdigit() for
+ * digits.
+ */
+ for (i = 0; i < 3; i++)
+ {
+ int start_pos = 0;
+
+ if (i >= 1)
+ start_pos += frag_length[0];
+ if (i == 2)
+ start_pos += frag_length[1];
+
+ strncpy(str_copy + target_pos, str + start_pos,
+ frag_length[i]);
+ target_pos += frag_length[i];
+ if (i != 2)
+ {
+ str_copy[target_pos] = ' ';
+ target_pos++;
+ }
+ }
+ str_copy[target_pos] = '\0';
+ }
+ else
+ {
+ str_copy = pgtypes_strdup(str);
+ if (!str_copy)
+ return -1;
+
+ /* convert the whole string to lower case */
+ for (i = 0; str_copy[i]; i++)
+ str_copy[i] = (char) pg_tolower((unsigned char) str_copy[i]);
+ }
+
+ /* look for numerical tokens */
+ reading_digit = 0;
+ token_count = 0;
+ for (i = 0; i < strlen(str_copy); i++)
+ {
+ if (!isdigit((unsigned char) str_copy[i]) && reading_digit)
+ {
+ /* the token is finished */
+ token[token_count][1] = i - 1;
+ reading_digit = 0;
+ token_count++;
+ }
+ else if (isdigit((unsigned char) str_copy[i]) && !reading_digit)
+ {
+ /* we have found a token */
+ token[token_count][0] = i;
+ reading_digit = 1;
+ }
+ }
+
+ /*
+ * we're at the end of the input string, but maybe we are still reading a
+ * number...
+ */
+ if (reading_digit)
+ {
+ token[token_count][1] = i - 1;
+ token_count++;
+ }
+
+
+ if (token_count < 2)
+ {
+ /*
+ * not all tokens found, no way to find 2 missing tokens with string
+ * matches
+ */
+ free(str_copy);
+ errno = PGTYPES_DATE_ERR_ENOSHORTDATE;
+ return -1;
+ }
+
+ if (token_count != 3)
+ {
+ /*
+ * not all tokens found but we may find another one with string
+ * matches by testing for the months names and months abbreviations
+ */
+ char *month_lower_tmp = pgtypes_alloc(PGTYPES_DATE_MONTH_MAXLENGTH);
+ char *start_pos;
+ int j;
+ int offset;
+ int found = 0;
+ char **list;
+
+ if (!month_lower_tmp)
+ {
+ /* free variables we alloc'ed before */
+ free(str_copy);
+ return -1;
+ }
+ list = pgtypes_date_months;
+ for (i = 0; list[i]; i++)
+ {
+ for (j = 0; j < PGTYPES_DATE_MONTH_MAXLENGTH; j++)
+ {
+ month_lower_tmp[j] = (char) pg_tolower((unsigned char) list[i][j]);
+ if (!month_lower_tmp[j])
+ {
+ /* properly terminated */
+ break;
+ }
+ }
+ if ((start_pos = strstr(str_copy, month_lower_tmp)))
+ {
+ offset = start_pos - str_copy;
+
+ /*
+ * sort the new token into the numeric tokens, shift them if
+ * necessary
+ */
+ if (offset < token[0][0])
+ {
+ token[2][0] = token[1][0];
+ token[2][1] = token[1][1];
+ token[1][0] = token[0][0];
+ token[1][1] = token[0][1];
+ token_count = 0;
+ }
+ else if (offset < token[1][0])
+ {
+ token[2][0] = token[1][0];
+ token[2][1] = token[1][1];
+ token_count = 1;
+ }
+ else
+ token_count = 2;
+ token[token_count][0] = offset;
+ token[token_count][1] = offset + strlen(month_lower_tmp) - 1;
+
+ /*
+ * the value is the index of the month in the array of months
+ * + 1 (January is month 0)
+ */
+ token_values[token_count] = i + 1;
+ found = 1;
+ break;
+ }
+
+ /*
+ * evil[tm] hack: if we read the pgtypes_date_months and haven't
+ * found a match, reset list to point to months (abbreviations)
+ * and reset the counter variable i
+ */
+ if (list == pgtypes_date_months)
+ {
+ if (list[i + 1] == NULL)
+ {
+ list = months;
+ i = -1;
+ }
+ }
+ }
+ if (!found)
+ {
+ free(month_lower_tmp);
+ free(str_copy);
+ errno = PGTYPES_DATE_ERR_ENOTDMY;
+ return -1;
+ }
+
+ /*
+ * here we found a month. token[token_count] and
+ * token_values[token_count] reflect the month's details.
+ *
+ * only the month can be specified with a literal. Here we can do a
+ * quick check if the month is at the right position according to the
+ * format string because we can check if the token that we expect to
+ * be the month is at the position of the only token that already has
+ * a value. If we wouldn't check here we could say "December 4 1990"
+ * with a fmt string of "dd mm yy" for 12 April 1990.
+ */
+ if (fmt_token_order[token_count] != 'm')
+ {
+ /* deal with the error later on */
+ token_values[token_count] = -1;
+ }
+ free(month_lower_tmp);
+ }
+
+ /* terminate the tokens with ASCII-0 and get their values */
+ for (i = 0; i < 3; i++)
+ {
+ *(str_copy + token[i][1] + 1) = '\0';
+ /* A month already has a value set, check for token_value == -1 */
+ if (token_values[i] == -1)
+ {
+ errno = 0;
+ token_values[i] = strtol(str_copy + token[i][0], (char **) NULL, 10);
+ /* strtol sets errno in case of an error */
+ if (errno)
+ token_values[i] = -1;
+ }
+ if (fmt_token_order[i] == 'd')
+ tm.tm_mday = token_values[i];
+ else if (fmt_token_order[i] == 'm')
+ tm.tm_mon = token_values[i];
+ else if (fmt_token_order[i] == 'y')
+ tm.tm_year = token_values[i];
+ }
+ free(str_copy);
+
+ if (tm.tm_mday < 1 || tm.tm_mday > 31)
+ {
+ errno = PGTYPES_DATE_BAD_DAY;
+ return -1;
+ }
+
+ if (tm.tm_mon < 1 || tm.tm_mon > MONTHS_PER_YEAR)
+ {
+ errno = PGTYPES_DATE_BAD_MONTH;
+ return -1;
+ }
+
+ if (tm.tm_mday == 31 && (tm.tm_mon == 4 || tm.tm_mon == 6 || tm.tm_mon == 9 || tm.tm_mon == 11))
+ {
+ errno = PGTYPES_DATE_BAD_DAY;
+ return -1;
+ }
+
+ if (tm.tm_mon == 2 && tm.tm_mday > 29)
+ {
+ errno = PGTYPES_DATE_BAD_DAY;
+ return -1;
+ }
+
+ *d = date2j(tm.tm_year, tm.tm_mon, tm.tm_mday) - date2j(2000, 1, 1);
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h
new file mode 100644
index 0000000..893c9b6
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/dt.h
@@ -0,0 +1,341 @@
+/* src/interfaces/ecpg/pgtypeslib/dt.h */
+
+#ifndef DT_H
+#define DT_H
+
+#include <pgtypes_timestamp.h>
+
+#include <time.h>
+
+#define MAXTZLEN 10
+
+typedef int32 fsec_t;
+
+#define USE_POSTGRES_DATES 0
+#define USE_ISO_DATES 1
+#define USE_SQL_DATES 2
+#define USE_GERMAN_DATES 3
+
+#define INTSTYLE_POSTGRES 0
+#define INTSTYLE_POSTGRES_VERBOSE 1
+#define INTSTYLE_SQL_STANDARD 2
+#define INTSTYLE_ISO_8601 3
+
+#define INTERVAL_FULL_RANGE (0x7FFF)
+#define INTERVAL_MASK(b) (1 << (b))
+#define MAX_INTERVAL_PRECISION 6
+
+#define DTERR_BAD_FORMAT (-1)
+#define DTERR_FIELD_OVERFLOW (-2)
+#define DTERR_MD_FIELD_OVERFLOW (-3) /* triggers hint about DateStyle */
+#define DTERR_INTERVAL_OVERFLOW (-4)
+#define DTERR_TZDISP_OVERFLOW (-5)
+
+
+#define DAGO "ago"
+#define DCURRENT "current"
+#define EPOCH "epoch"
+#define INVALID "invalid"
+#define EARLY "-infinity"
+#define LATE "infinity"
+#define NOW "now"
+#define TODAY "today"
+#define TOMORROW "tomorrow"
+#define YESTERDAY "yesterday"
+#define ZULU "zulu"
+
+#define DMICROSEC "usecond"
+#define DMILLISEC "msecond"
+#define DSECOND "second"
+#define DMINUTE "minute"
+#define DHOUR "hour"
+#define DDAY "day"
+#define DWEEK "week"
+#define DMONTH "month"
+#define DQUARTER "quarter"
+#define DYEAR "year"
+#define DDECADE "decade"
+#define DCENTURY "century"
+#define DMILLENNIUM "millennium"
+#define DA_D "ad"
+#define DB_C "bc"
+#define DTIMEZONE "timezone"
+
+/*
+ * Fundamental time field definitions for parsing.
+ *
+ * Meridian: am, pm, or 24-hour style.
+ * Millennium: ad, bc
+ */
+
+#define AM 0
+#define PM 1
+#define HR24 2
+
+#define AD 0
+#define BC 1
+
+/*
+ * Field types for time decoding.
+ *
+ * Can't have more of these than there are bits in an unsigned int
+ * since these are turned into bit masks during parsing and decoding.
+ *
+ * Furthermore, the values for YEAR, MONTH, DAY, HOUR, MINUTE, SECOND
+ * must be in the range 0..14 so that the associated bitmasks can fit
+ * into the left half of an INTERVAL's typmod value.
+ *
+ * Copy&pasted these values from src/include/utils/datetime.h
+ * 2008-11-20, changing a number of their values.
+ */
+
+#define RESERV 0
+#define MONTH 1
+#define YEAR 2
+#define DAY 3
+#define JULIAN 4
+#define TZ 5 /* fixed-offset timezone abbreviation */
+#define DTZ 6 /* fixed-offset timezone abbrev, DST */
+#define DYNTZ 7 /* dynamic timezone abbr (unimplemented) */
+#define IGNORE_DTF 8
+#define AMPM 9
+#define HOUR 10
+#define MINUTE 11
+#define SECOND 12
+#define MILLISECOND 13
+#define MICROSECOND 14
+#define DOY 15
+#define DOW 16
+#define UNITS 17
+#define ADBC 18
+/* these are only for relative dates */
+#define AGO 19
+#define ABS_BEFORE 20
+#define ABS_AFTER 21
+/* generic fields to help with parsing */
+#define ISODATE 22
+#define ISOTIME 23
+/* hack for parsing two-word timezone specs "MET DST" etc */
+#define DTZMOD 28 /* "DST" as a separate word */
+/* reserved for unrecognized string values */
+#define UNKNOWN_FIELD 31
+
+
+/*
+ * Token field definitions for time parsing and decoding.
+ *
+ * Some field type codes (see above) use these as the "value" in datetktbl[].
+ * These are also used for bit masks in DecodeDateTime and friends
+ * so actually restrict them to within [0,31] for now.
+ * - thomas 97/06/19
+ * Not all of these fields are used for masks in DecodeDateTime
+ * so allow some larger than 31. - thomas 1997-11-17
+ *
+ * Caution: there are undocumented assumptions in the code that most of these
+ * values are not equal to IGNORE_DTF nor RESERV. Be very careful when
+ * renumbering values in either of these apparently-independent lists :-(
+ */
+
+#define DTK_NUMBER 0
+#define DTK_STRING 1
+
+#define DTK_DATE 2
+#define DTK_TIME 3
+#define DTK_TZ 4
+#define DTK_AGO 5
+
+#define DTK_SPECIAL 6
+#define DTK_EARLY 9
+#define DTK_LATE 10
+#define DTK_EPOCH 11
+#define DTK_NOW 12
+#define DTK_YESTERDAY 13
+#define DTK_TODAY 14
+#define DTK_TOMORROW 15
+#define DTK_ZULU 16
+
+#define DTK_DELTA 17
+#define DTK_SECOND 18
+#define DTK_MINUTE 19
+#define DTK_HOUR 20
+#define DTK_DAY 21
+#define DTK_WEEK 22
+#define DTK_MONTH 23
+#define DTK_QUARTER 24
+#define DTK_YEAR 25
+#define DTK_DECADE 26
+#define DTK_CENTURY 27
+#define DTK_MILLENNIUM 28
+#define DTK_MILLISEC 29
+#define DTK_MICROSEC 30
+#define DTK_JULIAN 31
+
+#define DTK_DOW 32
+#define DTK_DOY 33
+#define DTK_TZ_HOUR 34
+#define DTK_TZ_MINUTE 35
+#define DTK_ISOYEAR 36
+#define DTK_ISODOW 37
+
+
+/*
+ * Bit mask definitions for time parsing.
+ */
+/* Copy&pasted these values from src/include/utils/datetime.h */
+#define DTK_M(t) (0x01 << (t))
+#define DTK_ALL_SECS_M (DTK_M(SECOND) | DTK_M(MILLISECOND) | DTK_M(MICROSECOND))
+#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY))
+#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND))
+
+/*
+ * Working buffer size for input and output of interval, timestamp, etc.
+ * Inputs that need more working space will be rejected early. Longer outputs
+ * will overrun buffers, so this must suffice for all possible output. As of
+ * this writing, PGTYPESinterval_to_asc() needs the most space at ~90 bytes.
+ */
+#define MAXDATELEN 128
+/* maximum possible number of fields in a date string */
+#define MAXDATEFIELDS 25
+/* only this many chars are stored in datetktbl */
+#define TOKMAXLEN 10
+
+/* keep this struct small; it gets used a lot */
+typedef struct
+{
+ char token[TOKMAXLEN + 1]; /* always NUL-terminated */
+ char type; /* see field type codes above */
+ int32 value; /* meaning depends on type */
+} datetkn;
+
+
+/* FMODULO()
+ * Macro to replace modf(), which is broken on some platforms.
+ * t = input and remainder
+ * q = integer part
+ * u = divisor
+ */
+#define FMODULO(t,q,u) \
+do { \
+ (q) = (((t) < 0) ? ceil((t) / (u)): floor((t) / (u))); \
+ if ((q) != 0) (t) -= rint((q) * (u)); \
+} while(0)
+
+/* TMODULO()
+ * Like FMODULO(), but work on the timestamp datatype (now always int64).
+ * We assume that int64 follows the C99 semantics for division (negative
+ * quotients truncate towards zero).
+ */
+#define TMODULO(t,q,u) \
+do { \
+ (q) = ((t) / (u)); \
+ if ((q) != 0) (t) -= ((q) * (u)); \
+} while(0)
+
+/* in both timestamp.h and ecpg/dt.h */
+#define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */
+#define MONTHS_PER_YEAR 12
+/*
+ * DAYS_PER_MONTH is very imprecise. The more accurate value is
+ * 365.2425/12 = 30.436875, or '30 days 10:29:06'. Right now we only
+ * return an integral number of days, but someday perhaps we should
+ * also return a 'time' value to be used as well. ISO 8601 suggests
+ * 30 days.
+ */
+#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */
+#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */
+
+/*
+ * This doesn't adjust for uneven daylight savings time intervals or leap
+ * seconds, and it crudely estimates leap years. A more accurate value
+ * for days per years is 365.2422.
+ */
+#define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */
+#define SECS_PER_DAY 86400
+#define SECS_PER_HOUR 3600
+#define SECS_PER_MINUTE 60
+#define MINS_PER_HOUR 60
+
+#define USECS_PER_DAY INT64CONST(86400000000)
+#define USECS_PER_HOUR INT64CONST(3600000000)
+#define USECS_PER_MINUTE INT64CONST(60000000)
+#define USECS_PER_SEC INT64CONST(1000000)
+
+/*
+ * Date/time validation
+ * Include check for leap year.
+ */
+#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
+
+/*
+ * Julian date support --- see comments in backend's timestamp.h.
+ */
+
+#define JULIAN_MINYEAR (-4713)
+#define JULIAN_MINMONTH (11)
+#define JULIAN_MINDAY (24)
+#define JULIAN_MAXYEAR (5874898)
+#define JULIAN_MAXMONTH (6)
+#define JULIAN_MAXDAY (3)
+
+#define IS_VALID_JULIAN(y,m,d) \
+ (((y) > JULIAN_MINYEAR || \
+ ((y) == JULIAN_MINYEAR && ((m) >= JULIAN_MINMONTH))) && \
+ ((y) < JULIAN_MAXYEAR || \
+ ((y) == JULIAN_MAXYEAR && ((m) < JULIAN_MAXMONTH))))
+
+#define MIN_TIMESTAMP INT64CONST(-211813488000000000)
+#define END_TIMESTAMP INT64CONST(9223371331200000000)
+
+#define IS_VALID_TIMESTAMP(t) (MIN_TIMESTAMP <= (t) && (t) < END_TIMESTAMP)
+
+#define UTIME_MINYEAR (1901)
+#define UTIME_MINMONTH (12)
+#define UTIME_MINDAY (14)
+#define UTIME_MAXYEAR (2038)
+#define UTIME_MAXMONTH (01)
+#define UTIME_MAXDAY (18)
+
+#define IS_VALID_UTIME(y,m,d) ((((y) > UTIME_MINYEAR) \
+ || (((y) == UTIME_MINYEAR) && (((m) > UTIME_MINMONTH) \
+ || (((m) == UTIME_MINMONTH) && ((d) >= UTIME_MINDAY))))) \
+ && (((y) < UTIME_MAXYEAR) \
+ || (((y) == UTIME_MAXYEAR) && (((m) < UTIME_MAXMONTH) \
+ || (((m) == UTIME_MAXMONTH) && ((d) <= UTIME_MAXDAY))))))
+
+#define DT_NOBEGIN (-INT64CONST(0x7fffffffffffffff) - 1)
+#define DT_NOEND (INT64CONST(0x7fffffffffffffff))
+
+#define TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0)
+#define TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0)
+#define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)
+#define TIMESTAMP_IS_NOEND(j) ((j) == DT_NOEND)
+#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
+
+int DecodeInterval(char **, int *, int, int *, struct tm *, fsec_t *);
+int DecodeTime(char *, int *, struct tm *, fsec_t *);
+void EncodeDateTime(struct tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates);
+void EncodeInterval(struct tm *tm, fsec_t fsec, int style, char *str);
+int tm2timestamp(struct tm *, fsec_t, int *, timestamp *);
+int DecodeUnits(int field, char *lowtoken, int *val);
+bool CheckDateTokenTables(void);
+void EncodeDateOnly(struct tm *tm, int style, char *str, bool EuroDates);
+int GetEpochTime(struct tm *);
+int ParseDateTime(char *, char *, char **, int *, int *, char **);
+int DecodeDateTime(char **, int *, int, int *, struct tm *, fsec_t *, bool);
+void j2date(int, int *, int *, int *);
+void GetCurrentDateTime(struct tm *);
+int date2j(int, int, int);
+void TrimTrailingZeros(char *);
+void dt2time(double, int *, int *, int *, fsec_t *);
+int PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
+ int *year, int *month, int *day,
+ int *hour, int *minute, int *second,
+ int *tz);
+
+extern char *pgtypes_date_weekdays_short[];
+extern char *pgtypes_date_months[];
+extern char *months[];
+extern char *days[];
+extern const int day_tab[2][13];
+
+#endif /* DT_H */
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
new file mode 100644
index 0000000..e8a8a0f
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -0,0 +1,3003 @@
+/* src/interfaces/ecpg/pgtypeslib/dt_common.c */
+
+#include "postgres_fe.h"
+
+#include <time.h>
+#include <ctype.h>
+#include <math.h>
+
+#include "common/string.h"
+#include "dt.h"
+#include "pgtypes_timestamp.h"
+#include "pgtypeslib_extern.h"
+
+const int day_tab[2][13] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0},
+{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}};
+
+typedef long AbsoluteTime;
+
+static const datetkn datetktbl[] = {
+/* text, token, lexval */
+ {EARLY, RESERV, DTK_EARLY}, /* "-infinity" reserved for "early time" */
+ {"acsst", DTZ, 37800}, /* Cent. Australia */
+ {"acst", DTZ, -14400}, /* Atlantic/Porto Acre */
+ {"act", TZ, -18000}, /* Atlantic/Porto Acre */
+ {DA_D, ADBC, AD}, /* "ad" for years >= 0 */
+ {"adt", DTZ, -10800}, /* Atlantic Daylight Time */
+ {"aesst", DTZ, 39600}, /* E. Australia */
+ {"aest", TZ, 36000}, /* Australia Eastern Std Time */
+ {"aft", TZ, 16200}, /* Kabul */
+ {"ahst", TZ, -36000}, /* Alaska-Hawaii Std Time */
+ {"akdt", DTZ, -28800}, /* Alaska Daylight Time */
+ {"akst", DTZ, -32400}, /* Alaska Standard Time */
+ {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */
+ {"almst", TZ, 25200}, /* Almaty Savings Time */
+ {"almt", TZ, 21600}, /* Almaty Time */
+ {"am", AMPM, AM},
+ {"amst", DTZ, 18000}, /* Armenia Summer Time (Yerevan) */
+#if 0
+ {"amst", DTZ, -10800}, /* Porto Velho */
+#endif
+ {"amt", TZ, 14400}, /* Armenia Time (Yerevan) */
+ {"anast", DTZ, 46800}, /* Anadyr Summer Time (Russia) */
+ {"anat", TZ, 43200}, /* Anadyr Time (Russia) */
+ {"apr", MONTH, 4},
+ {"april", MONTH, 4},
+#if 0
+ aqtst
+ aqtt
+ arst
+#endif
+ {"art", TZ, -10800}, /* Argentina Time */
+#if 0
+ ashst
+ ast /* Atlantic Standard Time, Arabia Standard
+ * Time, Acre Standard Time */
+#endif
+ {"ast", TZ, -14400}, /* Atlantic Std Time (Canada) */
+ {"at", IGNORE_DTF, 0}, /* "at" (throwaway) */
+ {"aug", MONTH, 8},
+ {"august", MONTH, 8},
+ {"awsst", DTZ, 32400}, /* W. Australia */
+ {"awst", TZ, 28800}, /* W. Australia */
+ {"awt", DTZ, -10800},
+ {"azost", DTZ, 0}, /* Azores Summer Time */
+ {"azot", TZ, -3600}, /* Azores Time */
+ {"azst", DTZ, 18000}, /* Azerbaijan Summer Time */
+ {"azt", TZ, 14400}, /* Azerbaijan Time */
+ {DB_C, ADBC, BC}, /* "bc" for years < 0 */
+ {"bdst", TZ, 7200}, /* British Double Summer Time */
+ {"bdt", TZ, 21600}, /* Dacca */
+ {"bnt", TZ, 28800}, /* Brunei Darussalam Time */
+ {"bort", TZ, 28800}, /* Borneo Time (Indonesia) */
+#if 0
+ bortst
+ bost
+#endif
+ {"bot", TZ, -14400}, /* Bolivia Time */
+ {"bra", TZ, -10800}, /* Brazil Time */
+#if 0
+ brst
+ brt
+#endif
+ {"bst", DTZ, 3600}, /* British Summer Time */
+#if 0
+ {"bst", TZ, -10800}, /* Brazil Standard Time */
+ {"bst", DTZ, -39600}, /* Bering Summer Time */
+#endif
+ {"bt", TZ, 10800}, /* Baghdad Time */
+ {"btt", TZ, 21600}, /* Bhutan Time */
+ {"cadt", DTZ, 37800}, /* Central Australian DST */
+ {"cast", TZ, 34200}, /* Central Australian ST */
+ {"cat", TZ, -36000}, /* Central Alaska Time */
+ {"cct", TZ, 28800}, /* China Coast Time */
+#if 0
+ {"cct", TZ, 23400}, /* Indian Cocos (Island) Time */
+#endif
+ {"cdt", DTZ, -18000}, /* Central Daylight Time */
+ {"cest", DTZ, 7200}, /* Central European Dayl.Time */
+ {"cet", TZ, 3600}, /* Central European Time */
+ {"cetdst", DTZ, 7200}, /* Central European Dayl.Time */
+ {"chadt", DTZ, 49500}, /* Chatham Island Daylight Time (13:45) */
+ {"chast", TZ, 45900}, /* Chatham Island Time (12:45) */
+#if 0
+ ckhst
+#endif
+ {"ckt", TZ, 43200}, /* Cook Islands Time */
+ {"clst", DTZ, -10800}, /* Chile Summer Time */
+ {"clt", TZ, -14400}, /* Chile Time */
+#if 0
+ cost
+#endif
+ {"cot", TZ, -18000}, /* Columbia Time */
+ {"cst", TZ, -21600}, /* Central Standard Time */
+#if 0
+ cvst
+#endif
+ {"cvt", TZ, 25200}, /* Christmas Island Time (Indian Ocean) */
+ {"cxt", TZ, 25200}, /* Christmas Island Time (Indian Ocean) */
+ {"d", UNITS, DTK_DAY}, /* "day of month" for ISO input */
+ {"davt", TZ, 25200}, /* Davis Time (Antarctica) */
+ {"ddut", TZ, 36000}, /* Dumont-d'Urville Time (Antarctica) */
+ {"dec", MONTH, 12},
+ {"december", MONTH, 12},
+ {"dnt", TZ, 3600}, /* Dansk Normal Tid */
+ {"dow", UNITS, DTK_DOW}, /* day of week */
+ {"doy", UNITS, DTK_DOY}, /* day of year */
+ {"dst", DTZMOD, SECS_PER_HOUR},
+#if 0
+ {"dusst", DTZ, 21600}, /* Dushanbe Summer Time */
+#endif
+ {"easst", DTZ, -18000}, /* Easter Island Summer Time */
+ {"east", TZ, -21600}, /* Easter Island Time */
+ {"eat", TZ, 10800}, /* East Africa Time */
+#if 0
+ {"east", DTZ, 14400}, /* Indian Antananarivo Savings Time */
+ {"eat", TZ, 10800}, /* Indian Antananarivo Time */
+ {"ect", TZ, -14400}, /* Eastern Caribbean Time */
+ {"ect", TZ, -18000}, /* Ecuador Time */
+#endif
+ {"edt", DTZ, -14400}, /* Eastern Daylight Time */
+ {"eest", DTZ, 10800}, /* Eastern Europe Summer Time */
+ {"eet", TZ, 7200}, /* East. Europe, USSR Zone 1 */
+ {"eetdst", DTZ, 10800}, /* Eastern Europe Daylight Time */
+ {"egst", DTZ, 0}, /* East Greenland Summer Time */
+ {"egt", TZ, -3600}, /* East Greenland Time */
+#if 0
+ ehdt
+#endif
+ {EPOCH, RESERV, DTK_EPOCH}, /* "epoch" reserved for system epoch time */
+ {"est", TZ, -18000}, /* Eastern Standard Time */
+ {"feb", MONTH, 2},
+ {"february", MONTH, 2},
+ {"fjst", DTZ, -46800}, /* Fiji Summer Time (13 hour offset!) */
+ {"fjt", TZ, -43200}, /* Fiji Time */
+ {"fkst", DTZ, -10800}, /* Falkland Islands Summer Time */
+ {"fkt", TZ, -7200}, /* Falkland Islands Time */
+#if 0
+ fnst
+ fnt
+#endif
+ {"fri", DOW, 5},
+ {"friday", DOW, 5},
+ {"fst", TZ, 3600}, /* French Summer Time */
+ {"fwt", DTZ, 7200}, /* French Winter Time */
+ {"galt", TZ, -21600}, /* Galapagos Time */
+ {"gamt", TZ, -32400}, /* Gambier Time */
+ {"gest", DTZ, 18000}, /* Georgia Summer Time */
+ {"get", TZ, 14400}, /* Georgia Time */
+ {"gft", TZ, -10800}, /* French Guiana Time */
+#if 0
+ ghst
+#endif
+ {"gilt", TZ, 43200}, /* Gilbert Islands Time */
+ {"gmt", TZ, 0}, /* Greenwich Mean Time */
+ {"gst", TZ, 36000}, /* Guam Std Time, USSR Zone 9 */
+ {"gyt", TZ, -14400}, /* Guyana Time */
+ {"h", UNITS, DTK_HOUR}, /* "hour" */
+#if 0
+ hadt
+ hast
+#endif
+ {"hdt", DTZ, -32400}, /* Hawaii/Alaska Daylight Time */
+#if 0
+ hkst
+#endif
+ {"hkt", TZ, 28800}, /* Hong Kong Time */
+#if 0
+ {"hmt", TZ, 10800}, /* Hellas ? ? */
+ hovst
+ hovt
+#endif
+ {"hst", TZ, -36000}, /* Hawaii Std Time */
+#if 0
+ hwt
+#endif
+ {"ict", TZ, 25200}, /* Indochina Time */
+ {"idle", TZ, 43200}, /* Intl. Date Line, East */
+ {"idlw", TZ, -43200}, /* Intl. Date Line, West */
+#if 0
+ idt /* Israeli, Iran, Indian Daylight Time */
+#endif
+ {LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */
+ {"iot", TZ, 18000}, /* Indian Chagos Time */
+ {"irkst", DTZ, 32400}, /* Irkutsk Summer Time */
+ {"irkt", TZ, 28800}, /* Irkutsk Time */
+ {"irt", TZ, 12600}, /* Iran Time */
+ {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */
+#if 0
+ isst
+#endif
+ {"ist", TZ, 7200}, /* Israel */
+ {"it", TZ, 12600}, /* Iran Time */
+ {"j", UNITS, DTK_JULIAN},
+ {"jan", MONTH, 1},
+ {"january", MONTH, 1},
+ {"javt", TZ, 25200}, /* Java Time (07:00? see JT) */
+ {"jayt", TZ, 32400}, /* Jayapura Time (Indonesia) */
+ {"jd", UNITS, DTK_JULIAN},
+ {"jst", TZ, 32400}, /* Japan Std Time,USSR Zone 8 */
+ {"jt", TZ, 27000}, /* Java Time (07:30? see JAVT) */
+ {"jul", MONTH, 7},
+ {"julian", UNITS, DTK_JULIAN},
+ {"july", MONTH, 7},
+ {"jun", MONTH, 6},
+ {"june", MONTH, 6},
+ {"kdt", DTZ, 36000}, /* Korea Daylight Time */
+ {"kgst", DTZ, 21600}, /* Kyrgyzstan Summer Time */
+ {"kgt", TZ, 18000}, /* Kyrgyzstan Time */
+ {"kost", TZ, 43200}, /* Kosrae Time */
+ {"krast", DTZ, 25200}, /* Krasnoyarsk Summer Time */
+ {"krat", TZ, 28800}, /* Krasnoyarsk Standard Time */
+ {"kst", TZ, 32400}, /* Korea Standard Time */
+ {"lhdt", DTZ, 39600}, /* Lord Howe Daylight Time, Australia */
+ {"lhst", TZ, 37800}, /* Lord Howe Standard Time, Australia */
+ {"ligt", TZ, 36000}, /* From Melbourne, Australia */
+ {"lint", TZ, 50400}, /* Line Islands Time (Kiribati; +14 hours!) */
+ {"lkt", TZ, 21600}, /* Lanka Time */
+ {"m", UNITS, DTK_MONTH}, /* "month" for ISO input */
+ {"magst", DTZ, 43200}, /* Magadan Summer Time */
+ {"magt", TZ, 39600}, /* Magadan Time */
+ {"mar", MONTH, 3},
+ {"march", MONTH, 3},
+ {"mart", TZ, -34200}, /* Marquesas Time */
+ {"mawt", TZ, 21600}, /* Mawson, Antarctica */
+ {"may", MONTH, 5},
+ {"mdt", DTZ, -21600}, /* Mountain Daylight Time */
+ {"mest", DTZ, 7200}, /* Middle Europe Summer Time */
+ {"met", TZ, 3600}, /* Middle Europe Time */
+ {"metdst", DTZ, 7200}, /* Middle Europe Daylight Time */
+ {"mewt", TZ, 3600}, /* Middle Europe Winter Time */
+ {"mez", TZ, 3600}, /* Middle Europe Zone */
+ {"mht", TZ, 43200}, /* Kwajalein */
+ {"mm", UNITS, DTK_MINUTE}, /* "minute" for ISO input */
+ {"mmt", TZ, 23400}, /* Myannar Time */
+ {"mon", DOW, 1},
+ {"monday", DOW, 1},
+#if 0
+ most
+#endif
+ {"mpt", TZ, 36000}, /* North Mariana Islands Time */
+ {"msd", DTZ, 14400}, /* Moscow Summer Time */
+ {"msk", TZ, 10800}, /* Moscow Time */
+ {"mst", TZ, -25200}, /* Mountain Standard Time */
+ {"mt", TZ, 30600}, /* Moluccas Time */
+ {"mut", TZ, 14400}, /* Mauritius Island Time */
+ {"mvt", TZ, 18000}, /* Maldives Island Time */
+ {"myt", TZ, 28800}, /* Malaysia Time */
+#if 0
+ ncst
+#endif
+ {"nct", TZ, 39600}, /* New Caledonia Time */
+ {"ndt", DTZ, -9000}, /* Nfld. Daylight Time */
+ {"nft", TZ, -12600}, /* Newfoundland Standard Time */
+ {"nor", TZ, 3600}, /* Norway Standard Time */
+ {"nov", MONTH, 11},
+ {"november", MONTH, 11},
+ {"novst", DTZ, 25200}, /* Novosibirsk Summer Time */
+ {"novt", TZ, 21600}, /* Novosibirsk Standard Time */
+ {NOW, RESERV, DTK_NOW}, /* current transaction time */
+ {"npt", TZ, 20700}, /* Nepal Standard Time (GMT-5:45) */
+ {"nst", TZ, -12600}, /* Nfld. Standard Time */
+ {"nt", TZ, -39600}, /* Nome Time */
+ {"nut", TZ, -39600}, /* Niue Time */
+ {"nzdt", DTZ, 46800}, /* New Zealand Daylight Time */
+ {"nzst", TZ, 43200}, /* New Zealand Standard Time */
+ {"nzt", TZ, 43200}, /* New Zealand Time */
+ {"oct", MONTH, 10},
+ {"october", MONTH, 10},
+ {"omsst", DTZ, 25200}, /* Omsk Summer Time */
+ {"omst", TZ, 21600}, /* Omsk Time */
+ {"on", IGNORE_DTF, 0}, /* "on" (throwaway) */
+ {"pdt", DTZ, -25200}, /* Pacific Daylight Time */
+#if 0
+ pest
+#endif
+ {"pet", TZ, -18000}, /* Peru Time */
+ {"petst", DTZ, 46800}, /* Petropavlovsk-Kamchatski Summer Time */
+ {"pett", TZ, 43200}, /* Petropavlovsk-Kamchatski Time */
+ {"pgt", TZ, 36000}, /* Papua New Guinea Time */
+ {"phot", TZ, 46800}, /* Phoenix Islands (Kiribati) Time */
+#if 0
+ phst
+#endif
+ {"pht", TZ, 28800}, /* Philippine Time */
+ {"pkt", TZ, 18000}, /* Pakistan Time */
+ {"pm", AMPM, PM},
+ {"pmdt", DTZ, -7200}, /* Pierre & Miquelon Daylight Time */
+#if 0
+ pmst
+#endif
+ {"pont", TZ, 39600}, /* Ponape Time (Micronesia) */
+ {"pst", TZ, -28800}, /* Pacific Standard Time */
+ {"pwt", TZ, 32400}, /* Palau Time */
+ {"pyst", DTZ, -10800}, /* Paraguay Summer Time */
+ {"pyt", TZ, -14400}, /* Paraguay Time */
+ {"ret", DTZ, 14400}, /* Reunion Island Time */
+ {"s", UNITS, DTK_SECOND}, /* "seconds" for ISO input */
+ {"sadt", DTZ, 37800}, /* S. Australian Dayl. Time */
+#if 0
+ samst
+ samt
+#endif
+ {"sast", TZ, 34200}, /* South Australian Std Time */
+ {"sat", DOW, 6},
+ {"saturday", DOW, 6},
+#if 0
+ sbt
+#endif
+ {"sct", DTZ, 14400}, /* Mahe Island Time */
+ {"sep", MONTH, 9},
+ {"sept", MONTH, 9},
+ {"september", MONTH, 9},
+ {"set", TZ, -3600}, /* Seychelles Time ?? */
+#if 0
+ sgt
+#endif
+ {"sst", DTZ, 7200}, /* Swedish Summer Time */
+ {"sun", DOW, 0},
+ {"sunday", DOW, 0},
+ {"swt", TZ, 3600}, /* Swedish Winter Time */
+#if 0
+ syot
+#endif
+ {"t", ISOTIME, DTK_TIME}, /* Filler for ISO time fields */
+ {"tft", TZ, 18000}, /* Kerguelen Time */
+ {"that", TZ, -36000}, /* Tahiti Time */
+ {"thu", DOW, 4},
+ {"thur", DOW, 4},
+ {"thurs", DOW, 4},
+ {"thursday", DOW, 4},
+ {"tjt", TZ, 18000}, /* Tajikistan Time */
+ {"tkt", TZ, -36000}, /* Tokelau Time */
+ {"tmt", TZ, 18000}, /* Turkmenistan Time */
+ {TODAY, RESERV, DTK_TODAY}, /* midnight */
+ {TOMORROW, RESERV, DTK_TOMORROW}, /* tomorrow midnight */
+#if 0
+ tost
+#endif
+ {"tot", TZ, 46800}, /* Tonga Time */
+#if 0
+ tpt
+#endif
+ {"truk", TZ, 36000}, /* Truk Time */
+ {"tue", DOW, 2},
+ {"tues", DOW, 2},
+ {"tuesday", DOW, 2},
+ {"tvt", TZ, 43200}, /* Tuvalu Time */
+#if 0
+ uct
+#endif
+ {"ulast", DTZ, 32400}, /* Ulan Bator Summer Time */
+ {"ulat", TZ, 28800}, /* Ulan Bator Time */
+ {"ut", TZ, 0},
+ {"utc", TZ, 0},
+ {"uyst", DTZ, -7200}, /* Uruguay Summer Time */
+ {"uyt", TZ, -10800}, /* Uruguay Time */
+ {"uzst", DTZ, 21600}, /* Uzbekistan Summer Time */
+ {"uzt", TZ, 18000}, /* Uzbekistan Time */
+ {"vet", TZ, -14400}, /* Venezuela Time */
+ {"vlast", DTZ, 39600}, /* Vladivostok Summer Time */
+ {"vlat", TZ, 36000}, /* Vladivostok Time */
+#if 0
+ vust
+#endif
+ {"vut", TZ, 39600}, /* Vanuata Time */
+ {"wadt", DTZ, 28800}, /* West Australian DST */
+ {"wakt", TZ, 43200}, /* Wake Time */
+#if 0
+ warst
+#endif
+ {"wast", TZ, 25200}, /* West Australian Std Time */
+ {"wat", TZ, -3600}, /* West Africa Time */
+ {"wdt", DTZ, 32400}, /* West Australian DST */
+ {"wed", DOW, 3},
+ {"wednesday", DOW, 3},
+ {"weds", DOW, 3},
+ {"west", DTZ, 3600}, /* Western Europe Summer Time */
+ {"wet", TZ, 0}, /* Western Europe */
+ {"wetdst", DTZ, 3600}, /* Western Europe Daylight Savings Time */
+ {"wft", TZ, 43200}, /* Wallis and Futuna Time */
+ {"wgst", DTZ, -7200}, /* West Greenland Summer Time */
+ {"wgt", TZ, -10800}, /* West Greenland Time */
+ {"wst", TZ, 28800}, /* West Australian Standard Time */
+ {"y", UNITS, DTK_YEAR}, /* "year" for ISO input */
+ {"yakst", DTZ, 36000}, /* Yakutsk Summer Time */
+ {"yakt", TZ, 32400}, /* Yakutsk Time */
+ {"yapt", TZ, 36000}, /* Yap Time (Micronesia) */
+ {"ydt", DTZ, -28800}, /* Yukon Daylight Time */
+ {"yekst", DTZ, 21600}, /* Yekaterinburg Summer Time */
+ {"yekt", TZ, 18000}, /* Yekaterinburg Time */
+ {YESTERDAY, RESERV, DTK_YESTERDAY}, /* yesterday midnight */
+ {"yst", TZ, -32400}, /* Yukon Standard Time */
+ {"z", TZ, 0}, /* time zone tag per ISO-8601 */
+ {"zp4", TZ, -14400}, /* UTC +4 hours. */
+ {"zp5", TZ, -18000}, /* UTC +5 hours. */
+ {"zp6", TZ, -21600}, /* UTC +6 hours. */
+ {ZULU, TZ, 0}, /* UTC */
+};
+
+static const datetkn deltatktbl[] = {
+ /* text, token, lexval */
+ {"@", IGNORE_DTF, 0}, /* postgres relative prefix */
+ {DAGO, AGO, 0}, /* "ago" indicates negative time offset */
+ {"c", UNITS, DTK_CENTURY}, /* "century" relative */
+ {"cent", UNITS, DTK_CENTURY}, /* "century" relative */
+ {"centuries", UNITS, DTK_CENTURY}, /* "centuries" relative */
+ {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */
+ {"d", UNITS, DTK_DAY}, /* "day" relative */
+ {DDAY, UNITS, DTK_DAY}, /* "day" relative */
+ {"days", UNITS, DTK_DAY}, /* "days" relative */
+ {"dec", UNITS, DTK_DECADE}, /* "decade" relative */
+ {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */
+ {"decades", UNITS, DTK_DECADE}, /* "decades" relative */
+ {"decs", UNITS, DTK_DECADE}, /* "decades" relative */
+ {"h", UNITS, DTK_HOUR}, /* "hour" relative */
+ {DHOUR, UNITS, DTK_HOUR}, /* "hour" relative */
+ {"hours", UNITS, DTK_HOUR}, /* "hours" relative */
+ {"hr", UNITS, DTK_HOUR}, /* "hour" relative */
+ {"hrs", UNITS, DTK_HOUR}, /* "hours" relative */
+ {"m", UNITS, DTK_MINUTE}, /* "minute" relative */
+ {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
+ {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */
+ {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
+ {"millisecon", UNITS, DTK_MILLISEC}, /* relative */
+ {"mils", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */
+ {"min", UNITS, DTK_MINUTE}, /* "minute" relative */
+ {"mins", UNITS, DTK_MINUTE}, /* "minutes" relative */
+ {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */
+ {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */
+ {"mon", UNITS, DTK_MONTH}, /* "months" relative */
+ {"mons", UNITS, DTK_MONTH}, /* "months" relative */
+ {DMONTH, UNITS, DTK_MONTH}, /* "month" relative */
+ {"months", UNITS, DTK_MONTH},
+ {"ms", UNITS, DTK_MILLISEC},
+ {"msec", UNITS, DTK_MILLISEC},
+ {DMILLISEC, UNITS, DTK_MILLISEC},
+ {"mseconds", UNITS, DTK_MILLISEC},
+ {"msecs", UNITS, DTK_MILLISEC},
+ {"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */
+ {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */
+ {"s", UNITS, DTK_SECOND},
+ {"sec", UNITS, DTK_SECOND},
+ {DSECOND, UNITS, DTK_SECOND},
+ {"seconds", UNITS, DTK_SECOND},
+ {"secs", UNITS, DTK_SECOND},
+ {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */
+ {"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */
+ {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */
+ {"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {"useconds", UNITS, DTK_MICROSEC}, /* "microseconds" relative */
+ {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */
+ {"w", UNITS, DTK_WEEK}, /* "week" relative */
+ {DWEEK, UNITS, DTK_WEEK}, /* "week" relative */
+ {"weeks", UNITS, DTK_WEEK}, /* "weeks" relative */
+ {"y", UNITS, DTK_YEAR}, /* "year" relative */
+ {DYEAR, UNITS, DTK_YEAR}, /* "year" relative */
+ {"years", UNITS, DTK_YEAR}, /* "years" relative */
+ {"yr", UNITS, DTK_YEAR}, /* "year" relative */
+ {"yrs", UNITS, DTK_YEAR}, /* "years" relative */
+};
+
+static const unsigned int szdatetktbl = lengthof(datetktbl);
+static const unsigned int szdeltatktbl = lengthof(deltatktbl);
+
+static const datetkn *datecache[MAXDATEFIELDS] = {NULL};
+
+static const datetkn *deltacache[MAXDATEFIELDS] = {NULL};
+
+char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL};
+
+char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", NULL};
+
+char *pgtypes_date_weekdays_short[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL};
+
+char *pgtypes_date_months[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", NULL};
+
+static const datetkn *
+datebsearch(const char *key, const datetkn *base, unsigned int nel)
+{
+ if (nel > 0)
+ {
+ const datetkn *last = base + nel - 1,
+ *position;
+ int result;
+
+ while (last >= base)
+ {
+ position = base + ((last - base) >> 1);
+ /* precheck the first character for a bit of extra speed */
+ result = (int) key[0] - (int) position->token[0];
+ if (result == 0)
+ {
+ /* use strncmp so that we match truncated tokens */
+ result = strncmp(key, position->token, TOKMAXLEN);
+ if (result == 0)
+ return position;
+ }
+ if (result < 0)
+ last = position - 1;
+ else
+ base = position + 1;
+ }
+ }
+ return NULL;
+}
+
+/* DecodeUnits()
+ * Decode text string using lookup table.
+ * This routine supports time interval decoding.
+ */
+int
+DecodeUnits(int field, char *lowtoken, int *val)
+{
+ int type;
+ const datetkn *tp;
+
+ /* use strncmp so that we match truncated tokens */
+ if (deltacache[field] != NULL &&
+ strncmp(lowtoken, deltacache[field]->token, TOKMAXLEN) == 0)
+ tp = deltacache[field];
+ else
+ tp = datebsearch(lowtoken, deltatktbl, szdeltatktbl);
+ deltacache[field] = tp;
+ if (tp == NULL)
+ {
+ type = UNKNOWN_FIELD;
+ *val = 0;
+ }
+ else
+ {
+ type = tp->type;
+ *val = tp->value;
+ }
+
+ return type;
+} /* DecodeUnits() */
+
+/*
+ * Calendar time to Julian date conversions.
+ * Julian date is commonly used in astronomical applications,
+ * since it is numerically accurate and computationally simple.
+ * The algorithms here will accurately convert between Julian day
+ * and calendar date for all non-negative Julian days
+ * (i.e. from Nov 24, -4713 on).
+ *
+ * These routines will be used by other date/time packages
+ * - thomas 97/02/25
+ *
+ * Rewritten to eliminate overflow problems. This now allows the
+ * routines to work correctly for all Julian day counts from
+ * 0 to 2147483647 (Nov 24, -4713 to Jun 3, 5874898) assuming
+ * a 32-bit integer. Longer types should also work to the limits
+ * of their precision.
+ */
+
+int
+date2j(int y, int m, int d)
+{
+ int julian;
+ int century;
+
+ if (m > 2)
+ {
+ m += 1;
+ y += 4800;
+ }
+ else
+ {
+ m += 13;
+ y += 4799;
+ }
+
+ century = y / 100;
+ julian = y * 365 - 32167;
+ julian += y / 4 - century + century / 4;
+ julian += 7834 * m / 256 + d;
+
+ return julian;
+} /* date2j() */
+
+void
+j2date(int jd, int *year, int *month, int *day)
+{
+ unsigned int julian;
+ unsigned int quad;
+ unsigned int extra;
+ int y;
+
+ julian = jd;
+ julian += 32044;
+ quad = julian / 146097;
+ extra = (julian - quad * 146097) * 4 + 3;
+ julian += 60 + quad * 3 + extra / 146097;
+ quad = julian / 1461;
+ julian -= quad * 1461;
+ y = julian * 4 / 1461;
+ julian = ((y != 0) ? (julian + 305) % 365 : (julian + 306) % 366) + 123;
+ y += quad * 4;
+ *year = y - 4800;
+ quad = julian * 2141 / 65536;
+ *day = julian - 7834 * quad / 256;
+ *month = (quad + 10) % 12 + 1;
+} /* j2date() */
+
+/* DecodeSpecial()
+ * Decode text string using lookup table.
+ * Implement a cache lookup since it is likely that dates
+ * will be related in format.
+ */
+static int
+DecodeSpecial(int field, char *lowtoken, int *val)
+{
+ int type;
+ const datetkn *tp;
+
+ /* use strncmp so that we match truncated tokens */
+ if (datecache[field] != NULL &&
+ strncmp(lowtoken, datecache[field]->token, TOKMAXLEN) == 0)
+ tp = datecache[field];
+ else
+ {
+ tp = NULL;
+ if (!tp)
+ tp = datebsearch(lowtoken, datetktbl, szdatetktbl);
+ }
+ datecache[field] = tp;
+ if (tp == NULL)
+ {
+ type = UNKNOWN_FIELD;
+ *val = 0;
+ }
+ else
+ {
+ type = tp->type;
+ *val = tp->value;
+ }
+
+ return type;
+} /* DecodeSpecial() */
+
+/* EncodeDateOnly()
+ * Encode date as local time.
+ */
+void
+EncodeDateOnly(struct tm *tm, int style, char *str, bool EuroDates)
+{
+ Assert(tm->tm_mon >= 1 && tm->tm_mon <= MONTHS_PER_YEAR);
+
+ switch (style)
+ {
+ case USE_ISO_DATES:
+ /* compatible with ISO date formats */
+ if (tm->tm_year > 0)
+ sprintf(str, "%04d-%02d-%02d",
+ tm->tm_year, tm->tm_mon, tm->tm_mday);
+ else
+ sprintf(str, "%04d-%02d-%02d %s",
+ -(tm->tm_year - 1), tm->tm_mon, tm->tm_mday, "BC");
+ break;
+
+ case USE_SQL_DATES:
+ /* compatible with Oracle/Ingres date formats */
+ if (EuroDates)
+ sprintf(str, "%02d/%02d", tm->tm_mday, tm->tm_mon);
+ else
+ sprintf(str, "%02d/%02d", tm->tm_mon, tm->tm_mday);
+ if (tm->tm_year > 0)
+ sprintf(str + 5, "/%04d", tm->tm_year);
+ else
+ sprintf(str + 5, "/%04d %s", -(tm->tm_year - 1), "BC");
+ break;
+
+ case USE_GERMAN_DATES:
+ /* German-style date format */
+ sprintf(str, "%02d.%02d", tm->tm_mday, tm->tm_mon);
+ if (tm->tm_year > 0)
+ sprintf(str + 5, ".%04d", tm->tm_year);
+ else
+ sprintf(str + 5, ".%04d %s", -(tm->tm_year - 1), "BC");
+ break;
+
+ case USE_POSTGRES_DATES:
+ default:
+ /* traditional date-only style for Postgres */
+ if (EuroDates)
+ sprintf(str, "%02d-%02d", tm->tm_mday, tm->tm_mon);
+ else
+ sprintf(str, "%02d-%02d", tm->tm_mon, tm->tm_mday);
+ if (tm->tm_year > 0)
+ sprintf(str + 5, "-%04d", tm->tm_year);
+ else
+ sprintf(str + 5, "-%04d %s", -(tm->tm_year - 1), "BC");
+ break;
+ }
+}
+
+void
+TrimTrailingZeros(char *str)
+{
+ int len = strlen(str);
+
+ /* chop off trailing zeros... but leave at least 2 fractional digits */
+ while (*(str + len - 1) == '0' && *(str + len - 3) != '.')
+ {
+ len--;
+ *(str + len) = '\0';
+ }
+}
+
+/* EncodeDateTime()
+ * Encode date and time interpreted as local time.
+ *
+ * tm and fsec are the value to encode, print_tz determines whether to include
+ * a time zone (the difference between timestamp and timestamptz types), tz is
+ * the numeric time zone offset, tzn is the textual time zone, which if
+ * specified will be used instead of tz by some styles, style is the date
+ * style, str is where to write the output.
+ *
+ * Supported date styles:
+ * Postgres - day mon hh:mm:ss yyyy tz
+ * SQL - mm/dd/yyyy hh:mm:ss.ss tz
+ * ISO - yyyy-mm-dd hh:mm:ss+/-tz
+ * German - dd.mm.yyyy hh:mm:ss tz
+ * Variants (affects order of month and day for Postgres and SQL styles):
+ * US - mm/dd/yyyy
+ * European - dd/mm/yyyy
+ */
+void
+EncodeDateTime(struct tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates)
+{
+ int day,
+ hour,
+ min;
+
+ /*
+ * Negative tm_isdst means we have no valid time zone translation.
+ */
+ if (tm->tm_isdst < 0)
+ print_tz = false;
+
+ switch (style)
+ {
+ case USE_ISO_DATES:
+ /* Compatible with ISO-8601 date formats */
+
+ sprintf(str, "%04d-%02d-%02d %02d:%02d",
+ (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1),
+ tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min);
+
+ /*
+ * Print fractional seconds if any. The field widths here should
+ * be at least equal to MAX_TIMESTAMP_PRECISION.
+ */
+ if (fsec != 0)
+ {
+ sprintf(str + strlen(str), ":%02d.%06d", tm->tm_sec, fsec);
+ TrimTrailingZeros(str);
+ }
+ else
+ sprintf(str + strlen(str), ":%02d", tm->tm_sec);
+
+ if (tm->tm_year <= 0)
+ sprintf(str + strlen(str), " BC");
+
+ if (print_tz)
+ {
+ hour = -(tz / SECS_PER_HOUR);
+ min = (abs(tz) / MINS_PER_HOUR) % MINS_PER_HOUR;
+ if (min != 0)
+ sprintf(str + strlen(str), "%+03d:%02d", hour, min);
+ else
+ sprintf(str + strlen(str), "%+03d", hour);
+ }
+ break;
+
+ case USE_SQL_DATES:
+ /* Compatible with Oracle/Ingres date formats */
+
+ if (EuroDates)
+ sprintf(str, "%02d/%02d", tm->tm_mday, tm->tm_mon);
+ else
+ sprintf(str, "%02d/%02d", tm->tm_mon, tm->tm_mday);
+
+ sprintf(str + 5, "/%04d %02d:%02d",
+ (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1),
+ tm->tm_hour, tm->tm_min);
+
+ /*
+ * Print fractional seconds if any. The field widths here should
+ * be at least equal to MAX_TIMESTAMP_PRECISION.
+ */
+ if (fsec != 0)
+ {
+ sprintf(str + strlen(str), ":%02d.%06d", tm->tm_sec, fsec);
+ TrimTrailingZeros(str);
+ }
+ else
+ sprintf(str + strlen(str), ":%02d", tm->tm_sec);
+
+ if (tm->tm_year <= 0)
+ sprintf(str + strlen(str), " BC");
+
+ /*
+ * Note: the uses of %.*s in this function would be risky if the
+ * timezone names ever contain non-ASCII characters, since we are
+ * not being careful to do encoding-aware clipping. However, all
+ * TZ abbreviations in the IANA database are plain ASCII.
+ */
+
+ if (print_tz)
+ {
+ if (tzn)
+ sprintf(str + strlen(str), " %.*s", MAXTZLEN, tzn);
+ else
+ {
+ hour = -(tz / SECS_PER_HOUR);
+ min = (abs(tz) / MINS_PER_HOUR) % MINS_PER_HOUR;
+ if (min != 0)
+ sprintf(str + strlen(str), "%+03d:%02d", hour, min);
+ else
+ sprintf(str + strlen(str), "%+03d", hour);
+ }
+ }
+ break;
+
+ case USE_GERMAN_DATES:
+ /* German variant on European style */
+
+ sprintf(str, "%02d.%02d", tm->tm_mday, tm->tm_mon);
+
+ sprintf(str + 5, ".%04d %02d:%02d",
+ (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1),
+ tm->tm_hour, tm->tm_min);
+
+ /*
+ * Print fractional seconds if any. The field widths here should
+ * be at least equal to MAX_TIMESTAMP_PRECISION.
+ */
+ if (fsec != 0)
+ {
+ sprintf(str + strlen(str), ":%02d.%06d", tm->tm_sec, fsec);
+ TrimTrailingZeros(str);
+ }
+ else
+ sprintf(str + strlen(str), ":%02d", tm->tm_sec);
+
+ if (tm->tm_year <= 0)
+ sprintf(str + strlen(str), " BC");
+
+ if (print_tz)
+ {
+ if (tzn)
+ sprintf(str + strlen(str), " %.*s", MAXTZLEN, tzn);
+ else
+ {
+ hour = -(tz / SECS_PER_HOUR);
+ min = (abs(tz) / MINS_PER_HOUR) % MINS_PER_HOUR;
+ if (min != 0)
+ sprintf(str + strlen(str), "%+03d:%02d", hour, min);
+ else
+ sprintf(str + strlen(str), "%+03d", hour);
+ }
+ }
+ break;
+
+ case USE_POSTGRES_DATES:
+ default:
+ /* Backward-compatible with traditional Postgres abstime dates */
+
+ day = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday);
+ tm->tm_wday = (int) ((day + date2j(2000, 1, 1) + 1) % 7);
+
+ memcpy(str, days[tm->tm_wday], 3);
+ strcpy(str + 3, " ");
+
+ if (EuroDates)
+ sprintf(str + 4, "%02d %3s", tm->tm_mday, months[tm->tm_mon - 1]);
+ else
+ sprintf(str + 4, "%3s %02d", months[tm->tm_mon - 1], tm->tm_mday);
+
+ sprintf(str + 10, " %02d:%02d", tm->tm_hour, tm->tm_min);
+
+ /*
+ * Print fractional seconds if any. The field widths here should
+ * be at least equal to MAX_TIMESTAMP_PRECISION.
+ */
+ if (fsec != 0)
+ {
+ sprintf(str + strlen(str), ":%02d.%06d", tm->tm_sec, fsec);
+ TrimTrailingZeros(str);
+ }
+ else
+ sprintf(str + strlen(str), ":%02d", tm->tm_sec);
+
+ sprintf(str + strlen(str), " %04d",
+ (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1));
+ if (tm->tm_year <= 0)
+ sprintf(str + strlen(str), " BC");
+
+ if (print_tz)
+ {
+ if (tzn)
+ sprintf(str + strlen(str), " %.*s", MAXTZLEN, tzn);
+ else
+ {
+ /*
+ * We have a time zone, but no string version. Use the
+ * numeric form, but be sure to include a leading space to
+ * avoid formatting something which would be rejected by
+ * the date/time parser later. - thomas 2001-10-19
+ */
+ hour = -(tz / SECS_PER_HOUR);
+ min = (abs(tz) / MINS_PER_HOUR) % MINS_PER_HOUR;
+ if (min != 0)
+ sprintf(str + strlen(str), " %+03d:%02d", hour, min);
+ else
+ sprintf(str + strlen(str), " %+03d", hour);
+ }
+ }
+ break;
+ }
+}
+
+int
+GetEpochTime(struct tm *tm)
+{
+ struct tm *t0;
+ time_t epoch = 0;
+
+ t0 = gmtime(&epoch);
+
+ if (t0)
+ {
+ tm->tm_year = t0->tm_year + 1900;
+ tm->tm_mon = t0->tm_mon + 1;
+ tm->tm_mday = t0->tm_mday;
+ tm->tm_hour = t0->tm_hour;
+ tm->tm_min = t0->tm_min;
+ tm->tm_sec = t0->tm_sec;
+
+ return 0;
+ }
+
+ return -1;
+} /* GetEpochTime() */
+
+static void
+abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
+{
+ time_t time = (time_t) _time;
+ struct tm *tx;
+
+ errno = 0;
+ if (tzp != NULL)
+ tx = localtime((time_t *) &time);
+ else
+ tx = gmtime((time_t *) &time);
+
+ if (!tx)
+ {
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return;
+ }
+
+ tm->tm_year = tx->tm_year + 1900;
+ tm->tm_mon = tx->tm_mon + 1;
+ tm->tm_mday = tx->tm_mday;
+ tm->tm_hour = tx->tm_hour;
+ tm->tm_min = tx->tm_min;
+ tm->tm_sec = tx->tm_sec;
+ tm->tm_isdst = tx->tm_isdst;
+
+#if defined(HAVE_STRUCT_TM_TM_ZONE)
+ tm->tm_gmtoff = tx->tm_gmtoff;
+ tm->tm_zone = tx->tm_zone;
+
+ if (tzp != NULL)
+ {
+ /*
+ * We have a brute force time zone per SQL99? Then use it without
+ * change since we have already rotated to the time zone.
+ */
+ *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */
+
+ /*
+ * FreeBSD man pages indicate that this should work - tgl 97/04/23
+ */
+ if (tzn != NULL)
+ {
+ /*
+ * Copy no more than MAXTZLEN bytes of timezone to tzn, in case it
+ * contains an error message, which doesn't fit in the buffer
+ */
+ strlcpy(*tzn, tm->tm_zone, MAXTZLEN + 1);
+ if (strlen(tm->tm_zone) > MAXTZLEN)
+ tm->tm_isdst = -1;
+ }
+ }
+ else
+ tm->tm_isdst = -1;
+#elif defined(HAVE_INT_TIMEZONE)
+ if (tzp != NULL)
+ {
+ *tzp = (tm->tm_isdst > 0) ? TIMEZONE_GLOBAL - SECS_PER_HOUR : TIMEZONE_GLOBAL;
+
+ if (tzn != NULL)
+ {
+ /*
+ * Copy no more than MAXTZLEN bytes of timezone to tzn, in case it
+ * contains an error message, which doesn't fit in the buffer
+ */
+ strlcpy(*tzn, TZNAME_GLOBAL[tm->tm_isdst], MAXTZLEN + 1);
+ if (strlen(TZNAME_GLOBAL[tm->tm_isdst]) > MAXTZLEN)
+ tm->tm_isdst = -1;
+ }
+ }
+ else
+ tm->tm_isdst = -1;
+#else /* not (HAVE_STRUCT_TM_TM_ZONE ||
+ * HAVE_INT_TIMEZONE) */
+ if (tzp != NULL)
+ {
+ /* default to UTC */
+ *tzp = 0;
+ if (tzn != NULL)
+ *tzn = NULL;
+ }
+ else
+ tm->tm_isdst = -1;
+#endif
+}
+
+void
+GetCurrentDateTime(struct tm *tm)
+{
+ int tz;
+
+ abstime2tm(time(NULL), &tz, tm, NULL);
+}
+
+void
+dt2time(double jd, int *hour, int *min, int *sec, fsec_t *fsec)
+{
+ int64 time;
+
+ time = jd;
+ *hour = time / USECS_PER_HOUR;
+ time -= (*hour) * USECS_PER_HOUR;
+ *min = time / USECS_PER_MINUTE;
+ time -= (*min) * USECS_PER_MINUTE;
+ *sec = time / USECS_PER_SEC;
+ *fsec = time - (*sec * USECS_PER_SEC);
+} /* dt2time() */
+
+
+
+/* DecodeNumberField()
+ * Interpret numeric string as a concatenated date or time field.
+ * Use the context of previously decoded fields to help with
+ * the interpretation.
+ */
+static int
+DecodeNumberField(int len, char *str, int fmask,
+ int *tmask, struct tm *tm, fsec_t *fsec, bool *is2digits)
+{
+ char *cp;
+
+ /*
+ * Have a decimal point? Then this is a date or something with a seconds
+ * field...
+ */
+ if ((cp = strchr(str, '.')) != NULL)
+ {
+ char fstr[7];
+ int i;
+
+ cp++;
+
+ /*
+ * OK, we have at most six digits to care about. Let's construct a
+ * string with those digits, zero-padded on the right, and then do the
+ * conversion to an integer.
+ *
+ * XXX This truncates the seventh digit, unlike rounding it as the
+ * backend does.
+ */
+ for (i = 0; i < 6; i++)
+ fstr[i] = *cp != '\0' ? *cp++ : '0';
+ fstr[i] = '\0';
+ *fsec = strtoint(fstr, NULL, 10);
+ *cp = '\0';
+ len = strlen(str);
+ }
+ /* No decimal point and no complete date yet? */
+ else if ((fmask & DTK_DATE_M) != DTK_DATE_M)
+ {
+ /* yyyymmdd? */
+ if (len == 8)
+ {
+ *tmask = DTK_DATE_M;
+
+ tm->tm_mday = atoi(str + 6);
+ *(str + 6) = '\0';
+ tm->tm_mon = atoi(str + 4);
+ *(str + 4) = '\0';
+ tm->tm_year = atoi(str + 0);
+
+ return DTK_DATE;
+ }
+ /* yymmdd? */
+ else if (len == 6)
+ {
+ *tmask = DTK_DATE_M;
+ tm->tm_mday = atoi(str + 4);
+ *(str + 4) = '\0';
+ tm->tm_mon = atoi(str + 2);
+ *(str + 2) = '\0';
+ tm->tm_year = atoi(str + 0);
+ *is2digits = true;
+
+ return DTK_DATE;
+ }
+ /* yyddd? */
+ else if (len == 5)
+ {
+ *tmask = DTK_DATE_M;
+ tm->tm_mday = atoi(str + 2);
+ *(str + 2) = '\0';
+ tm->tm_mon = 1;
+ tm->tm_year = atoi(str + 0);
+ *is2digits = true;
+
+ return DTK_DATE;
+ }
+ }
+
+ /* not all time fields are specified? */
+ if ((fmask & DTK_TIME_M) != DTK_TIME_M)
+ {
+ /* hhmmss */
+ if (len == 6)
+ {
+ *tmask = DTK_TIME_M;
+ tm->tm_sec = atoi(str + 4);
+ *(str + 4) = '\0';
+ tm->tm_min = atoi(str + 2);
+ *(str + 2) = '\0';
+ tm->tm_hour = atoi(str + 0);
+
+ return DTK_TIME;
+ }
+ /* hhmm? */
+ else if (len == 4)
+ {
+ *tmask = DTK_TIME_M;
+ tm->tm_sec = 0;
+ tm->tm_min = atoi(str + 2);
+ *(str + 2) = '\0';
+ tm->tm_hour = atoi(str + 0);
+
+ return DTK_TIME;
+ }
+ }
+
+ return -1;
+} /* DecodeNumberField() */
+
+
+/* DecodeNumber()
+ * Interpret plain numeric field as a date value in context.
+ */
+static int
+DecodeNumber(int flen, char *str, int fmask,
+ int *tmask, struct tm *tm, fsec_t *fsec, bool *is2digits, bool EuroDates)
+{
+ int val;
+ char *cp;
+
+ *tmask = 0;
+
+ val = strtoint(str, &cp, 10);
+ if (cp == str)
+ return -1;
+
+ if (*cp == '.')
+ {
+ /*
+ * More than two digits? Then could be a date or a run-together time:
+ * 2001.360 20011225 040506.789
+ */
+ if (cp - str > 2)
+ return DecodeNumberField(flen, str, (fmask | DTK_DATE_M),
+ tmask, tm, fsec, is2digits);
+
+ *fsec = strtod(cp, &cp);
+ if (*cp != '\0')
+ return -1;
+ }
+ else if (*cp != '\0')
+ return -1;
+
+ /* Special case day of year? */
+ if (flen == 3 && (fmask & DTK_M(YEAR)) && val >= 1 && val <= 366)
+ {
+ *tmask = (DTK_M(DOY) | DTK_M(MONTH) | DTK_M(DAY));
+ tm->tm_yday = val;
+ j2date(date2j(tm->tm_year, 1, 1) + tm->tm_yday - 1,
+ &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ }
+
+ /***
+ * Enough digits to be unequivocal year? Used to test for 4 digits or
+ * more, but we now test first for a three-digit doy so anything
+ * bigger than two digits had better be an explicit year.
+ * - thomas 1999-01-09
+ * Back to requiring a 4 digit year. We accept a two digit
+ * year farther down. - thomas 2000-03-28
+ ***/
+ else if (flen >= 4)
+ {
+ *tmask = DTK_M(YEAR);
+
+ /* already have a year? then see if we can substitute... */
+ if ((fmask & DTK_M(YEAR)) && !(fmask & DTK_M(DAY)) &&
+ tm->tm_year >= 1 && tm->tm_year <= 31)
+ {
+ tm->tm_mday = tm->tm_year;
+ *tmask = DTK_M(DAY);
+ }
+
+ tm->tm_year = val;
+ }
+
+ /* already have year? then could be month */
+ else if ((fmask & DTK_M(YEAR)) && !(fmask & DTK_M(MONTH)) && val >= 1 && val <= MONTHS_PER_YEAR)
+ {
+ *tmask = DTK_M(MONTH);
+ tm->tm_mon = val;
+ }
+ /* no year and EuroDates enabled? then could be day */
+ else if ((EuroDates || (fmask & DTK_M(MONTH))) &&
+ !(fmask & DTK_M(YEAR)) && !(fmask & DTK_M(DAY)) &&
+ val >= 1 && val <= 31)
+ {
+ *tmask = DTK_M(DAY);
+ tm->tm_mday = val;
+ }
+ else if (!(fmask & DTK_M(MONTH)) && val >= 1 && val <= MONTHS_PER_YEAR)
+ {
+ *tmask = DTK_M(MONTH);
+ tm->tm_mon = val;
+ }
+ else if (!(fmask & DTK_M(DAY)) && val >= 1 && val <= 31)
+ {
+ *tmask = DTK_M(DAY);
+ tm->tm_mday = val;
+ }
+
+ /*
+ * Check for 2 or 4 or more digits, but currently we reach here only if
+ * two digits. - thomas 2000-03-28
+ */
+ else if (!(fmask & DTK_M(YEAR)) && (flen >= 4 || flen == 2))
+ {
+ *tmask = DTK_M(YEAR);
+ tm->tm_year = val;
+
+ /* adjust ONLY if exactly two digits... */
+ *is2digits = (flen == 2);
+ }
+ else
+ return -1;
+
+ return 0;
+} /* DecodeNumber() */
+
+/* DecodeDate()
+ * Decode date string which includes delimiters.
+ * Insist on a complete set of fields.
+ */
+static int
+DecodeDate(char *str, int fmask, int *tmask, struct tm *tm, bool EuroDates)
+{
+ fsec_t fsec;
+
+ int nf = 0;
+ int i,
+ len;
+ bool bc = false;
+ bool is2digits = false;
+ int type,
+ val,
+ dmask = 0;
+ char *field[MAXDATEFIELDS];
+
+ /* parse this string... */
+ while (*str != '\0' && nf < MAXDATEFIELDS)
+ {
+ /* skip field separators */
+ while (!isalnum((unsigned char) *str))
+ str++;
+
+ field[nf] = str;
+ if (isdigit((unsigned char) *str))
+ {
+ while (isdigit((unsigned char) *str))
+ str++;
+ }
+ else if (isalpha((unsigned char) *str))
+ {
+ while (isalpha((unsigned char) *str))
+ str++;
+ }
+
+ /* Just get rid of any non-digit, non-alpha characters... */
+ if (*str != '\0')
+ *str++ = '\0';
+ nf++;
+ }
+
+#if 0
+ /* don't allow too many fields */
+ if (nf > 3)
+ return -1;
+#endif
+
+ *tmask = 0;
+
+ /* look first for text fields, since that will be unambiguous month */
+ for (i = 0; i < nf; i++)
+ {
+ if (isalpha((unsigned char) *field[i]))
+ {
+ type = DecodeSpecial(i, field[i], &val);
+ if (type == IGNORE_DTF)
+ continue;
+
+ dmask = DTK_M(type);
+ switch (type)
+ {
+ case MONTH:
+ tm->tm_mon = val;
+ break;
+
+ case ADBC:
+ bc = (val == BC);
+ break;
+
+ default:
+ return -1;
+ }
+ if (fmask & dmask)
+ return -1;
+
+ fmask |= dmask;
+ *tmask |= dmask;
+
+ /* mark this field as being completed */
+ field[i] = NULL;
+ }
+ }
+
+ /* now pick up remaining numeric fields */
+ for (i = 0; i < nf; i++)
+ {
+ if (field[i] == NULL)
+ continue;
+
+ if ((len = strlen(field[i])) <= 0)
+ return -1;
+
+ if (DecodeNumber(len, field[i], fmask, &dmask, tm, &fsec, &is2digits, EuroDates) != 0)
+ return -1;
+
+ if (fmask & dmask)
+ return -1;
+
+ fmask |= dmask;
+ *tmask |= dmask;
+ }
+
+ if ((fmask & ~(DTK_M(DOY) | DTK_M(TZ))) != DTK_DATE_M)
+ return -1;
+
+ /* there is no year zero in AD/BC notation; i.e. "1 BC" == year 0 */
+ if (bc)
+ {
+ if (tm->tm_year > 0)
+ tm->tm_year = -(tm->tm_year - 1);
+ else
+ return -1;
+ }
+ else if (is2digits)
+ {
+ if (tm->tm_year < 70)
+ tm->tm_year += 2000;
+ else if (tm->tm_year < 100)
+ tm->tm_year += 1900;
+ }
+
+ return 0;
+} /* DecodeDate() */
+
+
+/* DecodeTime()
+ * Decode time string which includes delimiters.
+ * Only check the lower limit on hours, since this same code
+ * can be used to represent time spans.
+ */
+int
+DecodeTime(char *str, int *tmask, struct tm *tm, fsec_t *fsec)
+{
+ char *cp;
+
+ *tmask = DTK_TIME_M;
+
+ tm->tm_hour = strtoint(str, &cp, 10);
+ if (*cp != ':')
+ return -1;
+ str = cp + 1;
+ tm->tm_min = strtoint(str, &cp, 10);
+ if (*cp == '\0')
+ {
+ tm->tm_sec = 0;
+ *fsec = 0;
+ }
+ else if (*cp != ':')
+ return -1;
+ else
+ {
+ str = cp + 1;
+ tm->tm_sec = strtoint(str, &cp, 10);
+ if (*cp == '\0')
+ *fsec = 0;
+ else if (*cp == '.')
+ {
+ char fstr[7];
+ int i;
+
+ cp++;
+
+ /*
+ * OK, we have at most six digits to care about. Let's construct a
+ * string with those digits, zero-padded on the right, and then do
+ * the conversion to an integer.
+ *
+ * XXX This truncates the seventh digit, unlike rounding it as the
+ * backend does.
+ */
+ for (i = 0; i < 6; i++)
+ fstr[i] = *cp != '\0' ? *cp++ : '0';
+ fstr[i] = '\0';
+ *fsec = strtoint(fstr, &cp, 10);
+ if (*cp != '\0')
+ return -1;
+ }
+ else
+ return -1;
+ }
+
+ /* do a sanity check */
+ if (tm->tm_hour < 0 || tm->tm_min < 0 || tm->tm_min > 59 ||
+ tm->tm_sec < 0 || tm->tm_sec > 59 || *fsec >= USECS_PER_SEC)
+ return -1;
+
+ return 0;
+} /* DecodeTime() */
+
+/* DecodeTimezone()
+ * Interpret string as a numeric timezone.
+ *
+ * Note: we allow timezone offsets up to 13:59. There are places that
+ * use +1300 summer time.
+ */
+static int
+DecodeTimezone(char *str, int *tzp)
+{
+ int tz;
+ int hr,
+ min;
+ char *cp;
+ int len;
+
+ /* assume leading character is "+" or "-" */
+ hr = strtoint(str + 1, &cp, 10);
+
+ /* explicit delimiter? */
+ if (*cp == ':')
+ min = strtoint(cp + 1, &cp, 10);
+ /* otherwise, might have run things together... */
+ else if (*cp == '\0' && (len = strlen(str)) > 3)
+ {
+ min = strtoint(str + len - 2, &cp, 10);
+ if (min < 0 || min >= 60)
+ return -1;
+
+ *(str + len - 2) = '\0';
+ hr = strtoint(str + 1, &cp, 10);
+ if (hr < 0 || hr > 13)
+ return -1;
+ }
+ else
+ min = 0;
+
+ tz = (hr * MINS_PER_HOUR + min) * SECS_PER_MINUTE;
+ if (*str == '-')
+ tz = -tz;
+
+ *tzp = -tz;
+ return *cp != '\0';
+} /* DecodeTimezone() */
+
+
+/* DecodePosixTimezone()
+ * Interpret string as a POSIX-compatible timezone:
+ * PST-hh:mm
+ * PST+h
+ * - thomas 2000-03-15
+ */
+static int
+DecodePosixTimezone(char *str, int *tzp)
+{
+ int val,
+ tz;
+ int type;
+ char *cp;
+ char delim;
+
+ cp = str;
+ while (*cp != '\0' && isalpha((unsigned char) *cp))
+ cp++;
+
+ if (DecodeTimezone(cp, &tz) != 0)
+ return -1;
+
+ delim = *cp;
+ *cp = '\0';
+ type = DecodeSpecial(MAXDATEFIELDS - 1, str, &val);
+ *cp = delim;
+
+ switch (type)
+ {
+ case DTZ:
+ case TZ:
+ *tzp = -(val + tz);
+ break;
+
+ default:
+ return -1;
+ }
+
+ return 0;
+} /* DecodePosixTimezone() */
+
+/* ParseDateTime()
+ * Break string into tokens based on a date/time context.
+ * Several field types are assigned:
+ * DTK_NUMBER - digits and (possibly) a decimal point
+ * DTK_DATE - digits and two delimiters, or digits and text
+ * DTK_TIME - digits, colon delimiters, and possibly a decimal point
+ * DTK_STRING - text (no digits)
+ * DTK_SPECIAL - leading "+" or "-" followed by text
+ * DTK_TZ - leading "+" or "-" followed by digits
+ * Note that some field types can hold unexpected items:
+ * DTK_NUMBER can hold date fields (yy.ddd)
+ * DTK_STRING can hold months (January) and time zones (PST)
+ * DTK_DATE can hold Posix time zones (GMT-8)
+ *
+ * The "lowstr" work buffer must have at least strlen(timestr) + MAXDATEFIELDS
+ * bytes of space. On output, field[] entries will point into it.
+ * The field[] and ftype[] arrays must have at least MAXDATEFIELDS entries.
+ */
+int
+ParseDateTime(char *timestr, char *lowstr,
+ char **field, int *ftype, int *numfields, char **endstr)
+{
+ int nf = 0;
+ char *lp = lowstr;
+
+ *endstr = timestr;
+ /* outer loop through fields */
+ while (*(*endstr) != '\0')
+ {
+ /* Record start of current field */
+ if (nf >= MAXDATEFIELDS)
+ return -1;
+ field[nf] = lp;
+
+ /* leading digit? then date or time */
+ if (isdigit((unsigned char) *(*endstr)))
+ {
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)))
+ *lp++ = *(*endstr)++;
+
+ /* time field? */
+ if (*(*endstr) == ':')
+ {
+ ftype[nf] = DTK_TIME;
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)) ||
+ (*(*endstr) == ':') || (*(*endstr) == '.'))
+ *lp++ = *(*endstr)++;
+ }
+ /* date field? allow embedded text month */
+ else if (*(*endstr) == '-' || *(*endstr) == '/' || *(*endstr) == '.')
+ {
+ /* save delimiting character to use later */
+ char *dp = (*endstr);
+
+ *lp++ = *(*endstr)++;
+ /* second field is all digits? then no embedded text month */
+ if (isdigit((unsigned char) *(*endstr)))
+ {
+ ftype[nf] = (*dp == '.') ? DTK_NUMBER : DTK_DATE;
+ while (isdigit((unsigned char) *(*endstr)))
+ *lp++ = *(*endstr)++;
+
+ /*
+ * insist that the delimiters match to get a three-field
+ * date.
+ */
+ if (*(*endstr) == *dp)
+ {
+ ftype[nf] = DTK_DATE;
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)) || (*(*endstr) == *dp))
+ *lp++ = *(*endstr)++;
+ }
+ }
+ else
+ {
+ ftype[nf] = DTK_DATE;
+ while (isalnum((unsigned char) *(*endstr)) || (*(*endstr) == *dp))
+ *lp++ = pg_tolower((unsigned char) *(*endstr)++);
+ }
+ }
+
+ /*
+ * otherwise, number only and will determine year, month, day, or
+ * concatenated fields later...
+ */
+ else
+ ftype[nf] = DTK_NUMBER;
+ }
+ /* Leading decimal point? Then fractional seconds... */
+ else if (*(*endstr) == '.')
+ {
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)))
+ *lp++ = *(*endstr)++;
+
+ ftype[nf] = DTK_NUMBER;
+ }
+
+ /*
+ * text? then date string, month, day of week, special, or timezone
+ */
+ else if (isalpha((unsigned char) *(*endstr)))
+ {
+ ftype[nf] = DTK_STRING;
+ *lp++ = pg_tolower((unsigned char) *(*endstr)++);
+ while (isalpha((unsigned char) *(*endstr)))
+ *lp++ = pg_tolower((unsigned char) *(*endstr)++);
+
+ /*
+ * Full date string with leading text month? Could also be a POSIX
+ * time zone...
+ */
+ if (*(*endstr) == '-' || *(*endstr) == '/' || *(*endstr) == '.')
+ {
+ char *dp = (*endstr);
+
+ ftype[nf] = DTK_DATE;
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)) || *(*endstr) == *dp)
+ *lp++ = *(*endstr)++;
+ }
+ }
+ /* skip leading spaces */
+ else if (isspace((unsigned char) *(*endstr)))
+ {
+ (*endstr)++;
+ continue;
+ }
+ /* sign? then special or numeric timezone */
+ else if (*(*endstr) == '+' || *(*endstr) == '-')
+ {
+ *lp++ = *(*endstr)++;
+ /* soak up leading whitespace */
+ while (isspace((unsigned char) *(*endstr)))
+ (*endstr)++;
+ /* numeric timezone? */
+ if (isdigit((unsigned char) *(*endstr)))
+ {
+ ftype[nf] = DTK_TZ;
+ *lp++ = *(*endstr)++;
+ while (isdigit((unsigned char) *(*endstr)) ||
+ (*(*endstr) == ':') || (*(*endstr) == '.'))
+ *lp++ = *(*endstr)++;
+ }
+ /* special? */
+ else if (isalpha((unsigned char) *(*endstr)))
+ {
+ ftype[nf] = DTK_SPECIAL;
+ *lp++ = pg_tolower((unsigned char) *(*endstr)++);
+ while (isalpha((unsigned char) *(*endstr)))
+ *lp++ = pg_tolower((unsigned char) *(*endstr)++);
+ }
+ /* otherwise something wrong... */
+ else
+ return -1;
+ }
+ /* ignore punctuation but use as delimiter */
+ else if (ispunct((unsigned char) *(*endstr)))
+ {
+ (*endstr)++;
+ continue;
+
+ }
+ /* otherwise, something is not right... */
+ else
+ return -1;
+
+ /* force in a delimiter after each field */
+ *lp++ = '\0';
+ nf++;
+ }
+
+ *numfields = nf;
+
+ return 0;
+} /* ParseDateTime() */
+
+
+/* DecodeDateTime()
+ * Interpret previously parsed fields for general date and time.
+ * Return 0 if full date, 1 if only time, and -1 if problems.
+ * External format(s):
+ * "<weekday> <month>-<day>-<year> <hour>:<minute>:<second>"
+ * "Fri Feb-7-1997 15:23:27"
+ * "Feb-7-1997 15:23:27"
+ * "2-7-1997 15:23:27"
+ * "1997-2-7 15:23:27"
+ * "1997.038 15:23:27" (day of year 1-366)
+ * Also supports input in compact time:
+ * "970207 152327"
+ * "97038 152327"
+ * "20011225T040506.789-07"
+ *
+ * Use the system-provided functions to get the current time zone
+ * if not specified in the input string.
+ * If the date is outside the time_t system-supported time range,
+ * then assume UTC time zone. - thomas 1997-05-27
+ */
+int
+DecodeDateTime(char **field, int *ftype, int nf,
+ int *dtype, struct tm *tm, fsec_t *fsec, bool EuroDates)
+{
+ int fmask = 0,
+ tmask,
+ type;
+ int ptype = 0; /* "prefix type" for ISO y2001m02d04 format */
+ int i;
+ int val;
+ int mer = HR24;
+ bool haveTextMonth = false;
+ bool is2digits = false;
+ bool bc = false;
+ int t = 0;
+ int *tzp = &t;
+
+ /***
+ * We'll insist on at least all of the date fields, but initialize the
+ * remaining fields in case they are not set later...
+ ***/
+ *dtype = DTK_DATE;
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ *fsec = 0;
+ /* don't know daylight savings time status apriori */
+ tm->tm_isdst = -1;
+ if (tzp != NULL)
+ *tzp = 0;
+
+ for (i = 0; i < nf; i++)
+ {
+ switch (ftype[i])
+ {
+ case DTK_DATE:
+ /***
+ * Integral julian day with attached time zone?
+ * All other forms with JD will be separated into
+ * distinct fields, so we handle just this case here.
+ ***/
+ if (ptype == DTK_JULIAN)
+ {
+ char *cp;
+ int val;
+
+ if (tzp == NULL)
+ return -1;
+
+ val = strtoint(field[i], &cp, 10);
+ if (*cp != '-')
+ return -1;
+
+ j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ /* Get the time zone from the end of the string */
+ if (DecodeTimezone(cp, tzp) != 0)
+ return -1;
+
+ tmask = DTK_DATE_M | DTK_TIME_M | DTK_M(TZ);
+ ptype = 0;
+ break;
+ }
+ /***
+ * Already have a date? Then this might be a POSIX time
+ * zone with an embedded dash (e.g. "PST-3" == "EST") or
+ * a run-together time with trailing time zone (e.g. hhmmss-zz).
+ * - thomas 2001-12-25
+ ***/
+ else if (((fmask & DTK_DATE_M) == DTK_DATE_M)
+ || (ptype != 0))
+ {
+ /* No time zone accepted? Then quit... */
+ if (tzp == NULL)
+ return -1;
+
+ if (isdigit((unsigned char) *field[i]) || ptype != 0)
+ {
+ char *cp;
+
+ if (ptype != 0)
+ {
+ /* Sanity check; should not fail this test */
+ if (ptype != DTK_TIME)
+ return -1;
+ ptype = 0;
+ }
+
+ /*
+ * Starts with a digit but we already have a time
+ * field? Then we are in trouble with a date and time
+ * already...
+ */
+ if ((fmask & DTK_TIME_M) == DTK_TIME_M)
+ return -1;
+
+ if ((cp = strchr(field[i], '-')) == NULL)
+ return -1;
+
+ /* Get the time zone from the end of the string */
+ if (DecodeTimezone(cp, tzp) != 0)
+ return -1;
+ *cp = '\0';
+
+ /*
+ * Then read the rest of the field as a concatenated
+ * time
+ */
+ if ((ftype[i] = DecodeNumberField(strlen(field[i]), field[i], fmask,
+ &tmask, tm, fsec, &is2digits)) < 0)
+ return -1;
+
+ /*
+ * modify tmask after returning from
+ * DecodeNumberField()
+ */
+ tmask |= DTK_M(TZ);
+ }
+ else
+ {
+ if (DecodePosixTimezone(field[i], tzp) != 0)
+ return -1;
+
+ ftype[i] = DTK_TZ;
+ tmask = DTK_M(TZ);
+ }
+ }
+ else if (DecodeDate(field[i], fmask, &tmask, tm, EuroDates) != 0)
+ return -1;
+ break;
+
+ case DTK_TIME:
+ if (DecodeTime(field[i], &tmask, tm, fsec) != 0)
+ return -1;
+
+ /*
+ * Check upper limit on hours; other limits checked in
+ * DecodeTime()
+ */
+ /* test for > 24:00:00 */
+ if (tm->tm_hour > 24 ||
+ (tm->tm_hour == 24 && (tm->tm_min > 0 || tm->tm_sec > 0)))
+ return -1;
+ break;
+
+ case DTK_TZ:
+ {
+ int tz;
+
+ if (tzp == NULL)
+ return -1;
+
+ if (DecodeTimezone(field[i], &tz) != 0)
+ return -1;
+
+ /*
+ * Already have a time zone? Then maybe this is the second
+ * field of a POSIX time: EST+3 (equivalent to PST)
+ */
+ if (i > 0 && (fmask & DTK_M(TZ)) != 0 &&
+ ftype[i - 1] == DTK_TZ &&
+ isalpha((unsigned char) *field[i - 1]))
+ {
+ *tzp -= tz;
+ tmask = 0;
+ }
+ else
+ {
+ *tzp = tz;
+ tmask = DTK_M(TZ);
+ }
+ }
+ break;
+
+ case DTK_NUMBER:
+
+ /*
+ * Was this an "ISO date" with embedded field labels? An
+ * example is "y2001m02d04" - thomas 2001-02-04
+ */
+ if (ptype != 0)
+ {
+ char *cp;
+ int val;
+
+ val = strtoint(field[i], &cp, 10);
+
+ /*
+ * only a few kinds are allowed to have an embedded
+ * decimal
+ */
+ if (*cp == '.')
+ switch (ptype)
+ {
+ case DTK_JULIAN:
+ case DTK_TIME:
+ case DTK_SECOND:
+ break;
+ default:
+ return 1;
+ break;
+ }
+ else if (*cp != '\0')
+ return -1;
+
+ switch (ptype)
+ {
+ case DTK_YEAR:
+ tm->tm_year = val;
+ tmask = DTK_M(YEAR);
+ break;
+
+ case DTK_MONTH:
+
+ /*
+ * already have a month and hour? then assume
+ * minutes
+ */
+ if ((fmask & DTK_M(MONTH)) != 0 &&
+ (fmask & DTK_M(HOUR)) != 0)
+ {
+ tm->tm_min = val;
+ tmask = DTK_M(MINUTE);
+ }
+ else
+ {
+ tm->tm_mon = val;
+ tmask = DTK_M(MONTH);
+ }
+ break;
+
+ case DTK_DAY:
+ tm->tm_mday = val;
+ tmask = DTK_M(DAY);
+ break;
+
+ case DTK_HOUR:
+ tm->tm_hour = val;
+ tmask = DTK_M(HOUR);
+ break;
+
+ case DTK_MINUTE:
+ tm->tm_min = val;
+ tmask = DTK_M(MINUTE);
+ break;
+
+ case DTK_SECOND:
+ tm->tm_sec = val;
+ tmask = DTK_M(SECOND);
+ if (*cp == '.')
+ {
+ double frac;
+
+ frac = strtod(cp, &cp);
+ if (*cp != '\0')
+ return -1;
+ *fsec = frac * 1000000;
+ }
+ break;
+
+ case DTK_TZ:
+ tmask = DTK_M(TZ);
+ if (DecodeTimezone(field[i], tzp) != 0)
+ return -1;
+ break;
+
+ case DTK_JULIAN:
+ /***
+ * previous field was a label for "julian date"?
+ ***/
+ tmask = DTK_DATE_M;
+ j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ /* fractional Julian Day? */
+ if (*cp == '.')
+ {
+ double time;
+
+ time = strtod(cp, &cp);
+ if (*cp != '\0')
+ return -1;
+
+ tmask |= DTK_TIME_M;
+ dt2time((time * USECS_PER_DAY), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
+ }
+ break;
+
+ case DTK_TIME:
+ /* previous field was "t" for ISO time */
+ if ((ftype[i] = DecodeNumberField(strlen(field[i]), field[i], (fmask | DTK_DATE_M),
+ &tmask, tm, fsec, &is2digits)) < 0)
+ return -1;
+
+ if (tmask != DTK_TIME_M)
+ return -1;
+ break;
+
+ default:
+ return -1;
+ break;
+ }
+
+ ptype = 0;
+ *dtype = DTK_DATE;
+ }
+ else
+ {
+ char *cp;
+ int flen;
+
+ flen = strlen(field[i]);
+ cp = strchr(field[i], '.');
+
+ /* Embedded decimal and no date yet? */
+ if (cp != NULL && !(fmask & DTK_DATE_M))
+ {
+ if (DecodeDate(field[i], fmask, &tmask, tm, EuroDates) != 0)
+ return -1;
+ }
+ /* embedded decimal and several digits before? */
+ else if (cp != NULL && flen - strlen(cp) > 2)
+ {
+ /*
+ * Interpret as a concatenated date or time Set the
+ * type field to allow decoding other fields later.
+ * Example: 20011223 or 040506
+ */
+ if ((ftype[i] = DecodeNumberField(flen, field[i], fmask,
+ &tmask, tm, fsec, &is2digits)) < 0)
+ return -1;
+ }
+ else if (flen > 4)
+ {
+ if ((ftype[i] = DecodeNumberField(flen, field[i], fmask,
+ &tmask, tm, fsec, &is2digits)) < 0)
+ return -1;
+ }
+ /* otherwise it is a single date/time field... */
+ else if (DecodeNumber(flen, field[i], fmask,
+ &tmask, tm, fsec, &is2digits, EuroDates) != 0)
+ return -1;
+ }
+ break;
+
+ case DTK_STRING:
+ case DTK_SPECIAL:
+ type = DecodeSpecial(i, field[i], &val);
+ if (type == IGNORE_DTF)
+ continue;
+
+ tmask = DTK_M(type);
+ switch (type)
+ {
+ case RESERV:
+ switch (val)
+ {
+ case DTK_NOW:
+ tmask = (DTK_DATE_M | DTK_TIME_M | DTK_M(TZ));
+ *dtype = DTK_DATE;
+ GetCurrentDateTime(tm);
+ break;
+
+ case DTK_YESTERDAY:
+ tmask = DTK_DATE_M;
+ *dtype = DTK_DATE;
+ GetCurrentDateTime(tm);
+ j2date(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - 1,
+ &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ break;
+
+ case DTK_TODAY:
+ tmask = DTK_DATE_M;
+ *dtype = DTK_DATE;
+ GetCurrentDateTime(tm);
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ break;
+
+ case DTK_TOMORROW:
+ tmask = DTK_DATE_M;
+ *dtype = DTK_DATE;
+ GetCurrentDateTime(tm);
+ j2date(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) + 1,
+ &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ break;
+
+ case DTK_ZULU:
+ tmask = (DTK_TIME_M | DTK_M(TZ));
+ *dtype = DTK_DATE;
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ if (tzp != NULL)
+ *tzp = 0;
+ break;
+
+ default:
+ *dtype = val;
+ }
+
+ break;
+
+ case MONTH:
+
+ /*
+ * already have a (numeric) month? then see if we can
+ * substitute...
+ */
+ if ((fmask & DTK_M(MONTH)) && !haveTextMonth &&
+ !(fmask & DTK_M(DAY)) && tm->tm_mon >= 1 && tm->tm_mon <= 31)
+ {
+ tm->tm_mday = tm->tm_mon;
+ tmask = DTK_M(DAY);
+ }
+ haveTextMonth = true;
+ tm->tm_mon = val;
+ break;
+
+ case DTZMOD:
+
+ /*
+ * daylight savings time modifier (solves "MET DST"
+ * syntax)
+ */
+ tmask |= DTK_M(DTZ);
+ tm->tm_isdst = 1;
+ if (tzp == NULL)
+ return -1;
+ *tzp -= val;
+ break;
+
+ case DTZ:
+
+ /*
+ * set mask for TZ here _or_ check for DTZ later when
+ * getting default timezone
+ */
+ tmask |= DTK_M(TZ);
+ tm->tm_isdst = 1;
+ if (tzp == NULL)
+ return -1;
+ *tzp = -val;
+ ftype[i] = DTK_TZ;
+ break;
+
+ case TZ:
+ tm->tm_isdst = 0;
+ if (tzp == NULL)
+ return -1;
+ *tzp = -val;
+ ftype[i] = DTK_TZ;
+ break;
+
+ case IGNORE_DTF:
+ break;
+
+ case AMPM:
+ mer = val;
+ break;
+
+ case ADBC:
+ bc = (val == BC);
+ break;
+
+ case DOW:
+ tm->tm_wday = val;
+ break;
+
+ case UNITS:
+ tmask = 0;
+ ptype = val;
+ break;
+
+ case ISOTIME:
+
+ /*
+ * This is a filler field "t" indicating that the next
+ * field is time. Try to verify that this is sensible.
+ */
+ tmask = 0;
+
+ /* No preceding date? Then quit... */
+ if ((fmask & DTK_DATE_M) != DTK_DATE_M)
+ return -1;
+
+ /***
+ * We will need one of the following fields:
+ * DTK_NUMBER should be hhmmss.fff
+ * DTK_TIME should be hh:mm:ss.fff
+ * DTK_DATE should be hhmmss-zz
+ ***/
+ if (i >= nf - 1 ||
+ (ftype[i + 1] != DTK_NUMBER &&
+ ftype[i + 1] != DTK_TIME &&
+ ftype[i + 1] != DTK_DATE))
+ return -1;
+
+ ptype = val;
+ break;
+
+ default:
+ return -1;
+ }
+ break;
+
+ default:
+ return -1;
+ }
+
+ if (tmask & fmask)
+ return -1;
+ fmask |= tmask;
+ }
+
+ /* there is no year zero in AD/BC notation; i.e. "1 BC" == year 0 */
+ if (bc)
+ {
+ if (tm->tm_year > 0)
+ tm->tm_year = -(tm->tm_year - 1);
+ else
+ return -1;
+ }
+ else if (is2digits)
+ {
+ if (tm->tm_year < 70)
+ tm->tm_year += 2000;
+ else if (tm->tm_year < 100)
+ tm->tm_year += 1900;
+ }
+
+ if (mer != HR24 && tm->tm_hour > 12)
+ return -1;
+ if (mer == AM && tm->tm_hour == 12)
+ tm->tm_hour = 0;
+ else if (mer == PM && tm->tm_hour != 12)
+ tm->tm_hour += 12;
+
+ /* do additional checking for full date specs... */
+ if (*dtype == DTK_DATE)
+ {
+ if ((fmask & DTK_DATE_M) != DTK_DATE_M)
+ return ((fmask & DTK_TIME_M) == DTK_TIME_M) ? 1 : -1;
+
+ /*
+ * check for valid day of month, now that we know for sure the month
+ * and year...
+ */
+ if (tm->tm_mday < 1 || tm->tm_mday > day_tab[isleap(tm->tm_year)][tm->tm_mon - 1])
+ return -1;
+
+ /*
+ * backend tried to find local timezone here but we don't use the
+ * result afterwards anyway so we only check for this error: daylight
+ * savings time modifier but no standard timezone?
+ */
+ if ((fmask & DTK_DATE_M) == DTK_DATE_M && tzp != NULL && !(fmask & DTK_M(TZ)) && (fmask & DTK_M(DTZMOD)))
+ return -1;
+ }
+
+ return 0;
+} /* DecodeDateTime() */
+
+/* Function works as follows:
+ *
+ *
+ * */
+
+static char *
+find_end_token(char *str, char *fmt)
+{
+ /*
+ * str: here is28the day12the hour fmt: here is%dthe day%hthe hour
+ *
+ * we extract the 28, we read the percent sign and the type "d" then this
+ * functions gets called as find_end_token("28the day12the hour", "the
+ * day%hthehour")
+ *
+ * fmt points to "the day%hthehour", next_percent points to %hthehour and
+ * we have to find a match for everything between these positions ("the
+ * day"). We look for "the day" in str and know that the pattern we are
+ * about to scan ends where this string starts (right after the "28")
+ *
+ * At the end, *fmt is '\0' and *str isn't. end_position then is
+ * unchanged.
+ */
+ char *end_position = NULL;
+ char *next_percent,
+ *subst_location = NULL;
+ int scan_offset = 0;
+ char last_char;
+
+ /* are we at the end? */
+ if (!*fmt)
+ {
+ end_position = fmt;
+ return end_position;
+ }
+
+ /* not at the end */
+ while (fmt[scan_offset] == '%' && fmt[scan_offset + 1])
+ {
+ /*
+ * there is no delimiter, skip to the next delimiter if we're reading
+ * a number and then something that is not a number "9:15pm", we might
+ * be able to recover with the strtol end pointer. Go for the next
+ * percent sign
+ */
+ scan_offset += 2;
+ }
+ next_percent = strchr(fmt + scan_offset, '%');
+ if (next_percent)
+ {
+ /*
+ * we don't want to allocate extra memory, so we temporarily set the
+ * '%' sign to '\0' and call strstr However since we allow whitespace
+ * to float around everything, we have to shorten the pattern until we
+ * reach a non-whitespace character
+ */
+
+ subst_location = next_percent;
+ while (*(subst_location - 1) == ' ' && subst_location - 1 > fmt + scan_offset)
+ subst_location--;
+ last_char = *subst_location;
+ *subst_location = '\0';
+
+ /*
+ * the haystack is the str and the needle is the original fmt but it
+ * ends at the position where the next percent sign would be
+ */
+
+ /*
+ * There is one special case. Imagine: str = " 2", fmt = "%d %...",
+ * since we want to allow blanks as "dynamic" padding we have to
+ * accept this. Now, we are called with a fmt of " %..." and look for
+ * " " in str. We find it at the first position and never read the
+ * 2...
+ */
+ while (*str == ' ')
+ str++;
+ end_position = strstr(str, fmt + scan_offset);
+ *subst_location = last_char;
+ }
+ else
+ {
+ /*
+ * there is no other percent sign. So everything up to the end has to
+ * match.
+ */
+ end_position = str + strlen(str);
+ }
+ if (!end_position)
+ {
+ /*
+ * maybe we have the following case:
+ *
+ * str = "4:15am" fmt = "%M:%S %p"
+ *
+ * at this place we could have
+ *
+ * str = "15am" fmt = " %p"
+ *
+ * and have set fmt to " " because overwrote the % sign with a NULL
+ *
+ * In this case where we would have to match a space but can't find
+ * it, set end_position to the end of the string
+ */
+ if ((fmt + scan_offset)[0] == ' ' && fmt + scan_offset + 1 == subst_location)
+ end_position = str + strlen(str);
+ }
+ return end_position;
+}
+
+static int
+pgtypes_defmt_scan(union un_fmt_comb *scan_val, int scan_type, char **pstr, char *pfmt)
+{
+ /*
+ * scan everything between pstr and pstr_end. This is not including the
+ * last character so we might set it to '\0' for the parsing
+ */
+
+ char last_char;
+ int err = 0;
+ char *pstr_end;
+ char *strtol_end = NULL;
+
+ while (**pstr == ' ')
+ pstr++;
+ pstr_end = find_end_token(*pstr, pfmt);
+ if (!pstr_end)
+ {
+ /* there was an error, no match */
+ return 1;
+ }
+ last_char = *pstr_end;
+ *pstr_end = '\0';
+
+ switch (scan_type)
+ {
+ case PGTYPES_TYPE_UINT:
+
+ /*
+ * numbers may be blank-padded, this is the only deviation from
+ * the fmt-string we accept
+ */
+ while (**pstr == ' ')
+ (*pstr)++;
+ errno = 0;
+ scan_val->uint_val = (unsigned int) strtol(*pstr, &strtol_end, 10);
+ if (errno)
+ err = 1;
+ break;
+ case PGTYPES_TYPE_UINT_LONG:
+ while (**pstr == ' ')
+ (*pstr)++;
+ errno = 0;
+ scan_val->luint_val = (unsigned long int) strtol(*pstr, &strtol_end, 10);
+ if (errno)
+ err = 1;
+ break;
+ case PGTYPES_TYPE_STRING_MALLOCED:
+ scan_val->str_val = pgtypes_strdup(*pstr);
+ if (scan_val->str_val == NULL)
+ err = 1;
+ break;
+ }
+ if (strtol_end && *strtol_end)
+ *pstr = strtol_end;
+ else
+ *pstr = pstr_end;
+ *pstr_end = last_char;
+ return err;
+}
+
+/* XXX range checking */
+int
+PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
+ int *year, int *month, int *day,
+ int *hour, int *minute, int *second,
+ int *tz)
+{
+ union un_fmt_comb scan_val;
+ int scan_type;
+
+ char *pstr,
+ *pfmt,
+ *tmp;
+ int err = 1;
+ unsigned int j;
+ struct tm tm;
+
+ pfmt = fmt;
+ pstr = *str;
+
+ while (*pfmt)
+ {
+ err = 0;
+ while (*pfmt == ' ')
+ pfmt++;
+ while (*pstr == ' ')
+ pstr++;
+ if (*pfmt != '%')
+ {
+ if (*pfmt == *pstr)
+ {
+ pfmt++;
+ pstr++;
+ }
+ else
+ {
+ /* Error: no match */
+ err = 1;
+ return err;
+ }
+ continue;
+ }
+ /* here *pfmt equals '%' */
+ pfmt++;
+ switch (*pfmt)
+ {
+ case 'a':
+ pfmt++;
+
+ /*
+ * we parse the day and see if it is a week day but we do not
+ * check if the week day really matches the date
+ */
+ err = 1;
+ j = 0;
+ while (pgtypes_date_weekdays_short[j])
+ {
+ if (strncmp(pgtypes_date_weekdays_short[j], pstr,
+ strlen(pgtypes_date_weekdays_short[j])) == 0)
+ {
+ /* found it */
+ err = 0;
+ pstr += strlen(pgtypes_date_weekdays_short[j]);
+ break;
+ }
+ j++;
+ }
+ break;
+ case 'A':
+ /* see note above */
+ pfmt++;
+ err = 1;
+ j = 0;
+ while (days[j])
+ {
+ if (strncmp(days[j], pstr, strlen(days[j])) == 0)
+ {
+ /* found it */
+ err = 0;
+ pstr += strlen(days[j]);
+ break;
+ }
+ j++;
+ }
+ break;
+ case 'b':
+ case 'h':
+ pfmt++;
+ err = 1;
+ j = 0;
+ while (months[j])
+ {
+ if (strncmp(months[j], pstr, strlen(months[j])) == 0)
+ {
+ /* found it */
+ err = 0;
+ pstr += strlen(months[j]);
+ *month = j + 1;
+ break;
+ }
+ j++;
+ }
+ break;
+ case 'B':
+ /* see note above */
+ pfmt++;
+ err = 1;
+ j = 0;
+ while (pgtypes_date_months[j])
+ {
+ if (strncmp(pgtypes_date_months[j], pstr, strlen(pgtypes_date_months[j])) == 0)
+ {
+ /* found it */
+ err = 0;
+ pstr += strlen(pgtypes_date_months[j]);
+ *month = j + 1;
+ break;
+ }
+ j++;
+ }
+ break;
+ case 'c':
+ /* XXX */
+ break;
+ case 'C':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *year = scan_val.uint_val * 100;
+ break;
+ case 'd':
+ case 'e':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *day = scan_val.uint_val;
+ break;
+ case 'D':
+
+ /*
+ * we have to concatenate the strings in order to be able to
+ * find the end of the substitution
+ */
+ pfmt++;
+ tmp = pgtypes_alloc(strlen("%m/%d/%y") + strlen(pstr) + 1);
+ strcpy(tmp, "%m/%d/%y");
+ strcat(tmp, pfmt);
+ err = PGTYPEStimestamp_defmt_scan(&pstr, tmp, d, year, month, day, hour, minute, second, tz);
+ free(tmp);
+ return err;
+ case 'm':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *month = scan_val.uint_val;
+ break;
+ case 'y':
+ case 'g': /* XXX difference to y (ISO) */
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (*year < 0)
+ {
+ /* not yet set */
+ *year = scan_val.uint_val;
+ }
+ else
+ *year += scan_val.uint_val;
+ if (*year < 100)
+ *year += 1900;
+ break;
+ case 'G':
+ /* XXX difference to %V (ISO) */
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *year = scan_val.uint_val;
+ break;
+ case 'H':
+ case 'I':
+ case 'k':
+ case 'l':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *hour += scan_val.uint_val;
+ break;
+ case 'j':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+
+ /*
+ * XXX what should we do with that? We could say that it's
+ * sufficient if we have the year and the day within the year
+ * to get at least a specific day.
+ */
+ break;
+ case 'M':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *minute = scan_val.uint_val;
+ break;
+ case 'n':
+ pfmt++;
+ if (*pstr == '\n')
+ pstr++;
+ else
+ err = 1;
+ break;
+ case 'p':
+ err = 1;
+ pfmt++;
+ if (strncmp(pstr, "am", 2) == 0)
+ {
+ *hour += 0;
+ err = 0;
+ pstr += 2;
+ }
+ if (strncmp(pstr, "a.m.", 4) == 0)
+ {
+ *hour += 0;
+ err = 0;
+ pstr += 4;
+ }
+ if (strncmp(pstr, "pm", 2) == 0)
+ {
+ *hour += 12;
+ err = 0;
+ pstr += 2;
+ }
+ if (strncmp(pstr, "p.m.", 4) == 0)
+ {
+ *hour += 12;
+ err = 0;
+ pstr += 4;
+ }
+ break;
+ case 'P':
+ err = 1;
+ pfmt++;
+ if (strncmp(pstr, "AM", 2) == 0)
+ {
+ *hour += 0;
+ err = 0;
+ pstr += 2;
+ }
+ if (strncmp(pstr, "A.M.", 4) == 0)
+ {
+ *hour += 0;
+ err = 0;
+ pstr += 4;
+ }
+ if (strncmp(pstr, "PM", 2) == 0)
+ {
+ *hour += 12;
+ err = 0;
+ pstr += 2;
+ }
+ if (strncmp(pstr, "P.M.", 4) == 0)
+ {
+ *hour += 12;
+ err = 0;
+ pstr += 4;
+ }
+ break;
+ case 'r':
+ pfmt++;
+ tmp = pgtypes_alloc(strlen("%I:%M:%S %p") + strlen(pstr) + 1);
+ strcpy(tmp, "%I:%M:%S %p");
+ strcat(tmp, pfmt);
+ err = PGTYPEStimestamp_defmt_scan(&pstr, tmp, d, year, month, day, hour, minute, second, tz);
+ free(tmp);
+ return err;
+ case 'R':
+ pfmt++;
+ tmp = pgtypes_alloc(strlen("%H:%M") + strlen(pstr) + 1);
+ strcpy(tmp, "%H:%M");
+ strcat(tmp, pfmt);
+ err = PGTYPEStimestamp_defmt_scan(&pstr, tmp, d, year, month, day, hour, minute, second, tz);
+ free(tmp);
+ return err;
+ case 's':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT_LONG;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ /* number of seconds in scan_val.luint_val */
+ {
+ struct tm *tms;
+ time_t et = (time_t) scan_val.luint_val;
+
+ tms = gmtime(&et);
+
+ if (tms)
+ {
+ *year = tms->tm_year + 1900;
+ *month = tms->tm_mon + 1;
+ *day = tms->tm_mday;
+ *hour = tms->tm_hour;
+ *minute = tms->tm_min;
+ *second = tms->tm_sec;
+ }
+ else
+ err = 1;
+ }
+ break;
+ case 'S':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *second = scan_val.uint_val;
+ break;
+ case 't':
+ pfmt++;
+ if (*pstr == '\t')
+ pstr++;
+ else
+ err = 1;
+ break;
+ case 'T':
+ pfmt++;
+ tmp = pgtypes_alloc(strlen("%H:%M:%S") + strlen(pstr) + 1);
+ strcpy(tmp, "%H:%M:%S");
+ strcat(tmp, pfmt);
+ err = PGTYPEStimestamp_defmt_scan(&pstr, tmp, d, year, month, day, hour, minute, second, tz);
+ free(tmp);
+ return err;
+ case 'u':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (scan_val.uint_val < 1 || scan_val.uint_val > 7)
+ err = 1;
+ break;
+ case 'U':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (scan_val.uint_val > 53)
+ err = 1;
+ break;
+ case 'V':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (scan_val.uint_val < 1 || scan_val.uint_val > 53)
+ err = 1;
+ break;
+ case 'w':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (scan_val.uint_val > 6)
+ err = 1;
+ break;
+ case 'W':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (scan_val.uint_val > 53)
+ err = 1;
+ break;
+ case 'x':
+ case 'X':
+ /* XXX */
+ break;
+ case 'Y':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_UINT;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ *year = scan_val.uint_val;
+ break;
+ case 'z':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_STRING_MALLOCED;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (!err)
+ {
+ err = DecodeTimezone(scan_val.str_val, tz);
+ free(scan_val.str_val);
+ }
+ break;
+ case 'Z':
+ pfmt++;
+ scan_type = PGTYPES_TYPE_STRING_MALLOCED;
+ err = pgtypes_defmt_scan(&scan_val, scan_type, &pstr, pfmt);
+ if (!err)
+ {
+ /*
+ * XXX use DecodeSpecial instead? Do we need strcasecmp
+ * here?
+ */
+ err = 1;
+ for (j = 0; j < szdatetktbl; j++)
+ {
+ if ((datetktbl[j].type == TZ || datetktbl[j].type == DTZ) &&
+ pg_strcasecmp(datetktbl[j].token,
+ scan_val.str_val) == 0)
+ {
+ *tz = -datetktbl[j].value;
+ err = 0;
+ break;
+ }
+ }
+ free(scan_val.str_val);
+ }
+ break;
+ case '+':
+ /* XXX */
+ break;
+ case '%':
+ pfmt++;
+ if (*pstr == '%')
+ pstr++;
+ else
+ err = 1;
+ break;
+ default:
+ err = 1;
+ }
+ }
+ if (!err)
+ {
+ if (*second < 0)
+ *second = 0;
+ if (*minute < 0)
+ *minute = 0;
+ if (*hour < 0)
+ *hour = 0;
+ if (*day < 0)
+ {
+ err = 1;
+ *day = 1;
+ }
+ if (*month < 0)
+ {
+ err = 1;
+ *month = 1;
+ }
+ if (*year < 0)
+ {
+ err = 1;
+ *year = 1970;
+ }
+
+ if (*second > 59)
+ {
+ err = 1;
+ *second = 0;
+ }
+ if (*minute > 59)
+ {
+ err = 1;
+ *minute = 0;
+ }
+ if (*hour > 24 || /* test for > 24:00:00 */
+ (*hour == 24 && (*minute > 0 || *second > 0)))
+ {
+ err = 1;
+ *hour = 0;
+ }
+ if (*month > MONTHS_PER_YEAR)
+ {
+ err = 1;
+ *month = 1;
+ }
+ if (*day > day_tab[isleap(*year)][*month - 1])
+ {
+ *day = day_tab[isleap(*year)][*month - 1];
+ err = 1;
+ }
+
+ tm.tm_sec = *second;
+ tm.tm_min = *minute;
+ tm.tm_hour = *hour;
+ tm.tm_mday = *day;
+ tm.tm_mon = *month;
+ tm.tm_year = *year;
+
+ tm2timestamp(&tm, 0, tz, d);
+ }
+ return err;
+}
+
+/* XXX: 1900 is compiled in as the base for years */
diff --git a/src/interfaces/ecpg/pgtypeslib/exports.txt b/src/interfaces/ecpg/pgtypeslib/exports.txt
new file mode 100644
index 0000000..2d5ec17
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/exports.txt
@@ -0,0 +1,48 @@
+# src/interfaces/ecpg/pgtypeslib/exports.txt
+# Functions to be exported by pgtypeslib DLL
+PGTYPESdate_dayofweek 1
+PGTYPESdate_defmt_asc 2
+PGTYPESdate_fmt_asc 3
+PGTYPESdate_free 4
+PGTYPESdate_from_asc 5
+PGTYPESdate_from_timestamp 6
+PGTYPESdate_julmdy 7
+PGTYPESdate_mdyjul 8
+PGTYPESdate_new 9
+PGTYPESdate_to_asc 10
+PGTYPESdate_today 11
+PGTYPESdecimal_free 12
+PGTYPESdecimal_new 13
+PGTYPESinterval_copy 14
+PGTYPESinterval_free 15
+PGTYPESinterval_from_asc 16
+PGTYPESinterval_new 17
+PGTYPESinterval_to_asc 18
+PGTYPESnumeric_add 19
+PGTYPESnumeric_cmp 20
+PGTYPESnumeric_copy 21
+PGTYPESnumeric_div 22
+PGTYPESnumeric_free 23
+PGTYPESnumeric_from_asc 24
+PGTYPESnumeric_from_decimal 25
+PGTYPESnumeric_from_double 26
+PGTYPESnumeric_from_int 27
+PGTYPESnumeric_from_long 28
+PGTYPESnumeric_mul 29
+PGTYPESnumeric_new 30
+PGTYPESnumeric_sub 31
+PGTYPESnumeric_to_asc 32
+PGTYPESnumeric_to_decimal 33
+PGTYPESnumeric_to_double 34
+PGTYPESnumeric_to_int 35
+PGTYPESnumeric_to_long 36
+PGTYPEStimestamp_add_interval 37
+PGTYPEStimestamp_current 38
+PGTYPEStimestamp_defmt_asc 39
+PGTYPEStimestamp_defmt_scan 40
+PGTYPEStimestamp_fmt_asc 41
+PGTYPEStimestamp_from_asc 42
+PGTYPEStimestamp_sub 43
+PGTYPEStimestamp_sub_interval 44
+PGTYPEStimestamp_to_asc 45
+PGTYPESchar_free 46
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
new file mode 100644
index 0000000..02b3c47
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -0,0 +1,1093 @@
+/* src/interfaces/ecpg/pgtypeslib/interval.c */
+
+#include "postgres_fe.h"
+
+#include <time.h>
+#include <math.h>
+#include <limits.h>
+
+#ifdef __FAST_MATH__
+#error -ffast-math is known to break this code
+#endif
+
+#include "common/string.h"
+#include "dt.h"
+#include "pgtypes_error.h"
+#include "pgtypes_interval.h"
+#include "pgtypeslib_extern.h"
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ * and changed struct pg_tm to struct tm
+ */
+static void
+AdjustFractSeconds(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale)
+{
+ int sec;
+
+ if (frac == 0)
+ return;
+ frac *= scale;
+ sec = (int) frac;
+ tm->tm_sec += sec;
+ frac -= sec;
+ *fsec += rint(frac * 1000000);
+}
+
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ * and changed struct pg_tm to struct tm
+ */
+static void
+AdjustFractDays(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale)
+{
+ int extra_days;
+
+ if (frac == 0)
+ return;
+ frac *= scale;
+ extra_days = (int) frac;
+ tm->tm_mday += extra_days;
+ frac -= extra_days;
+ AdjustFractSeconds(frac, tm, fsec, SECS_PER_DAY);
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static int
+ParseISO8601Number(const char *str, char **endptr, int *ipart, double *fpart)
+{
+ double val;
+
+ if (!(isdigit((unsigned char) *str) || *str == '-' || *str == '.'))
+ return DTERR_BAD_FORMAT;
+ errno = 0;
+ val = strtod(str, endptr);
+ /* did we not see anything that looks like a double? */
+ if (*endptr == str || errno != 0)
+ return DTERR_BAD_FORMAT;
+ /* watch out for overflow */
+ if (val < INT_MIN || val > INT_MAX)
+ return DTERR_FIELD_OVERFLOW;
+ /* be very sure we truncate towards zero (cf dtrunc()) */
+ if (val >= 0)
+ *ipart = (int) floor(val);
+ else
+ *ipart = (int) -floor(-val);
+ *fpart = val - *ipart;
+ return 0;
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static int
+ISO8601IntegerWidth(const char *fieldstart)
+{
+ /* We might have had a leading '-' */
+ if (*fieldstart == '-')
+ fieldstart++;
+ return strspn(fieldstart, "0123456789");
+}
+
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ * and changed struct pg_tm to struct tm
+ */
+static inline void
+ClearPgTm(struct /* pg_ */ tm *tm, fsec_t *fsec)
+{
+ tm->tm_year = 0;
+ tm->tm_mon = 0;
+ tm->tm_mday = 0;
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ *fsec = 0;
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ *
+ * * changed struct pg_tm to struct tm
+ *
+ * * Made the function static
+ */
+static int
+DecodeISO8601Interval(char *str,
+ int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec)
+{
+ bool datepart = true;
+ bool havefield = false;
+
+ *dtype = DTK_DELTA;
+ ClearPgTm(tm, fsec);
+
+ if (strlen(str) < 2 || str[0] != 'P')
+ return DTERR_BAD_FORMAT;
+
+ str++;
+ while (*str)
+ {
+ char *fieldstart;
+ int val;
+ double fval;
+ char unit;
+ int dterr;
+
+ if (*str == 'T') /* T indicates the beginning of the time part */
+ {
+ datepart = false;
+ havefield = false;
+ str++;
+ continue;
+ }
+
+ fieldstart = str;
+ dterr = ParseISO8601Number(str, &str, &val, &fval);
+ if (dterr)
+ return dterr;
+
+ /*
+ * Note: we could step off the end of the string here. Code below
+ * *must* exit the loop if unit == '\0'.
+ */
+ unit = *str++;
+
+ if (datepart)
+ {
+ switch (unit) /* before T: Y M W D */
+ {
+ case 'Y':
+ tm->tm_year += val;
+ tm->tm_mon += (fval * MONTHS_PER_YEAR);
+ break;
+ case 'M':
+ tm->tm_mon += val;
+ AdjustFractDays(fval, tm, fsec, DAYS_PER_MONTH);
+ break;
+ case 'W':
+ tm->tm_mday += val * 7;
+ AdjustFractDays(fval, tm, fsec, 7);
+ break;
+ case 'D':
+ tm->tm_mday += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_DAY);
+ break;
+ case 'T': /* ISO 8601 4.4.3.3 Alternative Format / Basic */
+ case '\0':
+ if (ISO8601IntegerWidth(fieldstart) == 8 && !havefield)
+ {
+ tm->tm_year += val / 10000;
+ tm->tm_mon += (val / 100) % 100;
+ tm->tm_mday += val % 100;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_DAY);
+ if (unit == '\0')
+ return 0;
+ datepart = false;
+ havefield = false;
+ continue;
+ }
+ /* Else fall through to extended alternative format */
+ /* FALLTHROUGH */
+ case '-': /* ISO 8601 4.4.3.3 Alternative Format,
+ * Extended */
+ if (havefield)
+ return DTERR_BAD_FORMAT;
+
+ tm->tm_year += val;
+ tm->tm_mon += (fval * MONTHS_PER_YEAR);
+ if (unit == '\0')
+ return 0;
+ if (unit == 'T')
+ {
+ datepart = false;
+ havefield = false;
+ continue;
+ }
+
+ dterr = ParseISO8601Number(str, &str, &val, &fval);
+ if (dterr)
+ return dterr;
+ tm->tm_mon += val;
+ AdjustFractDays(fval, tm, fsec, DAYS_PER_MONTH);
+ if (*str == '\0')
+ return 0;
+ if (*str == 'T')
+ {
+ datepart = false;
+ havefield = false;
+ continue;
+ }
+ if (*str != '-')
+ return DTERR_BAD_FORMAT;
+ str++;
+
+ dterr = ParseISO8601Number(str, &str, &val, &fval);
+ if (dterr)
+ return dterr;
+ tm->tm_mday += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_DAY);
+ if (*str == '\0')
+ return 0;
+ if (*str == 'T')
+ {
+ datepart = false;
+ havefield = false;
+ continue;
+ }
+ return DTERR_BAD_FORMAT;
+ default:
+ /* not a valid date unit suffix */
+ return DTERR_BAD_FORMAT;
+ }
+ }
+ else
+ {
+ switch (unit) /* after T: H M S */
+ {
+ case 'H':
+ tm->tm_hour += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_HOUR);
+ break;
+ case 'M':
+ tm->tm_min += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_MINUTE);
+ break;
+ case 'S':
+ tm->tm_sec += val;
+ AdjustFractSeconds(fval, tm, fsec, 1);
+ break;
+ case '\0': /* ISO 8601 4.4.3.3 Alternative Format */
+ if (ISO8601IntegerWidth(fieldstart) == 6 && !havefield)
+ {
+ tm->tm_hour += val / 10000;
+ tm->tm_min += (val / 100) % 100;
+ tm->tm_sec += val % 100;
+ AdjustFractSeconds(fval, tm, fsec, 1);
+ return 0;
+ }
+ /* Else fall through to extended alternative format */
+ /* FALLTHROUGH */
+ case ':': /* ISO 8601 4.4.3.3 Alternative Format,
+ * Extended */
+ if (havefield)
+ return DTERR_BAD_FORMAT;
+
+ tm->tm_hour += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_HOUR);
+ if (unit == '\0')
+ return 0;
+
+ dterr = ParseISO8601Number(str, &str, &val, &fval);
+ if (dterr)
+ return dterr;
+ tm->tm_min += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_MINUTE);
+ if (*str == '\0')
+ return 0;
+ if (*str != ':')
+ return DTERR_BAD_FORMAT;
+ str++;
+
+ dterr = ParseISO8601Number(str, &str, &val, &fval);
+ if (dterr)
+ return dterr;
+ tm->tm_sec += val;
+ AdjustFractSeconds(fval, tm, fsec, 1);
+ if (*str == '\0')
+ return 0;
+ return DTERR_BAD_FORMAT;
+
+ default:
+ /* not a valid time unit suffix */
+ return DTERR_BAD_FORMAT;
+ }
+ }
+
+ havefield = true;
+ }
+
+ return 0;
+}
+
+
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ * with 3 exceptions
+ *
+ * * changed struct pg_tm to struct tm
+ *
+ * * ECPG code called this without a 'range' parameter
+ * removed 'int range' from the argument list and
+ * places where DecodeTime is called; and added
+ * int range = INTERVAL_FULL_RANGE;
+ *
+ * * ECPG seems not to have a global IntervalStyle
+ * so added
+ * int IntervalStyle = INTSTYLE_POSTGRES;
+ */
+int
+DecodeInterval(char **field, int *ftype, int nf, /* int range, */
+ int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec)
+{
+ int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE;
+ int range = INTERVAL_FULL_RANGE;
+ bool is_before = false;
+ char *cp;
+ int fmask = 0,
+ tmask,
+ type;
+ int i;
+ int dterr;
+ int val;
+ double fval;
+
+ *dtype = DTK_DELTA;
+ type = IGNORE_DTF;
+ ClearPgTm(tm, fsec);
+
+ /* read through list backwards to pick up units before values */
+ for (i = nf - 1; i >= 0; i--)
+ {
+ switch (ftype[i])
+ {
+ case DTK_TIME:
+ dterr = DecodeTime(field[i], /* range, */
+ &tmask, tm, fsec);
+ if (dterr)
+ return dterr;
+ type = DTK_DAY;
+ break;
+
+ case DTK_TZ:
+
+ /*
+ * Timezone is a token with a leading sign character and at
+ * least one digit; there could be ':', '.', '-' embedded in
+ * it as well.
+ */
+ Assert(*field[i] == '-' || *field[i] == '+');
+
+ /*
+ * Try for hh:mm or hh:mm:ss. If not, fall through to
+ * DTK_NUMBER case, which can handle signed float numbers and
+ * signed year-month values.
+ */
+ if (strchr(field[i] + 1, ':') != NULL &&
+ DecodeTime(field[i] + 1, /* INTERVAL_FULL_RANGE, */
+ &tmask, tm, fsec) == 0)
+ {
+ if (*field[i] == '-')
+ {
+ /* flip the sign on all fields */
+ tm->tm_hour = -tm->tm_hour;
+ tm->tm_min = -tm->tm_min;
+ tm->tm_sec = -tm->tm_sec;
+ *fsec = -(*fsec);
+ }
+
+ /*
+ * Set the next type to be a day, if units are not
+ * specified. This handles the case of '1 +02:03' since we
+ * are reading right to left.
+ */
+ type = DTK_DAY;
+ tmask = DTK_M(TZ);
+ break;
+ }
+ /* FALL THROUGH */
+
+ case DTK_DATE:
+ case DTK_NUMBER:
+ if (type == IGNORE_DTF)
+ {
+ /* use typmod to decide what rightmost field is */
+ switch (range)
+ {
+ case INTERVAL_MASK(YEAR):
+ type = DTK_YEAR;
+ break;
+ case INTERVAL_MASK(MONTH):
+ case INTERVAL_MASK(YEAR) | INTERVAL_MASK(MONTH):
+ type = DTK_MONTH;
+ break;
+ case INTERVAL_MASK(DAY):
+ type = DTK_DAY;
+ break;
+ case INTERVAL_MASK(HOUR):
+ case INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR):
+ case INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE):
+ case INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND):
+ type = DTK_HOUR;
+ break;
+ case INTERVAL_MASK(MINUTE):
+ case INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE):
+ type = DTK_MINUTE;
+ break;
+ case INTERVAL_MASK(SECOND):
+ case INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND):
+ case INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND):
+ type = DTK_SECOND;
+ break;
+ default:
+ type = DTK_SECOND;
+ break;
+ }
+ }
+
+ errno = 0;
+ val = strtoint(field[i], &cp, 10);
+ if (errno == ERANGE)
+ return DTERR_FIELD_OVERFLOW;
+
+ if (*cp == '-')
+ {
+ /* SQL "years-months" syntax */
+ int val2;
+
+ val2 = strtoint(cp + 1, &cp, 10);
+ if (errno == ERANGE || val2 < 0 || val2 >= MONTHS_PER_YEAR)
+ return DTERR_FIELD_OVERFLOW;
+ if (*cp != '\0')
+ return DTERR_BAD_FORMAT;
+ type = DTK_MONTH;
+ if (*field[i] == '-')
+ val2 = -val2;
+ val = val * MONTHS_PER_YEAR + val2;
+ fval = 0;
+ }
+ else if (*cp == '.')
+ {
+ errno = 0;
+ fval = strtod(cp, &cp);
+ if (*cp != '\0' || errno != 0)
+ return DTERR_BAD_FORMAT;
+
+ if (*field[i] == '-')
+ fval = -fval;
+ }
+ else if (*cp == '\0')
+ fval = 0;
+ else
+ return DTERR_BAD_FORMAT;
+
+ tmask = 0; /* DTK_M(type); */
+
+ switch (type)
+ {
+ case DTK_MICROSEC:
+ *fsec += rint(val + fval);
+ tmask = DTK_M(MICROSECOND);
+ break;
+
+ case DTK_MILLISEC:
+ *fsec += rint((val + fval) * 1000);
+ tmask = DTK_M(MILLISECOND);
+ break;
+
+ case DTK_SECOND:
+ tm->tm_sec += val;
+ *fsec += rint(fval * 1000000);
+
+ /*
+ * If any subseconds were specified, consider this
+ * microsecond and millisecond input as well.
+ */
+ if (fval == 0)
+ tmask = DTK_M(SECOND);
+ else
+ tmask = DTK_ALL_SECS_M;
+ break;
+
+ case DTK_MINUTE:
+ tm->tm_min += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_MINUTE);
+ tmask = DTK_M(MINUTE);
+ break;
+
+ case DTK_HOUR:
+ tm->tm_hour += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_HOUR);
+ tmask = DTK_M(HOUR);
+ type = DTK_DAY;
+ break;
+
+ case DTK_DAY:
+ tm->tm_mday += val;
+ AdjustFractSeconds(fval, tm, fsec, SECS_PER_DAY);
+ tmask = (fmask & DTK_M(DAY)) ? 0 : DTK_M(DAY);
+ break;
+
+ case DTK_WEEK:
+ tm->tm_mday += val * 7;
+ AdjustFractDays(fval, tm, fsec, 7);
+ tmask = (fmask & DTK_M(DAY)) ? 0 : DTK_M(DAY);
+ break;
+
+ case DTK_MONTH:
+ tm->tm_mon += val;
+ AdjustFractDays(fval, tm, fsec, DAYS_PER_MONTH);
+ tmask = DTK_M(MONTH);
+ break;
+
+ case DTK_YEAR:
+ tm->tm_year += val;
+ if (fval != 0)
+ tm->tm_mon += fval * MONTHS_PER_YEAR;
+ tmask = (fmask & DTK_M(YEAR)) ? 0 : DTK_M(YEAR);
+ break;
+
+ case DTK_DECADE:
+ tm->tm_year += val * 10;
+ if (fval != 0)
+ tm->tm_mon += fval * MONTHS_PER_YEAR * 10;
+ tmask = (fmask & DTK_M(YEAR)) ? 0 : DTK_M(YEAR);
+ break;
+
+ case DTK_CENTURY:
+ tm->tm_year += val * 100;
+ if (fval != 0)
+ tm->tm_mon += fval * MONTHS_PER_YEAR * 100;
+ tmask = (fmask & DTK_M(YEAR)) ? 0 : DTK_M(YEAR);
+ break;
+
+ case DTK_MILLENNIUM:
+ tm->tm_year += val * 1000;
+ if (fval != 0)
+ tm->tm_mon += fval * MONTHS_PER_YEAR * 1000;
+ tmask = (fmask & DTK_M(YEAR)) ? 0 : DTK_M(YEAR);
+ break;
+
+ default:
+ return DTERR_BAD_FORMAT;
+ }
+ break;
+
+ case DTK_STRING:
+ case DTK_SPECIAL:
+ type = DecodeUnits(i, field[i], &val);
+ if (type == IGNORE_DTF)
+ continue;
+
+ tmask = 0; /* DTK_M(type); */
+ switch (type)
+ {
+ case UNITS:
+ type = val;
+ break;
+
+ case AGO:
+ is_before = true;
+ type = val;
+ break;
+
+ case RESERV:
+ tmask = (DTK_DATE_M | DTK_TIME_M);
+ *dtype = val;
+ break;
+
+ default:
+ return DTERR_BAD_FORMAT;
+ }
+ break;
+
+ default:
+ return DTERR_BAD_FORMAT;
+ }
+
+ if (tmask & fmask)
+ return DTERR_BAD_FORMAT;
+ fmask |= tmask;
+ }
+
+ /* ensure that at least one time field has been found */
+ if (fmask == 0)
+ return DTERR_BAD_FORMAT;
+
+ /* ensure fractional seconds are fractional */
+ if (*fsec != 0)
+ {
+ int sec;
+
+ sec = *fsec / USECS_PER_SEC;
+ *fsec -= sec * USECS_PER_SEC;
+ tm->tm_sec += sec;
+ }
+
+ /*----------
+ * The SQL standard defines the interval literal
+ * '-1 1:00:00'
+ * to mean "negative 1 days and negative 1 hours", while Postgres
+ * traditionally treats this as meaning "negative 1 days and positive
+ * 1 hours". In SQL_STANDARD intervalstyle, we apply the leading sign
+ * to all fields if there are no other explicit signs.
+ *
+ * We leave the signs alone if there are additional explicit signs.
+ * This protects us against misinterpreting postgres-style dump output,
+ * since the postgres-style output code has always put an explicit sign on
+ * all fields following a negative field. But note that SQL-spec output
+ * is ambiguous and can be misinterpreted on load! (So it's best practice
+ * to dump in postgres style, not SQL style.)
+ *----------
+ */
+ if (IntervalStyle == INTSTYLE_SQL_STANDARD && *field[0] == '-')
+ {
+ /* Check for additional explicit signs */
+ bool more_signs = false;
+
+ for (i = 1; i < nf; i++)
+ {
+ if (*field[i] == '-' || *field[i] == '+')
+ {
+ more_signs = true;
+ break;
+ }
+ }
+
+ if (!more_signs)
+ {
+ /*
+ * Rather than re-determining which field was field[0], just force
+ * 'em all negative.
+ */
+ if (*fsec > 0)
+ *fsec = -(*fsec);
+ if (tm->tm_sec > 0)
+ tm->tm_sec = -tm->tm_sec;
+ if (tm->tm_min > 0)
+ tm->tm_min = -tm->tm_min;
+ if (tm->tm_hour > 0)
+ tm->tm_hour = -tm->tm_hour;
+ if (tm->tm_mday > 0)
+ tm->tm_mday = -tm->tm_mday;
+ if (tm->tm_mon > 0)
+ tm->tm_mon = -tm->tm_mon;
+ if (tm->tm_year > 0)
+ tm->tm_year = -tm->tm_year;
+ }
+ }
+
+ /* finally, AGO negates everything */
+ if (is_before)
+ {
+ *fsec = -(*fsec);
+ tm->tm_sec = -tm->tm_sec;
+ tm->tm_min = -tm->tm_min;
+ tm->tm_hour = -tm->tm_hour;
+ tm->tm_mday = -tm->tm_mday;
+ tm->tm_mon = -tm->tm_mon;
+ tm->tm_year = -tm->tm_year;
+ }
+
+ return 0;
+}
+
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static char *
+AddVerboseIntPart(char *cp, int value, const char *units,
+ bool *is_zero, bool *is_before)
+{
+ if (value == 0)
+ return cp;
+ /* first nonzero value sets is_before */
+ if (*is_zero)
+ {
+ *is_before = (value < 0);
+ value = abs(value);
+ }
+ else if (*is_before)
+ value = -value;
+ sprintf(cp, " %d %s%s", value, units, (value == 1) ? "" : "s");
+ *is_zero = false;
+ return cp + strlen(cp);
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static char *
+AddPostgresIntPart(char *cp, int value, const char *units,
+ bool *is_zero, bool *is_before)
+{
+ if (value == 0)
+ return cp;
+ sprintf(cp, "%s%s%d %s%s",
+ (!*is_zero) ? " " : "",
+ (*is_before && value > 0) ? "+" : "",
+ value,
+ units,
+ (value != 1) ? "s" : "");
+
+ /*
+ * Each nonzero field sets is_before for (only) the next one. This is a
+ * tad bizarre but it's how it worked before...
+ */
+ *is_before = (value < 0);
+ *is_zero = false;
+ return cp + strlen(cp);
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static char *
+AddISO8601IntPart(char *cp, int value, char units)
+{
+ if (value == 0)
+ return cp;
+ sprintf(cp, "%d%c", value, units);
+ return cp + strlen(cp);
+}
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c */
+static void
+AppendSeconds(char *cp, int sec, fsec_t fsec, int precision, bool fillzeros)
+{
+ if (fsec == 0)
+ {
+ if (fillzeros)
+ sprintf(cp, "%02d", abs(sec));
+ else
+ sprintf(cp, "%d", abs(sec));
+ }
+ else
+ {
+ if (fillzeros)
+ sprintf(cp, "%02d.%0*d", abs(sec), precision, (int) Abs(fsec));
+ else
+ sprintf(cp, "%d.%0*d", abs(sec), precision, (int) Abs(fsec));
+ TrimTrailingZeros(cp);
+ }
+}
+
+
+/* copy&pasted from .../src/backend/utils/adt/datetime.c
+ *
+ * Change pg_tm to tm
+ */
+
+void
+EncodeInterval(struct /* pg_ */ tm *tm, fsec_t fsec, int style, char *str)
+{
+ char *cp = str;
+ int year = tm->tm_year;
+ int mon = tm->tm_mon;
+ int mday = tm->tm_mday;
+ int hour = tm->tm_hour;
+ int min = tm->tm_min;
+ int sec = tm->tm_sec;
+ bool is_before = false;
+ bool is_zero = true;
+
+ /*
+ * The sign of year and month are guaranteed to match, since they are
+ * stored internally as "month". But we'll need to check for is_before and
+ * is_zero when determining the signs of day and hour/minute/seconds
+ * fields.
+ */
+ switch (style)
+ {
+ /* SQL Standard interval format */
+ case INTSTYLE_SQL_STANDARD:
+ {
+ bool has_negative = year < 0 || mon < 0 ||
+ mday < 0 || hour < 0 ||
+ min < 0 || sec < 0 || fsec < 0;
+ bool has_positive = year > 0 || mon > 0 ||
+ mday > 0 || hour > 0 ||
+ min > 0 || sec > 0 || fsec > 0;
+ bool has_year_month = year != 0 || mon != 0;
+ bool has_day_time = mday != 0 || hour != 0 ||
+ min != 0 || sec != 0 || fsec != 0;
+ bool has_day = mday != 0;
+ bool sql_standard_value = !(has_negative && has_positive) &&
+ !(has_year_month && has_day_time);
+
+ /*
+ * SQL Standard wants only 1 "<sign>" preceding the whole
+ * interval ... but can't do that if mixed signs.
+ */
+ if (has_negative && sql_standard_value)
+ {
+ *cp++ = '-';
+ year = -year;
+ mon = -mon;
+ mday = -mday;
+ hour = -hour;
+ min = -min;
+ sec = -sec;
+ fsec = -fsec;
+ }
+
+ if (!has_negative && !has_positive)
+ {
+ sprintf(cp, "0");
+ }
+ else if (!sql_standard_value)
+ {
+ /*
+ * For non sql-standard interval values, force outputting
+ * the signs to avoid ambiguities with intervals with
+ * mixed sign components.
+ */
+ char year_sign = (year < 0 || mon < 0) ? '-' : '+';
+ char day_sign = (mday < 0) ? '-' : '+';
+ char sec_sign = (hour < 0 || min < 0 ||
+ sec < 0 || fsec < 0) ? '-' : '+';
+
+ sprintf(cp, "%c%d-%d %c%d %c%d:%02d:",
+ year_sign, abs(year), abs(mon),
+ day_sign, abs(mday),
+ sec_sign, abs(hour), abs(min));
+ cp += strlen(cp);
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
+ }
+ else if (has_year_month)
+ {
+ sprintf(cp, "%d-%d", year, mon);
+ }
+ else if (has_day)
+ {
+ sprintf(cp, "%d %d:%02d:", mday, hour, min);
+ cp += strlen(cp);
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
+ }
+ else
+ {
+ sprintf(cp, "%d:%02d:", hour, min);
+ cp += strlen(cp);
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
+ }
+ }
+ break;
+
+ /* ISO 8601 "time-intervals by duration only" */
+ case INTSTYLE_ISO_8601:
+ /* special-case zero to avoid printing nothing */
+ if (year == 0 && mon == 0 && mday == 0 &&
+ hour == 0 && min == 0 && sec == 0 && fsec == 0)
+ {
+ sprintf(cp, "PT0S");
+ break;
+ }
+ *cp++ = 'P';
+ cp = AddISO8601IntPart(cp, year, 'Y');
+ cp = AddISO8601IntPart(cp, mon, 'M');
+ cp = AddISO8601IntPart(cp, mday, 'D');
+ if (hour != 0 || min != 0 || sec != 0 || fsec != 0)
+ *cp++ = 'T';
+ cp = AddISO8601IntPart(cp, hour, 'H');
+ cp = AddISO8601IntPart(cp, min, 'M');
+ if (sec != 0 || fsec != 0)
+ {
+ if (sec < 0 || fsec < 0)
+ *cp++ = '-';
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, false);
+ cp += strlen(cp);
+ *cp++ = 'S';
+ *cp = '\0';
+ }
+ break;
+
+ /* Compatible with postgresql < 8.4 when DateStyle = 'iso' */
+ case INTSTYLE_POSTGRES:
+ cp = AddPostgresIntPart(cp, year, "year", &is_zero, &is_before);
+ cp = AddPostgresIntPart(cp, mon, "mon", &is_zero, &is_before);
+ cp = AddPostgresIntPart(cp, mday, "day", &is_zero, &is_before);
+ if (is_zero || hour != 0 || min != 0 || sec != 0 || fsec != 0)
+ {
+ bool minus = (hour < 0 || min < 0 || sec < 0 || fsec < 0);
+
+ sprintf(cp, "%s%s%02d:%02d:",
+ is_zero ? "" : " ",
+ (minus ? "-" : (is_before ? "+" : "")),
+ abs(hour), abs(min));
+ cp += strlen(cp);
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
+ }
+ break;
+
+ /* Compatible with postgresql < 8.4 when DateStyle != 'iso' */
+ case INTSTYLE_POSTGRES_VERBOSE:
+ default:
+ strcpy(cp, "@");
+ cp++;
+ cp = AddVerboseIntPart(cp, year, "year", &is_zero, &is_before);
+ cp = AddVerboseIntPart(cp, mon, "mon", &is_zero, &is_before);
+ cp = AddVerboseIntPart(cp, mday, "day", &is_zero, &is_before);
+ cp = AddVerboseIntPart(cp, hour, "hour", &is_zero, &is_before);
+ cp = AddVerboseIntPart(cp, min, "min", &is_zero, &is_before);
+ if (sec != 0 || fsec != 0)
+ {
+ *cp++ = ' ';
+ if (sec < 0 || (sec == 0 && fsec < 0))
+ {
+ if (is_zero)
+ is_before = true;
+ else if (!is_before)
+ *cp++ = '-';
+ }
+ else if (is_before)
+ *cp++ = '-';
+ AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, false);
+ cp += strlen(cp);
+ /* We output "ago", not negatives, so use abs(). */
+ sprintf(cp, " sec%s",
+ (abs(sec) != 1 || fsec != 0) ? "s" : "");
+ is_zero = false;
+ }
+ /* identically zero? then put in a unitless zero... */
+ if (is_zero)
+ strcat(cp, " 0");
+ if (is_before)
+ strcat(cp, " ago");
+ break;
+ }
+}
+
+
+/* interval2tm()
+ * Convert an interval data type to a tm structure.
+ */
+static int
+interval2tm(interval span, struct tm *tm, fsec_t *fsec)
+{
+ int64 time;
+
+ if (span.month != 0)
+ {
+ tm->tm_year = span.month / MONTHS_PER_YEAR;
+ tm->tm_mon = span.month % MONTHS_PER_YEAR;
+
+ }
+ else
+ {
+ tm->tm_year = 0;
+ tm->tm_mon = 0;
+ }
+
+ time = span.time;
+
+ tm->tm_mday = time / USECS_PER_DAY;
+ time -= tm->tm_mday * USECS_PER_DAY;
+ tm->tm_hour = time / USECS_PER_HOUR;
+ time -= tm->tm_hour * USECS_PER_HOUR;
+ tm->tm_min = time / USECS_PER_MINUTE;
+ time -= tm->tm_min * USECS_PER_MINUTE;
+ tm->tm_sec = time / USECS_PER_SEC;
+ *fsec = time - (tm->tm_sec * USECS_PER_SEC);
+
+ return 0;
+} /* interval2tm() */
+
+static int
+tm2interval(struct tm *tm, fsec_t fsec, interval * span)
+{
+ if ((double) tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon > INT_MAX ||
+ (double) tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon < INT_MIN)
+ return -1;
+ span->month = tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon;
+ span->time = (((((((tm->tm_mday * INT64CONST(24)) +
+ tm->tm_hour) * INT64CONST(60)) +
+ tm->tm_min) * INT64CONST(60)) +
+ tm->tm_sec) * USECS_PER_SEC) + fsec;
+
+ return 0;
+} /* tm2interval() */
+
+interval *
+PGTYPESinterval_new(void)
+{
+ interval *result;
+
+ result = (interval *) pgtypes_alloc(sizeof(interval));
+ /* result can be NULL if we run out of memory */
+ return result;
+}
+
+void
+PGTYPESinterval_free(interval * intvl)
+{
+ free(intvl);
+}
+
+interval *
+PGTYPESinterval_from_asc(char *str, char **endptr)
+{
+ interval *result = NULL;
+ fsec_t fsec;
+ struct tm tt,
+ *tm = &tt;
+ int dtype;
+ int nf;
+ char *field[MAXDATEFIELDS];
+ int ftype[MAXDATEFIELDS];
+ char lowstr[MAXDATELEN + MAXDATEFIELDS];
+ char *realptr;
+ char **ptr = (endptr != NULL) ? endptr : &realptr;
+
+ tm->tm_year = 0;
+ tm->tm_mon = 0;
+ tm->tm_mday = 0;
+ tm->tm_hour = 0;
+ tm->tm_min = 0;
+ tm->tm_sec = 0;
+ fsec = 0;
+
+ if (strlen(str) > MAXDATELEN)
+ {
+ errno = PGTYPES_INTVL_BAD_INTERVAL;
+ return NULL;
+ }
+
+ if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
+ (DecodeInterval(field, ftype, nf, &dtype, tm, &fsec) != 0 &&
+ DecodeISO8601Interval(str, &dtype, tm, &fsec) != 0))
+ {
+ errno = PGTYPES_INTVL_BAD_INTERVAL;
+ return NULL;
+ }
+
+ result = (interval *) pgtypes_alloc(sizeof(interval));
+ if (!result)
+ return NULL;
+
+ if (dtype != DTK_DELTA)
+ {
+ errno = PGTYPES_INTVL_BAD_INTERVAL;
+ free(result);
+ return NULL;
+ }
+
+ if (tm2interval(tm, fsec, result) != 0)
+ {
+ errno = PGTYPES_INTVL_BAD_INTERVAL;
+ free(result);
+ return NULL;
+ }
+
+ errno = 0;
+ return result;
+}
+
+char *
+PGTYPESinterval_to_asc(interval * span)
+{
+ struct tm tt,
+ *tm = &tt;
+ fsec_t fsec;
+ char buf[MAXDATELEN + 1];
+ int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE;
+
+ if (interval2tm(*span, tm, &fsec) != 0)
+ {
+ errno = PGTYPES_INTVL_BAD_INTERVAL;
+ return NULL;
+ }
+
+ EncodeInterval(tm, fsec, IntervalStyle, buf);
+
+ return pgtypes_strdup(buf);
+}
+
+int
+PGTYPESinterval_copy(interval * intvlsrc, interval * intvldest)
+{
+ intvldest->time = intvlsrc->time;
+ intvldest->month = intvlsrc->month;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
new file mode 100644
index 0000000..dbe4eb2
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -0,0 +1,1594 @@
+/* src/interfaces/ecpg/pgtypeslib/numeric.c */
+
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <float.h>
+#include <limits.h>
+
+#include "pgtypes_error.h"
+#include "pgtypes_numeric.h"
+#include "pgtypeslib_extern.h"
+
+#define Max(x, y) ((x) > (y) ? (x) : (y))
+#define Min(x, y) ((x) < (y) ? (x) : (y))
+
+#define init_var(v) memset(v,0,sizeof(numeric))
+
+#define digitbuf_alloc(size) ((NumericDigit *) pgtypes_alloc(size))
+#define digitbuf_free(buf) \
+ do { \
+ if ((buf) != NULL) \
+ free(buf); \
+ } while (0)
+
+
+/* ----------
+ * alloc_var() -
+ *
+ * Allocate a digit buffer of ndigits digits (plus a spare digit for rounding)
+ * ----------
+ */
+static int
+alloc_var(numeric *var, int ndigits)
+{
+ digitbuf_free(var->buf);
+ var->buf = digitbuf_alloc(ndigits + 1);
+ if (var->buf == NULL)
+ return -1;
+ var->buf[0] = 0;
+ var->digits = var->buf + 1;
+ var->ndigits = ndigits;
+ return 0;
+}
+
+numeric *
+PGTYPESnumeric_new(void)
+{
+ numeric *var;
+
+ if ((var = (numeric *) pgtypes_alloc(sizeof(numeric))) == NULL)
+ return NULL;
+
+ if (alloc_var(var, 0) < 0)
+ {
+ free(var);
+ return NULL;
+ }
+
+ return var;
+}
+
+decimal *
+PGTYPESdecimal_new(void)
+{
+ decimal *var;
+
+ if ((var = (decimal *) pgtypes_alloc(sizeof(decimal))) == NULL)
+ return NULL;
+
+ memset(var, 0, sizeof(decimal));
+
+ return var;
+}
+
+/* ----------
+ * set_var_from_str()
+ *
+ * Parse a string and put the number into a variable
+ * ----------
+ */
+static int
+set_var_from_str(char *str, char **ptr, numeric *dest)
+{
+ bool have_dp = false;
+ int i = 0;
+
+ errno = 0;
+ *ptr = str;
+ while (*(*ptr))
+ {
+ if (!isspace((unsigned char) *(*ptr)))
+ break;
+ (*ptr)++;
+ }
+
+ if (pg_strncasecmp(*ptr, "NaN", 3) == 0)
+ {
+ *ptr += 3;
+ dest->sign = NUMERIC_NAN;
+
+ /* Should be nothing left but spaces */
+ while (*(*ptr))
+ {
+ if (!isspace((unsigned char) *(*ptr)))
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ (*ptr)++;
+ }
+
+ return 0;
+ }
+
+ if (alloc_var(dest, strlen((*ptr))) < 0)
+ return -1;
+ dest->weight = -1;
+ dest->dscale = 0;
+ dest->sign = NUMERIC_POS;
+
+ switch (*(*ptr))
+ {
+ case '+':
+ dest->sign = NUMERIC_POS;
+ (*ptr)++;
+ break;
+
+ case '-':
+ dest->sign = NUMERIC_NEG;
+ (*ptr)++;
+ break;
+ }
+
+ if (*(*ptr) == '.')
+ {
+ have_dp = true;
+ (*ptr)++;
+ }
+
+ if (!isdigit((unsigned char) *(*ptr)))
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+
+ while (*(*ptr))
+ {
+ if (isdigit((unsigned char) *(*ptr)))
+ {
+ dest->digits[i++] = *(*ptr)++ - '0';
+ if (!have_dp)
+ dest->weight++;
+ else
+ dest->dscale++;
+ }
+ else if (*(*ptr) == '.')
+ {
+ if (have_dp)
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ have_dp = true;
+ (*ptr)++;
+ }
+ else
+ break;
+ }
+ dest->ndigits = i;
+
+ /* Handle exponent, if any */
+ if (*(*ptr) == 'e' || *(*ptr) == 'E')
+ {
+ long exponent;
+ char *endptr;
+
+ (*ptr)++;
+ exponent = strtol(*ptr, &endptr, 10);
+ if (endptr == (*ptr))
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ (*ptr) = endptr;
+ if (exponent >= INT_MAX / 2 || exponent <= -(INT_MAX / 2))
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ dest->weight += (int) exponent;
+ dest->dscale -= (int) exponent;
+ if (dest->dscale < 0)
+ dest->dscale = 0;
+ }
+
+ /* Should be nothing left but spaces */
+ while (*(*ptr))
+ {
+ if (!isspace((unsigned char) *(*ptr)))
+ {
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ (*ptr)++;
+ }
+
+ /* Strip any leading zeroes */
+ while (dest->ndigits > 0 && *(dest->digits) == 0)
+ {
+ (dest->digits)++;
+ (dest->weight)--;
+ (dest->ndigits)--;
+ }
+ if (dest->ndigits == 0)
+ dest->weight = 0;
+
+ dest->rscale = dest->dscale;
+ return 0;
+}
+
+
+/* ----------
+ * get_str_from_var() -
+ *
+ * Convert a var to text representation (guts of numeric_out).
+ * CAUTION: var's contents may be modified by rounding!
+ * ----------
+ */
+static char *
+get_str_from_var(numeric *var, int dscale)
+{
+ char *str;
+ char *cp;
+ int i;
+ int d;
+
+ if (var->sign == NUMERIC_NAN)
+ {
+ str = (char *) pgtypes_alloc(4);
+ if (str == NULL)
+ return NULL;
+ sprintf(str, "NaN");
+ return str;
+ }
+
+ /*
+ * Check if we must round up before printing the value and do so.
+ */
+ i = dscale + var->weight + 1;
+ if (i >= 0 && var->ndigits > i)
+ {
+ int carry = (var->digits[i] > 4) ? 1 : 0;
+
+ var->ndigits = i;
+
+ while (carry)
+ {
+ carry += var->digits[--i];
+ var->digits[i] = carry % 10;
+ carry /= 10;
+ }
+
+ if (i < 0)
+ {
+ var->digits--;
+ var->ndigits++;
+ var->weight++;
+ }
+ }
+ else
+ var->ndigits = Max(0, Min(i, var->ndigits));
+
+ /*
+ * Allocate space for the result
+ */
+ if ((str = (char *) pgtypes_alloc(Max(0, dscale) + Max(0, var->weight) + 4)) == NULL)
+ return NULL;
+ cp = str;
+
+ /*
+ * Output a dash for negative values
+ */
+ if (var->sign == NUMERIC_NEG)
+ *cp++ = '-';
+
+ /*
+ * Output all digits before the decimal point
+ */
+ i = Max(var->weight, 0);
+ d = 0;
+
+ while (i >= 0)
+ {
+ if (i <= var->weight && d < var->ndigits)
+ *cp++ = var->digits[d++] + '0';
+ else
+ *cp++ = '0';
+ i--;
+ }
+
+ /*
+ * If requested, output a decimal point and all the digits that follow it.
+ */
+ if (dscale > 0)
+ {
+ *cp++ = '.';
+ while (i >= -dscale)
+ {
+ if (i <= var->weight && d < var->ndigits)
+ *cp++ = var->digits[d++] + '0';
+ else
+ *cp++ = '0';
+ i--;
+ }
+ }
+
+ /*
+ * terminate the string and return it
+ */
+ *cp = '\0';
+ return str;
+}
+
+numeric *
+PGTYPESnumeric_from_asc(char *str, char **endptr)
+{
+ numeric *value = (numeric *) pgtypes_alloc(sizeof(numeric));
+ int ret;
+
+ char *realptr;
+ char **ptr = (endptr != NULL) ? endptr : &realptr;
+
+ if (!value)
+ return NULL;
+
+ ret = set_var_from_str(str, ptr, value);
+ if (ret)
+ {
+ PGTYPESnumeric_free(value);
+ return NULL;
+ }
+
+ return value;
+}
+
+char *
+PGTYPESnumeric_to_asc(numeric *num, int dscale)
+{
+ numeric *numcopy = PGTYPESnumeric_new();
+ char *s;
+
+ if (numcopy == NULL)
+ return NULL;
+
+ if (PGTYPESnumeric_copy(num, numcopy) < 0)
+ {
+ PGTYPESnumeric_free(numcopy);
+ return NULL;
+ }
+
+ if (dscale < 0)
+ dscale = num->dscale;
+
+ /* get_str_from_var may change its argument */
+ s = get_str_from_var(numcopy, dscale);
+ PGTYPESnumeric_free(numcopy);
+ return s;
+}
+
+/* ----------
+ * zero_var() -
+ *
+ * Set a variable to ZERO.
+ * Note: rscale and dscale are not touched.
+ * ----------
+ */
+static void
+zero_var(numeric *var)
+{
+ digitbuf_free(var->buf);
+ var->buf = NULL;
+ var->digits = NULL;
+ var->ndigits = 0;
+ var->weight = 0; /* by convention; doesn't really matter */
+ var->sign = NUMERIC_POS; /* anything but NAN... */
+}
+
+void
+PGTYPESnumeric_free(numeric *var)
+{
+ digitbuf_free(var->buf);
+ free(var);
+}
+
+void
+PGTYPESdecimal_free(decimal *var)
+{
+ free(var);
+}
+
+/* ----------
+ * cmp_abs() -
+ *
+ * Compare the absolute values of var1 and var2
+ * Returns: -1 for ABS(var1) < ABS(var2)
+ * 0 for ABS(var1) == ABS(var2)
+ * 1 for ABS(var1) > ABS(var2)
+ * ----------
+ */
+static int
+cmp_abs(numeric *var1, numeric *var2)
+{
+ int i1 = 0;
+ int i2 = 0;
+ int w1 = var1->weight;
+ int w2 = var2->weight;
+ int stat;
+
+ while (w1 > w2 && i1 < var1->ndigits)
+ {
+ if (var1->digits[i1++] != 0)
+ return 1;
+ w1--;
+ }
+ while (w2 > w1 && i2 < var2->ndigits)
+ {
+ if (var2->digits[i2++] != 0)
+ return -1;
+ w2--;
+ }
+
+ if (w1 == w2)
+ {
+ while (i1 < var1->ndigits && i2 < var2->ndigits)
+ {
+ stat = var1->digits[i1++] - var2->digits[i2++];
+ if (stat)
+ {
+ if (stat > 0)
+ return 1;
+ return -1;
+ }
+ }
+ }
+
+ while (i1 < var1->ndigits)
+ {
+ if (var1->digits[i1++] != 0)
+ return 1;
+ }
+ while (i2 < var2->ndigits)
+ {
+ if (var2->digits[i2++] != 0)
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/* ----------
+ * add_abs() -
+ *
+ * Add the absolute values of two variables into result.
+ * result might point to one of the operands without danger.
+ * ----------
+ */
+static int
+add_abs(numeric *var1, numeric *var2, numeric *result)
+{
+ NumericDigit *res_buf;
+ NumericDigit *res_digits;
+ int res_ndigits;
+ int res_weight;
+ int res_rscale;
+ int res_dscale;
+ int i,
+ i1,
+ i2;
+ int carry = 0;
+
+ /* copy these values into local vars for speed in inner loop */
+ int var1ndigits = var1->ndigits;
+ int var2ndigits = var2->ndigits;
+ NumericDigit *var1digits = var1->digits;
+ NumericDigit *var2digits = var2->digits;
+
+ res_weight = Max(var1->weight, var2->weight) + 1;
+ res_rscale = Max(var1->rscale, var2->rscale);
+ res_dscale = Max(var1->dscale, var2->dscale);
+ res_ndigits = res_rscale + res_weight + 1;
+ if (res_ndigits <= 0)
+ res_ndigits = 1;
+
+ if ((res_buf = digitbuf_alloc(res_ndigits)) == NULL)
+ return -1;
+ res_digits = res_buf;
+
+ i1 = res_rscale + var1->weight + 1;
+ i2 = res_rscale + var2->weight + 1;
+ for (i = res_ndigits - 1; i >= 0; i--)
+ {
+ i1--;
+ i2--;
+ if (i1 >= 0 && i1 < var1ndigits)
+ carry += var1digits[i1];
+ if (i2 >= 0 && i2 < var2ndigits)
+ carry += var2digits[i2];
+
+ if (carry >= 10)
+ {
+ res_digits[i] = carry - 10;
+ carry = 1;
+ }
+ else
+ {
+ res_digits[i] = carry;
+ carry = 0;
+ }
+ }
+
+ while (res_ndigits > 0 && *res_digits == 0)
+ {
+ res_digits++;
+ res_weight--;
+ res_ndigits--;
+ }
+ while (res_ndigits > 0 && res_digits[res_ndigits - 1] == 0)
+ res_ndigits--;
+
+ if (res_ndigits == 0)
+ res_weight = 0;
+
+ digitbuf_free(result->buf);
+ result->ndigits = res_ndigits;
+ result->buf = res_buf;
+ result->digits = res_digits;
+ result->weight = res_weight;
+ result->rscale = res_rscale;
+ result->dscale = res_dscale;
+
+ return 0;
+}
+
+
+/* ----------
+ * sub_abs() -
+ *
+ * Subtract the absolute value of var2 from the absolute value of var1
+ * and store in result. result might point to one of the operands
+ * without danger.
+ *
+ * ABS(var1) MUST BE GREATER OR EQUAL ABS(var2) !!!
+ * ----------
+ */
+static int
+sub_abs(numeric *var1, numeric *var2, numeric *result)
+{
+ NumericDigit *res_buf;
+ NumericDigit *res_digits;
+ int res_ndigits;
+ int res_weight;
+ int res_rscale;
+ int res_dscale;
+ int i,
+ i1,
+ i2;
+ int borrow = 0;
+
+ /* copy these values into local vars for speed in inner loop */
+ int var1ndigits = var1->ndigits;
+ int var2ndigits = var2->ndigits;
+ NumericDigit *var1digits = var1->digits;
+ NumericDigit *var2digits = var2->digits;
+
+ res_weight = var1->weight;
+ res_rscale = Max(var1->rscale, var2->rscale);
+ res_dscale = Max(var1->dscale, var2->dscale);
+ res_ndigits = res_rscale + res_weight + 1;
+ if (res_ndigits <= 0)
+ res_ndigits = 1;
+
+ if ((res_buf = digitbuf_alloc(res_ndigits)) == NULL)
+ return -1;
+ res_digits = res_buf;
+
+ i1 = res_rscale + var1->weight + 1;
+ i2 = res_rscale + var2->weight + 1;
+ for (i = res_ndigits - 1; i >= 0; i--)
+ {
+ i1--;
+ i2--;
+ if (i1 >= 0 && i1 < var1ndigits)
+ borrow += var1digits[i1];
+ if (i2 >= 0 && i2 < var2ndigits)
+ borrow -= var2digits[i2];
+
+ if (borrow < 0)
+ {
+ res_digits[i] = borrow + 10;
+ borrow = -1;
+ }
+ else
+ {
+ res_digits[i] = borrow;
+ borrow = 0;
+ }
+ }
+
+ while (res_ndigits > 0 && *res_digits == 0)
+ {
+ res_digits++;
+ res_weight--;
+ res_ndigits--;
+ }
+ while (res_ndigits > 0 && res_digits[res_ndigits - 1] == 0)
+ res_ndigits--;
+
+ if (res_ndigits == 0)
+ res_weight = 0;
+
+ digitbuf_free(result->buf);
+ result->ndigits = res_ndigits;
+ result->buf = res_buf;
+ result->digits = res_digits;
+ result->weight = res_weight;
+ result->rscale = res_rscale;
+ result->dscale = res_dscale;
+
+ return 0;
+}
+
+/* ----------
+ * add_var() -
+ *
+ * Full version of add functionality on variable level (handling signs).
+ * result might point to one of the operands too without danger.
+ * ----------
+ */
+int
+PGTYPESnumeric_add(numeric *var1, numeric *var2, numeric *result)
+{
+ /*
+ * Decide on the signs of the two variables what to do
+ */
+ if (var1->sign == NUMERIC_POS)
+ {
+ if (var2->sign == NUMERIC_POS)
+ {
+ /*
+ * Both are positive result = +(ABS(var1) + ABS(var2))
+ */
+ if (add_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ }
+ else
+ {
+ /*
+ * var1 is positive, var2 is negative Must compare absolute values
+ */
+ switch (cmp_abs(var1, var2))
+ {
+ case 0:
+ /* ----------
+ * ABS(var1) == ABS(var2)
+ * result = ZERO
+ * ----------
+ */
+ zero_var(result);
+ result->rscale = Max(var1->rscale, var2->rscale);
+ result->dscale = Max(var1->dscale, var2->dscale);
+ break;
+
+ case 1:
+ /* ----------
+ * ABS(var1) > ABS(var2)
+ * result = +(ABS(var1) - ABS(var2))
+ * ----------
+ */
+ if (sub_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ break;
+
+ case -1:
+ /* ----------
+ * ABS(var1) < ABS(var2)
+ * result = -(ABS(var2) - ABS(var1))
+ * ----------
+ */
+ if (sub_abs(var2, var1, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (var2->sign == NUMERIC_POS)
+ {
+ /* ----------
+ * var1 is negative, var2 is positive
+ * Must compare absolute values
+ * ----------
+ */
+ switch (cmp_abs(var1, var2))
+ {
+ case 0:
+ /* ----------
+ * ABS(var1) == ABS(var2)
+ * result = ZERO
+ * ----------
+ */
+ zero_var(result);
+ result->rscale = Max(var1->rscale, var2->rscale);
+ result->dscale = Max(var1->dscale, var2->dscale);
+ break;
+
+ case 1:
+ /* ----------
+ * ABS(var1) > ABS(var2)
+ * result = -(ABS(var1) - ABS(var2))
+ * ----------
+ */
+ if (sub_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ break;
+
+ case -1:
+ /* ----------
+ * ABS(var1) < ABS(var2)
+ * result = +(ABS(var2) - ABS(var1))
+ * ----------
+ */
+ if (sub_abs(var2, var1, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ break;
+ }
+ }
+ else
+ {
+ /* ----------
+ * Both are negative
+ * result = -(ABS(var1) + ABS(var2))
+ * ----------
+ */
+ if (add_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ }
+ }
+
+ return 0;
+}
+
+
+/* ----------
+ * sub_var() -
+ *
+ * Full version of sub functionality on variable level (handling signs).
+ * result might point to one of the operands too without danger.
+ * ----------
+ */
+int
+PGTYPESnumeric_sub(numeric *var1, numeric *var2, numeric *result)
+{
+ /*
+ * Decide on the signs of the two variables what to do
+ */
+ if (var1->sign == NUMERIC_POS)
+ {
+ if (var2->sign == NUMERIC_NEG)
+ {
+ /* ----------
+ * var1 is positive, var2 is negative
+ * result = +(ABS(var1) + ABS(var2))
+ * ----------
+ */
+ if (add_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ }
+ else
+ {
+ /* ----------
+ * Both are positive
+ * Must compare absolute values
+ * ----------
+ */
+ switch (cmp_abs(var1, var2))
+ {
+ case 0:
+ /* ----------
+ * ABS(var1) == ABS(var2)
+ * result = ZERO
+ * ----------
+ */
+ zero_var(result);
+ result->rscale = Max(var1->rscale, var2->rscale);
+ result->dscale = Max(var1->dscale, var2->dscale);
+ break;
+
+ case 1:
+ /* ----------
+ * ABS(var1) > ABS(var2)
+ * result = +(ABS(var1) - ABS(var2))
+ * ----------
+ */
+ if (sub_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ break;
+
+ case -1:
+ /* ----------
+ * ABS(var1) < ABS(var2)
+ * result = -(ABS(var2) - ABS(var1))
+ * ----------
+ */
+ if (sub_abs(var2, var1, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (var2->sign == NUMERIC_NEG)
+ {
+ /* ----------
+ * Both are negative
+ * Must compare absolute values
+ * ----------
+ */
+ switch (cmp_abs(var1, var2))
+ {
+ case 0:
+ /* ----------
+ * ABS(var1) == ABS(var2)
+ * result = ZERO
+ * ----------
+ */
+ zero_var(result);
+ result->rscale = Max(var1->rscale, var2->rscale);
+ result->dscale = Max(var1->dscale, var2->dscale);
+ break;
+
+ case 1:
+ /* ----------
+ * ABS(var1) > ABS(var2)
+ * result = -(ABS(var1) - ABS(var2))
+ * ----------
+ */
+ if (sub_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ break;
+
+ case -1:
+ /* ----------
+ * ABS(var1) < ABS(var2)
+ * result = +(ABS(var2) - ABS(var1))
+ * ----------
+ */
+ if (sub_abs(var2, var1, result) != 0)
+ return -1;
+ result->sign = NUMERIC_POS;
+ break;
+ }
+ }
+ else
+ {
+ /* ----------
+ * var1 is negative, var2 is positive
+ * result = -(ABS(var1) + ABS(var2))
+ * ----------
+ */
+ if (add_abs(var1, var2, result) != 0)
+ return -1;
+ result->sign = NUMERIC_NEG;
+ }
+ }
+
+ return 0;
+}
+
+/* ----------
+ * mul_var() -
+ *
+ * Multiplication on variable level. Product of var1 * var2 is stored
+ * in result. Accuracy of result is determined by global_rscale.
+ * ----------
+ */
+int
+PGTYPESnumeric_mul(numeric *var1, numeric *var2, numeric *result)
+{
+ NumericDigit *res_buf;
+ NumericDigit *res_digits;
+ int res_ndigits;
+ int res_weight;
+ int res_sign;
+ int i,
+ ri,
+ i1,
+ i2;
+ long sum = 0;
+ int global_rscale = var1->rscale + var2->rscale;
+
+ res_weight = var1->weight + var2->weight + 2;
+ res_ndigits = var1->ndigits + var2->ndigits + 1;
+ if (var1->sign == var2->sign)
+ res_sign = NUMERIC_POS;
+ else
+ res_sign = NUMERIC_NEG;
+
+ if ((res_buf = digitbuf_alloc(res_ndigits)) == NULL)
+ return -1;
+ res_digits = res_buf;
+ memset(res_digits, 0, res_ndigits);
+
+ ri = res_ndigits;
+ for (i1 = var1->ndigits - 1; i1 >= 0; i1--)
+ {
+ sum = 0;
+ i = --ri;
+
+ for (i2 = var2->ndigits - 1; i2 >= 0; i2--)
+ {
+ sum += res_digits[i] + var1->digits[i1] * var2->digits[i2];
+ res_digits[i--] = sum % 10;
+ sum /= 10;
+ }
+ res_digits[i] = sum;
+ }
+
+ i = res_weight + global_rscale + 2;
+ if (i >= 0 && i < res_ndigits)
+ {
+ sum = (res_digits[i] > 4) ? 1 : 0;
+ res_ndigits = i;
+ i--;
+ while (sum)
+ {
+ sum += res_digits[i];
+ res_digits[i--] = sum % 10;
+ sum /= 10;
+ }
+ }
+
+ while (res_ndigits > 0 && *res_digits == 0)
+ {
+ res_digits++;
+ res_weight--;
+ res_ndigits--;
+ }
+ while (res_ndigits > 0 && res_digits[res_ndigits - 1] == 0)
+ res_ndigits--;
+
+ if (res_ndigits == 0)
+ {
+ res_sign = NUMERIC_POS;
+ res_weight = 0;
+ }
+
+ digitbuf_free(result->buf);
+ result->buf = res_buf;
+ result->digits = res_digits;
+ result->ndigits = res_ndigits;
+ result->weight = res_weight;
+ result->rscale = global_rscale;
+ result->sign = res_sign;
+ result->dscale = var1->dscale + var2->dscale;
+
+ return 0;
+}
+
+/*
+ * Default scale selection for division
+ *
+ * Returns the appropriate display scale for the division result,
+ * and sets global_rscale to the result scale to use during div_var.
+ *
+ * Note that this must be called before div_var.
+ */
+static int
+select_div_scale(numeric *var1, numeric *var2, int *rscale)
+{
+ int weight1,
+ weight2,
+ qweight,
+ i;
+ NumericDigit firstdigit1,
+ firstdigit2;
+ int res_dscale;
+
+ /*
+ * The result scale of a division isn't specified in any SQL standard. For
+ * PostgreSQL we select a display scale that will give at least
+ * NUMERIC_MIN_SIG_DIGITS significant digits, so that numeric gives a
+ * result no less accurate than float8; but use a scale not less than
+ * either input's display scale.
+ */
+
+ /* Get the actual (normalized) weight and first digit of each input */
+
+ weight1 = 0; /* values to use if var1 is zero */
+ firstdigit1 = 0;
+ for (i = 0; i < var1->ndigits; i++)
+ {
+ firstdigit1 = var1->digits[i];
+ if (firstdigit1 != 0)
+ {
+ weight1 = var1->weight - i;
+ break;
+ }
+ }
+
+ weight2 = 0; /* values to use if var2 is zero */
+ firstdigit2 = 0;
+ for (i = 0; i < var2->ndigits; i++)
+ {
+ firstdigit2 = var2->digits[i];
+ if (firstdigit2 != 0)
+ {
+ weight2 = var2->weight - i;
+ break;
+ }
+ }
+
+ /*
+ * Estimate weight of quotient. If the two first digits are equal, we
+ * can't be sure, but assume that var1 is less than var2.
+ */
+ qweight = weight1 - weight2;
+ if (firstdigit1 <= firstdigit2)
+ qweight--;
+
+ /* Select display scale */
+ res_dscale = NUMERIC_MIN_SIG_DIGITS - qweight;
+ res_dscale = Max(res_dscale, var1->dscale);
+ res_dscale = Max(res_dscale, var2->dscale);
+ res_dscale = Max(res_dscale, NUMERIC_MIN_DISPLAY_SCALE);
+ res_dscale = Min(res_dscale, NUMERIC_MAX_DISPLAY_SCALE);
+
+ /* Select result scale */
+ *rscale = res_dscale + 4;
+
+ return res_dscale;
+}
+
+int
+PGTYPESnumeric_div(numeric *var1, numeric *var2, numeric *result)
+{
+ NumericDigit *res_digits;
+ int res_ndigits;
+ int res_sign;
+ int res_weight;
+ numeric dividend;
+ numeric divisor[10];
+ int ndigits_tmp;
+ int weight_tmp;
+ int rscale_tmp;
+ int ri;
+ int i;
+ long guess;
+ long first_have;
+ long first_div;
+ int first_nextdigit;
+ int stat = 0;
+ int rscale;
+ int res_dscale = select_div_scale(var1, var2, &rscale);
+ int err = -1;
+ NumericDigit *tmp_buf;
+
+ /*
+ * First of all division by zero check
+ */
+ ndigits_tmp = var2->ndigits + 1;
+ if (ndigits_tmp == 1)
+ {
+ errno = PGTYPES_NUM_DIVIDE_ZERO;
+ return -1;
+ }
+
+ /*
+ * Determine the result sign, weight and number of digits to calculate
+ */
+ if (var1->sign == var2->sign)
+ res_sign = NUMERIC_POS;
+ else
+ res_sign = NUMERIC_NEG;
+ res_weight = var1->weight - var2->weight + 1;
+ res_ndigits = rscale + res_weight;
+ if (res_ndigits <= 0)
+ res_ndigits = 1;
+
+ /*
+ * Now result zero check
+ */
+ if (var1->ndigits == 0)
+ {
+ zero_var(result);
+ result->rscale = rscale;
+ return 0;
+ }
+
+ /*
+ * Initialize local variables
+ */
+ init_var(&dividend);
+ for (i = 1; i < 10; i++)
+ init_var(&divisor[i]);
+
+ /*
+ * Make a copy of the divisor which has one leading zero digit
+ */
+ divisor[1].ndigits = ndigits_tmp;
+ divisor[1].rscale = var2->ndigits;
+ divisor[1].sign = NUMERIC_POS;
+ divisor[1].buf = digitbuf_alloc(ndigits_tmp);
+ if (divisor[1].buf == NULL)
+ goto done;
+ divisor[1].digits = divisor[1].buf;
+ divisor[1].digits[0] = 0;
+ memcpy(&(divisor[1].digits[1]), var2->digits, ndigits_tmp - 1);
+
+ /*
+ * Make a copy of the dividend
+ */
+ dividend.ndigits = var1->ndigits;
+ dividend.weight = 0;
+ dividend.rscale = var1->ndigits;
+ dividend.sign = NUMERIC_POS;
+ dividend.buf = digitbuf_alloc(var1->ndigits);
+ if (dividend.buf == NULL)
+ goto done;
+ dividend.digits = dividend.buf;
+ memcpy(dividend.digits, var1->digits, var1->ndigits);
+
+ /*
+ * Setup the result. Do the allocation in a temporary buffer first, so we
+ * don't free result->buf unless we have successfully allocated a buffer
+ * to replace it with.
+ */
+ tmp_buf = digitbuf_alloc(res_ndigits + 2);
+ if (tmp_buf == NULL)
+ goto done;
+ digitbuf_free(result->buf);
+ result->buf = tmp_buf;
+ res_digits = result->buf;
+ result->digits = res_digits;
+ result->ndigits = res_ndigits;
+ result->weight = res_weight;
+ result->rscale = rscale;
+ result->sign = res_sign;
+ res_digits[0] = 0;
+
+ first_div = divisor[1].digits[1] * 10;
+ if (ndigits_tmp > 2)
+ first_div += divisor[1].digits[2];
+
+ first_have = 0;
+ first_nextdigit = 0;
+
+ weight_tmp = 1;
+ rscale_tmp = divisor[1].rscale;
+
+ for (ri = 0; ri <= res_ndigits; ri++)
+ {
+ first_have = first_have * 10;
+ if (first_nextdigit >= 0 && first_nextdigit < dividend.ndigits)
+ first_have += dividend.digits[first_nextdigit];
+ first_nextdigit++;
+
+ guess = (first_have * 10) / first_div + 1;
+ if (guess > 9)
+ guess = 9;
+
+ while (guess > 0)
+ {
+ if (divisor[guess].buf == NULL)
+ {
+ int i;
+ long sum = 0;
+
+ memcpy(&divisor[guess], &divisor[1], sizeof(numeric));
+ divisor[guess].buf = digitbuf_alloc(divisor[guess].ndigits);
+ if (divisor[guess].buf == NULL)
+ goto done;
+ divisor[guess].digits = divisor[guess].buf;
+ for (i = divisor[1].ndigits - 1; i >= 0; i--)
+ {
+ sum += divisor[1].digits[i] * guess;
+ divisor[guess].digits[i] = sum % 10;
+ sum /= 10;
+ }
+ }
+
+ divisor[guess].weight = weight_tmp;
+ divisor[guess].rscale = rscale_tmp;
+
+ stat = cmp_abs(&dividend, &divisor[guess]);
+ if (stat >= 0)
+ break;
+
+ guess--;
+ }
+
+ res_digits[ri + 1] = guess;
+ if (stat == 0)
+ {
+ ri++;
+ break;
+ }
+
+ weight_tmp--;
+ rscale_tmp++;
+
+ if (guess == 0)
+ continue;
+
+ if (sub_abs(&dividend, &divisor[guess], &dividend) != 0)
+ goto done;
+
+ first_nextdigit = dividend.weight - weight_tmp;
+ first_have = 0;
+ if (first_nextdigit >= 0 && first_nextdigit < dividend.ndigits)
+ first_have = dividend.digits[first_nextdigit];
+ first_nextdigit++;
+ }
+
+ result->ndigits = ri + 1;
+ if (ri == res_ndigits + 1)
+ {
+ int carry = (res_digits[ri] > 4) ? 1 : 0;
+
+ result->ndigits = ri;
+ res_digits[ri] = 0;
+
+ while (carry && ri > 0)
+ {
+ carry += res_digits[--ri];
+ res_digits[ri] = carry % 10;
+ carry /= 10;
+ }
+ }
+
+ while (result->ndigits > 0 && *(result->digits) == 0)
+ {
+ (result->digits)++;
+ (result->weight)--;
+ (result->ndigits)--;
+ }
+ while (result->ndigits > 0 && result->digits[result->ndigits - 1] == 0)
+ (result->ndigits)--;
+ if (result->ndigits == 0)
+ result->sign = NUMERIC_POS;
+
+ result->dscale = res_dscale;
+ err = 0; /* if we've made it this far, return success */
+
+done:
+
+ /*
+ * Tidy up
+ */
+ if (dividend.buf != NULL)
+ digitbuf_free(dividend.buf);
+
+ for (i = 1; i < 10; i++)
+ {
+ if (divisor[i].buf != NULL)
+ digitbuf_free(divisor[i].buf);
+ }
+
+ return err;
+}
+
+
+int
+PGTYPESnumeric_cmp(numeric *var1, numeric *var2)
+{
+ /* use cmp_abs function to calculate the result */
+
+ /* both are positive: normal comparison with cmp_abs */
+ if (var1->sign == NUMERIC_POS && var2->sign == NUMERIC_POS)
+ return cmp_abs(var1, var2);
+
+ /* both are negative: return the inverse of the normal comparison */
+ if (var1->sign == NUMERIC_NEG && var2->sign == NUMERIC_NEG)
+ {
+ /*
+ * instead of inverting the result, we invert the parameter ordering
+ */
+ return cmp_abs(var2, var1);
+ }
+
+ /* one is positive, one is negative: trivial */
+ if (var1->sign == NUMERIC_POS && var2->sign == NUMERIC_NEG)
+ return 1;
+ if (var1->sign == NUMERIC_NEG && var2->sign == NUMERIC_POS)
+ return -1;
+
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return INT_MAX;
+
+}
+
+int
+PGTYPESnumeric_from_int(signed int int_val, numeric *var)
+{
+ /* implicit conversion */
+ signed long int long_int = int_val;
+
+ return PGTYPESnumeric_from_long(long_int, var);
+}
+
+int
+PGTYPESnumeric_from_long(signed long int long_val, numeric *var)
+{
+ /* calculate the size of the long int number */
+ /* a number n needs log_10 n digits */
+
+ /*
+ * however we multiply by 10 each time and compare instead of calculating
+ * the logarithm
+ */
+
+ int size = 0;
+ int i;
+ signed long int abs_long_val = long_val;
+ signed long int extract;
+ signed long int reach_limit;
+
+ if (abs_long_val < 0)
+ {
+ abs_long_val *= -1;
+ var->sign = NUMERIC_NEG;
+ }
+ else
+ var->sign = NUMERIC_POS;
+
+ reach_limit = 1;
+ do
+ {
+ size++;
+ reach_limit *= 10;
+ } while (reach_limit - 1 < abs_long_val && reach_limit <= LONG_MAX / 10);
+
+ if (reach_limit > LONG_MAX / 10)
+ {
+ /* add the first digit and a .0 */
+ size += 2;
+ }
+ else
+ {
+ /* always add a .0 */
+ size++;
+ reach_limit /= 10;
+ }
+
+ if (alloc_var(var, size) < 0)
+ return -1;
+
+ var->rscale = 1;
+ var->dscale = 1;
+ var->weight = size - 2;
+
+ i = 0;
+ do
+ {
+ extract = abs_long_val - (abs_long_val % reach_limit);
+ var->digits[i] = extract / reach_limit;
+ abs_long_val -= extract;
+ i++;
+ reach_limit /= 10;
+
+ /*
+ * we can abandon if abs_long_val reaches 0, because the memory is
+ * initialized properly and filled with '0', so converting 10000 in
+ * only one step is no problem
+ */
+ } while (abs_long_val > 0);
+
+ return 0;
+}
+
+int
+PGTYPESnumeric_copy(numeric *src, numeric *dst)
+{
+ int i;
+
+ if (dst == NULL)
+ return -1;
+ zero_var(dst);
+
+ dst->weight = src->weight;
+ dst->rscale = src->rscale;
+ dst->dscale = src->dscale;
+ dst->sign = src->sign;
+
+ if (alloc_var(dst, src->ndigits) != 0)
+ return -1;
+
+ for (i = 0; i < src->ndigits; i++)
+ dst->digits[i] = src->digits[i];
+
+ return 0;
+}
+
+int
+PGTYPESnumeric_from_double(double d, numeric *dst)
+{
+ char buffer[DBL_DIG + 100];
+ numeric *tmp;
+ int i;
+
+ if (sprintf(buffer, "%.*g", DBL_DIG, d) <= 0)
+ return -1;
+
+ if ((tmp = PGTYPESnumeric_from_asc(buffer, NULL)) == NULL)
+ return -1;
+ i = PGTYPESnumeric_copy(tmp, dst);
+ PGTYPESnumeric_free(tmp);
+ if (i != 0)
+ return -1;
+
+ errno = 0;
+ return 0;
+}
+
+static int
+numericvar_to_double(numeric *var, double *dp)
+{
+ char *tmp;
+ double val;
+ char *endptr;
+ numeric *varcopy = PGTYPESnumeric_new();
+
+ if (varcopy == NULL)
+ return -1;
+
+ if (PGTYPESnumeric_copy(var, varcopy) < 0)
+ {
+ PGTYPESnumeric_free(varcopy);
+ return -1;
+ }
+
+ tmp = get_str_from_var(varcopy, varcopy->dscale);
+ PGTYPESnumeric_free(varcopy);
+
+ if (tmp == NULL)
+ return -1;
+
+ /*
+ * strtod does not reset errno to 0 in case of success.
+ */
+ errno = 0;
+ val = strtod(tmp, &endptr);
+ if (errno == ERANGE)
+ {
+ free(tmp);
+ if (val == 0)
+ errno = PGTYPES_NUM_UNDERFLOW;
+ else
+ errno = PGTYPES_NUM_OVERFLOW;
+ return -1;
+ }
+
+ /* can't free tmp yet, endptr points still into it */
+ if (*endptr != '\0')
+ {
+ /* shouldn't happen ... */
+ free(tmp);
+ errno = PGTYPES_NUM_BAD_NUMERIC;
+ return -1;
+ }
+ free(tmp);
+ *dp = val;
+ return 0;
+}
+
+int
+PGTYPESnumeric_to_double(numeric *nv, double *dp)
+{
+ double tmp;
+
+ if (numericvar_to_double(nv, &tmp) != 0)
+ return -1;
+ *dp = tmp;
+ return 0;
+}
+
+int
+PGTYPESnumeric_to_int(numeric *nv, int *ip)
+{
+ long l;
+ int i;
+
+ if ((i = PGTYPESnumeric_to_long(nv, &l)) != 0)
+ return i;
+
+/* silence compilers that might complain about useless tests */
+#if SIZEOF_LONG > SIZEOF_INT
+
+ if (l < INT_MIN || l > INT_MAX)
+ {
+ errno = PGTYPES_NUM_OVERFLOW;
+ return -1;
+ }
+
+#endif
+
+ *ip = (int) l;
+ return 0;
+}
+
+int
+PGTYPESnumeric_to_long(numeric *nv, long *lp)
+{
+ char *s = PGTYPESnumeric_to_asc(nv, 0);
+ char *endptr;
+
+ if (s == NULL)
+ return -1;
+
+ errno = 0;
+ *lp = strtol(s, &endptr, 10);
+ if (endptr == s)
+ {
+ /* this should not happen actually */
+ free(s);
+ return -1;
+ }
+ free(s);
+ if (errno == ERANGE)
+ {
+ if (*lp == LONG_MIN)
+ errno = PGTYPES_NUM_UNDERFLOW;
+ else
+ errno = PGTYPES_NUM_OVERFLOW;
+ return -1;
+ }
+ return 0;
+}
+
+int
+PGTYPESnumeric_to_decimal(numeric *src, decimal *dst)
+{
+ int i;
+
+ if (src->ndigits > DECSIZE)
+ {
+ errno = PGTYPES_NUM_OVERFLOW;
+ return -1;
+ }
+
+ dst->weight = src->weight;
+ dst->rscale = src->rscale;
+ dst->dscale = src->dscale;
+ dst->sign = src->sign;
+ dst->ndigits = src->ndigits;
+
+ for (i = 0; i < src->ndigits; i++)
+ dst->digits[i] = src->digits[i];
+
+ return 0;
+}
+
+int
+PGTYPESnumeric_from_decimal(decimal *src, numeric *dst)
+{
+ int i;
+
+ zero_var(dst);
+
+ dst->weight = src->weight;
+ dst->rscale = src->rscale;
+ dst->dscale = src->dscale;
+ dst->sign = src->sign;
+
+ if (alloc_var(dst, src->ndigits) != 0)
+ return -1;
+
+ for (i = 0; i < src->ndigits; i++)
+ dst->digits[i] = src->digits[i];
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h b/src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h
new file mode 100644
index 0000000..1012088
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h
@@ -0,0 +1,41 @@
+/* src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h */
+
+#ifndef _ECPG_PGTYPESLIB_EXTERN_H
+#define _ECPG_PGTYPESLIB_EXTERN_H
+
+#include "pgtypes_error.h"
+
+/* These are the constants that decide which printf() format we'll use in
+ * order to get a string representation of the value */
+#define PGTYPES_TYPE_NOTHING 0
+#define PGTYPES_TYPE_STRING_MALLOCED 1
+#define PGTYPES_TYPE_STRING_CONSTANT 2
+#define PGTYPES_TYPE_CHAR 3
+#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */
+#define PGTYPES_TYPE_INT64 5
+#define PGTYPES_TYPE_UINT 6
+#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading zero */
+#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading
+ * space */
+#define PGTYPES_TYPE_UINT_3_LZ 9
+#define PGTYPES_TYPE_UINT_4_LZ 10
+#define PGTYPES_TYPE_UINT_LONG 11
+
+#define PGTYPES_FMT_NUM_MAX_DIGITS 40
+
+union un_fmt_comb
+{
+ char *str_val;
+ unsigned int uint_val;
+ char char_val;
+ unsigned long int luint_val;
+ double double_val;
+ int64 int64_val;
+};
+
+int pgtypes_fmt_replace(union un_fmt_comb, int, char **, int *);
+
+char *pgtypes_alloc(long);
+char *pgtypes_strdup(const char *);
+
+#endif /* _ECPG_PGTYPESLIB_EXTERN_H */
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
new file mode 100644
index 0000000..3f82ee5
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -0,0 +1,930 @@
+/*
+ * src/interfaces/ecpg/pgtypeslib/timestamp.c
+ */
+#include "postgres_fe.h"
+
+#include <time.h>
+#include <limits.h>
+#include <math.h>
+
+#ifdef __FAST_MATH__
+#error -ffast-math is known to break this code
+#endif
+
+#include "dt.h"
+#include "pgtypes_date.h"
+#include "pgtypes_timestamp.h"
+#include "pgtypeslib_extern.h"
+
+static int64
+time2t(const int hour, const int min, const int sec, const fsec_t fsec)
+{
+ return (((((hour * MINS_PER_HOUR) + min) * SECS_PER_MINUTE) + sec) * USECS_PER_SEC) + fsec;
+} /* time2t() */
+
+static timestamp
+dt2local(timestamp dt, int tz)
+{
+ dt -= (tz * USECS_PER_SEC);
+ return dt;
+} /* dt2local() */
+
+/* tm2timestamp()
+ * Convert a tm structure to a timestamp data type.
+ * Note that year is _not_ 1900-based, but is an explicit full value.
+ * Also, month is one-based, _not_ zero-based.
+ *
+ * Returns -1 on failure (overflow).
+ */
+int
+tm2timestamp(struct tm *tm, fsec_t fsec, int *tzp, timestamp * result)
+{
+ int dDate;
+ int64 time;
+
+ /* Prevent overflow in Julian-day routines */
+ if (!IS_VALID_JULIAN(tm->tm_year, tm->tm_mon, tm->tm_mday))
+ return -1;
+
+ dDate = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
+ time = time2t(tm->tm_hour, tm->tm_min, tm->tm_sec, fsec);
+ *result = (dDate * USECS_PER_DAY) + time;
+ /* check for major overflow */
+ if ((*result - time) / USECS_PER_DAY != dDate)
+ return -1;
+ /* check for just-barely overflow (okay except time-of-day wraps) */
+ /* caution: we want to allow 1999-12-31 24:00:00 */
+ if ((*result < 0 && dDate > 0) ||
+ (*result > 0 && dDate < -1))
+ return -1;
+ if (tzp != NULL)
+ *result = dt2local(*result, -(*tzp));
+
+ /* final range check catches just-out-of-range timestamps */
+ if (!IS_VALID_TIMESTAMP(*result))
+ return -1;
+
+ return 0;
+} /* tm2timestamp() */
+
+static timestamp
+SetEpochTimestamp(void)
+{
+ int64 noresult = 0;
+ timestamp dt;
+ struct tm tt,
+ *tm = &tt;
+
+ if (GetEpochTime(tm) < 0)
+ return noresult;
+
+ tm2timestamp(tm, 0, NULL, &dt);
+ return dt;
+} /* SetEpochTimestamp() */
+
+/* timestamp2tm()
+ * Convert timestamp data type to POSIX time structure.
+ * Note that year is _not_ 1900-based, but is an explicit full value.
+ * Also, month is one-based, _not_ zero-based.
+ * Returns:
+ * 0 on success
+ * -1 on out of range
+ *
+ * For dates within the system-supported time_t range, convert to the
+ * local time zone. If out of this range, leave as GMT. - tgl 97/05/27
+ */
+static int
+timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **tzn)
+{
+ int64 dDate,
+ date0;
+ int64 time;
+#if defined(HAVE_STRUCT_TM_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
+ time_t utime;
+ struct tm *tx;
+#endif
+
+ date0 = date2j(2000, 1, 1);
+
+ time = dt;
+ TMODULO(time, dDate, USECS_PER_DAY);
+
+ if (time < INT64CONST(0))
+ {
+ time += USECS_PER_DAY;
+ dDate -= 1;
+ }
+
+ /* add offset to go from J2000 back to standard Julian date */
+ dDate += date0;
+
+ /* Julian day routine does not work for negative Julian days */
+ if (dDate < 0 || dDate > (timestamp) INT_MAX)
+ return -1;
+
+ j2date((int) dDate, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+ dt2time(time, &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
+
+ if (tzp != NULL)
+ {
+ /*
+ * Does this fall within the capabilities of the localtime()
+ * interface? Then use this to rotate to the local time zone.
+ */
+ if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday))
+ {
+#if defined(HAVE_STRUCT_TM_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
+
+ utime = dt / USECS_PER_SEC +
+ ((date0 - date2j(1970, 1, 1)) * INT64CONST(86400));
+
+ tx = localtime(&utime);
+ tm->tm_year = tx->tm_year + 1900;
+ tm->tm_mon = tx->tm_mon + 1;
+ tm->tm_mday = tx->tm_mday;
+ tm->tm_hour = tx->tm_hour;
+ tm->tm_min = tx->tm_min;
+ tm->tm_isdst = tx->tm_isdst;
+
+#if defined(HAVE_STRUCT_TM_TM_ZONE)
+ tm->tm_gmtoff = tx->tm_gmtoff;
+ tm->tm_zone = tx->tm_zone;
+
+ *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */
+ if (tzn != NULL)
+ *tzn = tm->tm_zone;
+#elif defined(HAVE_INT_TIMEZONE)
+ *tzp = (tm->tm_isdst > 0) ? TIMEZONE_GLOBAL - SECS_PER_HOUR : TIMEZONE_GLOBAL;
+ if (tzn != NULL)
+ *tzn = TZNAME_GLOBAL[(tm->tm_isdst > 0)];
+#endif
+#else /* not (HAVE_STRUCT_TM_TM_ZONE ||
+ * HAVE_INT_TIMEZONE) */
+ *tzp = 0;
+ /* Mark this as *no* time zone available */
+ tm->tm_isdst = -1;
+ if (tzn != NULL)
+ *tzn = NULL;
+#endif
+ }
+ else
+ {
+ *tzp = 0;
+ /* Mark this as *no* time zone available */
+ tm->tm_isdst = -1;
+ if (tzn != NULL)
+ *tzn = NULL;
+ }
+ }
+ else
+ {
+ tm->tm_isdst = -1;
+ if (tzn != NULL)
+ *tzn = NULL;
+ }
+
+ tm->tm_yday = dDate - date2j(tm->tm_year, 1, 1) + 1;
+
+ return 0;
+} /* timestamp2tm() */
+
+/* EncodeSpecialTimestamp()
+ * * Convert reserved timestamp data type to string.
+ * */
+static void
+EncodeSpecialTimestamp(timestamp dt, char *str)
+{
+ if (TIMESTAMP_IS_NOBEGIN(dt))
+ strcpy(str, EARLY);
+ else if (TIMESTAMP_IS_NOEND(dt))
+ strcpy(str, LATE);
+ else
+ abort(); /* shouldn't happen */
+}
+
+timestamp
+PGTYPEStimestamp_from_asc(char *str, char **endptr)
+{
+ timestamp result;
+ int64 noresult = 0;
+ fsec_t fsec;
+ struct tm tt,
+ *tm = &tt;
+ int dtype;
+ int nf;
+ char *field[MAXDATEFIELDS];
+ int ftype[MAXDATEFIELDS];
+ char lowstr[MAXDATELEN + MAXDATEFIELDS];
+ char *realptr;
+ char **ptr = (endptr != NULL) ? endptr : &realptr;
+
+ if (strlen(str) > MAXDATELEN)
+ {
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return noresult;
+ }
+
+ if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
+ DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, 0) != 0)
+ {
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return noresult;
+ }
+
+ switch (dtype)
+ {
+ case DTK_DATE:
+ if (tm2timestamp(tm, fsec, NULL, &result) != 0)
+ {
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return noresult;
+ }
+ break;
+
+ case DTK_EPOCH:
+ result = SetEpochTimestamp();
+ break;
+
+ case DTK_LATE:
+ TIMESTAMP_NOEND(result);
+ break;
+
+ case DTK_EARLY:
+ TIMESTAMP_NOBEGIN(result);
+ break;
+
+ default:
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return noresult;
+ }
+
+ /* AdjustTimestampForTypmod(&result, typmod); */
+
+ /*
+ * Since it's difficult to test for noresult, make sure errno is 0 if no
+ * error occurred.
+ */
+ errno = 0;
+ return result;
+}
+
+char *
+PGTYPEStimestamp_to_asc(timestamp tstamp)
+{
+ struct tm tt,
+ *tm = &tt;
+ char buf[MAXDATELEN + 1];
+ fsec_t fsec;
+ int DateStyle = 1; /* this defaults to USE_ISO_DATES, shall we
+ * make it an option? */
+
+ if (TIMESTAMP_NOT_FINITE(tstamp))
+ EncodeSpecialTimestamp(tstamp, buf);
+ else if (timestamp2tm(tstamp, NULL, tm, &fsec, NULL) == 0)
+ EncodeDateTime(tm, fsec, false, 0, NULL, DateStyle, buf, 0);
+ else
+ {
+ errno = PGTYPES_TS_BAD_TIMESTAMP;
+ return NULL;
+ }
+ return pgtypes_strdup(buf);
+}
+
+void
+PGTYPEStimestamp_current(timestamp * ts)
+{
+ struct tm tm;
+
+ GetCurrentDateTime(&tm);
+ if (errno == 0)
+ tm2timestamp(&tm, 0, NULL, ts);
+}
+
+static int
+dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm *tm,
+ char *output, int *pstr_len, const char *fmtstr)
+{
+ union un_fmt_comb replace_val;
+ int replace_type;
+ int i;
+ const char *p = fmtstr;
+ char *q = output;
+
+ while (*p)
+ {
+ if (*p == '%')
+ {
+ p++;
+ /* fix compiler warning */
+ replace_type = PGTYPES_TYPE_NOTHING;
+ switch (*p)
+ {
+ /* the abbreviated name of the day in the week */
+ /* XXX should be locale aware */
+ case 'a':
+ replace_val.str_val = pgtypes_date_weekdays_short[dow];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ /* the full name of the day in the week */
+ /* XXX should be locale aware */
+ case 'A':
+ replace_val.str_val = days[dow];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ /* the abbreviated name of the month */
+ /* XXX should be locale aware */
+ case 'b':
+ case 'h':
+ replace_val.str_val = months[tm->tm_mon - 1];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ /* the full name of the month */
+ /* XXX should be locale aware */
+ case 'B':
+ replace_val.str_val = pgtypes_date_months[tm->tm_mon - 1];
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+
+ /*
+ * The preferred date and time representation for
+ * the current locale.
+ */
+ case 'c':
+ /* XXX */
+ break;
+ /* the century number with leading zeroes */
+ case 'C':
+ replace_val.uint_val = tm->tm_year / 100;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* day with leading zeroes (01 - 31) */
+ case 'd':
+ replace_val.uint_val = tm->tm_mday;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* the date in the format mm/dd/yy */
+ case 'D':
+
+ /*
+ * ts, dDate, dow, tm is information about the timestamp
+ *
+ * q is the start of the current output buffer
+ *
+ * pstr_len is a pointer to the remaining size of output,
+ * i.e. the size of q
+ */
+ i = dttofmtasc_replace(ts, dDate, dow, tm,
+ q, pstr_len,
+ "%m/%d/%y");
+ if (i)
+ return i;
+ break;
+ /* day with leading spaces (01 - 31) */
+ case 'e':
+ replace_val.uint_val = tm->tm_mday;
+ replace_type = PGTYPES_TYPE_UINT_2_LS;
+ break;
+
+ /*
+ * alternative format modifier
+ */
+ case 'E':
+ {
+ char tmp[4] = "%Ex";
+
+ p++;
+ if (*p == '\0')
+ return -1;
+ tmp[2] = *p;
+
+ /*
+ * strftime's month is 0 based, ours is 1 based
+ */
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, tmp, tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+ }
+
+ /*
+ * The ISO 8601 year with century as a decimal number. The
+ * 4-digit year corresponding to the ISO week number.
+ */
+ case 'G':
+ {
+ /* Keep compiler quiet - Don't use a literal format */
+ const char *fmt = "%G";
+
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, fmt, tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ }
+ break;
+
+ /*
+ * Like %G, but without century, i.e., with a 2-digit year
+ * (00-99).
+ */
+ case 'g':
+ {
+ const char *fmt = "%g"; /* Keep compiler quiet about
+ * 2-digit year */
+
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, fmt, tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ }
+ break;
+ /* hour (24 hour clock) with leading zeroes */
+ case 'H':
+ replace_val.uint_val = tm->tm_hour;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* hour (12 hour clock) with leading zeroes */
+ case 'I':
+ replace_val.uint_val = tm->tm_hour % 12;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+
+ /*
+ * The day of the year as a decimal number with leading
+ * zeroes. It ranges from 001 to 366.
+ */
+ case 'j':
+ replace_val.uint_val = tm->tm_yday;
+ replace_type = PGTYPES_TYPE_UINT_3_LZ;
+ break;
+
+ /*
+ * The hour (24 hour clock). Leading zeroes will be turned
+ * into spaces.
+ */
+ case 'k':
+ replace_val.uint_val = tm->tm_hour;
+ replace_type = PGTYPES_TYPE_UINT_2_LS;
+ break;
+
+ /*
+ * The hour (12 hour clock). Leading zeroes will be turned
+ * into spaces.
+ */
+ case 'l':
+ replace_val.uint_val = tm->tm_hour % 12;
+ replace_type = PGTYPES_TYPE_UINT_2_LS;
+ break;
+ /* The month as a decimal number with a leading zero */
+ case 'm':
+ replace_val.uint_val = tm->tm_mon;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* The minute as a decimal number with a leading zero */
+ case 'M':
+ replace_val.uint_val = tm->tm_min;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* A newline character */
+ case 'n':
+ replace_val.char_val = '\n';
+ replace_type = PGTYPES_TYPE_CHAR;
+ break;
+ /* the AM/PM specifier (uppercase) */
+ /* XXX should be locale aware */
+ case 'p':
+ if (tm->tm_hour < 12)
+ replace_val.str_val = "AM";
+ else
+ replace_val.str_val = "PM";
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ /* the AM/PM specifier (lowercase) */
+ /* XXX should be locale aware */
+ case 'P':
+ if (tm->tm_hour < 12)
+ replace_val.str_val = "am";
+ else
+ replace_val.str_val = "pm";
+ replace_type = PGTYPES_TYPE_STRING_CONSTANT;
+ break;
+ /* the time in the format %I:%M:%S %p */
+ /* XXX should be locale aware */
+ case 'r':
+ i = dttofmtasc_replace(ts, dDate, dow, tm,
+ q, pstr_len,
+ "%I:%M:%S %p");
+ if (i)
+ return i;
+ break;
+ /* The time in 24 hour notation (%H:%M) */
+ case 'R':
+ i = dttofmtasc_replace(ts, dDate, dow, tm,
+ q, pstr_len,
+ "%H:%M");
+ if (i)
+ return i;
+ break;
+ /* The number of seconds since the Epoch (1970-01-01) */
+ case 's':
+ replace_val.int64_val = (*ts - SetEpochTimestamp()) / 1000000.0;
+ replace_type = PGTYPES_TYPE_INT64;
+ break;
+ /* seconds as a decimal number with leading zeroes */
+ case 'S':
+ replace_val.uint_val = tm->tm_sec;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* A tabulator */
+ case 't':
+ replace_val.char_val = '\t';
+ replace_type = PGTYPES_TYPE_CHAR;
+ break;
+ /* The time in 24 hour notation (%H:%M:%S) */
+ case 'T':
+ i = dttofmtasc_replace(ts, dDate, dow, tm,
+ q, pstr_len,
+ "%H:%M:%S");
+ if (i)
+ return i;
+ break;
+
+ /*
+ * The day of the week as a decimal, Monday = 1, Sunday =
+ * 7
+ */
+ case 'u':
+ replace_val.uint_val = dow;
+ if (replace_val.uint_val == 0)
+ replace_val.uint_val = 7;
+ replace_type = PGTYPES_TYPE_UINT;
+ break;
+ /* The week number of the year as a decimal number */
+ case 'U':
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, "%U", tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+
+ /*
+ * The ISO 8601:1988 week number of the current year as a
+ * decimal number.
+ */
+ case 'V':
+ {
+ /* Keep compiler quiet - Don't use a literal format */
+ const char *fmt = "%V";
+
+ i = strftime(q, *pstr_len, fmt, tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ replace_type = PGTYPES_TYPE_NOTHING;
+ }
+ break;
+
+ /*
+ * The day of the week as a decimal, Sunday being 0 and
+ * Monday 1.
+ */
+ case 'w':
+ replace_val.uint_val = dow;
+ replace_type = PGTYPES_TYPE_UINT;
+ break;
+ /* The week number of the year (another definition) */
+ case 'W':
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, "%U", tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+
+ /*
+ * The preferred date representation for the current
+ * locale without the time.
+ */
+ case 'x':
+ {
+ const char *fmt = "%x"; /* Keep compiler quiet about
+ * 2-digit year */
+
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, fmt, tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ }
+ break;
+
+ /*
+ * The preferred time representation for the current
+ * locale without the date.
+ */
+ case 'X':
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, "%X", tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+ /* The year without the century (2 digits, leading zeroes) */
+ case 'y':
+ replace_val.uint_val = tm->tm_year % 100;
+ replace_type = PGTYPES_TYPE_UINT_2_LZ;
+ break;
+ /* The year with the century (4 digits) */
+ case 'Y':
+ replace_val.uint_val = tm->tm_year;
+ replace_type = PGTYPES_TYPE_UINT;
+ break;
+ /* The time zone offset from GMT */
+ case 'z':
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, "%z", tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+ /* The name or abbreviation of the time zone */
+ case 'Z':
+ tm->tm_mon -= 1;
+ i = strftime(q, *pstr_len, "%Z", tm);
+ if (i == 0)
+ return -1;
+ while (*q)
+ {
+ q++;
+ (*pstr_len)--;
+ }
+ tm->tm_mon += 1;
+ replace_type = PGTYPES_TYPE_NOTHING;
+ break;
+ /* A % sign */
+ case '%':
+ replace_val.char_val = '%';
+ replace_type = PGTYPES_TYPE_CHAR;
+ break;
+ case '\0':
+ /* fmtstr: foo%' - The string ends with a % sign */
+
+ /*
+ * this is not compliant to the specification
+ */
+ return -1;
+ default:
+
+ /*
+ * if we don't know the pattern, we just copy it
+ */
+ if (*pstr_len > 1)
+ {
+ *q = '%';
+ q++;
+ (*pstr_len)--;
+ if (*pstr_len > 1)
+ {
+ *q = *p;
+ q++;
+ (*pstr_len)--;
+ }
+ else
+ {
+ *q = '\0';
+ return -1;
+ }
+ *q = '\0';
+ }
+ else
+ return -1;
+ break;
+ }
+ i = pgtypes_fmt_replace(replace_val, replace_type, &q, pstr_len);
+ if (i)
+ return i;
+ }
+ else
+ {
+ if (*pstr_len > 1)
+ {
+ *q = *p;
+ (*pstr_len)--;
+ q++;
+ *q = '\0';
+ }
+ else
+ return -1;
+ }
+ p++;
+ }
+ return 0;
+}
+
+
+int
+PGTYPEStimestamp_fmt_asc(timestamp * ts, char *output, int str_len, const char *fmtstr)
+{
+ struct tm tm;
+ fsec_t fsec;
+ date dDate;
+ int dow;
+
+ dDate = PGTYPESdate_from_timestamp(*ts);
+ dow = PGTYPESdate_dayofweek(dDate);
+ timestamp2tm(*ts, NULL, &tm, &fsec, NULL);
+
+ return dttofmtasc_replace(ts, dDate, dow, &tm, output, &str_len, fmtstr);
+}
+
+int
+PGTYPEStimestamp_sub(timestamp * ts1, timestamp * ts2, interval * iv)
+{
+ if (TIMESTAMP_NOT_FINITE(*ts1) || TIMESTAMP_NOT_FINITE(*ts2))
+ return PGTYPES_TS_ERR_EINFTIME;
+ else
+ iv->time = (*ts1 - *ts2);
+
+ iv->month = 0;
+
+ return 0;
+}
+
+int
+PGTYPEStimestamp_defmt_asc(const char *str, const char *fmt, timestamp * d)
+{
+ int year,
+ month,
+ day;
+ int hour,
+ minute,
+ second;
+ int tz;
+
+ int i;
+ char *mstr;
+ char *mfmt;
+
+ if (!fmt)
+ fmt = "%Y-%m-%d %H:%M:%S";
+ if (!fmt[0])
+ return 1;
+
+ mstr = pgtypes_strdup(str);
+ mfmt = pgtypes_strdup(fmt);
+
+ /*
+ * initialize with impossible values so that we can see if the fields
+ * where specified at all
+ */
+ /* XXX ambiguity with 1 BC for year? */
+ year = -1;
+ month = -1;
+ day = -1;
+ hour = 0;
+ minute = -1;
+ second = -1;
+ tz = 0;
+
+ i = PGTYPEStimestamp_defmt_scan(&mstr, mfmt, d, &year, &month, &day, &hour, &minute, &second, &tz);
+ free(mstr);
+ free(mfmt);
+ return i;
+}
+
+/*
+* add an interval to a time stamp
+*
+* *tout = tin + span
+*
+* returns 0 if successful
+* returns -1 if it fails
+*
+*/
+
+int
+PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout)
+{
+ if (TIMESTAMP_NOT_FINITE(*tin))
+ *tout = *tin;
+
+
+ else
+ {
+ if (span->month != 0)
+ {
+ struct tm tt,
+ *tm = &tt;
+ fsec_t fsec;
+
+
+ if (timestamp2tm(*tin, NULL, tm, &fsec, NULL) != 0)
+ return -1;
+ tm->tm_mon += span->month;
+ if (tm->tm_mon > MONTHS_PER_YEAR)
+ {
+ tm->tm_year += (tm->tm_mon - 1) / MONTHS_PER_YEAR;
+ tm->tm_mon = (tm->tm_mon - 1) % MONTHS_PER_YEAR + 1;
+ }
+ else if (tm->tm_mon < 1)
+ {
+ tm->tm_year += tm->tm_mon / MONTHS_PER_YEAR - 1;
+ tm->tm_mon = tm->tm_mon % MONTHS_PER_YEAR + MONTHS_PER_YEAR;
+ }
+
+
+ /* adjust for end of month boundary problems... */
+ if (tm->tm_mday > day_tab[isleap(tm->tm_year)][tm->tm_mon - 1])
+ tm->tm_mday = (day_tab[isleap(tm->tm_year)][tm->tm_mon - 1]);
+
+
+ if (tm2timestamp(tm, fsec, NULL, tin) != 0)
+ return -1;
+ }
+
+
+ *tin += span->time;
+ *tout = *tin;
+ }
+ return 0;
+
+}
+
+
+/*
+* subtract an interval from a time stamp
+*
+* *tout = tin - span
+*
+* returns 0 if successful
+* returns -1 if it fails
+*
+*/
+
+int
+PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, timestamp * tout)
+{
+ interval tspan;
+
+ tspan.month = -span->month;
+ tspan.time = -span->time;
+
+
+ return PGTYPEStimestamp_add_interval(tin, &tspan, tout);
+}
diff --git a/src/interfaces/ecpg/preproc/.gitignore b/src/interfaces/ecpg/preproc/.gitignore
new file mode 100644
index 0000000..958a826
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/.gitignore
@@ -0,0 +1,8 @@
+/preproc.y
+/preproc.c
+/preproc.h
+/pgc.c
+/c_kwlist_d.h
+/ecpg_kwlist_d.h
+/typename.c
+/ecpg
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
new file mode 100644
index 0000000..29479f9
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -0,0 +1,102 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces/ecpg/preproc
+#
+# Copyright (c) 1998-2021, PostgreSQL Global Development Group
+#
+# src/interfaces/ecpg/preproc/Makefile
+#
+#-------------------------------------------------------------------------
+
+PGFILEDESC = "ecpg - embedded SQL precompiler for C"
+PGAPPICON=win32
+
+subdir = src/interfaces/ecpg/preproc
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I. -I$(srcdir) \
+ -I$(top_srcdir)/src/interfaces/ecpg/ecpglib \
+ -I$(libpq_srcdir) \
+ $(CPPFLAGS)
+
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+OBJS = \
+ $(WIN32RES) \
+ c_keywords.o \
+ descriptor.o \
+ ecpg.o \
+ ecpg_keywords.o \
+ keywords.o \
+ output.o \
+ parser.o \
+ pgc.o \
+ preproc.o \
+ type.o \
+ typename.o \
+ variable.o
+
+# where to find gen_keywordlist.pl and subsidiary files
+TOOLSDIR = $(top_srcdir)/src/tools
+GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
+GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
+
+# Suppress parallel build to avoid a bug in GNU make 3.82
+# (see comments in ../Makefile)
+ifeq ($(MAKE_VERSION),3.82)
+.NOTPARALLEL:
+endif
+
+all: ecpg
+
+ecpg: $(OBJS) | submake-libpgport
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) $(PTHREAD_LIBS) -o $@$(X)
+
+# We symlink typename.c from ecpglib and recompile it here
+typename.c: % : $(top_srcdir)/src/interfaces/ecpg/ecpglib/%
+ rm -f $@ && $(LN_S) $< .
+
+# See notes in src/backend/parser/Makefile about the following two rules
+preproc.h: preproc.c
+ touch $@
+
+preproc.c: BISONFLAGS += -d
+
+preproc.y: ../../../backend/parser/gram.y parse.pl ecpg.addons ecpg.header ecpg.tokens ecpg.trailer ecpg.type
+ $(PERL) $(srcdir)/parse.pl $(srcdir) < $< > $@
+ $(PERL) $(srcdir)/check_rules.pl $(srcdir) $<
+
+# generate keyword headers
+c_kwlist_d.h: c_kwlist.h $(GEN_KEYWORDLIST_DEPS)
+ $(GEN_KEYWORDLIST) --varname ScanCKeywords --no-case-fold $<
+
+ecpg_kwlist_d.h: ecpg_kwlist.h $(GEN_KEYWORDLIST_DEPS)
+ $(GEN_KEYWORDLIST) --varname ScanECPGKeywords $<
+
+# Force these dependencies to be known even without dependency info built:
+ecpg_keywords.o c_keywords.o keywords.o preproc.o pgc.o parser.o: preproc.h
+ecpg_keywords.o: ecpg_kwlist_d.h
+c_keywords.o: c_kwlist_d.h
+keywords.o: $(top_srcdir)/src/include/parser/kwlist.h
+
+distprep: preproc.y preproc.c preproc.h pgc.c c_kwlist_d.h ecpg_kwlist_d.h
+
+install: all installdirs
+ $(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(bindir)/ecpg$(X)'
+
+# preproc.y, preproc.c, preproc.h, pgc.c, c_kwlist_d.h, and ecpg_kwlist_d.h
+# are in the distribution tarball, so they are not cleaned here.
+clean distclean:
+ rm -f *.o ecpg$(X)
+ rm -f typename.c
+
+maintainer-clean: distclean
+ rm -f preproc.y preproc.c preproc.h pgc.c c_kwlist_d.h ecpg_kwlist_d.h
diff --git a/src/interfaces/ecpg/preproc/README.parser b/src/interfaces/ecpg/preproc/README.parser
new file mode 100644
index 0000000..ddc3061
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/README.parser
@@ -0,0 +1,42 @@
+ECPG modifies and extends the core grammar in a way that
+1) every token in ECPG is <str> type. New tokens are
+ defined in ecpg.tokens, types are defined in ecpg.type
+2) most tokens from the core grammar are simply converted
+ to literals concatenated together to form the SQL string
+ passed to the server, this is done by parse.pl.
+3) some rules need side-effects, actions are either added
+ or completely overridden (compared to the basic token
+ concatenation) for them, these are defined in ecpg.addons,
+ the rules for ecpg.addons are explained below.
+4) new grammar rules are needed for ECPG metacommands.
+ These are in ecpg.trailer.
+5) ecpg.header contains common functions, etc. used by
+ actions for grammar rules.
+
+In "ecpg.addons", every modified rule follows this pattern:
+ ECPG: dumpedtokens postfix
+where "dumpedtokens" is simply tokens from core gram.y's
+rules concatenated together. e.g. if gram.y has this:
+ ruleA: tokenA tokenB tokenC {...}
+then "dumpedtokens" is "ruleAtokenAtokenBtokenC".
+"postfix" above can be:
+a) "block" - the automatic rule created by parse.pl is completely
+ overridden, the code block has to be written completely as
+ it were in a plain bison grammar
+b) "rule" - the automatic rule is extended on, so new syntaxes
+ are accepted for "ruleA". E.g.:
+ ECPG: ruleAtokenAtokenBtokenC rule
+ | tokenD tokenE { action_code; }
+ ...
+ It will be substituted with:
+ ruleA: <original syntax forms and actions up to and including
+ "tokenA tokenB tokenC">
+ | tokenD tokenE { action_code; }
+ ...
+c) "addon" - the automatic action for the rule (SQL syntax constructed
+ from the tokens concatenated together) is prepended with a new
+ action code part. This code part is written as is's already inside
+ the { ... }
+
+Multiple "addon" or "block" lines may appear together with the
+new code block if the code block is common for those rules.
diff --git a/src/interfaces/ecpg/preproc/c_keywords.c b/src/interfaces/ecpg/preproc/c_keywords.c
new file mode 100644
index 0000000..e51c036
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/c_keywords.c
@@ -0,0 +1,66 @@
+/*-------------------------------------------------------------------------
+ *
+ * c_keywords.c
+ * lexical token lookup for reserved words in postgres embedded SQL
+ *
+ * src/interfaces/ecpg/preproc/c_keywords.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+/* ScanKeywordList lookup data for C keywords */
+#include "c_kwlist_d.h"
+#include "preproc_extern.h"
+#include "preproc.h"
+
+/* Token codes for C keywords */
+#define PG_KEYWORD(kwname, value) value,
+
+static const uint16 ScanCKeywordTokens[] = {
+#include "c_kwlist.h"
+};
+
+#undef PG_KEYWORD
+
+
+/*
+ * ScanCKeywordLookup - see if a given word is a keyword
+ *
+ * Returns the token value of the keyword, or -1 if no match.
+ *
+ * Do a hash search using plain strcmp() comparison. This is much like
+ * ScanKeywordLookup(), except we want case-sensitive matching.
+ */
+int
+ScanCKeywordLookup(const char *str)
+{
+ size_t len;
+ int h;
+ const char *kw;
+
+ /*
+ * Reject immediately if too long to be any keyword. This saves useless
+ * hashing work on long strings.
+ */
+ len = strlen(str);
+ if (len > ScanCKeywords.max_kw_len)
+ return -1;
+
+ /*
+ * Compute the hash function. Since it's a perfect hash, we need only
+ * match to the specific keyword it identifies.
+ */
+ h = ScanCKeywords_hash_func(str, len);
+
+ /* An out-of-range result implies no match */
+ if (h < 0 || h >= ScanCKeywords.num_keywords)
+ return -1;
+
+ kw = GetScanKeyword(h, &ScanCKeywords);
+
+ if (strcmp(kw, str) == 0)
+ return ScanCKeywordTokens[h];
+
+ return -1;
+}
diff --git a/src/interfaces/ecpg/preproc/c_kwlist.h b/src/interfaces/ecpg/preproc/c_kwlist.h
new file mode 100644
index 0000000..51c5dfb
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/c_kwlist.h
@@ -0,0 +1,52 @@
+/*-------------------------------------------------------------------------
+ *
+ * c_kwlist.h
+ *
+ * The keyword lists are kept in their own source files for use by
+ * automatic tools. The exact representation of a keyword is determined
+ * by the PG_KEYWORD macro, which is not defined in this file; it can
+ * be defined by the caller for special purposes.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/ecpg/preproc/c_kwlist.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* There is deliberately not an #ifndef C_KWLIST_H here. */
+
+/*
+ * List of (keyword-name, keyword-token-value) pairs.
+ *
+ * Note: gen_keywordlist.pl requires the entries to appear in ASCII order.
+ */
+
+/* name, value */
+PG_KEYWORD("VARCHAR", VARCHAR)
+PG_KEYWORD("auto", S_AUTO)
+PG_KEYWORD("bool", SQL_BOOL)
+PG_KEYWORD("char", CHAR_P)
+PG_KEYWORD("const", S_CONST)
+PG_KEYWORD("enum", ENUM_P)
+PG_KEYWORD("extern", S_EXTERN)
+PG_KEYWORD("float", FLOAT_P)
+PG_KEYWORD("hour", HOUR_P)
+PG_KEYWORD("int", INT_P)
+PG_KEYWORD("long", SQL_LONG)
+PG_KEYWORD("minute", MINUTE_P)
+PG_KEYWORD("month", MONTH_P)
+PG_KEYWORD("register", S_REGISTER)
+PG_KEYWORD("second", SECOND_P)
+PG_KEYWORD("short", SQL_SHORT)
+PG_KEYWORD("signed", SQL_SIGNED)
+PG_KEYWORD("static", S_STATIC)
+PG_KEYWORD("struct", SQL_STRUCT)
+PG_KEYWORD("to", TO)
+PG_KEYWORD("typedef", S_TYPEDEF)
+PG_KEYWORD("union", UNION)
+PG_KEYWORD("unsigned", SQL_UNSIGNED)
+PG_KEYWORD("varchar", VARCHAR)
+PG_KEYWORD("volatile", S_VOLATILE)
+PG_KEYWORD("year", YEAR_P)
diff --git a/src/interfaces/ecpg/preproc/c_kwlist_d.h b/src/interfaces/ecpg/preproc/c_kwlist_d.h
new file mode 100644
index 0000000..5cdedad
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/c_kwlist_d.h
@@ -0,0 +1,118 @@
+/*-------------------------------------------------------------------------
+ *
+ * c_kwlist_d.h
+ * List of keywords represented as a ScanKeywordList.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * NOTES
+ * ******************************
+ * *** DO NOT EDIT THIS FILE! ***
+ * ******************************
+ *
+ * It has been GENERATED by src/tools/gen_keywordlist.pl
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef C_KWLIST_D_H
+#define C_KWLIST_D_H
+
+#include "common/kwlookup.h"
+
+static const char ScanCKeywords_kw_string[] =
+ "VARCHAR\0"
+ "auto\0"
+ "bool\0"
+ "char\0"
+ "const\0"
+ "enum\0"
+ "extern\0"
+ "float\0"
+ "hour\0"
+ "int\0"
+ "long\0"
+ "minute\0"
+ "month\0"
+ "register\0"
+ "second\0"
+ "short\0"
+ "signed\0"
+ "static\0"
+ "struct\0"
+ "to\0"
+ "typedef\0"
+ "union\0"
+ "unsigned\0"
+ "varchar\0"
+ "volatile\0"
+ "year";
+
+static const uint16 ScanCKeywords_kw_offsets[] = {
+ 0,
+ 8,
+ 13,
+ 18,
+ 23,
+ 29,
+ 34,
+ 41,
+ 47,
+ 52,
+ 56,
+ 61,
+ 68,
+ 74,
+ 83,
+ 90,
+ 96,
+ 103,
+ 110,
+ 117,
+ 120,
+ 128,
+ 134,
+ 143,
+ 151,
+ 160,
+};
+
+#define SCANCKEYWORDS_NUM_KEYWORDS 26
+
+static int
+ScanCKeywords_hash_func(const void *key, size_t keylen)
+{
+ static const int8 h[53] = {
+ -5, 0, 127, -9, 0, 127, 127, 3,
+ 127, 15, 127, 127, 127, 127, 11, 16,
+ 1, 0, 6, 16, 9, 5, 127, 0,
+ 127, 20, 24, -5, 5, 18, 5, 18,
+ 2, 127, 127, 127, 20, 127, -17, 0,
+ 127, 2, 127, 6, 127, -10, 12, 19,
+ 0, 0, 0, 127, 0
+ };
+
+ const unsigned char *k = (const unsigned char *) key;
+ uint32 a = 0;
+ uint32 b = 0;
+
+ while (keylen--)
+ {
+ unsigned char c = *k++;
+
+ a = a * 257 + c;
+ b = b * 17 + c;
+ }
+ return h[a % 53] + h[b % 53];
+}
+
+static const ScanKeywordList ScanCKeywords = {
+ ScanCKeywords_kw_string,
+ ScanCKeywords_kw_offsets,
+ ScanCKeywords_hash_func,
+ SCANCKEYWORDS_NUM_KEYWORDS,
+ 8
+};
+
+#endif /* C_KWLIST_D_H */
diff --git a/src/interfaces/ecpg/preproc/check_rules.pl b/src/interfaces/ecpg/preproc/check_rules.pl
new file mode 100644
index 0000000..c0b5d19
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/check_rules.pl
@@ -0,0 +1,191 @@
+#!/usr/bin/perl
+# src/interfaces/ecpg/preproc/check_rules.pl
+# test parser generator for ecpg
+# call with backend grammar as stdin
+#
+# Copyright (c) 2009-2021, PostgreSQL Global Development Group
+#
+# Written by Michael Meskes <meskes@postgresql.org>
+# Andy Colson <andy@squeakycode.net>
+#
+# Placed under the same license as PostgreSQL.
+#
+# Command line: [-v] [path only to ecpg.addons] [full filename of gram.y]
+# -v enables verbose mode... show's some stats... thought it might be interesting
+#
+# This script loads rule names from gram.y and sets $found{rule} = 1 for each.
+# Then it checks to make sure each rule in ecpg.addons was found in gram.y
+
+use strict;
+use warnings;
+no warnings 'uninitialized';
+
+my $verbose = 0;
+if ($ARGV[0] eq '-v')
+{
+ $verbose = shift;
+}
+my $path = shift || '.';
+my $parser = shift || '../../../backend/parser/gram.y';
+
+my $filename = $path . "/ecpg.addons";
+if ($verbose)
+{
+ print "parser: $parser\n";
+ print "addons: $filename\n";
+}
+
+my %replace_line = (
+ 'ExecuteStmtEXECUTEnameexecute_param_clause' =>
+ 'EXECUTE prepared_name execute_param_clause execute_rest',
+
+ 'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clauseopt_with_data'
+ => 'CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest',
+
+ 'ExecuteStmtCREATEOptTempTABLEIF_PNOTEXISTScreate_as_targetASEXECUTEnameexecute_param_clauseopt_with_data'
+ => 'CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest',
+
+ 'PrepareStmtPREPAREnameprep_type_clauseASPreparableStmt' =>
+ 'PREPARE prepared_name prep_type_clause AS PreparableStmt');
+
+my $block = '';
+my $yaccmode = 0;
+my $in_rule = 0;
+my $brace_indent = 0;
+my (@arr, %found);
+my $comment = 0;
+my $non_term_id = '';
+my $cc = 0;
+
+open my $parser_fh, '<', $parser or die $!;
+while (<$parser_fh>)
+{
+ if (/^%%/)
+ {
+ $yaccmode++;
+ }
+
+ if ($yaccmode != 1)
+ {
+ next;
+ }
+
+ chomp; # strip record separator
+
+ next if ($_ eq '');
+
+ # Make sure any braces are split
+ s/{/ { /g;
+ s/}/ } /g;
+
+ # Any comments are split
+ s|\/\*| /* |g;
+ s|\*\/| */ |g;
+
+ # Now split the line into individual fields
+ my $n = (@arr = split(' '));
+
+ # Go through each field in turn
+ for (my $fieldIndexer = 0; $fieldIndexer < $n; $fieldIndexer++)
+ {
+ if ($arr[$fieldIndexer] eq '*/' && $comment)
+ {
+ $comment = 0;
+ next;
+ }
+ elsif ($comment)
+ {
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '/*')
+ {
+
+ # start of a multiline comment
+ $comment = 1;
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '//')
+ {
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '}')
+ {
+ $brace_indent--;
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '{')
+ {
+ $brace_indent++;
+ next;
+ }
+
+ if ($brace_indent > 0)
+ {
+ next;
+ }
+
+ if ($arr[$fieldIndexer] eq ';' || $arr[$fieldIndexer] eq '|')
+ {
+ $block = $non_term_id . $block;
+ if ($replace_line{$block})
+ {
+ $block = $non_term_id . $replace_line{$block};
+ $block =~ tr/ |//d;
+ }
+ $found{$block} = 1;
+ $cc++;
+ $block = '';
+ $in_rule = 0 if $arr[$fieldIndexer] eq ';';
+ }
+ elsif (($arr[$fieldIndexer] =~ '[A-Za-z0-9]+:')
+ || $arr[ $fieldIndexer + 1 ] eq ':')
+ {
+ die "unterminated rule at grammar line $.\n"
+ if $in_rule;
+ $in_rule = 1;
+ $non_term_id = $arr[$fieldIndexer];
+ $non_term_id =~ tr/://d;
+ }
+ else
+ {
+ $block = $block . $arr[$fieldIndexer];
+ }
+ }
+}
+
+die "unterminated rule at end of grammar\n"
+ if $in_rule;
+
+close $parser_fh;
+if ($verbose)
+{
+ print "$cc rules loaded\n";
+}
+
+my $ret = 0;
+$cc = 0;
+
+open my $ecpg_fh, '<', $filename or die $!;
+while (<$ecpg_fh>)
+{
+ if (!/^ECPG:/)
+ {
+ next;
+ }
+
+ my @Fld = split(' ', $_, 3);
+ $cc++;
+ if (not exists $found{ $Fld[1] })
+ {
+ print $Fld[1], " is not used for building parser!\n";
+ $ret = 1;
+ }
+}
+close $ecpg_fh;
+
+if ($verbose)
+{
+ print "$cc rules checked\n";
+}
+
+exit $ret;
diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c
new file mode 100644
index 0000000..35d9471
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/descriptor.c
@@ -0,0 +1,367 @@
+/*
+ * functions needed for descriptor handling
+ *
+ * src/interfaces/ecpg/preproc/descriptor.c
+ *
+ * since descriptor might be either a string constant or a string var
+ * we need to check for a constant if we expect a constant
+ */
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+
+/*
+ * assignment handling function (descriptor)
+ */
+
+static struct assignment *assignments;
+
+void
+push_assignment(char *var, enum ECPGdtype value)
+{
+ struct assignment *new = (struct assignment *) mm_alloc(sizeof(struct assignment));
+
+ new->next = assignments;
+ new->variable = mm_alloc(strlen(var) + 1);
+ strcpy(new->variable, var);
+ new->value = value;
+ assignments = new;
+}
+
+static void
+drop_assignments(void)
+{
+ while (assignments)
+ {
+ struct assignment *old_head = assignments;
+
+ assignments = old_head->next;
+ free(old_head->variable);
+ free(old_head);
+ }
+}
+
+static void
+ECPGnumeric_lvalue(char *name)
+{
+ const struct variable *v = find_variable(name);
+
+ switch (v->type->type)
+ {
+ case ECPGt_short:
+ case ECPGt_int:
+ case ECPGt_long:
+ case ECPGt_long_long:
+ case ECPGt_unsigned_short:
+ case ECPGt_unsigned_int:
+ case ECPGt_unsigned_long:
+ case ECPGt_unsigned_long_long:
+ case ECPGt_const:
+ fputs(name, base_yyout);
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "variable \"%s\" must have a numeric type", name);
+ break;
+ }
+}
+
+/*
+ * descriptor name lookup
+ */
+
+static struct descriptor *descriptors;
+
+void
+add_descriptor(char *name, char *connection)
+{
+ struct descriptor *new;
+
+ if (name[0] != '"')
+ return;
+
+ new = (struct descriptor *) mm_alloc(sizeof(struct descriptor));
+
+ new->next = descriptors;
+ new->name = mm_alloc(strlen(name) + 1);
+ strcpy(new->name, name);
+ if (connection)
+ {
+ new->connection = mm_alloc(strlen(connection) + 1);
+ strcpy(new->connection, connection);
+ }
+ else
+ new->connection = connection;
+ descriptors = new;
+}
+
+void
+drop_descriptor(char *name, char *connection)
+{
+ struct descriptor *i;
+ struct descriptor **lastptr = &descriptors;
+
+ if (name[0] != '"')
+ return;
+
+ for (i = descriptors; i; lastptr = &i->next, i = i->next)
+ {
+ if (strcmp(name, i->name) == 0)
+ {
+ if ((!connection && !i->connection)
+ || (connection && i->connection
+ && strcmp(connection, i->connection) == 0))
+ {
+ *lastptr = i->next;
+ if (i->connection)
+ free(i->connection);
+ free(i->name);
+ free(i);
+ return;
+ }
+ }
+ }
+ if (connection)
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor %s bound to connection %s does not exist", name, connection);
+ else
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor %s bound to the default connection does not exist", name);
+}
+
+struct descriptor
+ *
+lookup_descriptor(char *name, char *connection)
+{
+ struct descriptor *i;
+
+ if (name[0] != '"')
+ return NULL;
+
+ for (i = descriptors; i; i = i->next)
+ {
+ if (strcmp(name, i->name) == 0)
+ {
+ if ((!connection && !i->connection)
+ || (connection && i->connection
+ && strcmp(connection, i->connection) == 0))
+ return i;
+ if (connection && !i->connection)
+ {
+ /* overwrite descriptor's connection */
+ i->connection = mm_strdup(connection);
+ return i;
+ }
+ }
+ }
+ if (connection)
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor %s bound to connection %s does not exist", name, connection);
+ else
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor %s bound to the default connection does not exist", name);
+ return NULL;
+}
+
+void
+output_get_descr_header(char *desc_name)
+{
+ struct assignment *results;
+
+ fprintf(base_yyout, "{ ECPGget_desc_header(__LINE__, %s, &(", desc_name);
+ for (results = assignments; results != NULL; results = results->next)
+ {
+ if (results->value == ECPGd_count)
+ ECPGnumeric_lvalue(results->variable);
+ else
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor header item \"%d\" does not exist", results->value);
+ }
+
+ drop_assignments();
+ fprintf(base_yyout, "));\n");
+ whenever_action(3);
+}
+
+void
+output_get_descr(char *desc_name, char *index)
+{
+ struct assignment *results;
+
+ fprintf(base_yyout, "{ ECPGget_desc(__LINE__, %s, %s,", desc_name, index);
+ for (results = assignments; results != NULL; results = results->next)
+ {
+ const struct variable *v = find_variable(results->variable);
+ char *str_zero = mm_strdup("0");
+
+ switch (results->value)
+ {
+ case ECPGd_nullable:
+ mmerror(PARSE_ERROR, ET_WARNING, "nullable is always 1");
+ break;
+ case ECPGd_key_member:
+ mmerror(PARSE_ERROR, ET_WARNING, "key_member is always 0");
+ break;
+ default:
+ break;
+ }
+ fprintf(base_yyout, "%s,", get_dtype(results->value));
+ ECPGdump_a_type(base_yyout, v->name, v->type, v->brace_level,
+ NULL, NULL, -1, NULL, NULL, str_zero, NULL, NULL);
+ free(str_zero);
+ }
+ drop_assignments();
+ fputs("ECPGd_EODT);\n", base_yyout);
+
+ whenever_action(2 | 1);
+}
+
+void
+output_set_descr_header(char *desc_name)
+{
+ struct assignment *results;
+
+ fprintf(base_yyout, "{ ECPGset_desc_header(__LINE__, %s, (int)(", desc_name);
+ for (results = assignments; results != NULL; results = results->next)
+ {
+ if (results->value == ECPGd_count)
+ ECPGnumeric_lvalue(results->variable);
+ else
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor header item \"%d\" does not exist", results->value);
+ }
+
+ drop_assignments();
+ fprintf(base_yyout, "));\n");
+ whenever_action(3);
+}
+
+static const char *
+descriptor_item_name(enum ECPGdtype itemcode)
+{
+ switch (itemcode)
+ {
+ case ECPGd_cardinality:
+ return "CARDINALITY";
+ case ECPGd_count:
+ return "COUNT";
+ case ECPGd_data:
+ return "DATA";
+ case ECPGd_di_code:
+ return "DATETIME_INTERVAL_CODE";
+ case ECPGd_di_precision:
+ return "DATETIME_INTERVAL_PRECISION";
+ case ECPGd_indicator:
+ return "INDICATOR";
+ case ECPGd_key_member:
+ return "KEY_MEMBER";
+ case ECPGd_length:
+ return "LENGTH";
+ case ECPGd_name:
+ return "NAME";
+ case ECPGd_nullable:
+ return "NULLABLE";
+ case ECPGd_octet:
+ return "OCTET_LENGTH";
+ case ECPGd_precision:
+ return "PRECISION";
+ case ECPGd_ret_length:
+ return "RETURNED_LENGTH";
+ case ECPGd_ret_octet:
+ return "RETURNED_OCTET_LENGTH";
+ case ECPGd_scale:
+ return "SCALE";
+ case ECPGd_type:
+ return "TYPE";
+ default:
+ return NULL;
+ }
+}
+
+void
+output_set_descr(char *desc_name, char *index)
+{
+ struct assignment *results;
+
+ fprintf(base_yyout, "{ ECPGset_desc(__LINE__, %s, %s,", desc_name, index);
+ for (results = assignments; results != NULL; results = results->next)
+ {
+ const struct variable *v = find_variable(results->variable);
+
+ switch (results->value)
+ {
+ case ECPGd_cardinality:
+ case ECPGd_di_code:
+ case ECPGd_di_precision:
+ case ECPGd_precision:
+ case ECPGd_scale:
+ mmfatal(PARSE_ERROR, "descriptor item \"%s\" is not implemented",
+ descriptor_item_name(results->value));
+ break;
+
+ case ECPGd_key_member:
+ case ECPGd_name:
+ case ECPGd_nullable:
+ case ECPGd_octet:
+ case ECPGd_ret_length:
+ case ECPGd_ret_octet:
+ mmfatal(PARSE_ERROR, "descriptor item \"%s\" cannot be set",
+ descriptor_item_name(results->value));
+ break;
+
+ case ECPGd_data:
+ case ECPGd_indicator:
+ case ECPGd_length:
+ case ECPGd_type:
+ {
+ char *str_zero = mm_strdup("0");
+
+ fprintf(base_yyout, "%s,", get_dtype(results->value));
+ ECPGdump_a_type(base_yyout, v->name, v->type, v->brace_level,
+ NULL, NULL, -1, NULL, NULL, str_zero, NULL, NULL);
+ free(str_zero);
+ }
+ break;
+
+ default:
+ ;
+ }
+ }
+ drop_assignments();
+ fputs("ECPGd_EODT);\n", base_yyout);
+
+ whenever_action(2 | 1);
+}
+
+/* I consider dynamic allocation overkill since at most two descriptor
+ variables are possible per statement. (input and output descriptor)
+ And descriptors are no normal variables, so they don't belong into
+ the variable list.
+*/
+
+#define MAX_DESCRIPTOR_NAMELEN 128
+struct variable *
+descriptor_variable(const char *name, int input)
+{
+ static char descriptor_names[2][MAX_DESCRIPTOR_NAMELEN];
+ static struct ECPGtype descriptor_type = {ECPGt_descriptor, NULL, NULL, NULL, {NULL}, 0};
+ static struct variable varspace[2] = {
+ {descriptor_names[0], &descriptor_type, 0, NULL},
+ {descriptor_names[1], &descriptor_type, 0, NULL}
+ };
+
+ strlcpy(descriptor_names[input], name, sizeof(descriptor_names[input]));
+ return &varspace[input];
+}
+
+struct variable *
+sqlda_variable(const char *name)
+{
+ struct variable *p = (struct variable *) mm_alloc(sizeof(struct variable));
+
+ p->name = mm_strdup(name);
+ p->type = (struct ECPGtype *) mm_alloc(sizeof(struct ECPGtype));
+ p->type->type = ECPGt_sqlda;
+ p->type->size = NULL;
+ p->type->struct_sizeof = NULL;
+ p->type->u.element = NULL;
+ p->type->counter = 0;
+ p->brace_level = 0;
+ p->next = NULL;
+
+ return p;
+}
diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons
new file mode 100644
index 0000000..94f7d4a
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.addons
@@ -0,0 +1,590 @@
+/* src/interfaces/ecpg/preproc/ecpg.addons */
+ECPG: stmtClosePortalStmt block
+ {
+ if (INFORMIX_MODE)
+ {
+ if (pg_strcasecmp($1+strlen("close "), "database") == 0)
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CLOSE DATABASE statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");");
+ whenever_action(2);
+ free($1);
+ break;
+ }
+ }
+
+ output_statement($1, 0, ECPGst_normal);
+ }
+ECPG: stmtDeallocateStmt block
+ {
+ output_deallocate_prepare_statement($1);
+ }
+ECPG: stmtDeclareCursorStmt block
+ { output_simple_statement($1, (strncmp($1, "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0); }
+ECPG: stmtDiscardStmt block
+ECPG: stmtFetchStmt block
+ { output_statement($1, 1, ECPGst_normal); }
+ECPG: stmtDeleteStmt block
+ECPG: stmtInsertStmt block
+ECPG: stmtSelectStmt block
+ECPG: stmtUpdateStmt block
+ { output_statement($1, 1, ECPGst_prepnormal); }
+ECPG: stmtExecuteStmt block
+ {
+ check_declared_list($1.name);
+ if ($1.type == NULL || strlen($1.type) == 0)
+ output_statement($1.name, 1, ECPGst_execute);
+ else
+ {
+ if ($1.name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable($1.name), &no_indicator);
+ else
+ {
+ /* case of ecpg_ident or CSTRING */
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup($1.name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(3, mm_strdup("execute"), mm_strdup("$0"), $1.type), 0, ECPGst_exec_with_exprlist);
+ }
+ }
+ECPG: stmtPrepareStmt block
+ {
+ check_declared_list($1.name);
+ if ($1.type == NULL)
+ output_prepare_statement($1.name, $1.stmt);
+ else if (strlen($1.type) == 0)
+ {
+ char *stmt = cat_str(3, mm_strdup("\""), $1.stmt, mm_strdup("\""));
+ output_prepare_statement($1.name, stmt);
+ }
+ else
+ {
+ if ($1.name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable($1.name), &no_indicator);
+ else
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup($1.name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(5, mm_strdup("prepare"), mm_strdup("$0"), $1.type, mm_strdup("as"), $1.stmt), 0, ECPGst_prepare);
+ }
+ }
+ECPG: stmtTransactionStmt block
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);
+ whenever_action(2);
+ free($1);
+ }
+ECPG: toplevel_stmtTransactionStmtLegacy block
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);
+ whenever_action(2);
+ free($1);
+ }
+ECPG: stmtViewStmt rule
+ | ECPGAllocateDescr
+ {
+ fprintf(base_yyout,"ECPGallocate_desc(__LINE__, %s);",$1);
+ whenever_action(0);
+ free($1);
+ }
+ | ECPGConnect
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGconnect(__LINE__, %d, %s, %d); ", compat, $1, autocommit);
+ reset_variables();
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGDeclareStmt
+ {
+ output_simple_statement($1, 0);
+ }
+ | ECPGCursorStmt
+ {
+ output_simple_statement($1, (strncmp($1, "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0);
+ }
+ | ECPGDeallocateDescr
+ {
+ fprintf(base_yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1);
+ whenever_action(0);
+ free($1);
+ }
+ | ECPGDeclare
+ {
+ output_simple_statement($1, 0);
+ }
+ | ECPGDescribe
+ {
+ check_declared_list($1.stmt_name);
+
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %d, %s, %s,", compat, $1.input, connection ? connection : "NULL", $1.stmt_name);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free($1.stmt_name);
+ }
+ | ECPGDisconnect
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in DISCONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, %s);",
+ $1 ? $1 : "\"CURRENT\"");
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGExecuteImmediateStmt { output_statement($1, 0, ECPGst_exec_immediate); }
+ | ECPGFree
+ {
+ const char *con = connection ? connection : "NULL";
+
+ if (strcmp($1, "all") == 0)
+ fprintf(base_yyout, "{ ECPGdeallocate_all(__LINE__, %d, %s);", compat, con);
+ else if ($1[0] == ':')
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, %s);", compat, con, $1+1);
+ else
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, \"%s\");", compat, con, $1);
+
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGGetDescriptor
+ {
+ lookup_descriptor($1.name, connection);
+ output_get_descr($1.name, $1.str);
+ free($1.name);
+ free($1.str);
+ }
+ | ECPGGetDescriptorHeader
+ {
+ lookup_descriptor($1, connection);
+ output_get_descr_header($1);
+ free($1);
+ }
+ | ECPGOpen
+ {
+ struct cursor *ptr;
+
+ if ((ptr = add_additional_variables($1, true)) != NULL)
+ {
+ connection = ptr->connection ? mm_strdup(ptr->connection) : NULL;
+ output_statement(mm_strdup(ptr->command), 0, ECPGst_normal);
+ ptr->opened = true;
+ }
+ }
+ | ECPGSetAutocommit
+ {
+ fprintf(base_yyout, "{ ECPGsetcommit(__LINE__, \"%s\", %s);", $1, connection ? connection : "NULL");
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGSetConnection
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in SET CONNECTION statement");
+
+ fprintf(base_yyout, "{ ECPGsetconn(__LINE__, %s);", $1);
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGSetDescriptor
+ {
+ lookup_descriptor($1.name, connection);
+ output_set_descr($1.name, $1.str);
+ free($1.name);
+ free($1.str);
+ }
+ | ECPGSetDescriptorHeader
+ {
+ lookup_descriptor($1, connection);
+ output_set_descr_header($1);
+ free($1);
+ }
+ | ECPGTypedef
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in TYPE statement");
+
+ fprintf(base_yyout, "%s", $1);
+ free($1);
+ output_line_number();
+ }
+ | ECPGVar
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in VAR statement");
+
+ output_simple_statement($1, 0);
+ }
+ | ECPGWhenever
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in WHENEVER statement");
+
+ output_simple_statement($1, 0);
+ }
+ECPG: where_or_current_clauseWHERECURRENT_POFcursor_name block
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ $$ = cat_str(2,mm_strdup("where current of"), cursor_marker);
+ }
+ECPG: CopyStmtCOPYopt_binaryqualified_nameopt_column_listcopy_fromopt_programcopy_file_namecopy_delimiteropt_withcopy_optionswhere_clause addon
+ if (strcmp($6, "from") == 0 &&
+ (strcmp($7, "stdin") == 0 || strcmp($7, "stdout") == 0))
+ mmerror(PARSE_ERROR, ET_WARNING, "COPY FROM STDIN is not implemented");
+ECPG: var_valueNumericOnly addon
+ if ($1[0] == '$')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+ECPG: fetch_argscursor_name addon
+ struct cursor *ptr = add_additional_variables($1, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($1[0] == ':')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+ECPG: fetch_argsfrom_incursor_name addon
+ struct cursor *ptr = add_additional_variables($2, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($2[0] == ':')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+ECPG: fetch_argsNEXTopt_from_incursor_name addon
+ECPG: fetch_argsPRIORopt_from_incursor_name addon
+ECPG: fetch_argsFIRST_Popt_from_incursor_name addon
+ECPG: fetch_argsLAST_Popt_from_incursor_name addon
+ECPG: fetch_argsALLopt_from_incursor_name addon
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+ECPG: fetch_argsSignedIconstopt_from_incursor_name addon
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+ if ($1[0] == '$')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+ECPG: fetch_argsFORWARDALLopt_from_incursor_name addon
+ECPG: fetch_argsBACKWARDALLopt_from_incursor_name addon
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ECPG: fetch_argsABSOLUTE_PSignedIconstopt_from_incursor_name addon
+ECPG: fetch_argsRELATIVE_PSignedIconstopt_from_incursor_name addon
+ECPG: fetch_argsFORWARDSignedIconstopt_from_incursor_name addon
+ECPG: fetch_argsBACKWARDSignedIconstopt_from_incursor_name addon
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ if ($2[0] == '$')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+ECPG: cursor_namename rule
+ | char_civar
+ {
+ char *curname = mm_alloc(strlen($1) + 2);
+ sprintf(curname, ":%s", $1);
+ free($1);
+ $1 = curname;
+ $$ = $1;
+ }
+ECPG: ExplainableStmtExecuteStmt block
+ {
+ $$ = $1.name;
+ }
+ECPG: PrepareStmtPREPAREprepared_nameprep_type_clauseASPreparableStmt block
+ {
+ $$.name = $2;
+ $$.type = $3;
+ $$.stmt = $5;
+ }
+ | PREPARE prepared_name FROM execstring
+ {
+ $$.name = $2;
+ $$.type = NULL;
+ $$.stmt = $4;
+ }
+ECPG: ExecuteStmtEXECUTEprepared_nameexecute_param_clauseexecute_rest block
+ {
+ $$.name = $2;
+ $$.type = $3;
+ }
+ECPG: ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEprepared_nameexecute_param_clauseopt_with_dataexecute_rest block
+ {
+ $$.name = cat_str(8,mm_strdup("create"),$2,mm_strdup("table"),$4,mm_strdup("as execute"),$7,$8,$9);
+ }
+ECPG: ExecuteStmtCREATEOptTempTABLEIF_PNOTEXISTScreate_as_targetASEXECUTEprepared_nameexecute_param_clauseopt_with_dataexecute_rest block
+ {
+ $$.name = cat_str(8,mm_strdup("create"),$2,mm_strdup("table if not exists"),$7,mm_strdup("as execute"),$10,$11,$12);
+ }
+ECPG: DeclareCursorStmtDECLAREcursor_namecursor_optionsCURSORopt_holdFORSelectStmt block
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
+ char *comment, *c1, *c2;
+ int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
+
+ if (INFORMIX_MODE && pg_strcasecmp($2, "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn($2, ptr->name) == 0)
+ {
+ if ($2[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", $2+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", $2);
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ this->next = cur;
+ this->name = $2;
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->opened = false;
+ this->command = cat_str(7, mm_strdup("declare"), cursor_marker, $3, mm_strdup("cursor"), $5, mm_strdup("for"), $7);
+ this->argsinsert = argsinsert;
+ this->argsinsert_oos = NULL;
+ this->argsresult = argsresult;
+ this->argsresult_oos = NULL;
+ argsinsert = argsresult = NULL;
+ cur = this;
+
+ c1 = mm_strdup(this->command);
+ if ((c2 = strstr(c1, "*/")) != NULL)
+ {
+ /* We put this text into a comment, so we better remove [*][/]. */
+ c2[0] = '.';
+ c2[1] = '.';
+ }
+ comment = cat_str(3, mm_strdup("/*"), c1, mm_strdup("*/"));
+
+ $$ = cat2_str(adjust_outofscope_cursor_vars(this), comment);
+ }
+ECPG: ClosePortalStmtCLOSEcursor_name block
+ {
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : $2;
+ struct cursor *ptr = NULL;
+ for (ptr = cur; ptr != NULL; ptr = ptr -> next)
+ {
+ if (strcmp($2, ptr -> name) == 0)
+ {
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ break;
+ }
+ }
+ $$ = cat2_str(mm_strdup("close"), cursor_marker);
+ }
+ECPG: opt_hold block
+ {
+ if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
+ $$ = mm_strdup("with hold");
+ else
+ $$ = EMPTY;
+ }
+ECPG: into_clauseINTOOptTempTableName block
+ {
+ FoundInto = 1;
+ $$= cat2_str(mm_strdup("into"), $2);
+ }
+ | ecpg_into { $$ = EMPTY; }
+ECPG: table_refselect_with_parensopt_alias_clause addon
+ if ($2 == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+ECPG: table_refLATERAL_Pselect_with_parensopt_alias_clause addon
+ if ($3 == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+ECPG: TypenameSimpleTypenameopt_array_bounds block
+ { $$ = cat2_str($1, $2.str); }
+ECPG: TypenameSETOFSimpleTypenameopt_array_bounds block
+ { $$ = cat_str(3, mm_strdup("setof"), $2, $3.str); }
+ECPG: opt_array_boundsopt_array_bounds'['']' block
+ {
+ $$.index1 = $1.index1;
+ $$.index2 = $1.index2;
+ if (strcmp($$.index1, "-1") == 0)
+ $$.index1 = mm_strdup("0");
+ else if (strcmp($1.index2, "-1") == 0)
+ $$.index2 = mm_strdup("0");
+ $$.str = cat_str(2, $1.str, mm_strdup("[]"));
+ }
+ | opt_array_bounds '[' Iresult ']'
+ {
+ $$.index1 = $1.index1;
+ $$.index2 = $1.index2;
+ if (strcmp($1.index1, "-1") == 0)
+ $$.index1 = mm_strdup($3);
+ else if (strcmp($1.index2, "-1") == 0)
+ $$.index2 = mm_strdup($3);
+ $$.str = cat_str(4, $1.str, mm_strdup("["), $3, mm_strdup("]"));
+ }
+ECPG: opt_array_bounds
+ {
+ $$.index1 = mm_strdup("-1");
+ $$.index2 = mm_strdup("-1");
+ $$.str= EMPTY;
+ }
+ECPG: IconstICONST block
+ { $$ = make_name(); }
+ECPG: AexprConstNULL_P rule
+ | civar { $$ = $1; }
+ | civarind { $$ = $1; }
+ECPG: ColIdcol_name_keyword rule
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ECPG: type_function_nametype_func_name_keyword rule
+ | ECPGKeywords { $$ = $1; }
+ | ECPGTypeName { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ECPG: VariableShowStmtSHOWALL block
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "SHOW ALL is not implemented");
+ $$ = EMPTY;
+ }
+ECPG: FetchStmtMOVEfetch_args rule
+ | FETCH fetch_args ecpg_fetch_into
+ {
+ $$ = cat2_str(mm_strdup("fetch"), $2);
+ }
+ | FETCH FORWARD cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch forward"), cursor_marker);
+ }
+ | FETCH FORWARD from_in cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch forward from"), cursor_marker);
+ }
+ | FETCH BACKWARD cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch backward"), cursor_marker);
+ }
+ | FETCH BACKWARD from_in cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+ | MOVE FORWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+ | MOVE FORWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+ | MOVE BACKWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+ | MOVE BACKWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move backward from"), cursor_marker);
+ }
+ECPG: limit_clauseLIMITselect_limit_value','select_offset_value block
+ {
+ mmerror(PARSE_ERROR, ET_WARNING, "no longer supported LIMIT #,# syntax passed to server");
+ $$ = cat_str(4, mm_strdup("limit"), $2, mm_strdup(","), $4);
+ }
+ECPG: SignedIconstIconst rule
+ | civar { $$ = $1; }
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
new file mode 100644
index 0000000..13e0f8c
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -0,0 +1,504 @@
+/* src/interfaces/ecpg/preproc/ecpg.c */
+
+/* Main for ecpg, the PostgreSQL embedded SQL precompiler. */
+/* Copyright (c) 1996-2021, PostgreSQL Global Development Group */
+
+#include "postgres_fe.h"
+
+#include <unistd.h>
+
+#include "getopt_long.h"
+
+#include "preproc_extern.h"
+
+int ret_value = 0;
+bool autocommit = false,
+ auto_create_c = false,
+ system_includes = false,
+ force_indicator = true,
+ questionmarks = false,
+ regression_mode = false,
+ auto_prepare = false;
+
+char *output_filename;
+
+enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL;
+
+struct _include_path *include_paths = NULL;
+struct cursor *cur = NULL;
+struct typedefs *types = NULL;
+struct _defines *defines = NULL;
+struct declared_list *g_declared_list = NULL;
+
+static void
+help(const char *progname)
+{
+ printf(_("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n"),
+ progname);
+ printf(_("Usage:\n"
+ " %s [OPTION]... FILE...\n\n"),
+ progname);
+ printf(_("Options:\n"));
+ printf(_(" -c automatically generate C code from embedded SQL code;\n"
+ " this affects EXEC SQL TYPE\n"));
+ printf(_(" -C MODE set compatibility mode; MODE can be one of\n"
+ " \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"));
+#ifdef YYDEBUG
+ printf(_(" -d generate parser debug output\n"));
+#endif
+ printf(_(" -D SYMBOL define SYMBOL\n"));
+ printf(_(" -h parse a header file, this option includes option \"-c\"\n"));
+ printf(_(" -i parse system include files as well\n"));
+ printf(_(" -I DIRECTORY search DIRECTORY for include files\n"));
+ printf(_(" -o OUTFILE write result to OUTFILE\n"));
+ printf(_(" -r OPTION specify run-time behavior; OPTION can be:\n"
+ " \"no_indicator\", \"prepare\", \"questionmarks\"\n"));
+ printf(_(" --regression run in regression testing mode\n"));
+ printf(_(" -t turn on autocommit of transactions\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nIf no output file is specified, the name is formed by adding .c to the\n"
+ "input file name, after stripping off .pgc if present.\n"));
+ printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+}
+
+static void
+add_include_path(char *path)
+{
+ struct _include_path *ip = include_paths,
+ *new;
+
+ new = mm_alloc(sizeof(struct _include_path));
+ new->path = path;
+ new->next = NULL;
+
+ if (ip == NULL)
+ include_paths = new;
+ else
+ {
+ for (; ip->next != NULL; ip = ip->next);
+ ip->next = new;
+ }
+}
+
+static void
+add_preprocessor_define(char *define)
+{
+ struct _defines *pd = defines;
+ char *ptr,
+ *define_copy = mm_strdup(define);
+
+ defines = mm_alloc(sizeof(struct _defines));
+
+ /* look for = sign */
+ ptr = strchr(define_copy, '=');
+ if (ptr != NULL)
+ {
+ char *tmp;
+
+ /* symbol has a value */
+ for (tmp = ptr - 1; *tmp == ' '; tmp--);
+ tmp[1] = '\0';
+ defines->olddef = define_copy;
+ defines->newdef = ptr + 1;
+ }
+ else
+ {
+ defines->olddef = define_copy;
+ defines->newdef = mm_strdup("1");
+ }
+ defines->pertinent = true;
+ defines->used = NULL;
+ defines->next = pd;
+}
+
+#define ECPG_GETOPT_LONG_REGRESSION 1
+int
+main(int argc, char *const argv[])
+{
+ static struct option ecpg_options[] = {
+ {"regression", no_argument, NULL, ECPG_GETOPT_LONG_REGRESSION},
+ {NULL, 0, NULL, 0}
+ };
+
+ int fnr,
+ c,
+ out_option = 0;
+ bool verbose = false,
+ header_mode = false;
+ struct _include_path *ip;
+ const char *progname;
+ char my_exec_path[MAXPGPATH];
+ char include_path[MAXPGPATH];
+
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("ecpg"));
+
+ progname = get_progname(argv[0]);
+
+ if (find_my_exec(argv[0], my_exec_path) < 0)
+ {
+ fprintf(stderr, _("%s: could not locate my own executable path\n"), argv[0]);
+ return ILLEGAL_OPTION;
+ }
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ help(progname);
+ exit(0);
+ }
+ if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
+ {
+ printf("ecpg (PostgreSQL) %s\n", PG_VERSION);
+ exit(0);
+ }
+ }
+
+ output_filename = NULL;
+ while ((c = getopt_long(argc, argv, "vcio:I:tD:dC:r:h", ecpg_options, NULL)) != -1)
+ {
+ switch (c)
+ {
+ case ECPG_GETOPT_LONG_REGRESSION:
+ regression_mode = true;
+ break;
+ case 'o':
+ output_filename = mm_strdup(optarg);
+ if (strcmp(output_filename, "-") == 0)
+ base_yyout = stdout;
+ else
+ base_yyout = fopen(output_filename, PG_BINARY_W);
+
+ if (base_yyout == NULL)
+ {
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+ progname, output_filename, strerror(errno));
+ output_filename = NULL;
+ }
+ else
+ out_option = 1;
+ break;
+ case 'I':
+ add_include_path(optarg);
+ break;
+ case 't':
+ autocommit = true;
+ break;
+ case 'v':
+ verbose = true;
+ break;
+ case 'h':
+ header_mode = true;
+ /* this must include "-c" to make sense, so fall through */
+ /* FALLTHROUGH */
+ case 'c':
+ auto_create_c = true;
+ break;
+ case 'i':
+ system_includes = true;
+ break;
+ case 'C':
+ if (pg_strcasecmp(optarg, "INFORMIX") == 0 || pg_strcasecmp(optarg, "INFORMIX_SE") == 0)
+ {
+ char pkginclude_path[MAXPGPATH];
+ char informix_path[MAXPGPATH];
+
+ compat = (pg_strcasecmp(optarg, "INFORMIX") == 0) ? ECPG_COMPAT_INFORMIX : ECPG_COMPAT_INFORMIX_SE;
+ get_pkginclude_path(my_exec_path, pkginclude_path);
+ snprintf(informix_path, MAXPGPATH, "%s/informix/esql", pkginclude_path);
+ add_include_path(informix_path);
+ }
+ else if (pg_strcasecmp(optarg, "ORACLE") == 0)
+ {
+ compat = ECPG_COMPAT_ORACLE;
+ }
+ else
+ {
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);
+ return ILLEGAL_OPTION;
+ }
+ break;
+ case 'r':
+ if (pg_strcasecmp(optarg, "no_indicator") == 0)
+ force_indicator = false;
+ else if (pg_strcasecmp(optarg, "prepare") == 0)
+ auto_prepare = true;
+ else if (pg_strcasecmp(optarg, "questionmarks") == 0)
+ questionmarks = true;
+ else
+ {
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);
+ return ILLEGAL_OPTION;
+ }
+ break;
+ case 'D':
+ add_preprocessor_define(optarg);
+ break;
+ case 'd':
+#ifdef YYDEBUG
+ base_yydebug = 1;
+#else
+ fprintf(stderr, _("%s: parser debug support (-d) not available\n"),
+ progname);
+#endif
+ break;
+ default:
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);
+ return ILLEGAL_OPTION;
+ }
+ }
+
+ add_include_path(".");
+ add_include_path("/usr/local/include");
+ get_include_path(my_exec_path, include_path);
+ add_include_path(include_path);
+ add_include_path("/usr/include");
+
+ if (verbose)
+ {
+ fprintf(stderr,
+ _("%s, the PostgreSQL embedded C preprocessor, version %s\n"),
+ progname, PG_VERSION);
+ fprintf(stderr, _("EXEC SQL INCLUDE ... search starts here:\n"));
+ for (ip = include_paths; ip != NULL; ip = ip->next)
+ fprintf(stderr, " %s\n", ip->path);
+ fprintf(stderr, _("end of search list\n"));
+ return 0;
+ }
+
+ if (optind >= argc) /* no files specified */
+ {
+ fprintf(stderr, _("%s: no input files specified\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);
+ return ILLEGAL_OPTION;
+ }
+ else
+ {
+ /* after the options there must not be anything but filenames */
+ for (fnr = optind; fnr < argc; fnr++)
+ {
+ char *ptr2ext;
+
+ /* If argv[fnr] is "-" we have to read from stdin */
+ if (strcmp(argv[fnr], "-") == 0)
+ {
+ input_filename = mm_alloc(strlen("stdin") + 1);
+ strcpy(input_filename, "stdin");
+ base_yyin = stdin;
+ }
+ else
+ {
+ input_filename = mm_alloc(strlen(argv[fnr]) + 5);
+ strcpy(input_filename, argv[fnr]);
+
+ /* take care of relative paths */
+ ptr2ext = last_dir_separator(input_filename);
+ ptr2ext = (ptr2ext ? strrchr(ptr2ext, '.') : strrchr(input_filename, '.'));
+
+ /* no extension? */
+ if (ptr2ext == NULL)
+ {
+ ptr2ext = input_filename + strlen(input_filename);
+
+ /* no extension => add .pgc or .pgh */
+ ptr2ext[0] = '.';
+ ptr2ext[1] = 'p';
+ ptr2ext[2] = 'g';
+ ptr2ext[3] = (header_mode == true) ? 'h' : 'c';
+ ptr2ext[4] = '\0';
+ }
+
+ base_yyin = fopen(input_filename, PG_BINARY_R);
+ }
+
+ if (out_option == 0) /* calculate the output name */
+ {
+ if (strcmp(input_filename, "stdin") == 0)
+ base_yyout = stdout;
+ else
+ {
+ output_filename = mm_alloc(strlen(input_filename) + 3);
+ strcpy(output_filename, input_filename);
+
+ ptr2ext = strrchr(output_filename, '.');
+ /* make extension = .c resp. .h */
+ ptr2ext[1] = (header_mode == true) ? 'h' : 'c';
+ ptr2ext[2] = '\0';
+
+ base_yyout = fopen(output_filename, PG_BINARY_W);
+ if (base_yyout == NULL)
+ {
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+ progname, output_filename, strerror(errno));
+ free(output_filename);
+ output_filename = NULL;
+ free(input_filename);
+ continue;
+ }
+ }
+ }
+
+ if (base_yyin == NULL)
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+ progname, argv[fnr], strerror(errno));
+ else
+ {
+ struct cursor *ptr;
+ struct _defines *defptr;
+ struct typedefs *typeptr;
+ struct declared_list *list;
+
+ /* remove old cursor definitions if any are still there */
+ for (ptr = cur; ptr != NULL;)
+ {
+ struct cursor *this = ptr;
+ struct arguments *l1,
+ *l2;
+
+ free(ptr->command);
+ free(ptr->connection);
+ free(ptr->name);
+ for (l1 = ptr->argsinsert; l1; l1 = l2)
+ {
+ l2 = l1->next;
+ free(l1);
+ }
+ for (l1 = ptr->argsresult; l1; l1 = l2)
+ {
+ l2 = l1->next;
+ free(l1);
+ }
+ ptr = ptr->next;
+ free(this);
+ }
+ cur = NULL;
+
+ /* remove old declared statements if any are still there */
+ for (list = g_declared_list; list != NULL;)
+ {
+ struct declared_list *this = list;
+
+ list = list->next;
+ free(this);
+ }
+
+ /* remove non-pertinent old defines as well */
+ while (defines && !defines->pertinent)
+ {
+ defptr = defines;
+ defines = defines->next;
+
+ free(defptr->newdef);
+ free(defptr->olddef);
+ free(defptr);
+ }
+
+ for (defptr = defines; defptr != NULL; defptr = defptr->next)
+ {
+ struct _defines *this = defptr->next;
+
+ if (this && !this->pertinent)
+ {
+ defptr->next = this->next;
+
+ free(this->newdef);
+ free(this->olddef);
+ free(this);
+ }
+ }
+
+ /* and old typedefs */
+ for (typeptr = types; typeptr != NULL;)
+ {
+ struct typedefs *this = typeptr;
+
+ free(typeptr->name);
+ ECPGfree_struct_member(typeptr->struct_member_list);
+ free(typeptr->type);
+ typeptr = typeptr->next;
+ free(this);
+ }
+ types = NULL;
+
+ /* initialize whenever structures */
+ memset(&when_error, 0, sizeof(struct when));
+ memset(&when_nf, 0, sizeof(struct when));
+ memset(&when_warn, 0, sizeof(struct when));
+
+ /* and structure member lists */
+ memset(struct_member_list, 0, sizeof(struct_member_list));
+
+ /*
+ * and our variable counter for out of scope cursors'
+ * variables
+ */
+ ecpg_internal_var = 0;
+
+ /* finally the actual connection */
+ connection = NULL;
+
+ /* initialize lex */
+ lex_init();
+
+ /* we need several includes */
+ /* but not if we are in header mode */
+ if (regression_mode)
+ fprintf(base_yyout, "/* Processed by ecpg (regression mode) */\n");
+ else
+ fprintf(base_yyout, "/* Processed by ecpg (%s) */\n", PG_VERSION);
+
+ if (header_mode == false)
+ {
+ fprintf(base_yyout, "/* These include files are added by the preprocessor */\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
+
+ /* add some compatibility headers */
+ if (INFORMIX_MODE)
+ fprintf(base_yyout, "/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
+
+ fprintf(base_yyout, "/* End of automatic include section */\n");
+ }
+
+ if (regression_mode)
+ fprintf(base_yyout, "#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))\n");
+
+ output_line_number();
+
+ /* and parse the source */
+ base_yyparse();
+
+ /*
+ * Check whether all cursors were indeed opened. It does not
+ * really make sense to declare a cursor but not open it.
+ */
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ if (!(ptr->opened))
+ mmerror(PARSE_ERROR, ET_WARNING, "cursor \"%s\" has been declared but not opened", ptr->name);
+
+ if (base_yyin != NULL && base_yyin != stdin)
+ fclose(base_yyin);
+ if (out_option == 0 && base_yyout != stdout)
+ fclose(base_yyout);
+
+ /*
+ * If there was an error, delete the output file.
+ */
+ if (ret_value != 0)
+ {
+ if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
+ fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
+ }
+ }
+
+ if (output_filename && out_option == 0)
+ {
+ free(output_filename);
+ output_filename = NULL;
+ }
+
+ free(input_filename);
+ }
+ }
+ return ret_value;
+}
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
new file mode 100644
index 0000000..b8508a9
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -0,0 +1,626 @@
+/* src/interfaces/ecpg/preproc/ecpg.header */
+
+/* Copyright comment */
+%{
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+#include "ecpg_config.h"
+#include <unistd.h>
+
+/* Location tracking support --- simpler than bison's default */
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do { \
+ if (N) \
+ (Current) = (Rhs)[1]; \
+ else \
+ (Current) = (Rhs)[0]; \
+ } while (0)
+
+/*
+ * The %name-prefix option below will make bison call base_yylex, but we
+ * really want it to call filtered_base_yylex (see parser.c).
+ */
+#define base_yylex filtered_base_yylex
+
+/*
+ * This is only here so the string gets into the POT. Bison uses it
+ * internally.
+ */
+#define bison_gettext_dummy gettext_noop("syntax error")
+
+/*
+ * Variables containing simple states.
+ */
+int struct_level = 0;
+int braces_open; /* brace level counter */
+char *current_function;
+int ecpg_internal_var = 0;
+char *connection = NULL;
+char *input_filename = NULL;
+
+static int FoundInto = 0;
+static int initializer = 0;
+static int pacounter = 1;
+static char pacounter_buffer[sizeof(int) * CHAR_BIT * 10 / 3]; /* a rough guess at the size we need */
+static struct this_type actual_type[STRUCT_DEPTH];
+static char *actual_startline[STRUCT_DEPTH];
+static int varchar_counter = 1;
+static int bytea_counter = 1;
+
+/* temporarily store struct members while creating the data structure */
+struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH] = { NULL };
+
+/* also store struct type so we can do a sizeof() later */
+static char *ECPGstruct_sizeof = NULL;
+
+/* for forward declarations we have to store some data as well */
+static char *forward_name = NULL;
+
+struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR, NULL, NULL, NULL, {NULL}, 0};
+struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
+
+static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
+
+static void vmmerror(int error_code, enum errortype type, const char *error, va_list ap) pg_attribute_printf(3, 0);
+
+static bool check_declared_list(const char*);
+
+/*
+ * Handle parsing errors and warnings
+ */
+static void
+vmmerror(int error_code, enum errortype type, const char *error, va_list ap)
+{
+ /* localize the error message string */
+ error = _(error);
+
+ fprintf(stderr, "%s:%d: ", input_filename, base_yylineno);
+
+ switch(type)
+ {
+ case ET_WARNING:
+ fprintf(stderr, _("WARNING: "));
+ break;
+ case ET_ERROR:
+ fprintf(stderr, _("ERROR: "));
+ break;
+ }
+
+ vfprintf(stderr, error, ap);
+
+ fprintf(stderr, "\n");
+
+ switch(type)
+ {
+ case ET_WARNING:
+ break;
+ case ET_ERROR:
+ ret_value = error_code;
+ break;
+ }
+}
+
+void
+mmerror(int error_code, enum errortype type, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, type, error, ap);
+ va_end(ap);
+}
+
+void
+mmfatal(int error_code, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, ET_ERROR, error, ap);
+ va_end(ap);
+
+ if (base_yyin)
+ fclose(base_yyin);
+ if (base_yyout)
+ fclose(base_yyout);
+
+ if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
+ fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
+ exit(error_code);
+}
+
+/*
+ * string concatenation
+ */
+
+static char *
+cat2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
+
+ strcpy(res_str, str1);
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+cat_str(int count, ...)
+{
+ va_list args;
+ int i;
+ char *res_str;
+
+ va_start(args, count);
+
+ res_str = va_arg(args, char *);
+
+ /* now add all other strings */
+ for (i = 1; i < count; i++)
+ res_str = cat2_str(res_str, va_arg(args, char *));
+
+ va_end(args);
+
+ return res_str;
+}
+
+static char *
+make2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+make3_str(char *str1, char *str2, char *str3)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) +strlen(str3) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ strcat(res_str, str3);
+ free(str1);
+ free(str2);
+ free(str3);
+ return res_str;
+}
+
+/* and the rest */
+static char *
+make_name(void)
+{
+ return mm_strdup(base_yytext);
+}
+
+static char *
+create_questionmarks(char *name, bool array)
+{
+ struct variable *p = find_variable(name);
+ int count;
+ char *result = EMPTY;
+
+ /* In case we have a struct, we have to print as many "?" as there are attributes in the struct
+ * An array is only allowed together with an element argument
+ * This is essentially only used for inserts, but using a struct as input parameter is an error anywhere else
+ * so we don't have to worry here. */
+
+ if (p->type->type == ECPGt_struct || (array && p->type->type == ECPGt_array && p->type->u.element->type == ECPGt_struct))
+ {
+ struct ECPGstruct_member *m;
+
+ if (p->type->type == ECPGt_struct)
+ m = p->type->u.members;
+ else
+ m = p->type->u.element->u.members;
+
+ for (count = 0; m != NULL; m=m->next, count++);
+ }
+ else
+ count = 1;
+
+ for (; count > 0; count --)
+ {
+ sprintf(pacounter_buffer, "$%d", pacounter++);
+ result = cat_str(3, result, mm_strdup(pacounter_buffer), mm_strdup(" , "));
+ }
+
+ /* removed the trailing " ," */
+
+ result[strlen(result)-3] = '\0';
+ return result;
+}
+
+static char *
+adjust_outofscope_cursor_vars(struct cursor *cur)
+{
+ /* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
+ * For instance you can DECLARE a cursor in one function, and OPEN/FETCH/CLOSE
+ * it in another functions. This is very useful for e.g. event-driver programming,
+ * but may also lead to dangerous programming. The limitation when this is allowed
+ * and doesn't cause problems have to be documented, like the allocated variables
+ * must not be realloc()'ed.
+ *
+ * We have to change the variables to our own struct and just store the pointer
+ * instead of the variable. Do it only for local variables, not for globals.
+ */
+
+ char *result = EMPTY;
+ int insert;
+
+ for (insert = 1; insert >= 0; insert--)
+ {
+ struct arguments *list;
+ struct arguments *ptr;
+ struct arguments *newlist = NULL;
+ struct variable *newvar, *newind;
+
+ list = (insert ? cur->argsinsert : cur->argsresult);
+
+ for (ptr = list; ptr != NULL; ptr = ptr->next)
+ {
+ char var_text[20];
+ char *original_var;
+ bool skip_set_var = false;
+ bool var_ptr = false;
+
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->variable->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+
+ /* Don't emit ECPGset_var() calls for global variables */
+ if (ptr->variable->brace_level == 0)
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type == ECPGt_char_variable)
+ && (strncmp(ptr->variable->name, "ECPGprepared_statement", strlen("ECPGprepared_statement")) == 0))
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type != ECPGt_varchar
+ && ptr->variable->type->type != ECPGt_char
+ && ptr->variable->type->type != ECPGt_unsigned_char
+ && ptr->variable->type->type != ECPGt_string
+ && ptr->variable->type->type != ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ mm_strdup("1"),
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ }
+ else if ((ptr->variable->type->type == ECPGt_varchar
+ || ptr->variable->type->type == ECPGt_char
+ || ptr->variable->type->type == ECPGt_unsigned_char
+ || ptr->variable->type->type == ECPGt_string
+ || ptr->variable->type->type == ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ if (ptr->variable->type->type == ECPGt_varchar ||
+ ptr->variable->type->type == ECPGt_bytea)
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_struct
+ || ptr->variable->type->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.members,
+ ptr->variable->type->type,
+ ptr->variable->type->type_name,
+ ptr->variable->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_array)
+ {
+ if (ptr->variable->type->u.element->type == ECPGt_struct
+ || ptr->variable->type->u.element->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.element->u.members,
+ ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->type_name,
+ ptr->variable->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->size,
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <connection>, <pointer>. <line number>)" */
+ if (!skip_set_var)
+ {
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ /* now the indicator if there is one and it's not a global variable */
+ if ((ptr->indicator->type->type == ECPGt_NO_INDICATOR) || (ptr->indicator->brace_level == 0))
+ {
+ newind = ptr->indicator;
+ }
+ else
+ {
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->indicator->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+ var_ptr = false;
+
+ if (ptr->indicator->type->type == ECPGt_struct
+ || ptr->indicator->type->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.members,
+ ptr->indicator->type->type,
+ ptr->indicator->type->type_name,
+ ptr->indicator->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->indicator->type->type == ECPGt_array)
+ {
+ if (ptr->indicator->type->u.element->type == ECPGt_struct
+ || ptr->indicator->type->u.element->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.element->u.members,
+ ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->type_name,
+ ptr->indicator->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("), mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->size,
+ ptr->indicator->type->u.element->counter),
+ ptr->indicator->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else if (atoi(ptr->indicator->type->size) > 1)
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <pointer>. <line number>)" */
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ add_variable_to_tail(&newlist, newvar, newind);
+ }
+
+ if (insert)
+ cur->argsinsert_oos = newlist;
+ else
+ cur->argsresult_oos = newlist;
+ }
+
+ return result;
+}
+
+/* This tests whether the cursor was declared and opened in the same function. */
+#define SAMEFUNC(cur) \
+ ((cur->function == NULL) || \
+ (cur->function != NULL && strcmp(cur->function, current_function) == 0))
+
+static struct cursor *
+add_additional_variables(char *name, bool insert)
+{
+ struct cursor *ptr;
+ struct arguments *p;
+ int (* strcmp_fn)(const char *, const char *) = ((name[0] == ':' || name[0] == '"') ? strcmp : pg_strcasecmp);
+
+ for (ptr = cur; ptr != NULL; ptr=ptr->next)
+ {
+ if (strcmp_fn(ptr->name, name) == 0)
+ break;
+ }
+
+ if (ptr == NULL)
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" does not exist", name);
+ return NULL;
+ }
+
+ if (insert)
+ {
+ /* add all those input variables that were given earlier
+ * note that we have to append here but have to keep the existing order */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsinsert : ptr->argsinsert_oos); p; p = p->next)
+ add_variable_to_tail(&argsinsert, p->variable, p->indicator);
+ }
+
+ /* add all those output variables that were given earlier */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsresult : ptr->argsresult_oos); p; p = p->next)
+ add_variable_to_tail(&argsresult, p->variable, p->indicator);
+
+ return ptr;
+}
+
+static void
+add_typedef(char *name, char *dimension, char *length, enum ECPGttype type_enum,
+ char *type_dimension, char *type_index, int initializer, int array)
+{
+ /* add entry to list */
+ struct typedefs *ptr, *this;
+
+ if ((type_enum == ECPGt_struct ||
+ type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in type definition");
+ else if (INFORMIX_MODE && strcmp(name, "string") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "type name \"string\" is reserved in Informix mode");
+ else
+ {
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(name, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", name);
+ }
+ adjust_array(type_enum, &dimension, &length, type_dimension, type_index, array, true);
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = name;
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = type_enum;
+ this->type->type_str = mm_strdup(name);
+ this->type->type_dimension = dimension; /* dimension of array */
+ this->type->type_index = length; /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = (type_enum == ECPGt_struct || type_enum == ECPGt_union) ?
+ ECPGstruct_member_dup(struct_member_list[struct_level]) : NULL;
+
+ if (type_enum != ECPGt_varchar &&
+ type_enum != ECPGt_bytea &&
+ type_enum != ECPGt_char &&
+ type_enum != ECPGt_unsigned_char &&
+ type_enum != ECPGt_string &&
+ atoi(this->type->type_index) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ types = this;
+ }
+}
+
+/*
+ * check an SQL identifier is declared or not.
+ * If it is already declared, the global variable
+ * connection will be changed to the related connection.
+ */
+static bool
+check_declared_list(const char *name)
+{
+ struct declared_list *ptr = NULL;
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr -> next)
+ {
+ if (!ptr->connection)
+ continue;
+ if (strcmp(name, ptr -> name) == 0)
+ {
+ if (connection && strcmp(ptr->connection, connection) != 0)
+ mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten with %s by DECLARE statement %s", connection, ptr->connection, name);
+ connection = mm_strdup(ptr -> connection);
+ return true;
+ }
+ }
+ return false;
+}
+%}
+
+%expect 0
+%name-prefix="base_yy"
+%locations
+
+%union {
+ double dval;
+ char *str;
+ int ival;
+ struct when action;
+ struct index index;
+ int tagname;
+ struct this_type type;
+ enum ECPGttype type_enum;
+ enum ECPGdtype dtype_enum;
+ struct fetch_desc descriptor;
+ struct su_symbol struct_union;
+ struct prep prep;
+ struct exec exec;
+ struct describe describe;
+}
diff --git a/src/interfaces/ecpg/preproc/ecpg.tokens b/src/interfaces/ecpg/preproc/ecpg.tokens
new file mode 100644
index 0000000..8e0527f
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.tokens
@@ -0,0 +1,26 @@
+/* src/interfaces/ecpg/preproc/ecpg.tokens */
+
+/* special embedded SQL tokens */
+%token SQL_ALLOCATE SQL_AUTOCOMMIT SQL_BOOL SQL_BREAK
+ SQL_CARDINALITY SQL_CONNECT
+ SQL_COUNT
+ SQL_DATETIME_INTERVAL_CODE
+ SQL_DATETIME_INTERVAL_PRECISION SQL_DESCRIBE
+ SQL_DESCRIPTOR SQL_DISCONNECT SQL_FOUND
+ SQL_FREE SQL_GET SQL_GO SQL_GOTO SQL_IDENTIFIED
+ SQL_INDICATOR SQL_KEY_MEMBER SQL_LENGTH
+ SQL_LONG SQL_NULLABLE SQL_OCTET_LENGTH
+ SQL_OPEN SQL_OUTPUT SQL_REFERENCE
+ SQL_RETURNED_LENGTH SQL_RETURNED_OCTET_LENGTH SQL_SCALE
+ SQL_SECTION SQL_SHORT SQL_SIGNED SQL_SQLERROR
+ SQL_SQLPRINT SQL_SQLWARNING SQL_START SQL_STOP
+ SQL_STRUCT SQL_UNSIGNED SQL_VAR SQL_WHENEVER
+
+/* C tokens */
+%token S_ADD S_AND S_ANYTHING S_AUTO S_CONST S_DEC S_DIV
+ S_DOTPOINT S_EQUAL S_EXTERN S_INC S_LSHIFT S_MEMPOINT
+ S_MEMBER S_MOD S_MUL S_NEQUAL S_OR S_REGISTER S_RSHIFT
+ S_STATIC S_SUB S_VOLATILE
+ S_TYPEDEF
+
+%token CSTRING CVARIABLE CPP_LINE IP
diff --git a/src/interfaces/ecpg/preproc/ecpg.trailer b/src/interfaces/ecpg/preproc/ecpg.trailer
new file mode 100644
index 0000000..daf979a
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -0,0 +1,1931 @@
+/* src/interfaces/ecpg/preproc/ecpg.trailer */
+
+statements: /*EMPTY*/
+ | statements statement
+ ;
+
+statement: ecpgstart at toplevel_stmt ';'
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+ | ecpgstart toplevel_stmt ';'
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+ | ecpgstart ECPGVarDeclaration
+ {
+ fprintf(base_yyout, "%s", $2);
+ free($2);
+ output_line_number();
+ }
+ | ECPGDeclaration
+ | c_thing { fprintf(base_yyout, "%s", $1); free($1); }
+ | CPP_LINE { fprintf(base_yyout, "%s", $1); free($1); }
+ | '{' { braces_open++; fputs("{", base_yyout); }
+ | '}'
+ {
+ remove_typedefs(braces_open);
+ remove_variables(braces_open--);
+ if (braces_open == 0)
+ {
+ free(current_function);
+ current_function = NULL;
+ }
+ fputs("}", base_yyout);
+ }
+ ;
+
+CreateAsStmt: CREATE OptTemp TABLE create_as_target AS {FoundInto = 0;} SelectStmt opt_with_data
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ $$ = cat_str(7, mm_strdup("create"), $2, mm_strdup("table"), $4, mm_strdup("as"), $7, $8);
+ }
+ | CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS {FoundInto = 0;} SelectStmt opt_with_data
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ $$ = cat_str(7, mm_strdup("create"), $2, mm_strdup("table if not exists"), $7, mm_strdup("as"), $10, $11);
+ }
+ ;
+
+at: AT connection_object
+ {
+ connection = $2;
+ /*
+ * Do we have a variable as connection target? Remove the variable
+ * from the variable list or else it will be used twice.
+ */
+ if (argsinsert != NULL)
+ argsinsert = NULL;
+ }
+ ;
+
+/*
+ * the exec sql connect statement: connect to the given database
+ */
+ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user
+ { $$ = cat_str(5, $3, mm_strdup(","), $5, mm_strdup(","), $4); }
+ | SQL_CONNECT TO DEFAULT
+ { $$ = mm_strdup("NULL, NULL, NULL, \"DEFAULT\""); }
+ /* also allow ORACLE syntax */
+ | SQL_CONNECT ora_user
+ { $$ = cat_str(3, mm_strdup("NULL,"), $2, mm_strdup(", NULL")); }
+ | DATABASE connection_target
+ { $$ = cat2_str($2, mm_strdup(", NULL, NULL, NULL")); }
+ ;
+
+connection_target: opt_database_name opt_server opt_port
+ {
+ /* old style: dbname[@server][:port] */
+ if (strlen($2) > 0 && *($2) != '@')
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\", found \"%s\"", $2);
+
+ /* C strings need to be handled differently */
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), make3_str($1, $2, $3), mm_strdup("\""));
+ }
+ | db_prefix ':' server opt_port '/' opt_database_name opt_options
+ {
+ /* new style: <tcp|unix>:postgresql://server[:port][/dbname] */
+ if (strncmp($1, "unix:postgresql", strlen("unix:postgresql")) != 0 && strncmp($1, "tcp:postgresql", strlen("tcp:postgresql")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported");
+
+ if (strncmp($3, "//", strlen("//")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"://\", found \"%s\"", $3);
+
+ if (strncmp($1, "unix", strlen("unix")) == 0 &&
+ strncmp($3 + strlen("//"), "localhost", strlen("localhost")) != 0 &&
+ strncmp($3 + strlen("//"), "127.0.0.1", strlen("127.0.0.1")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "Unix-domain sockets only work on \"localhost\" but not on \"%s\"", $3 + strlen("//"));
+
+ $$ = make3_str(make3_str(mm_strdup("\""), $1, mm_strdup(":")), $3, make3_str(make3_str($4, mm_strdup("/"), $6), $7, mm_strdup("\"")));
+ }
+ | char_variable
+ {
+ $$ = $1;
+ }
+ | ecpg_sconst
+ {
+ /* We can only process double quoted strings not single quotes ones,
+ * so we change the quotes.
+ * Note, that the rule for ecpg_sconst adds these single quotes. */
+ $1[0] = '\"';
+ $1[strlen($1)-1] = '\"';
+ $$ = $1;
+ }
+ ;
+
+opt_database_name: name { $$ = $1; }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+db_prefix: ecpg_ident cvariable
+ {
+ if (strcmp($2, "postgresql") != 0 && strcmp($2, "postgres") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"postgresql\", found \"%s\"", $2);
+
+ if (strcmp($1, "tcp") != 0 && strcmp($1, "unix") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid connection type: %s", $1);
+
+ $$ = make3_str($1, mm_strdup(":"), $2);
+ }
+ ;
+
+server: Op server_name
+ {
+ if (strcmp($1, "@") != 0 && strcmp($1, "//") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\" or \"://\", found \"%s\"", $1);
+
+ $$ = make2_str($1, $2);
+ }
+ ;
+
+opt_server: server { $$ = $1; }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+server_name: ColId { $$ = $1; }
+ | ColId '.' server_name { $$ = make3_str($1, mm_strdup("."), $3); }
+ | IP { $$ = make_name(); }
+ ;
+
+opt_port: ':' Iconst { $$ = make2_str(mm_strdup(":"), $2); }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+opt_connection_name: AS connection_object { $$ = $2; }
+ | /*EMPTY*/ { $$ = mm_strdup("NULL"); }
+ ;
+
+opt_user: USER ora_user { $$ = $2; }
+ | /*EMPTY*/ { $$ = mm_strdup("NULL, NULL"); }
+ ;
+
+ora_user: user_name
+ { $$ = cat2_str($1, mm_strdup(", NULL")); }
+ | user_name '/' user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ | user_name SQL_IDENTIFIED BY user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $4); }
+ | user_name USING user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ ;
+
+user_name: RoleId
+ {
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ | ecpg_sconst
+ {
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ | civar
+ {
+ enum ECPGttype type = argsinsert->variable->type->type;
+
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = argsinsert->variable->type->u.element->type;
+
+ /* handle varchars */
+ if (type == ECPGt_varchar)
+ $$ = make2_str(mm_strdup(argsinsert->variable->name), mm_strdup(".arr"));
+ else
+ $$ = mm_strdup(argsinsert->variable->name);
+ }
+ ;
+
+char_variable: cvariable
+ {
+ /* check if we have a string variable */
+ struct variable *p = find_variable($1);
+ enum ECPGttype type = p->type->type;
+
+ /* If we have just one character this is not a string */
+ if (atol(p->type->size) == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ else
+ {
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = p->type->u.element->type;
+
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ $$ = $1;
+ break;
+ case ECPGt_varchar:
+ $$ = make2_str($1, mm_strdup(".arr"));
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ $$ = $1;
+ break;
+ }
+ }
+ }
+ ;
+
+opt_options: Op connect_options
+ {
+ if (strlen($1) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp($1, "?") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $1);
+
+ $$ = make2_str(mm_strdup("?"), $2);
+ }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+connect_options: ColId opt_opt_value
+ {
+ $$ = make2_str($1, $2);
+ }
+ | ColId opt_opt_value Op connect_options
+ {
+ if (strlen($3) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp($3, "&") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $3);
+
+ $$ = cat_str(3, make2_str($1, $2), $3, $4);
+ }
+ ;
+
+opt_opt_value: /*EMPTY*/
+ { $$ = EMPTY; }
+ | '=' Iconst
+ { $$ = make2_str(mm_strdup("="), $2); }
+ | '=' ecpg_ident
+ { $$ = make2_str(mm_strdup("="), $2); }
+ | '=' civar
+ { $$ = make2_str(mm_strdup("="), $2); }
+ ;
+
+prepared_name: name
+ {
+ if ($1[0] == '\"' && $1[strlen($1)-1] == '\"') /* already quoted? */
+ $$ = $1;
+ else /* not quoted => convert to lowercase */
+ {
+ size_t i;
+
+ for (i = 0; i< strlen($1); i++)
+ $1[i] = tolower((unsigned char) $1[i]);
+
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ }
+ | char_variable { $$ = $1; }
+ ;
+
+/*
+ * Declare Statement
+ */
+ECPGDeclareStmt: DECLARE prepared_name STATEMENT
+ {
+ struct declared_list *ptr = NULL;
+ /* Check whether the declared name has been defined or not */
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp($2, ptr->name) == 0)
+ {
+ /* re-definition is not allowed */
+ mmerror(PARSE_ERROR, ET_ERROR, "name \"%s\" is already declared", ptr->name);
+ }
+ }
+
+ /* Add a new declared name into the g_declared_list */
+ ptr = NULL;
+ ptr = (struct declared_list *)mm_alloc(sizeof(struct declared_list));
+ if (ptr)
+ {
+ /* initial definition */
+ ptr -> name = $2;
+ if (connection)
+ ptr -> connection = mm_strdup(connection);
+ else
+ ptr -> connection = NULL;
+
+ ptr -> next = g_declared_list;
+ g_declared_list = ptr;
+ }
+
+ $$ = cat_str(3 , mm_strdup("/* declare "), mm_strdup($2), mm_strdup(" as an SQL identifier */"));
+ }
+;
+
+/*
+ * Declare a prepared cursor. The syntax is different from the standard
+ * declare statement, so we create a new rule.
+ */
+ECPGCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR prepared_name
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
+ int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
+ struct variable *thisquery = (struct variable *)mm_alloc(sizeof(struct variable));
+ char *comment;
+ char *con;
+
+ if (INFORMIX_MODE && pg_strcasecmp($2, "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ check_declared_list($7);
+ con = connection ? connection : "NULL";
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn($2, ptr->name) == 0)
+ {
+ /* re-definition is a bug */
+ if ($2[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", $2+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", $2);
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ /* initial definition */
+ this->next = cur;
+ this->name = $2;
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->command = cat_str(6, mm_strdup("declare"), cursor_marker, $3, mm_strdup("cursor"), $5, mm_strdup("for $1"));
+ this->argsresult = NULL;
+ this->argsresult_oos = NULL;
+
+ thisquery->type = &ecpg_query;
+ thisquery->brace_level = 0;
+ thisquery->next = NULL;
+ thisquery->name = (char *) mm_alloc(sizeof("ECPGprepared_statement(, , __LINE__)") + strlen(con) + strlen($7));
+ sprintf(thisquery->name, "ECPGprepared_statement(%s, %s, __LINE__)", con, $7);
+
+ this->argsinsert = NULL;
+ this->argsinsert_oos = NULL;
+ if ($2[0] == ':')
+ {
+ struct variable *var = find_variable($2 + 1);
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&(this->argsinsert), var, &no_indicator);
+ }
+ add_variable_to_head(&(this->argsinsert), thisquery, &no_indicator);
+
+ cur = this;
+
+ comment = cat_str(3, mm_strdup("/*"), mm_strdup(this->command), mm_strdup("*/"));
+
+ $$ = cat_str(2, adjust_outofscope_cursor_vars(this),
+ comment);
+ }
+ ;
+
+ECPGExecuteImmediateStmt: EXECUTE IMMEDIATE execstring
+ {
+ /* execute immediate means prepare the statement and
+ * immediately execute it */
+ $$ = $3;
+ };
+/*
+ * variable declaration outside exec sql declare block
+ */
+ECPGVarDeclaration: single_vt_declaration;
+
+single_vt_declaration: type_declaration { $$ = $1; }
+ | var_declaration { $$ = $1; }
+ ;
+
+precision: NumericOnly { $$ = $1; };
+
+opt_scale: ',' NumericOnly { $$ = $2; }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+ecpg_interval: opt_interval { $$ = $1; }
+ | YEAR_P TO MINUTE_P { $$ = mm_strdup("year to minute"); }
+ | YEAR_P TO SECOND_P { $$ = mm_strdup("year to second"); }
+ | DAY_P TO DAY_P { $$ = mm_strdup("day to day"); }
+ | MONTH_P TO MONTH_P { $$ = mm_strdup("month to month"); }
+ ;
+
+/*
+ * variable declaration inside exec sql declare block
+ */
+ECPGDeclaration: sql_startdeclare
+ { fputs("/* exec sql begin declare section */", base_yyout); }
+ var_type_declarations sql_enddeclare
+ {
+ fprintf(base_yyout, "%s/* exec sql end declare section */", $3);
+ free($3);
+ output_line_number();
+ }
+ ;
+
+sql_startdeclare: ecpgstart BEGIN_P DECLARE SQL_SECTION ';' {};
+
+sql_enddeclare: ecpgstart END_P DECLARE SQL_SECTION ';' {};
+
+var_type_declarations: /*EMPTY*/ { $$ = EMPTY; }
+ | vt_declarations { $$ = $1; }
+ ;
+
+vt_declarations: single_vt_declaration { $$ = $1; }
+ | CPP_LINE { $$ = $1; }
+ | vt_declarations single_vt_declaration { $$ = cat2_str($1, $2); }
+ | vt_declarations CPP_LINE { $$ = cat2_str($1, $2); }
+ ;
+
+variable_declarations: var_declaration { $$ = $1; }
+ | variable_declarations var_declaration { $$ = cat2_str($1, $2); }
+ ;
+
+type_declaration: S_TYPEDEF
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ var_type opt_pointer ECPGColLabelCommon opt_array_bounds ';'
+ {
+ add_typedef($5, $6.index1, $6.index2, $3.type_enum, $3.type_dimension, $3.type_index, initializer, *$4 ? 1 : 0);
+
+ fprintf(base_yyout, "typedef %s %s %s %s;\n", $3.type_str, *$4 ? "*" : "", $5, $6.str);
+ output_line_number();
+ $$ = mm_strdup("");
+ };
+
+var_declaration: storage_declaration
+ var_type
+ {
+ actual_type[struct_level].type_enum = $2.type_enum;
+ actual_type[struct_level].type_str = $2.type_str;
+ actual_type[struct_level].type_dimension = $2.type_dimension;
+ actual_type[struct_level].type_index = $2.type_index;
+ actual_type[struct_level].type_sizeof = $2.type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+ variable_list ';'
+ {
+ $$ = cat_str(5, actual_startline[struct_level], $1, $2.type_str, $4, mm_strdup(";\n"));
+ }
+ | var_type
+ {
+ actual_type[struct_level].type_enum = $1.type_enum;
+ actual_type[struct_level].type_str = $1.type_str;
+ actual_type[struct_level].type_dimension = $1.type_dimension;
+ actual_type[struct_level].type_index = $1.type_index;
+ actual_type[struct_level].type_sizeof = $1.type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+ variable_list ';'
+ {
+ $$ = cat_str(4, actual_startline[struct_level], $1.type_str, $3, mm_strdup(";\n"));
+ }
+ | struct_union_type_with_symbol ';'
+ {
+ $$ = cat2_str($1, mm_strdup(";"));
+ }
+ ;
+
+opt_bit_field: ':' Iconst { $$ =cat2_str(mm_strdup(":"), $2); }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+storage_declaration: storage_clause storage_modifier
+ {$$ = cat2_str ($1, $2); }
+ | storage_clause {$$ = $1; }
+ | storage_modifier {$$ = $1; }
+ ;
+
+storage_clause : S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_AUTO { $$ = mm_strdup("auto"); }
+ ;
+
+storage_modifier : S_CONST { $$ = mm_strdup("const"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ ;
+
+var_type: simple_type
+ {
+ $$.type_enum = $1;
+ $$.type_str = mm_strdup(ecpg_type_name($1));
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | struct_union_type
+ {
+ $$.type_str = $1;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+
+ if (strncmp($1, "struct", sizeof("struct")-1) == 0)
+ {
+ $$.type_enum = ECPGt_struct;
+ $$.type_sizeof = ECPGstruct_sizeof;
+ }
+ else
+ {
+ $$.type_enum = ECPGt_union;
+ $$.type_sizeof = NULL;
+ }
+ }
+ | enum_type
+ {
+ $$.type_str = $1;
+ $$.type_enum = ECPGt_int;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | ECPGColLabelCommon '(' precision opt_scale ')'
+ {
+ if (strcmp($1, "numeric") == 0)
+ {
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ }
+ else if (strcmp($1, "decimal") == 0)
+ {
+ $$.type_enum = ECPGt_decimal;
+ $$.type_str = mm_strdup("decimal");
+ }
+ else
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "only data types numeric and decimal have precision/scale argument");
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ }
+
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | ECPGColLabelCommon ecpg_interval
+ {
+ if (strlen($2) != 0 && strcmp ($1, "datetime") != 0 && strcmp ($1, "interval") != 0)
+ mmerror (PARSE_ERROR, ET_ERROR, "interval specification not allowed here");
+
+ /*
+ * Check for type names that the SQL grammar treats as
+ * unreserved keywords
+ */
+ if (strcmp($1, "varchar") == 0)
+ {
+ $$.type_enum = ECPGt_varchar;
+ $$.type_str = EMPTY; /*mm_strdup("varchar");*/
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "bytea") == 0)
+ {
+ $$.type_enum = ECPGt_bytea;
+ $$.type_str = EMPTY;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "float") == 0)
+ {
+ $$.type_enum = ECPGt_float;
+ $$.type_str = mm_strdup("float");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "double") == 0)
+ {
+ $$.type_enum = ECPGt_double;
+ $$.type_str = mm_strdup("double");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "numeric") == 0)
+ {
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "decimal") == 0)
+ {
+ $$.type_enum = ECPGt_decimal;
+ $$.type_str = mm_strdup("decimal");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "date") == 0)
+ {
+ $$.type_enum = ECPGt_date;
+ $$.type_str = mm_strdup("date");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "timestamp") == 0)
+ {
+ $$.type_enum = ECPGt_timestamp;
+ $$.type_str = mm_strdup("timestamp");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "interval") == 0)
+ {
+ $$.type_enum = ECPGt_interval;
+ $$.type_str = mm_strdup("interval");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "datetime") == 0)
+ {
+ $$.type_enum = ECPGt_timestamp;
+ $$.type_str = mm_strdup("timestamp");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if ((strcmp($1, "string") == 0) && INFORMIX_MODE)
+ {
+ $$.type_enum = ECPGt_string;
+ $$.type_str = mm_strdup("char");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else
+ {
+ /* this is for typedef'ed types */
+ struct typedefs *this = get_typedef($1);
+
+ $$.type_str = (this->type->type_enum == ECPGt_varchar || this->type->type_enum == ECPGt_bytea) ? EMPTY : mm_strdup(this->name);
+ $$.type_enum = this->type->type_enum;
+ $$.type_dimension = this->type->type_dimension;
+ $$.type_index = this->type->type_index;
+ if (this->type->type_sizeof && strlen(this->type->type_sizeof) != 0)
+ $$.type_sizeof = this->type->type_sizeof;
+ else
+ $$.type_sizeof = cat_str(3, mm_strdup("sizeof("), mm_strdup(this->name), mm_strdup(")"));
+
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ }
+ }
+ | s_struct_union_symbol
+ {
+ /* this is for named structs/unions */
+ char *name;
+ struct typedefs *this;
+ bool forward = (forward_name != NULL && strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
+
+ name = cat2_str($1.su, $1.symbol);
+ /* Do we have a forward definition? */
+ if (!forward)
+ {
+ /* No */
+
+ this = get_typedef(name);
+ $$.type_str = mm_strdup(this->name);
+ $$.type_enum = this->type->type_enum;
+ $$.type_dimension = this->type->type_dimension;
+ $$.type_index = this->type->type_index;
+ $$.type_sizeof = this->type->type_sizeof;
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ free(name);
+ }
+ else
+ {
+ $$.type_str = name;
+ $$.type_enum = ECPGt_long;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = mm_strdup("");
+ struct_member_list[struct_level] = NULL;
+ }
+ }
+ ;
+
+enum_type: ENUM_P symbol enum_definition
+ { $$ = cat_str(3, mm_strdup("enum"), $2, $3); }
+ | ENUM_P enum_definition
+ { $$ = cat2_str(mm_strdup("enum"), $2); }
+ | ENUM_P symbol
+ { $$ = cat2_str(mm_strdup("enum"), $2); }
+ ;
+
+enum_definition: '{' c_list '}'
+ { $$ = cat_str(3, mm_strdup("{"), $2, mm_strdup("}")); };
+
+struct_union_type_with_symbol: s_struct_union_symbol
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ forward_name = mm_strdup($1.symbol);
+ }
+ '{' variable_declarations '}'
+ {
+ struct typedefs *ptr, *this;
+ struct this_type su_type;
+
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ if (strncmp($1.su, "struct", sizeof("struct")-1) == 0)
+ su_type.type_enum = ECPGt_struct;
+ else
+ su_type.type_enum = ECPGt_union;
+ su_type.type_str = cat2_str($1.su, $1.symbol);
+ free(forward_name);
+ forward_name = NULL;
+
+ /* This is essentially a typedef but needs the keyword struct/union as well.
+ * So we create the typedef for each struct definition with symbol */
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(su_type.type_str, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", su_type.type_str);
+ }
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = mm_strdup(su_type.type_str);
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = su_type.type_enum;
+ this->type->type_str = mm_strdup(su_type.type_str);
+ this->type->type_dimension = mm_strdup("-1"); /* dimension of array */
+ this->type->type_index = mm_strdup("-1"); /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = struct_member_list[struct_level];
+
+ types = this;
+ $$ = cat_str(4, su_type.type_str, mm_strdup("{"), $4, mm_strdup("}"));
+ }
+ ;
+
+struct_union_type: struct_union_type_with_symbol { $$ = $1; }
+ | s_struct_union
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ }
+ '{' variable_declarations '}'
+ {
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ $$ = cat_str(4, $1, mm_strdup("{"), $4, mm_strdup("}"));
+ }
+ ;
+
+s_struct_union_symbol: SQL_STRUCT symbol
+ {
+ $$.su = mm_strdup("struct");
+ $$.symbol = $2;
+ ECPGstruct_sizeof = cat_str(3, mm_strdup("sizeof("), cat2_str(mm_strdup($$.su), mm_strdup($$.symbol)), mm_strdup(")"));
+ }
+ | UNION symbol
+ {
+ $$.su = mm_strdup("union");
+ $$.symbol = $2;
+ }
+ ;
+
+s_struct_union: SQL_STRUCT
+ {
+ ECPGstruct_sizeof = mm_strdup(""); /* This must not be NULL to distinguish from simple types. */
+ $$ = mm_strdup("struct");
+ }
+ | UNION
+ {
+ $$ = mm_strdup("union");
+ }
+ ;
+
+simple_type: unsigned_type { $$=$1; }
+ | opt_signed signed_type { $$=$2; }
+ ;
+
+unsigned_type: SQL_UNSIGNED SQL_SHORT { $$ = ECPGt_unsigned_short; }
+ | SQL_UNSIGNED SQL_SHORT INT_P { $$ = ECPGt_unsigned_short; }
+ | SQL_UNSIGNED { $$ = ECPGt_unsigned_int; }
+ | SQL_UNSIGNED INT_P { $$ = ECPGt_unsigned_int; }
+ | SQL_UNSIGNED SQL_LONG { $$ = ECPGt_unsigned_long; }
+ | SQL_UNSIGNED SQL_LONG INT_P { $$ = ECPGt_unsigned_long; }
+ | SQL_UNSIGNED SQL_LONG SQL_LONG { $$ = ECPGt_unsigned_long_long; }
+ | SQL_UNSIGNED SQL_LONG SQL_LONG INT_P { $$ = ECPGt_unsigned_long_long; }
+ | SQL_UNSIGNED CHAR_P { $$ = ECPGt_unsigned_char; }
+ ;
+
+signed_type: SQL_SHORT { $$ = ECPGt_short; }
+ | SQL_SHORT INT_P { $$ = ECPGt_short; }
+ | INT_P { $$ = ECPGt_int; }
+ | SQL_LONG { $$ = ECPGt_long; }
+ | SQL_LONG INT_P { $$ = ECPGt_long; }
+ | SQL_LONG SQL_LONG { $$ = ECPGt_long_long; }
+ | SQL_LONG SQL_LONG INT_P { $$ = ECPGt_long_long; }
+ | SQL_BOOL { $$ = ECPGt_bool; }
+ | CHAR_P { $$ = ECPGt_char; }
+ | DOUBLE_P { $$ = ECPGt_double; }
+ ;
+
+opt_signed: SQL_SIGNED
+ | /* EMPTY */
+ ;
+
+variable_list: variable
+ { $$ = $1; }
+ | variable_list ',' variable
+ {
+ if (actual_type[struct_level].type_enum == ECPGt_varchar || actual_type[struct_level].type_enum == ECPGt_bytea)
+ $$ = cat_str(3, $1, mm_strdup(";"), $3);
+ else
+ $$ = cat_str(3, $1, mm_strdup(","), $3);
+ }
+ ;
+
+variable: opt_pointer ECPGColLabel opt_array_bounds opt_bit_field opt_initializer
+ {
+ struct ECPGtype * type;
+ char *dimension = $3.index1; /* dimension of array */
+ char *length = $3.index2; /* length of string */
+ char *dim_str;
+ char *vcn;
+ int *varlen_type_counter;
+ char *struct_name;
+
+ adjust_array(actual_type[struct_level].type_enum, &dimension, &length, actual_type[struct_level].type_dimension, actual_type[struct_level].type_index, strlen($1), false);
+ switch (actual_type[struct_level].type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (actual_type[struct_level].type_enum == ECPGt_varchar)
+ {
+ varlen_type_counter = &varchar_counter;
+ struct_name = " struct varchar_";
+ }
+ else
+ {
+ varlen_type_counter = &bytea_counter;
+ struct_name = " struct bytea_";
+ }
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter), dimension);
+
+ if (strcmp(dimension, "0") == 0 || abs(atoi(dimension)) == 1)
+ dim_str=mm_strdup("");
+ else
+ dim_str=cat_str(3, mm_strdup("["), mm_strdup(dimension), mm_strdup("]"));
+ /* cannot check for atoi <= 0 because a defined constant will yield 0 here as well */
+ if (atoi(length) < 0 || strcmp(length, "0") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "pointers to varchar are not implemented");
+
+ /* make sure varchar struct name is unique by adding a unique counter to its definition */
+ vcn = (char *) mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ sprintf(vcn, "%d", *varlen_type_counter);
+ if (strcmp(dimension, "0") == 0)
+ $$ = cat_str(7, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } *"), mm_strdup($2), $4, $5);
+ else
+ $$ = cat_str(8, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } "), mm_strdup($2), dim_str, $4, $5);
+ (*varlen_type_counter)++;
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ {
+ int i = strlen($5);
+
+ if (atoi(length) == -1 && i > 0) /* char <var>[] = "string" */
+ {
+ /* if we have an initializer but no string size set, let's use the initializer's length */
+ free(length);
+ length = mm_alloc(i+sizeof("sizeof()"));
+ sprintf(length, "sizeof(%s)", $5+2);
+ }
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0);
+ }
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+
+ default:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+ }
+
+ if (struct_level == 0)
+ new_variable($2, type, braces_open);
+ else
+ ECPGmake_struct_member($2, type, &(struct_member_list[struct_level - 1]));
+
+ free($2);
+ }
+ ;
+
+opt_initializer: /*EMPTY*/
+ { $$ = EMPTY; }
+ | '=' c_term
+ {
+ initializer = 1;
+ $$ = cat2_str(mm_strdup("="), $2);
+ }
+ ;
+
+opt_pointer: /*EMPTY*/ { $$ = EMPTY; }
+ | '*' { $$ = mm_strdup("*"); }
+ | '*' '*' { $$ = mm_strdup("**"); }
+ ;
+
+/*
+ * We try to simulate the correct DECLARE syntax here so we get dynamic SQL
+ */
+ECPGDeclare: DECLARE STATEMENT ecpg_ident
+ {
+ /* this is only supported for compatibility */
+ $$ = cat_str(3, mm_strdup("/* declare statement"), $3, mm_strdup("*/"));
+ }
+ ;
+/*
+ * the exec sql disconnect statement: disconnect from the given database
+ */
+ECPGDisconnect: SQL_DISCONNECT dis_name { $$ = $2; }
+ ;
+
+dis_name: connection_object { $$ = $1; }
+ | CURRENT_P { $$ = mm_strdup("\"CURRENT\""); }
+ | ALL { $$ = mm_strdup("\"ALL\""); }
+ | /* EMPTY */ { $$ = mm_strdup("\"CURRENT\""); }
+ ;
+
+connection_object: name { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ | DEFAULT { $$ = mm_strdup("\"DEFAULT\""); }
+ | char_variable { $$ = $1; }
+ ;
+
+execstring: char_variable
+ { $$ = $1; }
+ | CSTRING
+ { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ ;
+
+/*
+ * the exec sql free command to deallocate a previously
+ * prepared statement
+ */
+ECPGFree: SQL_FREE cursor_name { $$ = $2; }
+ | SQL_FREE ALL { $$ = mm_strdup("all"); }
+ ;
+
+/*
+ * open is an open cursor, at the moment this has to be removed
+ */
+ECPGOpen: SQL_OPEN cursor_name opt_ecpg_using
+ {
+ if ($2[0] == ':')
+ remove_variable_from_list(&argsinsert, find_variable($2 + 1));
+ $$ = $2;
+ }
+ ;
+
+opt_ecpg_using: /*EMPTY*/ { $$ = EMPTY; }
+ | ecpg_using { $$ = $1; }
+ ;
+
+ecpg_using: USING using_list { $$ = EMPTY; }
+ | using_descriptor { $$ = $1; }
+ ;
+
+using_descriptor: USING SQL_P SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_variable_to_head(&argsinsert, descriptor_variable($4,0), &no_indicator);
+ $$ = EMPTY;
+ }
+ | USING SQL_DESCRIPTOR name
+ {
+ add_variable_to_head(&argsinsert, sqlda_variable($3), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+into_descriptor: INTO SQL_P SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_variable_to_head(&argsresult, descriptor_variable($4,1), &no_indicator);
+ $$ = EMPTY;
+ }
+ | INTO SQL_DESCRIPTOR name
+ {
+ add_variable_to_head(&argsresult, sqlda_variable($3), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+into_sqlda: INTO name
+ {
+ add_variable_to_head(&argsresult, sqlda_variable($2), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+using_list: UsingValue | UsingValue ',' using_list;
+
+UsingValue: UsingConst
+ {
+ char *length = mm_alloc(32);
+
+ sprintf(length, "%zu", strlen($1));
+ add_variable_to_head(&argsinsert, new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ | civar { $$ = EMPTY; }
+ | civarind { $$ = EMPTY; }
+ ;
+
+UsingConst: Iconst { $$ = $1; }
+ | '+' Iconst { $$ = cat_str(2, mm_strdup("+"), $2); }
+ | '-' Iconst { $$ = cat_str(2, mm_strdup("-"), $2); }
+ | ecpg_fconst { $$ = $1; }
+ | '+' ecpg_fconst { $$ = cat_str(2, mm_strdup("+"), $2); }
+ | '-' ecpg_fconst { $$ = cat_str(2, mm_strdup("-"), $2); }
+ | ecpg_sconst { $$ = $1; }
+ | ecpg_bconst { $$ = $1; }
+ | ecpg_xconst { $$ = $1; }
+ ;
+
+/*
+ * We accept DESCRIBE [OUTPUT] but do nothing with DESCRIBE INPUT so far.
+ */
+ECPGDescribe: SQL_DESCRIBE INPUT_P prepared_name using_descriptor
+ {
+ $$.input = 1;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name using_descriptor
+ {
+ struct variable *var;
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_descriptor
+ {
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE INPUT_P prepared_name into_sqlda
+ {
+ $$.input = 1;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_sqlda
+ {
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ ;
+
+opt_output: SQL_OUTPUT { $$ = mm_strdup("output"); }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+/*
+ * dynamic SQL: descriptor based access
+ * originally written by Christof Petig <christof.petig@wtal.de>
+ * and Peter Eisentraut <peter.eisentraut@credativ.de>
+ */
+
+/*
+ * allocate a descriptor
+ */
+ECPGAllocateDescr: SQL_ALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_descriptor($3,connection);
+ $$ = $3;
+ }
+ ;
+
+
+/*
+ * deallocate a descriptor
+ */
+ECPGDeallocateDescr: DEALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ drop_descriptor($3,connection);
+ $$ = $3;
+ }
+ ;
+
+/*
+ * manipulate a descriptor header
+ */
+
+ECPGGetDescriptorHeader: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar ECPGGetDescHeaderItems
+ { $$ = $3; }
+ ;
+
+ECPGGetDescHeaderItems: ECPGGetDescHeaderItem
+ | ECPGGetDescHeaderItems ',' ECPGGetDescHeaderItem
+ ;
+
+ECPGGetDescHeaderItem: cvariable '=' desc_header_item
+ { push_assignment($1, $3); }
+ ;
+
+
+ECPGSetDescriptorHeader: SET SQL_DESCRIPTOR quoted_ident_stringvar ECPGSetDescHeaderItems
+ { $$ = $3; }
+ ;
+
+ECPGSetDescHeaderItems: ECPGSetDescHeaderItem
+ | ECPGSetDescHeaderItems ',' ECPGSetDescHeaderItem
+ ;
+
+ECPGSetDescHeaderItem: desc_header_item '=' IntConstVar
+ {
+ push_assignment($3, $1);
+ }
+ ;
+
+IntConstVar: Iconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen($1));
+ new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = $1;
+ }
+ | cvariable
+ {
+ $$ = $1;
+ }
+ ;
+
+desc_header_item: SQL_COUNT { $$ = ECPGd_count; }
+ ;
+
+/*
+ * manipulate a descriptor
+ */
+
+ECPGGetDescriptor: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGGetDescItems
+ { $$.str = $5; $$.name = $3; }
+ ;
+
+ECPGGetDescItems: ECPGGetDescItem
+ | ECPGGetDescItems ',' ECPGGetDescItem
+ ;
+
+ECPGGetDescItem: cvariable '=' descriptor_item { push_assignment($1, $3); };
+
+
+ECPGSetDescriptor: SET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGSetDescItems
+ { $$.str = $5; $$.name = $3; }
+ ;
+
+ECPGSetDescItems: ECPGSetDescItem
+ | ECPGSetDescItems ',' ECPGSetDescItem
+ ;
+
+ECPGSetDescItem: descriptor_item '=' AllConstVar
+ {
+ push_assignment($3, $1);
+ }
+ ;
+
+AllConstVar: ecpg_fconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen($1));
+ new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = $1;
+ }
+
+ | IntConstVar
+ {
+ $$ = $1;
+ }
+
+ | '-' ecpg_fconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), $2);
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+
+ | '-' Iconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), $2);
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+
+ | ecpg_sconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = $1 + 1;
+
+ var[strlen(var) - 1] = '\0';
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+ ;
+
+descriptor_item: SQL_CARDINALITY { $$ = ECPGd_cardinality; }
+ | DATA_P { $$ = ECPGd_data; }
+ | SQL_DATETIME_INTERVAL_CODE { $$ = ECPGd_di_code; }
+ | SQL_DATETIME_INTERVAL_PRECISION { $$ = ECPGd_di_precision; }
+ | SQL_INDICATOR { $$ = ECPGd_indicator; }
+ | SQL_KEY_MEMBER { $$ = ECPGd_key_member; }
+ | SQL_LENGTH { $$ = ECPGd_length; }
+ | NAME_P { $$ = ECPGd_name; }
+ | SQL_NULLABLE { $$ = ECPGd_nullable; }
+ | SQL_OCTET_LENGTH { $$ = ECPGd_octet; }
+ | PRECISION { $$ = ECPGd_precision; }
+ | SQL_RETURNED_LENGTH { $$ = ECPGd_length; }
+ | SQL_RETURNED_OCTET_LENGTH { $$ = ECPGd_ret_octet; }
+ | SQL_SCALE { $$ = ECPGd_scale; }
+ | TYPE_P { $$ = ECPGd_type; }
+ ;
+
+/*
+ * set/reset the automatic transaction mode, this needs a different handling
+ * as the other set commands
+ */
+ECPGSetAutocommit: SET SQL_AUTOCOMMIT '=' on_off { $$ = $4; }
+ | SET SQL_AUTOCOMMIT TO on_off { $$ = $4; }
+ ;
+
+on_off: ON { $$ = mm_strdup("on"); }
+ | OFF { $$ = mm_strdup("off"); }
+ ;
+
+/*
+ * set the actual connection, this needs a different handling as the other
+ * set commands
+ */
+ECPGSetConnection: SET CONNECTION TO connection_object { $$ = $4; }
+ | SET CONNECTION '=' connection_object { $$ = $4; }
+ | SET CONNECTION connection_object { $$ = $3; }
+ ;
+
+/*
+ * define a new type for embedded SQL
+ */
+ECPGTypedef: TYPE_P
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ ECPGColLabelCommon IS var_type opt_array_bounds opt_reference
+ {
+ add_typedef($3, $6.index1, $6.index2, $5.type_enum, $5.type_dimension, $5.type_index, initializer, *$7 ? 1 : 0);
+
+ if (auto_create_c == false)
+ $$ = cat_str(7, mm_strdup("/* exec sql type"), mm_strdup($3), mm_strdup("is"), mm_strdup($5.type_str), mm_strdup($6.str), $7, mm_strdup("*/"));
+ else
+ $$ = cat_str(6, mm_strdup("typedef "), mm_strdup($5.type_str), *$7?mm_strdup("*"):mm_strdup(""), mm_strdup($3), mm_strdup($6.str), mm_strdup(";"));
+ }
+ ;
+
+opt_reference: SQL_REFERENCE { $$ = mm_strdup("reference"); }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+/*
+ * define the type of one variable for embedded SQL
+ */
+ECPGVar: SQL_VAR
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ ColLabel IS var_type opt_array_bounds opt_reference
+ {
+ struct variable *p = find_variable($3);
+ char *dimension = $6.index1;
+ char *length = $6.index2;
+ struct ECPGtype * type;
+
+ if (($5.type_enum == ECPGt_struct ||
+ $5.type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in EXEC SQL VAR command");
+ else
+ {
+ adjust_array($5.type_enum, &dimension, &length, $5.type_dimension, $5.type_index, *$7?1:0, false);
+
+ switch ($5.type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], $5.type_enum, $5.type_str, $5.type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], $5.type_enum, $5.type_str, $5.type_sizeof), dimension);
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type($5.type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, length, 0), dimension);
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type($5.type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, length, 0), dimension);
+ break;
+
+ default:
+ if (atoi(length) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type($5.type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, mm_strdup("1"), 0), dimension);
+ break;
+ }
+
+ ECPGfree_type(p->type);
+ p->type = type;
+ }
+
+ $$ = cat_str(7, mm_strdup("/* exec sql var"), mm_strdup($3), mm_strdup("is"), mm_strdup($5.type_str), mm_strdup($6.str), $7, mm_strdup("*/"));
+ }
+ ;
+
+/*
+ * whenever statement: decide what to do in case of error/no data found
+ * according to SQL standards we lack: SQLSTATE, CONSTRAINT and SQLEXCEPTION
+ */
+ECPGWhenever: SQL_WHENEVER SQL_SQLERROR action
+ {
+ when_error.code = $<action>3.code;
+ when_error.command = $<action>3.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever sqlerror "), $3.str, mm_strdup("; */"));
+ }
+ | SQL_WHENEVER NOT SQL_FOUND action
+ {
+ when_nf.code = $<action>4.code;
+ when_nf.command = $<action>4.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever not found "), $4.str, mm_strdup("; */"));
+ }
+ | SQL_WHENEVER SQL_SQLWARNING action
+ {
+ when_warn.code = $<action>3.code;
+ when_warn.command = $<action>3.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever sql_warning "), $3.str, mm_strdup("; */"));
+ }
+ ;
+
+action : CONTINUE_P
+ {
+ $<action>$.code = W_NOTHING;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("continue");
+ }
+ | SQL_SQLPRINT
+ {
+ $<action>$.code = W_SQLPRINT;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("sqlprint");
+ }
+ | SQL_STOP
+ {
+ $<action>$.code = W_STOP;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("stop");
+ }
+ | SQL_GOTO name
+ {
+ $<action>$.code = W_GOTO;
+ $<action>$.command = mm_strdup($2);
+ $<action>$.str = cat2_str(mm_strdup("goto "), $2);
+ }
+ | SQL_GO TO name
+ {
+ $<action>$.code = W_GOTO;
+ $<action>$.command = mm_strdup($3);
+ $<action>$.str = cat2_str(mm_strdup("goto "), $3);
+ }
+ | DO name '(' c_args ')'
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat_str(4, $2, mm_strdup("("), $4, mm_strdup(")"));
+ $<action>$.str = cat2_str(mm_strdup("do"), mm_strdup($<action>$.command));
+ }
+ | DO SQL_BREAK
+ {
+ $<action>$.code = W_BREAK;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("break");
+ }
+ | DO CONTINUE_P
+ {
+ $<action>$.code = W_CONTINUE;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("continue");
+ }
+ | CALL name '(' c_args ')'
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat_str(4, $2, mm_strdup("("), $4, mm_strdup(")"));
+ $<action>$.str = cat2_str(mm_strdup("call"), mm_strdup($<action>$.command));
+ }
+ | CALL name
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat2_str($2, mm_strdup("()"));
+ $<action>$.str = cat2_str(mm_strdup("call"), mm_strdup($<action>$.command));
+ }
+ ;
+
+/* some other stuff for ecpg */
+
+/* additional unreserved keywords */
+ECPGKeywords: ECPGKeywords_vanames { $$ = $1; }
+ | ECPGKeywords_rest { $$ = $1; }
+ ;
+
+ECPGKeywords_vanames: SQL_BREAK { $$ = mm_strdup("break"); }
+ | SQL_CARDINALITY { $$ = mm_strdup("cardinality"); }
+ | SQL_COUNT { $$ = mm_strdup("count"); }
+ | SQL_DATETIME_INTERVAL_CODE { $$ = mm_strdup("datetime_interval_code"); }
+ | SQL_DATETIME_INTERVAL_PRECISION { $$ = mm_strdup("datetime_interval_precision"); }
+ | SQL_FOUND { $$ = mm_strdup("found"); }
+ | SQL_GO { $$ = mm_strdup("go"); }
+ | SQL_GOTO { $$ = mm_strdup("goto"); }
+ | SQL_IDENTIFIED { $$ = mm_strdup("identified"); }
+ | SQL_INDICATOR { $$ = mm_strdup("indicator"); }
+ | SQL_KEY_MEMBER { $$ = mm_strdup("key_member"); }
+ | SQL_LENGTH { $$ = mm_strdup("length"); }
+ | SQL_NULLABLE { $$ = mm_strdup("nullable"); }
+ | SQL_OCTET_LENGTH { $$ = mm_strdup("octet_length"); }
+ | SQL_RETURNED_LENGTH { $$ = mm_strdup("returned_length"); }
+ | SQL_RETURNED_OCTET_LENGTH { $$ = mm_strdup("returned_octet_length"); }
+ | SQL_SCALE { $$ = mm_strdup("scale"); }
+ | SQL_SECTION { $$ = mm_strdup("section"); }
+ | SQL_SQLERROR { $$ = mm_strdup("sqlerror"); }
+ | SQL_SQLPRINT { $$ = mm_strdup("sqlprint"); }
+ | SQL_SQLWARNING { $$ = mm_strdup("sqlwarning"); }
+ | SQL_STOP { $$ = mm_strdup("stop"); }
+ ;
+
+ECPGKeywords_rest: SQL_CONNECT { $$ = mm_strdup("connect"); }
+ | SQL_DESCRIBE { $$ = mm_strdup("describe"); }
+ | SQL_DISCONNECT { $$ = mm_strdup("disconnect"); }
+ | SQL_OPEN { $$ = mm_strdup("open"); }
+ | SQL_VAR { $$ = mm_strdup("var"); }
+ | SQL_WHENEVER { $$ = mm_strdup("whenever"); }
+ ;
+
+/* additional keywords that can be SQL type names (but not ECPGColLabels) */
+ECPGTypeName: SQL_BOOL { $$ = mm_strdup("bool"); }
+ | SQL_LONG { $$ = mm_strdup("long"); }
+ | SQL_OUTPUT { $$ = mm_strdup("output"); }
+ | SQL_SHORT { $$ = mm_strdup("short"); }
+ | SQL_STRUCT { $$ = mm_strdup("struct"); }
+ | SQL_SIGNED { $$ = mm_strdup("signed"); }
+ | SQL_UNSIGNED { $$ = mm_strdup("unsigned"); }
+ ;
+
+symbol: ColLabel { $$ = $1; }
+ ;
+
+ECPGColId: ecpg_ident { $$ = $1; }
+ | unreserved_keyword { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ ;
+
+/*
+ * Name classification hierarchy.
+ *
+ * These productions should match those in the core grammar, except that
+ * we use all_unreserved_keyword instead of unreserved_keyword, and
+ * where possible include ECPG keywords as well as core keywords.
+ */
+
+/* Column identifier --- names that can be column, table, etc names.
+ */
+ColId: ecpg_ident { $$ = $1; }
+ | all_unreserved_keyword { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ ;
+
+/* Type/function identifier --- names that can be type or function names.
+ */
+type_function_name: ecpg_ident { $$ = $1; }
+ | all_unreserved_keyword { $$ = $1; }
+ | type_func_name_keyword { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | ECPGTypeName { $$ = $1; }
+ ;
+
+/* Column label --- allowed labels in "AS" clauses.
+ * This presently includes *all* Postgres keywords.
+ */
+ColLabel: ECPGColLabel { $$ = $1; }
+ | ECPGTypeName { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | CURRENT_P { $$ = mm_strdup("current"); }
+ | INPUT_P { $$ = mm_strdup("input"); }
+ | INT_P { $$ = mm_strdup("int"); }
+ | TO { $$ = mm_strdup("to"); }
+ | UNION { $$ = mm_strdup("union"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ | ECPGCKeywords { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ ;
+
+ECPGColLabel: ECPGColLabelCommon { $$ = $1; }
+ | unreserved_keyword { $$ = $1; }
+ | reserved_keyword { $$ = $1; }
+ | ECPGKeywords_rest { $$ = $1; }
+ | CONNECTION { $$ = mm_strdup("connection"); }
+ ;
+
+ECPGColLabelCommon: ecpg_ident { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | type_func_name_keyword { $$ = $1; }
+ | ECPGKeywords_vanames { $$ = $1; }
+ ;
+
+ECPGCKeywords: S_AUTO { $$ = mm_strdup("auto"); }
+ | S_CONST { $$ = mm_strdup("const"); }
+ | S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_TYPEDEF { $$ = mm_strdup("typedef"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ ;
+
+/* "Unreserved" keywords --- available for use as any kind of name.
+ */
+
+/*
+ * The following symbols must be excluded from ECPGColLabel and directly
+ * included into ColLabel to enable C variables to get names from ECPGColLabel:
+ * DAY_P, HOUR_P, MINUTE_P, MONTH_P, SECOND_P, YEAR_P.
+ *
+ * We also have to exclude CONNECTION, CURRENT, and INPUT for various reasons.
+ * CONNECTION can be added back in all_unreserved_keyword, but CURRENT and
+ * INPUT are reserved for ecpg purposes.
+ *
+ * The mentioned exclusions are done by $replace_line settings in parse.pl.
+ */
+all_unreserved_keyword: unreserved_keyword { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ | CONNECTION { $$ = mm_strdup("connection"); }
+ ;
+
+ECPGunreserved_interval: DAY_P { $$ = mm_strdup("day"); }
+ | HOUR_P { $$ = mm_strdup("hour"); }
+ | MINUTE_P { $$ = mm_strdup("minute"); }
+ | MONTH_P { $$ = mm_strdup("month"); }
+ | SECOND_P { $$ = mm_strdup("second"); }
+ | YEAR_P { $$ = mm_strdup("year"); }
+ ;
+
+
+into_list : coutputvariable | into_list ',' coutputvariable
+ ;
+
+ecpgstart: SQL_START {
+ reset_variables();
+ pacounter = 1;
+ }
+ ;
+
+c_args: /*EMPTY*/ { $$ = EMPTY; }
+ | c_list { $$ = $1; }
+ ;
+
+coutputvariable: cvariable indicator
+ { add_variable_to_head(&argsresult, find_variable($1), find_variable($2)); }
+ | cvariable
+ { add_variable_to_head(&argsresult, find_variable($1), &no_indicator); }
+ ;
+
+
+civarind: cvariable indicator
+ {
+ if (find_variable($2)->type->type == ECPGt_array)
+ mmerror(PARSE_ERROR, ET_ERROR, "arrays of indicators are not allowed on input");
+
+ add_variable_to_head(&argsinsert, find_variable($1), find_variable($2));
+ $$ = create_questionmarks($1, false);
+ }
+ ;
+
+char_civar: char_variable
+ {
+ char *ptr = strstr($1, ".arr");
+
+ if (ptr) /* varchar, we need the struct name here, not the struct element */
+ *ptr = '\0';
+ add_variable_to_head(&argsinsert, find_variable($1), &no_indicator);
+ $$ = $1;
+ }
+ ;
+
+civar: cvariable
+ {
+ add_variable_to_head(&argsinsert, find_variable($1), &no_indicator);
+ $$ = create_questionmarks($1, false);
+ }
+ ;
+
+indicator: cvariable { check_indicator((find_variable($1))->type); $$ = $1; }
+ | SQL_INDICATOR cvariable { check_indicator((find_variable($2))->type); $$ = $2; }
+ | SQL_INDICATOR name { check_indicator((find_variable($2))->type); $$ = $2; }
+ ;
+
+cvariable: CVARIABLE
+ {
+ /* As long as multidimensional arrays are not implemented we have to check for those here */
+ char *ptr = $1;
+ int brace_open=0, brace = false;
+
+ for (; *ptr; ptr++)
+ {
+ switch (*ptr)
+ {
+ case '[':
+ if (brace)
+ mmfatal(PARSE_ERROR, "multidimensional arrays for simple data types are not supported");
+ brace_open++;
+ break;
+ case ']':
+ brace_open--;
+ if (brace_open == 0)
+ brace = true;
+ break;
+ case '\t':
+ case ' ':
+ break;
+ default:
+ if (brace_open == 0)
+ brace = false;
+ break;
+ }
+ }
+ $$ = $1;
+ }
+ ;
+
+ecpg_param: PARAM { $$ = make_name(); } ;
+
+ecpg_bconst: BCONST { $$ = $1; } ;
+
+ecpg_fconst: FCONST { $$ = make_name(); } ;
+
+ecpg_sconst: SCONST { $$ = $1; } ;
+
+ecpg_xconst: XCONST { $$ = $1; } ;
+
+ecpg_ident: IDENT { $$ = $1; }
+ | CSTRING { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ ;
+
+quoted_ident_stringvar: name
+ { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ | char_variable
+ { $$ = make3_str(mm_strdup("("), $1, mm_strdup(")")); }
+ ;
+
+/*
+ * C stuff
+ */
+
+c_stuff_item: c_anything { $$ = $1; }
+ | '(' ')' { $$ = mm_strdup("()"); }
+ | '(' c_stuff ')'
+ { $$ = cat_str(3, mm_strdup("("), $2, mm_strdup(")")); }
+ ;
+
+c_stuff: c_stuff_item { $$ = $1; }
+ | c_stuff c_stuff_item
+ { $$ = cat2_str($1, $2); }
+ ;
+
+c_list: c_term { $$ = $1; }
+ | c_list ',' c_term { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ ;
+
+c_term: c_stuff { $$ = $1; }
+ | '{' c_list '}' { $$ = cat_str(3, mm_strdup("{"), $2, mm_strdup("}")); }
+ ;
+
+c_thing: c_anything { $$ = $1; }
+ | '(' { $$ = mm_strdup("("); }
+ | ')' { $$ = mm_strdup(")"); }
+ | ',' { $$ = mm_strdup(","); }
+ | ';' { $$ = mm_strdup(";"); }
+ ;
+
+c_anything: ecpg_ident { $$ = $1; }
+ | Iconst { $$ = $1; }
+ | ecpg_fconst { $$ = $1; }
+ | ecpg_sconst { $$ = $1; }
+ | '*' { $$ = mm_strdup("*"); }
+ | '+' { $$ = mm_strdup("+"); }
+ | '-' { $$ = mm_strdup("-"); }
+ | '/' { $$ = mm_strdup("/"); }
+ | '%' { $$ = mm_strdup("%"); }
+ | NULL_P { $$ = mm_strdup("NULL"); }
+ | S_ADD { $$ = mm_strdup("+="); }
+ | S_AND { $$ = mm_strdup("&&"); }
+ | S_ANYTHING { $$ = make_name(); }
+ | S_AUTO { $$ = mm_strdup("auto"); }
+ | S_CONST { $$ = mm_strdup("const"); }
+ | S_DEC { $$ = mm_strdup("--"); }
+ | S_DIV { $$ = mm_strdup("/="); }
+ | S_DOTPOINT { $$ = mm_strdup(".*"); }
+ | S_EQUAL { $$ = mm_strdup("=="); }
+ | S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_INC { $$ = mm_strdup("++"); }
+ | S_LSHIFT { $$ = mm_strdup("<<"); }
+ | S_MEMBER { $$ = mm_strdup("->"); }
+ | S_MEMPOINT { $$ = mm_strdup("->*"); }
+ | S_MOD { $$ = mm_strdup("%="); }
+ | S_MUL { $$ = mm_strdup("*="); }
+ | S_NEQUAL { $$ = mm_strdup("!="); }
+ | S_OR { $$ = mm_strdup("||"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_RSHIFT { $$ = mm_strdup(">>"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_SUB { $$ = mm_strdup("-="); }
+ | S_TYPEDEF { $$ = mm_strdup("typedef"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ | SQL_BOOL { $$ = mm_strdup("bool"); }
+ | ENUM_P { $$ = mm_strdup("enum"); }
+ | HOUR_P { $$ = mm_strdup("hour"); }
+ | INT_P { $$ = mm_strdup("int"); }
+ | SQL_LONG { $$ = mm_strdup("long"); }
+ | MINUTE_P { $$ = mm_strdup("minute"); }
+ | MONTH_P { $$ = mm_strdup("month"); }
+ | SECOND_P { $$ = mm_strdup("second"); }
+ | SQL_SHORT { $$ = mm_strdup("short"); }
+ | SQL_SIGNED { $$ = mm_strdup("signed"); }
+ | SQL_STRUCT { $$ = mm_strdup("struct"); }
+ | SQL_UNSIGNED { $$ = mm_strdup("unsigned"); }
+ | YEAR_P { $$ = mm_strdup("year"); }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | FLOAT_P { $$ = mm_strdup("float"); }
+ | TO { $$ = mm_strdup("to"); }
+ | UNION { $$ = mm_strdup("union"); }
+ | VARCHAR { $$ = mm_strdup("varchar"); }
+ | '[' { $$ = mm_strdup("["); }
+ | ']' { $$ = mm_strdup("]"); }
+ | '=' { $$ = mm_strdup("="); }
+ | ':' { $$ = mm_strdup(":"); }
+ ;
+
+DeallocateStmt: DEALLOCATE prepared_name { check_declared_list($2); $$ = $2; }
+ | DEALLOCATE PREPARE prepared_name { check_declared_list($3); $$ = $3; }
+ | DEALLOCATE ALL { $$ = mm_strdup("all"); }
+ | DEALLOCATE PREPARE ALL { $$ = mm_strdup("all"); }
+ ;
+
+Iresult: Iconst { $$ = $1; }
+ | '(' Iresult ')' { $$ = cat_str(3, mm_strdup("("), $2, mm_strdup(")")); }
+ | Iresult '+' Iresult { $$ = cat_str(3, $1, mm_strdup("+"), $3); }
+ | Iresult '-' Iresult { $$ = cat_str(3, $1, mm_strdup("-"), $3); }
+ | Iresult '*' Iresult { $$ = cat_str(3, $1, mm_strdup("*"), $3); }
+ | Iresult '/' Iresult { $$ = cat_str(3, $1, mm_strdup("/"), $3); }
+ | Iresult '%' Iresult { $$ = cat_str(3, $1, mm_strdup("%"), $3); }
+ | ecpg_sconst { $$ = $1; }
+ | ColId { $$ = $1; }
+ | ColId '(' var_type ')' { if (pg_strcasecmp($1, "sizeof") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "operator not allowed in variable definition");
+ else
+ $$ = cat_str(4, $1, mm_strdup("("), $3.type_str, mm_strdup(")"));
+ }
+ ;
+
+execute_rest: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_using opt_ecpg_into { $$ = EMPTY; }
+ | ecpg_into ecpg_using { $$ = EMPTY; }
+ | ecpg_into { $$ = EMPTY; }
+ ;
+
+ecpg_into: INTO into_list { $$ = EMPTY; }
+ | into_descriptor { $$ = $1; }
+ ;
+
+opt_ecpg_into: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_into { $$ = $1; }
+ ;
+
+ecpg_fetch_into: ecpg_into { $$ = $1; }
+ | using_descriptor
+ {
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+ $$ = $1;
+ }
+ ;
+
+opt_ecpg_fetch_into: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_fetch_into { $$ = $1; }
+ ;
+
+%%
+
+void base_yyerror(const char *error)
+{
+ /* translator: %s is typically the translation of "syntax error" */
+ mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
+ _(error), token_start ? token_start : base_yytext);
+}
+
+void parser_init(void)
+{
+ /* This function is empty. It only exists for compatibility with the backend parser right now. */
+}
diff --git a/src/interfaces/ecpg/preproc/ecpg.type b/src/interfaces/ecpg/preproc/ecpg.type
new file mode 100644
index 0000000..e4b77fa
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.type
@@ -0,0 +1,146 @@
+/* src/interfaces/ecpg/preproc/ecpg.type */
+%type <str> ECPGAllocateDescr
+%type <str> ECPGCKeywords
+%type <str> ECPGColId
+%type <str> ECPGColLabel
+%type <str> ECPGColLabelCommon
+%type <str> ECPGConnect
+%type <str> ECPGCursorStmt
+%type <str> ECPGDeallocateDescr
+%type <str> ECPGDeclaration
+%type <str> ECPGDeclare
+%type <str> ECPGDeclareStmt
+%type <str> ECPGDisconnect
+%type <str> ECPGExecuteImmediateStmt
+%type <str> ECPGFree
+%type <str> ECPGGetDescHeaderItem
+%type <str> ECPGGetDescItem
+%type <str> ECPGGetDescriptorHeader
+%type <str> ECPGKeywords
+%type <str> ECPGKeywords_rest
+%type <str> ECPGKeywords_vanames
+%type <str> ECPGOpen
+%type <str> ECPGSetAutocommit
+%type <str> ECPGSetConnection
+%type <str> ECPGSetDescHeaderItem
+%type <str> ECPGSetDescItem
+%type <str> ECPGSetDescriptorHeader
+%type <str> ECPGTypeName
+%type <str> ECPGTypedef
+%type <str> ECPGVar
+%type <str> ECPGVarDeclaration
+%type <str> ECPGWhenever
+%type <str> ECPGunreserved_interval
+%type <str> UsingConst
+%type <str> UsingValue
+%type <str> all_unreserved_keyword
+%type <str> c_anything
+%type <str> c_args
+%type <str> c_list
+%type <str> c_stuff
+%type <str> c_stuff_item
+%type <str> c_term
+%type <str> c_thing
+%type <str> char_variable
+%type <str> char_civar
+%type <str> civar
+%type <str> civarind
+%type <str> ColId
+%type <str> ColLabel
+%type <str> connect_options
+%type <str> connection_object
+%type <str> connection_target
+%type <str> coutputvariable
+%type <str> cvariable
+%type <str> db_prefix
+%type <str> CreateAsStmt
+%type <str> DeallocateStmt
+%type <str> dis_name
+%type <str> ecpg_bconst
+%type <str> ecpg_fconst
+%type <str> ecpg_ident
+%type <str> ecpg_interval
+%type <str> ecpg_into
+%type <str> ecpg_fetch_into
+%type <str> ecpg_param
+%type <str> ecpg_sconst
+%type <str> ecpg_using
+%type <str> ecpg_xconst
+%type <str> enum_definition
+%type <str> enum_type
+%type <str> execstring
+%type <str> execute_rest
+%type <str> indicator
+%type <str> into_descriptor
+%type <str> into_sqlda
+%type <str> Iresult
+%type <str> on_off
+%type <str> opt_bit_field
+%type <str> opt_connection_name
+%type <str> opt_database_name
+%type <str> opt_ecpg_into
+%type <str> opt_ecpg_fetch_into
+%type <str> opt_ecpg_using
+%type <str> opt_initializer
+%type <str> opt_options
+%type <str> opt_output
+%type <str> opt_pointer
+%type <str> opt_port
+%type <str> opt_reference
+%type <str> opt_scale
+%type <str> opt_server
+%type <str> opt_user
+%type <str> opt_opt_value
+%type <str> ora_user
+%type <str> precision
+%type <str> prepared_name
+%type <str> quoted_ident_stringvar
+%type <str> s_struct_union
+%type <str> server
+%type <str> server_name
+%type <str> single_vt_declaration
+%type <str> storage_clause
+%type <str> storage_declaration
+%type <str> storage_modifier
+%type <str> struct_union_type
+%type <str> struct_union_type_with_symbol
+%type <str> symbol
+%type <str> type_declaration
+%type <str> type_function_name
+%type <str> user_name
+%type <str> using_descriptor
+%type <str> var_declaration
+%type <str> var_type_declarations
+%type <str> variable
+%type <str> variable_declarations
+%type <str> variable_list
+%type <str> vt_declarations
+
+%type <str> Op
+%type <str> IntConstVar
+%type <str> AllConstVar
+%type <str> CSTRING
+%type <str> CPP_LINE
+%type <str> CVARIABLE
+%type <str> BCONST
+%type <str> SCONST
+%type <str> XCONST
+%type <str> IDENT
+
+%type <struct_union> s_struct_union_symbol
+
+%type <descriptor> ECPGGetDescriptor
+%type <descriptor> ECPGSetDescriptor
+
+%type <type_enum> simple_type
+%type <type_enum> signed_type
+%type <type_enum> unsigned_type
+
+%type <dtype_enum> descriptor_item
+%type <dtype_enum> desc_header_item
+
+%type <type> var_type
+
+%type <action> action
+
+%type <describe> ECPGDescribe \ No newline at end of file
diff --git a/src/interfaces/ecpg/preproc/ecpg_keywords.c b/src/interfaces/ecpg/preproc/ecpg_keywords.c
new file mode 100644
index 0000000..a2db06f
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg_keywords.c
@@ -0,0 +1,54 @@
+/*-------------------------------------------------------------------------
+ *
+ * ecpg_keywords.c
+ * lexical token lookup for reserved words in postgres embedded SQL
+ *
+ * IDENTIFICATION
+ * src/interfaces/ecpg/preproc/ecpg_keywords.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <ctype.h>
+
+/* ScanKeywordList lookup data for ECPG keywords */
+#include "ecpg_kwlist_d.h"
+#include "preproc_extern.h"
+#include "preproc.h"
+
+/* Token codes for ECPG keywords */
+#define PG_KEYWORD(kwname, value) value,
+
+static const uint16 ECPGScanKeywordTokens[] = {
+#include "ecpg_kwlist.h"
+};
+
+#undef PG_KEYWORD
+
+
+/*
+ * ScanECPGKeywordLookup - see if a given word is a keyword
+ *
+ * Returns the token value of the keyword, or -1 if no match.
+ *
+ * Keywords are matched using the same case-folding rules as in the backend.
+ */
+int
+ScanECPGKeywordLookup(const char *text)
+{
+ int kwnum;
+
+ /* First check SQL symbols defined by the backend. */
+ kwnum = ScanKeywordLookup(text, &ScanKeywords);
+ if (kwnum >= 0)
+ return SQLScanKeywordTokens[kwnum];
+
+ /* Try ECPG-specific keywords. */
+ kwnum = ScanKeywordLookup(text, &ScanECPGKeywords);
+ if (kwnum >= 0)
+ return ECPGScanKeywordTokens[kwnum];
+
+ return -1;
+}
diff --git a/src/interfaces/ecpg/preproc/ecpg_kwlist.h b/src/interfaces/ecpg/preproc/ecpg_kwlist.h
new file mode 100644
index 0000000..3c466f8
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg_kwlist.h
@@ -0,0 +1,67 @@
+/*-------------------------------------------------------------------------
+ *
+ * ecpg_kwlist.h
+ *
+ * The keyword lists are kept in their own source files for use by
+ * automatic tools. The exact representation of a keyword is determined
+ * by the PG_KEYWORD macro, which is not defined in this file; it can
+ * be defined by the caller for special purposes.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/ecpg/preproc/ecpg_kwlist.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* There is deliberately not an #ifndef ECPG_KWLIST_H here. */
+
+/*
+ * List of (keyword-name, keyword-token-value) pairs.
+ *
+ * Note: gen_keywordlist.pl requires the entries to appear in ASCII order.
+ */
+
+/* name, value */
+PG_KEYWORD("allocate", SQL_ALLOCATE)
+PG_KEYWORD("autocommit", SQL_AUTOCOMMIT)
+PG_KEYWORD("bool", SQL_BOOL)
+PG_KEYWORD("break", SQL_BREAK)
+PG_KEYWORD("cardinality", SQL_CARDINALITY)
+PG_KEYWORD("connect", SQL_CONNECT)
+PG_KEYWORD("count", SQL_COUNT)
+PG_KEYWORD("datetime_interval_code", SQL_DATETIME_INTERVAL_CODE)
+PG_KEYWORD("datetime_interval_precision", SQL_DATETIME_INTERVAL_PRECISION)
+PG_KEYWORD("describe", SQL_DESCRIBE)
+PG_KEYWORD("descriptor", SQL_DESCRIPTOR)
+PG_KEYWORD("disconnect", SQL_DISCONNECT)
+PG_KEYWORD("found", SQL_FOUND)
+PG_KEYWORD("free", SQL_FREE)
+PG_KEYWORD("get", SQL_GET)
+PG_KEYWORD("go", SQL_GO)
+PG_KEYWORD("goto", SQL_GOTO)
+PG_KEYWORD("identified", SQL_IDENTIFIED)
+PG_KEYWORD("indicator", SQL_INDICATOR)
+PG_KEYWORD("key_member", SQL_KEY_MEMBER)
+PG_KEYWORD("length", SQL_LENGTH)
+PG_KEYWORD("long", SQL_LONG)
+PG_KEYWORD("nullable", SQL_NULLABLE)
+PG_KEYWORD("octet_length", SQL_OCTET_LENGTH)
+PG_KEYWORD("open", SQL_OPEN)
+PG_KEYWORD("output", SQL_OUTPUT)
+PG_KEYWORD("reference", SQL_REFERENCE)
+PG_KEYWORD("returned_length", SQL_RETURNED_LENGTH)
+PG_KEYWORD("returned_octet_length", SQL_RETURNED_OCTET_LENGTH)
+PG_KEYWORD("scale", SQL_SCALE)
+PG_KEYWORD("section", SQL_SECTION)
+PG_KEYWORD("short", SQL_SHORT)
+PG_KEYWORD("signed", SQL_SIGNED)
+PG_KEYWORD("sqlerror", SQL_SQLERROR)
+PG_KEYWORD("sqlprint", SQL_SQLPRINT)
+PG_KEYWORD("sqlwarning", SQL_SQLWARNING)
+PG_KEYWORD("stop", SQL_STOP)
+PG_KEYWORD("struct", SQL_STRUCT)
+PG_KEYWORD("unsigned", SQL_UNSIGNED)
+PG_KEYWORD("var", SQL_VAR)
+PG_KEYWORD("whenever", SQL_WHENEVER)
diff --git a/src/interfaces/ecpg/preproc/ecpg_kwlist_d.h b/src/interfaces/ecpg/preproc/ecpg_kwlist_d.h
new file mode 100644
index 0000000..2196577
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg_kwlist_d.h
@@ -0,0 +1,152 @@
+/*-------------------------------------------------------------------------
+ *
+ * ecpg_kwlist_d.h
+ * List of keywords represented as a ScanKeywordList.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * NOTES
+ * ******************************
+ * *** DO NOT EDIT THIS FILE! ***
+ * ******************************
+ *
+ * It has been GENERATED by src/tools/gen_keywordlist.pl
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef ECPG_KWLIST_D_H
+#define ECPG_KWLIST_D_H
+
+#include "common/kwlookup.h"
+
+static const char ScanECPGKeywords_kw_string[] =
+ "allocate\0"
+ "autocommit\0"
+ "bool\0"
+ "break\0"
+ "cardinality\0"
+ "connect\0"
+ "count\0"
+ "datetime_interval_code\0"
+ "datetime_interval_precision\0"
+ "describe\0"
+ "descriptor\0"
+ "disconnect\0"
+ "found\0"
+ "free\0"
+ "get\0"
+ "go\0"
+ "goto\0"
+ "identified\0"
+ "indicator\0"
+ "key_member\0"
+ "length\0"
+ "long\0"
+ "nullable\0"
+ "octet_length\0"
+ "open\0"
+ "output\0"
+ "reference\0"
+ "returned_length\0"
+ "returned_octet_length\0"
+ "scale\0"
+ "section\0"
+ "short\0"
+ "signed\0"
+ "sqlerror\0"
+ "sqlprint\0"
+ "sqlwarning\0"
+ "stop\0"
+ "struct\0"
+ "unsigned\0"
+ "var\0"
+ "whenever";
+
+static const uint16 ScanECPGKeywords_kw_offsets[] = {
+ 0,
+ 9,
+ 20,
+ 25,
+ 31,
+ 43,
+ 51,
+ 57,
+ 80,
+ 108,
+ 117,
+ 128,
+ 139,
+ 145,
+ 150,
+ 154,
+ 157,
+ 162,
+ 173,
+ 183,
+ 194,
+ 201,
+ 206,
+ 215,
+ 228,
+ 233,
+ 240,
+ 250,
+ 266,
+ 288,
+ 294,
+ 302,
+ 308,
+ 315,
+ 324,
+ 333,
+ 344,
+ 349,
+ 356,
+ 365,
+ 369,
+};
+
+#define SCANECPGKEYWORDS_NUM_KEYWORDS 41
+
+static int
+ScanECPGKeywords_hash_func(const void *key, size_t keylen)
+{
+ static const int8 h[83] = {
+ -10, -4, 127, 0, 32, 27, 127, -10,
+ 127, 37, -28, 127, 3, 31, 127, -17,
+ 127, 127, -3, 127, 127, 0, 15, 127,
+ 127, 34, 127, 127, 127, 24, 41, 3,
+ 34, -24, 127, 127, 0, 127, 127, 127,
+ 16, 0, 33, 127, 127, 127, 14, 127,
+ 127, 18, 0, 127, 127, -4, -20, 21,
+ 0, 0, 30, 5, 0, 127, 23, 6,
+ 127, -14, 127, 127, 54, 0, -6, 0,
+ 0, -2, 36, 12, 0, -12, 41, 8,
+ 19, 127, 11
+ };
+
+ const unsigned char *k = (const unsigned char *) key;
+ uint32 a = 0;
+ uint32 b = 1;
+
+ while (keylen--)
+ {
+ unsigned char c = *k++ | 0x20;
+
+ a = a * 257 + c;
+ b = b * 17 + c;
+ }
+ return h[a % 83] + h[b % 83];
+}
+
+static const ScanKeywordList ScanECPGKeywords = {
+ ScanECPGKeywords_kw_string,
+ ScanECPGKeywords_kw_offsets,
+ ScanECPGKeywords_hash_func,
+ SCANECPGKEYWORDS_NUM_KEYWORDS,
+ 27
+};
+
+#endif /* ECPG_KWLIST_D_H */
diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c
new file mode 100644
index 0000000..83609e3
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/keywords.c
@@ -0,0 +1,38 @@
+/*-------------------------------------------------------------------------
+ *
+ * keywords.c
+ * lexical token lookup for key words in PostgreSQL
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/ecpg/preproc/keywords.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+/*
+ * This is much trickier than it looks. We are #include'ing kwlist.h
+ * but the token numbers that go into the table are from preproc.h
+ * not the backend's gram.h. Therefore this token table will match
+ * the ScanKeywords table supplied from common/keywords.c, including all
+ * keywords known to the backend, but it will supply the token numbers used
+ * by ecpg's grammar, which is what we need. The ecpg grammar must
+ * define all the same token names the backend does, else we'll get
+ * undefined-symbol failures in this compile.
+ */
+
+#include "preproc_extern.h"
+#include "preproc.h"
+
+#define PG_KEYWORD(kwname, value, category, collabel) value,
+
+const uint16 SQLScanKeywordTokens[] = {
+#include "parser/kwlist.h"
+};
+
+#undef PG_KEYWORD
diff --git a/src/interfaces/ecpg/preproc/nls.mk b/src/interfaces/ecpg/preproc/nls.mk
new file mode 100644
index 0000000..fed0f7c
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/nls.mk
@@ -0,0 +1,6 @@
+# src/interfaces/ecpg/preproc/nls.mk
+CATALOG_NAME = ecpg
+AVAIL_LANGUAGES = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN zh_TW
+GETTEXT_FILES = descriptor.c ecpg.c pgc.c preproc.c type.c variable.c
+GETTEXT_TRIGGERS = mmerror:3 mmfatal:2
+GETTEXT_FLAGS = mmerror:3:c-format mmfatal:2:c-format
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
new file mode 100644
index 0000000..cf8aadd
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -0,0 +1,251 @@
+/* src/interfaces/ecpg/preproc/output.c */
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+
+static void output_escaped_str(char *cmd, bool quoted);
+
+void
+output_line_number(void)
+{
+ char *line = hashline_number();
+
+ fprintf(base_yyout, "%s", line);
+ free(line);
+}
+
+void
+output_simple_statement(char *stmt, int whenever_mode)
+{
+ output_escaped_str(stmt, false);
+ if (whenever_mode)
+ whenever_action(whenever_mode);
+ output_line_number();
+ free(stmt);
+}
+
+
+/*
+ * store the whenever action here
+ */
+struct when when_error,
+ when_nf,
+ when_warn;
+
+static void
+print_action(struct when *w)
+{
+ switch (w->code)
+ {
+ case W_SQLPRINT:
+ fprintf(base_yyout, "sqlprint();");
+ break;
+ case W_GOTO:
+ fprintf(base_yyout, "goto %s;", w->command);
+ break;
+ case W_DO:
+ fprintf(base_yyout, "%s;", w->command);
+ break;
+ case W_STOP:
+ fprintf(base_yyout, "exit (1);");
+ break;
+ case W_BREAK:
+ fprintf(base_yyout, "break;");
+ break;
+ case W_CONTINUE:
+ fprintf(base_yyout, "continue;");
+ break;
+ default:
+ fprintf(base_yyout, "{/* %d not implemented yet */}", w->code);
+ break;
+ }
+}
+
+void
+whenever_action(int mode)
+{
+ if ((mode & 1) == 1 && when_nf.code != W_NOTHING)
+ {
+ output_line_number();
+ fprintf(base_yyout, "\nif (sqlca.sqlcode == ECPG_NOT_FOUND) ");
+ print_action(&when_nf);
+ }
+ if (when_warn.code != W_NOTHING)
+ {
+ output_line_number();
+ fprintf(base_yyout, "\nif (sqlca.sqlwarn[0] == 'W') ");
+ print_action(&when_warn);
+ }
+ if (when_error.code != W_NOTHING)
+ {
+ output_line_number();
+ fprintf(base_yyout, "\nif (sqlca.sqlcode < 0) ");
+ print_action(&when_error);
+ }
+
+ if ((mode & 2) == 2)
+ fputc('}', base_yyout);
+
+ output_line_number();
+}
+
+char *
+hashline_number(void)
+{
+ /* do not print line numbers if we are in debug mode */
+ if (input_filename
+#ifdef YYDEBUG
+ && !base_yydebug
+#endif
+ )
+ {
+ /* "* 2" here is for escaping '\' and '"' below */
+ char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2);
+ char *src,
+ *dest;
+
+ sprintf(line, "\n#line %d \"", base_yylineno);
+ src = input_filename;
+ dest = line + strlen(line);
+ while (*src)
+ {
+ if (*src == '\\' || *src == '"')
+ *dest++ = '\\';
+ *dest++ = *src++;
+ }
+ *dest = '\0';
+ strcat(dest, "\"\n");
+
+ return line;
+ }
+
+ return EMPTY;
+}
+
+static char *ecpg_statement_type_name[] = {
+ "ECPGst_normal",
+ "ECPGst_execute",
+ "ECPGst_exec_immediate",
+ "ECPGst_prepnormal",
+ "ECPGst_prepare",
+ "ECPGst_exec_with_exprlist"
+};
+
+void
+output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type st)
+{
+ fprintf(base_yyout, "{ ECPGdo(__LINE__, %d, %d, %s, %d, ", compat, force_indicator, connection ? connection : "NULL", questionmarks);
+
+ if (st == ECPGst_prepnormal && !auto_prepare)
+ st = ECPGst_normal;
+
+ /*
+ * In following cases, stmt is CSTRING or char_variable. They must be
+ * output directly. - prepared_name of EXECUTE without exprlist -
+ * execstring of EXECUTE IMMEDIATE
+ */
+ fprintf(base_yyout, "%s, ", ecpg_statement_type_name[st]);
+ if (st == ECPGst_execute || st == ECPGst_exec_immediate)
+ fprintf(base_yyout, "%s, ", stmt);
+ else
+ {
+ fputs("\"", base_yyout);
+ output_escaped_str(stmt, false);
+ fputs("\", ", base_yyout);
+ }
+
+ /* dump variables to C file */
+ dump_variables(argsinsert, 1);
+ fputs("ECPGt_EOIT, ", base_yyout);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ reset_variables();
+
+ whenever_action(whenever_mode | 2);
+ free(stmt);
+}
+
+void
+output_prepare_statement(char *name, char *stmt)
+{
+ fprintf(base_yyout, "{ ECPGprepare(__LINE__, %s, %d, ", connection ? connection : "NULL", questionmarks);
+ output_escaped_str(name, true);
+ fputs(", ", base_yyout);
+ output_escaped_str(stmt, true);
+ fputs(");", base_yyout);
+ whenever_action(2);
+ free(name);
+}
+
+void
+output_deallocate_prepare_statement(char *name)
+{
+ const char *con = connection ? connection : "NULL";
+
+ if (strcmp(name, "all") != 0)
+ {
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, ", compat, con);
+ output_escaped_str(name, true);
+ fputs(");", base_yyout);
+ }
+ else
+ fprintf(base_yyout, "{ ECPGdeallocate_all(__LINE__, %d, %s);", compat, con);
+
+ whenever_action(2);
+ free(name);
+}
+
+static void
+output_escaped_str(char *str, bool quoted)
+{
+ int i = 0;
+ int len = strlen(str);
+
+ if (quoted && str[0] == '"' && str[len - 1] == '"') /* do not escape quotes
+ * at beginning and end
+ * if quoted string */
+ {
+ i = 1;
+ len--;
+ fputs("\"", base_yyout);
+ }
+
+ /* output this char by char as we have to filter " and \n */
+ for (; i < len; i++)
+ {
+ if (str[i] == '"')
+ fputs("\\\"", base_yyout);
+ else if (str[i] == '\n')
+ fputs("\\\n", base_yyout);
+ else if (str[i] == '\\')
+ {
+ int j = i;
+
+ /*
+ * check whether this is a continuation line if it is, do not
+ * output anything because newlines are escaped anyway
+ */
+
+ /* accept blanks after the '\' as some other compilers do too */
+ do
+ {
+ j++;
+ } while (str[j] == ' ' || str[j] == '\t');
+
+ if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a
+ * newline */
+ fputs("\\\\", base_yyout);
+ }
+ else if (str[i] == '\r' && str[i + 1] == '\n')
+ {
+ fputs("\\\r\n", base_yyout);
+ i++;
+ }
+ else
+ fputc(str[i], base_yyout);
+ }
+
+ if (quoted && str[0] == '"' && str[len] == '"')
+ fputs("\"", base_yyout);
+}
diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl
new file mode 100644
index 0000000..1e24801
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/parse.pl
@@ -0,0 +1,698 @@
+#!/usr/bin/perl
+# src/interfaces/ecpg/preproc/parse.pl
+# parser generator for ecpg version 2
+# call with backend parser as stdin
+#
+# Copyright (c) 2007-2021, PostgreSQL Global Development Group
+#
+# Written by Mike Aubury <mike.aubury@aubit.com>
+# Michael Meskes <meskes@postgresql.org>
+# Andy Colson <andy@squeakycode.net>
+#
+# Placed under the same license as PostgreSQL.
+#
+
+use strict;
+use warnings;
+no warnings 'uninitialized';
+
+my $path = shift @ARGV;
+$path = "." unless $path;
+
+my $copymode = 0;
+my $brace_indent = 0;
+my $yaccmode = 0;
+my $in_rule = 0;
+my $header_included = 0;
+my $feature_not_supported = 0;
+my $tokenmode = 0;
+
+my (%buff, $infield, $comment, %tokens, %addons);
+my ($stmt_mode, @fields);
+my ($line, $non_term_id);
+
+
+# some token have to be replaced by other symbols
+# either in the rule
+my %replace_token = (
+ 'BCONST' => 'ecpg_bconst',
+ 'FCONST' => 'ecpg_fconst',
+ 'Sconst' => 'ecpg_sconst',
+ 'XCONST' => 'ecpg_xconst',
+ 'IDENT' => 'ecpg_ident',
+ 'PARAM' => 'ecpg_param',);
+
+# or in the block
+my %replace_string = (
+ 'NOT_LA' => 'not',
+ 'NULLS_LA' => 'nulls',
+ 'WITH_LA' => 'with',
+ 'TYPECAST' => '::',
+ 'DOT_DOT' => '..',
+ 'COLON_EQUALS' => ':=',
+ 'EQUALS_GREATER' => '=>',
+ 'LESS_EQUALS' => '<=',
+ 'GREATER_EQUALS' => '>=',
+ 'NOT_EQUALS' => '<>',);
+
+# specific replace_types for specific non-terminals - never include the ':'
+# ECPG-only replace_types are defined in ecpg-replace_types
+my %replace_types = (
+ 'PrepareStmt' => '<prep>',
+ 'ExecuteStmt' => '<exec>',
+ 'opt_array_bounds' => '<index>',
+
+ # "ignore" means: do not create type and rules for this non-term-id
+ 'parse_toplevel' => 'ignore',
+ 'stmtmulti' => 'ignore',
+ 'CreateAsStmt' => 'ignore',
+ 'DeallocateStmt' => 'ignore',
+ 'ColId' => 'ignore',
+ 'type_function_name' => 'ignore',
+ 'ColLabel' => 'ignore',
+ 'Sconst' => 'ignore',
+ 'opt_distinct_clause' => 'ignore',
+ 'PLpgSQL_Expr' => 'ignore',
+ 'PLAssignStmt' => 'ignore',
+ 'plassign_target' => 'ignore',
+ 'plassign_equals' => 'ignore',);
+
+# these replace_line commands excise certain keywords from the core keyword
+# lists. Be sure to account for these in ColLabel and related productions.
+my %replace_line = (
+ 'unreserved_keywordCONNECTION' => 'ignore',
+ 'unreserved_keywordCURRENT_P' => 'ignore',
+ 'unreserved_keywordDAY_P' => 'ignore',
+ 'unreserved_keywordHOUR_P' => 'ignore',
+ 'unreserved_keywordINPUT_P' => 'ignore',
+ 'unreserved_keywordMINUTE_P' => 'ignore',
+ 'unreserved_keywordMONTH_P' => 'ignore',
+ 'unreserved_keywordSECOND_P' => 'ignore',
+ 'unreserved_keywordYEAR_P' => 'ignore',
+ 'col_name_keywordCHAR_P' => 'ignore',
+ 'col_name_keywordINT_P' => 'ignore',
+ 'col_name_keywordVALUES' => 'ignore',
+ 'reserved_keywordTO' => 'ignore',
+ 'reserved_keywordUNION' => 'ignore',
+
+ # some other production rules have to be ignored or replaced
+ 'fetch_argsFORWARDopt_from_incursor_name' => 'ignore',
+ 'fetch_argsBACKWARDopt_from_incursor_name' => 'ignore',
+ "opt_array_boundsopt_array_bounds'['Iconst']'" => 'ignore',
+ 'VariableShowStmtSHOWvar_name' => 'SHOW var_name ecpg_into',
+ 'VariableShowStmtSHOWTIMEZONE' => 'SHOW TIME ZONE ecpg_into',
+ 'VariableShowStmtSHOWTRANSACTIONISOLATIONLEVEL' =>
+ 'SHOW TRANSACTION ISOLATION LEVEL ecpg_into',
+ 'VariableShowStmtSHOWSESSIONAUTHORIZATION' =>
+ 'SHOW SESSION AUTHORIZATION ecpg_into',
+ 'returning_clauseRETURNINGtarget_list' =>
+ 'RETURNING target_list opt_ecpg_into',
+ 'ExecuteStmtEXECUTEnameexecute_param_clause' =>
+ 'EXECUTE prepared_name execute_param_clause execute_rest',
+ 'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clauseopt_with_data'
+ => 'CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest',
+ 'ExecuteStmtCREATEOptTempTABLEIF_PNOTEXISTScreate_as_targetASEXECUTEnameexecute_param_clauseopt_with_data'
+ => 'CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest',
+ 'PrepareStmtPREPAREnameprep_type_clauseASPreparableStmt' =>
+ 'PREPARE prepared_name prep_type_clause AS PreparableStmt',
+ 'var_nameColId' => 'ECPGColId');
+
+preload_addons();
+
+main();
+
+dump_buffer('header');
+dump_buffer('tokens');
+dump_buffer('types');
+dump_buffer('ecpgtype');
+dump_buffer('orig_tokens');
+print '%%', "\n";
+print 'prog: statements;', "\n";
+dump_buffer('rules');
+include_file('trailer', 'ecpg.trailer');
+dump_buffer('trailer');
+
+sub main
+{
+ line: while (<>)
+ {
+ if (/ERRCODE_FEATURE_NOT_SUPPORTED/)
+ {
+ $feature_not_supported = 1;
+ next line;
+ }
+
+ chomp;
+
+ # comment out the line below to make the result file match (blank line wise)
+ # the prior version.
+ #next if ($_ eq '');
+
+ # Dump the action for a rule -
+ # stmt_mode indicates if we are processing the 'stmt:'
+ # rule (mode==0 means normal, mode==1 means stmt:)
+ # flds are the fields to use. These may start with a '$' - in
+ # which case they are the result of a previous non-terminal
+ #
+ # if they don't start with a '$' then they are token name
+ #
+ # len is the number of fields in flds...
+ # leadin is the padding to apply at the beginning (just use for formatting)
+
+ if (/^%%/)
+ {
+ $tokenmode = 2;
+ $copymode = 1;
+ $yaccmode++;
+ $infield = 0;
+ }
+
+ my $prec = 0;
+
+ # Make sure any braces are split
+ s/{/ { /g;
+ s/}/ } /g;
+
+ # Any comments are split
+ s|\/\*| /* |g;
+ s|\*\/| */ |g;
+
+ # Now split the line into individual fields
+ my @arr = split(' ');
+
+ if ($arr[0] eq '%token' && $tokenmode == 0)
+ {
+ $tokenmode = 1;
+ include_file('tokens', 'ecpg.tokens');
+ }
+ elsif ($arr[0] eq '%type' && $header_included == 0)
+ {
+ include_file('header', 'ecpg.header');
+ include_file('ecpgtype', 'ecpg.type');
+ $header_included = 1;
+ }
+
+ if ($tokenmode == 1)
+ {
+ my $str = '';
+ my $prior = '';
+ for my $a (@arr)
+ {
+ if ($a eq '/*')
+ {
+ $comment++;
+ next;
+ }
+ if ($a eq '*/')
+ {
+ $comment--;
+ next;
+ }
+ if ($comment)
+ {
+ next;
+ }
+ if (substr($a, 0, 1) eq '<')
+ {
+ next;
+
+ # its a type
+ }
+ $tokens{$a} = 1;
+
+ $str = $str . ' ' . $a;
+ if ($a eq 'IDENT' && $prior eq '%nonassoc')
+ {
+
+ # add more tokens to the list
+ $str = $str . "\n%nonassoc CSTRING";
+ }
+ $prior = $a;
+ }
+ add_to_buffer('orig_tokens', $str);
+ next line;
+ }
+
+ # Don't worry about anything if we're not in the right section of gram.y
+ if ($yaccmode != 1)
+ {
+ next line;
+ }
+
+
+ # Go through each field in turn
+ for (
+ my $fieldIndexer = 0;
+ $fieldIndexer < scalar(@arr);
+ $fieldIndexer++)
+ {
+ if ($arr[$fieldIndexer] eq '*/' && $comment)
+ {
+ $comment = 0;
+ next;
+ }
+ elsif ($comment)
+ {
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '/*')
+ {
+
+ # start of a multiline comment
+ $comment = 1;
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '//')
+ {
+ next line;
+ }
+ elsif ($arr[$fieldIndexer] eq '}')
+ {
+ $brace_indent--;
+ next;
+ }
+ elsif ($arr[$fieldIndexer] eq '{')
+ {
+ $brace_indent++;
+ next;
+ }
+
+ if ($brace_indent > 0)
+ {
+ next;
+ }
+ if ($arr[$fieldIndexer] eq ';')
+ {
+ if ($copymode)
+ {
+ if ($infield)
+ {
+ dump_line($stmt_mode, \@fields);
+ }
+ add_to_buffer('rules', ";\n\n");
+ }
+ else
+ {
+ $copymode = 1;
+ }
+ @fields = ();
+ $infield = 0;
+ $line = '';
+ $in_rule = 0;
+ next;
+ }
+
+ if ($arr[$fieldIndexer] eq '|')
+ {
+ if ($copymode)
+ {
+ if ($infield)
+ {
+ $infield = $infield + dump_line($stmt_mode, \@fields);
+ }
+ if ($infield > 1)
+ {
+ $line = '| ';
+ }
+ }
+ @fields = ();
+ next;
+ }
+
+ if (exists $replace_token{ $arr[$fieldIndexer] })
+ {
+ $arr[$fieldIndexer] = $replace_token{ $arr[$fieldIndexer] };
+ }
+
+ # Are we looking at a declaration of a non-terminal ?
+ if (($arr[$fieldIndexer] =~ /[A-Za-z0-9]+:/)
+ || $arr[ $fieldIndexer + 1 ] eq ':')
+ {
+ $non_term_id = $arr[$fieldIndexer];
+ $non_term_id =~ tr/://d;
+
+ if (not defined $replace_types{$non_term_id})
+ {
+ $replace_types{$non_term_id} = '<str>';
+ $copymode = 1;
+ }
+ elsif ($replace_types{$non_term_id} eq 'ignore')
+ {
+ $copymode = 0;
+ $line = '';
+ next line;
+ }
+ $line = $line . ' ' . $arr[$fieldIndexer];
+
+ # Do we have the : attached already ?
+ # If yes, we'll have already printed the ':'
+ if (!($arr[$fieldIndexer] =~ '[A-Za-z0-9]+:'))
+ {
+
+ # Consume the ':' which is next...
+ $line = $line . ':';
+ $fieldIndexer++;
+ }
+
+ # Special mode?
+ if ($non_term_id eq 'stmt')
+ {
+ $stmt_mode = 1;
+ }
+ else
+ {
+ $stmt_mode = 0;
+ }
+ my $tstr =
+ '%type '
+ . $replace_types{$non_term_id} . ' '
+ . $non_term_id;
+ add_to_buffer('types', $tstr);
+
+ if ($copymode)
+ {
+ add_to_buffer('rules', $line);
+ }
+ $line = '';
+ @fields = ();
+ $infield = 1;
+ die "unterminated rule at grammar line $.\n"
+ if $in_rule;
+ $in_rule = 1;
+ next;
+ }
+ elsif ($copymode)
+ {
+ $line = $line . ' ' . $arr[$fieldIndexer];
+ }
+ if ($arr[$fieldIndexer] eq '%prec')
+ {
+ $prec = 1;
+ next;
+ }
+
+ if ( $copymode
+ && !$prec
+ && !$comment
+ && length($arr[$fieldIndexer])
+ && $infield)
+ {
+ if ($arr[$fieldIndexer] ne 'Op'
+ && ( $tokens{ $arr[$fieldIndexer] } > 0
+ || $arr[$fieldIndexer] =~ /'.+'/)
+ || $stmt_mode == 1)
+ {
+ my $S;
+ if (exists $replace_string{ $arr[$fieldIndexer] })
+ {
+ $S = $replace_string{ $arr[$fieldIndexer] };
+ }
+ else
+ {
+ $S = $arr[$fieldIndexer];
+ }
+ $S =~ s/_P//g;
+ $S =~ tr/'//d;
+ if ($stmt_mode == 1)
+ {
+ push(@fields, $S);
+ }
+ else
+ {
+ push(@fields, lc($S));
+ }
+ }
+ else
+ {
+ push(@fields, '$' . (scalar(@fields) + 1));
+ }
+ }
+ }
+ }
+ die "unterminated rule at end of grammar\n"
+ if $in_rule;
+ return;
+}
+
+
+# append a file onto a buffer.
+# Arguments: buffer_name, filename (without path)
+sub include_file
+{
+ my ($buffer, $filename) = @_;
+ my $full = "$path/$filename";
+ open(my $fh, '<', $full) or die;
+ while (<$fh>)
+ {
+ chomp;
+ add_to_buffer($buffer, $_);
+ }
+ close($fh);
+ return;
+}
+
+sub include_addon
+{
+ my ($buffer, $block, $fields, $stmt_mode) = @_;
+ my $rec = $addons{$block};
+ return 0 unless $rec;
+
+ if ($rec->{type} eq 'rule')
+ {
+ dump_fields($stmt_mode, $fields, ' { ');
+ }
+ elsif ($rec->{type} eq 'addon')
+ {
+ add_to_buffer('rules', ' { ');
+ }
+
+ #add_to_buffer( $stream, $_ );
+ #We have an array to add to the buffer, we'll add it ourself instead of
+ #calling add_to_buffer, which does not know about arrays
+
+ push(@{ $buff{$buffer} }, @{ $rec->{lines} });
+
+ if ($rec->{type} eq 'addon')
+ {
+ dump_fields($stmt_mode, $fields, '');
+ }
+
+
+ # if we added something (ie there are lines in our array), return 1
+ return 1 if (scalar(@{ $rec->{lines} }) > 0);
+ return 0;
+}
+
+
+# include_addon does this same thing, but does not call this
+# sub... so if you change this, you need to fix include_addon too
+# Pass: buffer_name, string_to_append
+sub add_to_buffer
+{
+ push(@{ $buff{ $_[0] } }, "$_[1]\n");
+ return;
+}
+
+sub dump_buffer
+{
+ my ($buffer) = @_;
+ print '/* ', $buffer, ' */', "\n";
+ my $ref = $buff{$buffer};
+ print @$ref;
+ return;
+}
+
+sub dump_fields
+{
+ my ($mode, $flds, $ln) = @_;
+ my $len = scalar(@$flds);
+
+ if ($mode == 0)
+ {
+
+ #Normal
+ add_to_buffer('rules', $ln);
+ if ($feature_not_supported == 1)
+ {
+
+ # we found an unsupported feature, but we have to
+ # filter out ExecuteStmt: CREATE OptTemp TABLE ...
+ # because the warning there is only valid in some situations
+ if ($flds->[0] ne 'create' || $flds->[2] ne 'table')
+ {
+ add_to_buffer('rules',
+ 'mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");'
+ );
+ }
+ $feature_not_supported = 0;
+ }
+
+ if ($len == 0)
+ {
+
+ # We have no fields ?
+ add_to_buffer('rules', ' $$=EMPTY; }');
+ }
+ else
+ {
+
+ # Go through each field and try to 'aggregate' the tokens
+ # into a single 'mm_strdup' where possible
+ my @flds_new;
+ my $str;
+ for (my $z = 0; $z < $len; $z++)
+ {
+ if (substr($flds->[$z], 0, 1) eq '$')
+ {
+ push(@flds_new, $flds->[$z]);
+ next;
+ }
+
+ $str = $flds->[$z];
+
+ while (1)
+ {
+ if ($z >= $len - 1
+ || substr($flds->[ $z + 1 ], 0, 1) eq '$')
+ {
+
+ # We're at the end...
+ push(@flds_new, "mm_strdup(\"$str\")");
+ last;
+ }
+ $z++;
+ $str = $str . ' ' . $flds->[$z];
+ }
+ }
+
+ # So - how many fields did we end up with ?
+ $len = scalar(@flds_new);
+ if ($len == 1)
+ {
+
+ # Straight assignment
+ $str = ' $$ = ' . $flds_new[0] . ';';
+ add_to_buffer('rules', $str);
+ }
+ else
+ {
+
+ # Need to concatenate the results to form
+ # our final string
+ $str =
+ ' $$ = cat_str(' . $len . ',' . join(',', @flds_new) . ');';
+ add_to_buffer('rules', $str);
+ }
+ add_to_buffer('rules', '}');
+ }
+ }
+ else
+ {
+
+ # we're in the stmt: rule
+ if ($len)
+ {
+
+ # or just the statement ...
+ add_to_buffer('rules',
+ ' { output_statement($1, 0, ECPGst_normal); }');
+ }
+ else
+ {
+ add_to_buffer('rules', ' { $$ = NULL; }');
+ }
+ }
+ return;
+}
+
+
+sub dump_line
+{
+ my ($stmt_mode, $fields) = @_;
+ my $block = $non_term_id . $line;
+ $block =~ tr/ |//d;
+ my $rep = $replace_line{$block};
+ if ($rep)
+ {
+ if ($rep eq 'ignore')
+ {
+ return 0;
+ }
+
+ if (index($line, '|') != -1)
+ {
+ $line = '| ' . $rep;
+ }
+ else
+ {
+ $line = $rep;
+ }
+ $block = $non_term_id . $line;
+ $block =~ tr/ |//d;
+ }
+ add_to_buffer('rules', $line);
+ my $i = include_addon('rules', $block, $fields, $stmt_mode);
+ if ($i == 0)
+ {
+ dump_fields($stmt_mode, $fields, ' { ');
+ }
+ return 1;
+}
+
+=top
+ load addons into cache
+ %addons = {
+ stmtClosePortalStmt => { 'type' => 'block', 'lines' => [ "{", "if (INFORMIX_MODE)" ..., "}" ] },
+ stmtViewStmt => { 'type' => 'rule', 'lines' => [ "| ECPGAllocateDescr", ... ] }
+ }
+
+=cut
+
+sub preload_addons
+{
+ my $filename = $path . "/ecpg.addons";
+ open(my $fh, '<', $filename) or die;
+
+ # there may be multiple lines starting ECPG: and then multiple lines of code.
+ # the code need to be add to all prior ECPG records.
+ my (@needsRules, @code, $record);
+
+ # there may be comments before the first ECPG line, skip them
+ my $skip = 1;
+ while (<$fh>)
+ {
+ if (/^ECPG:\s(\S+)\s?(\w+)?/)
+ {
+ $skip = 0;
+ if (@code)
+ {
+ for my $x (@needsRules)
+ {
+ push(@{ $x->{lines} }, @code);
+ }
+ @code = ();
+ @needsRules = ();
+ }
+ $record = {};
+ $record->{type} = $2;
+ $record->{lines} = [];
+ if (exists $addons{$1}) { die "Ga! there are dups!\n"; }
+ $addons{$1} = $record;
+ push(@needsRules, $record);
+ }
+ else
+ {
+ next if $skip;
+ push(@code, $_);
+ }
+ }
+ close($fh);
+ if (@code)
+ {
+ for my $x (@needsRules)
+ {
+ push(@{ $x->{lines} }, @code);
+ }
+ }
+ return;
+}
diff --git a/src/interfaces/ecpg/preproc/parser.c b/src/interfaces/ecpg/preproc/parser.c
new file mode 100644
index 0000000..a8571a3
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/parser.c
@@ -0,0 +1,231 @@
+/*-------------------------------------------------------------------------
+ *
+ * parser.c
+ * Main entry point/driver for PostgreSQL grammar
+ *
+ * This should match src/backend/parser/parser.c, except that we do not
+ * need to bother with re-entrant interfaces.
+ *
+ * Note: ECPG doesn't report error location like the backend does.
+ * This file will need work if we ever want it to.
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/ecpg/preproc/parser.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+#include "preproc.h"
+
+
+static bool have_lookahead; /* is lookahead info valid? */
+static int lookahead_token; /* one-token lookahead */
+static YYSTYPE lookahead_yylval; /* yylval for lookahead token */
+static YYLTYPE lookahead_yylloc; /* yylloc for lookahead token */
+static char *lookahead_yytext; /* start current token */
+
+static bool check_uescapechar(unsigned char escape);
+static bool ecpg_isspace(char ch);
+
+
+/*
+ * Intermediate filter between parser and base lexer (base_yylex in scan.l).
+ *
+ * This filter is needed because in some cases the standard SQL grammar
+ * requires more than one token lookahead. We reduce these cases to one-token
+ * lookahead by replacing tokens here, in order to keep the grammar LALR(1).
+ *
+ * Using a filter is simpler than trying to recognize multiword tokens
+ * directly in scan.l, because we'd have to allow for comments between the
+ * words. Furthermore it's not clear how to do that without re-introducing
+ * scanner backtrack, which would cost more performance than this filter
+ * layer does.
+ *
+ * We also use this filter to convert UIDENT and USCONST sequences into
+ * plain IDENT and SCONST tokens. While that could be handled by additional
+ * productions in the main grammar, it's more efficient to do it like this.
+ */
+int
+filtered_base_yylex(void)
+{
+ int cur_token;
+ int next_token;
+ YYSTYPE cur_yylval;
+ YYLTYPE cur_yylloc;
+ char *cur_yytext;
+
+ /* Get next token --- we might already have it */
+ if (have_lookahead)
+ {
+ cur_token = lookahead_token;
+ base_yylval = lookahead_yylval;
+ base_yylloc = lookahead_yylloc;
+ base_yytext = lookahead_yytext;
+ have_lookahead = false;
+ }
+ else
+ cur_token = base_yylex();
+
+ /*
+ * If this token isn't one that requires lookahead, just return it.
+ */
+ switch (cur_token)
+ {
+ case NOT:
+ case NULLS_P:
+ case WITH:
+ case UIDENT:
+ case USCONST:
+ break;
+ default:
+ return cur_token;
+ }
+
+ /* Save and restore lexer output variables around the call */
+ cur_yylval = base_yylval;
+ cur_yylloc = base_yylloc;
+ cur_yytext = base_yytext;
+
+ /* Get next token, saving outputs into lookahead variables */
+ next_token = base_yylex();
+
+ lookahead_token = next_token;
+ lookahead_yylval = base_yylval;
+ lookahead_yylloc = base_yylloc;
+ lookahead_yytext = base_yytext;
+
+ base_yylval = cur_yylval;
+ base_yylloc = cur_yylloc;
+ base_yytext = cur_yytext;
+
+ have_lookahead = true;
+
+ /* Replace cur_token if needed, based on lookahead */
+ switch (cur_token)
+ {
+ case NOT:
+ /* Replace NOT by NOT_LA if it's followed by BETWEEN, IN, etc */
+ switch (next_token)
+ {
+ case BETWEEN:
+ case IN_P:
+ case LIKE:
+ case ILIKE:
+ case SIMILAR:
+ cur_token = NOT_LA;
+ break;
+ }
+ break;
+
+ case NULLS_P:
+ /* Replace NULLS_P by NULLS_LA if it's followed by FIRST or LAST */
+ switch (next_token)
+ {
+ case FIRST_P:
+ case LAST_P:
+ cur_token = NULLS_LA;
+ break;
+ }
+ break;
+
+ case WITH:
+ /* Replace WITH by WITH_LA if it's followed by TIME or ORDINALITY */
+ switch (next_token)
+ {
+ case TIME:
+ case ORDINALITY:
+ cur_token = WITH_LA;
+ break;
+ }
+ break;
+ case UIDENT:
+ case USCONST:
+ /* Look ahead for UESCAPE */
+ if (next_token == UESCAPE)
+ {
+ /* Yup, so get third token, which had better be SCONST */
+ const char *escstr;
+
+ /*
+ * Again save and restore lexer output variables around the
+ * call
+ */
+ cur_yylval = base_yylval;
+ cur_yylloc = base_yylloc;
+ cur_yytext = base_yytext;
+
+ /* Get third token */
+ next_token = base_yylex();
+
+ if (next_token != SCONST)
+ mmerror(PARSE_ERROR, ET_ERROR, "UESCAPE must be followed by a simple string literal");
+
+ /*
+ * Save and check escape string, which the scanner returns
+ * with quotes
+ */
+ escstr = base_yylval.str;
+ if (strlen(escstr) != 3 || !check_uescapechar(escstr[1]))
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid Unicode escape character");
+
+ base_yylval = cur_yylval;
+ base_yylloc = cur_yylloc;
+ base_yytext = cur_yytext;
+
+ /* Combine 3 tokens into 1 */
+ base_yylval.str = psprintf("%s UESCAPE %s", base_yylval.str, escstr);
+
+ /* Clear have_lookahead, thereby consuming all three tokens */
+ have_lookahead = false;
+ }
+
+ if (cur_token == UIDENT)
+ cur_token = IDENT;
+ else if (cur_token == USCONST)
+ cur_token = SCONST;
+ break;
+ }
+
+ return cur_token;
+}
+
+/*
+ * check_uescapechar() and ecpg_isspace() should match their equivalents
+ * in pgc.l.
+ */
+
+/* is 'escape' acceptable as Unicode escape character (UESCAPE syntax) ? */
+static bool
+check_uescapechar(unsigned char escape)
+{
+ if (isxdigit(escape)
+ || escape == '+'
+ || escape == '\''
+ || escape == '"'
+ || ecpg_isspace(escape))
+ return false;
+ else
+ return true;
+}
+
+/*
+ * ecpg_isspace() --- return true if flex scanner considers char whitespace
+ */
+static bool
+ecpg_isspace(char ch)
+{
+ if (ch == ' ' ||
+ ch == '\t' ||
+ ch == '\n' ||
+ ch == '\r' ||
+ ch == '\f')
+ return true;
+ return false;
+}
diff --git a/src/interfaces/ecpg/preproc/pgc.c b/src/interfaces/ecpg/preproc/pgc.c
new file mode 100644
index 0000000..9a2171f
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/pgc.c
@@ -0,0 +1,5005 @@
+#line 2 "pgc.c"
+/*-------------------------------------------------------------------------
+ *
+ * pgc.l
+ * lexical scanner for ecpg
+ *
+ * This is a modified version of src/backend/parser/scan.l
+ *
+ * The ecpg scanner is not backup-free, so the fail rules are
+ * only here to simplify syncing this file with scan.l.
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/ecpg/preproc/pgc.l
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <limits.h>
+
+#include "common/string.h"
+
+#include "preproc_extern.h"
+#include "preproc.h"
+
+#line 32 "pgc.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer base_yy_create_buffer
+#define yy_delete_buffer base_yy_delete_buffer
+#define yy_scan_buffer base_yy_scan_buffer
+#define yy_scan_string base_yy_scan_string
+#define yy_scan_bytes base_yy_scan_bytes
+#define yy_init_buffer base_yy_init_buffer
+#define yy_flush_buffer base_yy_flush_buffer
+#define yy_load_buffer_state base_yy_load_buffer_state
+#define yy_switch_to_buffer base_yy_switch_to_buffer
+#define yypush_buffer_state base_yypush_buffer_state
+#define yypop_buffer_state base_yypop_buffer_state
+#define yyensure_buffer_stack base_yyensure_buffer_stack
+#define yy_flex_debug base_yy_flex_debug
+#define yyin base_yyin
+#define yyleng base_yyleng
+#define yylex base_yylex
+#define yylineno base_yylineno
+#define yyout base_yyout
+#define yyrestart base_yyrestart
+#define yytext base_yytext
+#define yywrap base_yywrap
+#define yyalloc base_yyalloc
+#define yyrealloc base_yyrealloc
+#define yyfree base_yyfree
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define base_yy_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer base_yy_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define base_yy_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer base_yy_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define base_yy_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer base_yy_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define base_yy_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string base_yy_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define base_yy_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes base_yy_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define base_yy_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer base_yy_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define base_yy_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer base_yy_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define base_yy_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state base_yy_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define base_yy_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer base_yy_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define base_yypush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state base_yypush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define base_yypop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state base_yypop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define base_yyensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack base_yyensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define base_yylex_ALREADY_DEFINED
+#else
+#define yylex base_yylex
+#endif
+
+#ifdef yyrestart
+#define base_yyrestart_ALREADY_DEFINED
+#else
+#define yyrestart base_yyrestart
+#endif
+
+#ifdef yylex_init
+#define base_yylex_init_ALREADY_DEFINED
+#else
+#define yylex_init base_yylex_init
+#endif
+
+#ifdef yylex_init_extra
+#define base_yylex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra base_yylex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define base_yylex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy base_yylex_destroy
+#endif
+
+#ifdef yyget_debug
+#define base_yyget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug base_yyget_debug
+#endif
+
+#ifdef yyset_debug
+#define base_yyset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug base_yyset_debug
+#endif
+
+#ifdef yyget_extra
+#define base_yyget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra base_yyget_extra
+#endif
+
+#ifdef yyset_extra
+#define base_yyset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra base_yyset_extra
+#endif
+
+#ifdef yyget_in
+#define base_yyget_in_ALREADY_DEFINED
+#else
+#define yyget_in base_yyget_in
+#endif
+
+#ifdef yyset_in
+#define base_yyset_in_ALREADY_DEFINED
+#else
+#define yyset_in base_yyset_in
+#endif
+
+#ifdef yyget_out
+#define base_yyget_out_ALREADY_DEFINED
+#else
+#define yyget_out base_yyget_out
+#endif
+
+#ifdef yyset_out
+#define base_yyset_out_ALREADY_DEFINED
+#else
+#define yyset_out base_yyset_out
+#endif
+
+#ifdef yyget_leng
+#define base_yyget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng base_yyget_leng
+#endif
+
+#ifdef yyget_text
+#define base_yyget_text_ALREADY_DEFINED
+#else
+#define yyget_text base_yyget_text
+#endif
+
+#ifdef yyget_lineno
+#define base_yyget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno base_yyget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define base_yyset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno base_yyset_lineno
+#endif
+
+#ifdef yywrap
+#define base_yywrap_ALREADY_DEFINED
+#else
+#define yywrap base_yywrap
+#endif
+
+#ifdef yyalloc
+#define base_yyalloc_ALREADY_DEFINED
+#else
+#define yyalloc base_yyalloc
+#endif
+
+#ifdef yyrealloc
+#define base_yyrealloc_ALREADY_DEFINED
+#else
+#define yyrealloc base_yyrealloc
+#endif
+
+#ifdef yyfree
+#define base_yyfree_ALREADY_DEFINED
+#else
+#define yyfree base_yyfree
+#endif
+
+#ifdef yytext
+#define base_yytext_ALREADY_DEFINED
+#else
+#define yytext base_yytext
+#endif
+
+#ifdef yyleng
+#define base_yyleng_ALREADY_DEFINED
+#else
+#define yyleng base_yyleng
+#endif
+
+#ifdef yyin
+#define base_yyin_ALREADY_DEFINED
+#else
+#define yyin base_yyin
+#endif
+
+#ifdef yyout
+#define base_yyout_ALREADY_DEFINED
+#else
+#define yyout base_yyout
+#endif
+
+#ifdef yy_flex_debug
+#define base_yy_flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug base_yy_flex_debug
+#endif
+
+#ifdef yylineno
+#define base_yylineno_ALREADY_DEFINED
+#else
+#define yylineno base_yylineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
+ * existing scanners that call yyless() from OUTSIDE yylex.
+ * One obvious solution it to make yy_act a global. I tried that, and saw
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
+ * normally declared as a register variable-- so it is not worth it.
+ */
+ #define YY_LESS_LINENO(n) \
+ do { \
+ int yyl;\
+ for ( yyl = n; yyl < yyleng; ++yyl )\
+ if ( yytext[yyl] == '\n' )\
+ --yylineno;\
+ }while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define base_yywrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 139
+#define YY_END_OF_BUFFER 140
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int16_t yy_accept[566] =
+ { 0,
+ 0, 0, 10, 10, 0, 0, 0, 0, 0, 0,
+ 9, 9, 0, 0, 0, 0, 19, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 140, 138, 10, 17, 5, 5,
+ 6, 6, 42, 38, 44, 39, 44, 9, 23, 17,
+ 20, 19, 19, 19, 19, 24, 24, 17, 29, 23,
+ 33, 33, 35, 40, 129, 129, 127, 86, 86, 127,
+ 127, 108, 86, 86, 108, 43, 108, 68, 80, 108,
+ 12, 84, 85, 79, 82, 78, 83, 108, 81, 58,
+
+ 58, 76, 77, 108, 91, 108, 74, 74, 89, 90,
+ 87, 108, 88, 66, 1, 1, 55, 36, 55, 53,
+ 54, 55, 14, 54, 54, 54, 54, 58, 54, 54,
+ 54, 54, 65, 65, 65, 65, 65, 65, 137, 137,
+ 137, 137, 133, 133, 132, 131, 130, 114, 114, 10,
+ 5, 7, 4, 3, 42, 41, 44, 9, 23, 21,
+ 19, 19, 19, 19, 18, 19, 19, 24, 26, 27,
+ 26, 26, 26, 22, 33, 32, 34, 0, 0, 128,
+ 0, 0, 0, 0, 0, 100, 0, 0, 0, 0,
+ 0, 0, 105, 96, 0, 75, 103, 97, 101, 98,
+
+ 102, 92, 107, 59, 2, 0, 104, 59, 58, 62,
+ 70, 94, 99, 93, 74, 74, 95, 1, 0, 55,
+ 52, 55, 0, 0, 30, 56, 31, 1, 46, 2,
+ 59, 58, 45, 47, 64, 49, 51, 48, 50, 65,
+ 8, 15, 13, 0, 11, 0, 136, 0, 0, 0,
+ 132, 130, 0, 0, 113, 3, 19, 19, 19, 19,
+ 27, 0, 0, 28, 34, 0, 0, 0, 0, 0,
+ 73, 73, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 106, 2, 0, 69, 60, 59,
+ 63, 61, 70, 74, 55, 55, 31, 1, 1, 2,
+
+ 59, 58, 64, 0, 0, 0, 37, 16, 135, 134,
+ 19, 19, 18, 19, 19, 27, 0, 0, 28, 0,
+ 0, 0, 0, 0, 0, 0, 0, 73, 73, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 74, 55, 0, 59, 64, 0, 0, 0, 64, 135,
+ 135, 134, 134, 19, 0, 0, 122, 0, 0, 0,
+ 0, 0, 0, 0, 73, 73, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 74, 55, 55, 0, 59, 64, 0, 0, 0, 0,
+ 0, 25, 122, 0, 124, 0, 118, 0, 0, 0,
+
+ 0, 0, 0, 73, 73, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 112, 0, 74, 55, 0,
+ 0, 0, 0, 0, 0, 64, 64, 0, 0, 126,
+ 118, 120, 0, 0, 0, 0, 110, 0, 112, 0,
+ 67, 57, 0, 0, 0, 0, 0, 64, 0, 120,
+ 0, 0, 0, 71, 71, 110, 116, 67, 67, 74,
+ 74, 74, 74, 57, 64, 0, 0, 0, 0, 71,
+ 71, 71, 0, 71, 0, 116, 0, 0, 0, 74,
+ 74, 74, 74, 74, 74, 57, 64, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 74, 74, 74,
+
+ 74, 74, 74, 74, 74, 121, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 74, 74, 74, 74, 74,
+ 74, 74, 74, 121, 0, 123, 0, 117, 0, 0,
+ 0, 0, 0, 0, 74, 74, 74, 74, 74, 74,
+ 0, 125, 117, 119, 72, 72, 0, 0, 111, 74,
+ 74, 74, 111, 119, 72, 72, 72, 72, 109, 0,
+ 109, 74, 115, 115, 0
+ } ;
+
+static const YY_CHAR yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
+ 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
+ 26, 27, 28, 28, 29, 30, 31, 32, 33, 34,
+ 35, 35, 36, 35, 35, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 35, 35, 47, 35, 35,
+ 48, 49, 50, 51, 52, 28, 29, 30, 31, 32,
+
+ 33, 34, 35, 35, 53, 35, 35, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 54, 35, 35, 55,
+ 35, 35, 56, 57, 58, 28, 1, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59
+ } ;
+
+static const YY_CHAR yy_meta[60] =
+ { 0,
+ 1, 2, 3, 3, 4, 5, 4, 6, 7, 4,
+ 8, 9, 9, 10, 7, 1, 11, 12, 13, 14,
+ 14, 14, 15, 16, 17, 18, 19, 4, 20, 20,
+ 20, 20, 20, 20, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 12, 22, 9,
+ 4, 21, 21, 21, 21, 1, 4, 1, 21
+ } ;
+
+static const flex_int16_t yy_base[631] =
+ { 0,
+ 0, 0, 2149, 2148, 0, 53, 2152, 2151, 0, 5,
+ 2145, 2144, 2140, 2138, 2137, 2133, 18, 27, 1, 34,
+ 7, 12, 0, 30, 2137, 2136, 2130, 2129, 110, 0,
+ 38, 168, 201, 0, 260, 0, 28, 60, 71, 171,
+ 319, 0, 378, 0, 2138, 2578, 0, 2578, 0, 0,
+ 29, 2123, 0, 2130, 2578, 2578, 10, 0, 0, 2124,
+ 2578, 86, 89, 175, 2117, 0, 0, 2122, 418, 2121,
+ 0, 0, 2119, 2120, 2578, 438, 2578, 2578, 2578, 147,
+ 22, 2578, 94, 186, 2099, 2578, 11, 412, 2097, 2110,
+ 2578, 2578, 2578, 168, 50, 2578, 82, 177, 433, 435,
+
+ 456, 2578, 2578, 2094, 2091, 2089, 0, 39, 2578, 2578,
+ 2578, 2055, 2578, 2578, 447, 477, 2085, 2578, 486, 477,
+ 0, 0, 2578, 2578, 2093, 449, 2095, 486, 13, 158,
+ 2081, 2080, 0, 2094, 2093, 2092, 2092, 2090, 2076, 0,
+ 2578, 0, 2578, 514, 2578, 2578, 0, 2578, 521, 0,
+ 0, 88, 2578, 0, 0, 2578, 2578, 0, 0, 2578,
+ 524, 529, 2057, 545, 2578, 2056, 548, 0, 2578, 440,
+ 0, 0, 0, 2578, 0, 2578, 2064, 551, 555, 2578,
+ 449, 2036, 2035, 564, 410, 2578, 579, 496, 535, 2034,
+ 453, 2027, 2578, 2578, 496, 2578, 2578, 2578, 2578, 2578,
+
+ 2578, 2051, 2578, 619, 0, 2061, 2578, 624, 629, 638,
+ 0, 2578, 2578, 2578, 0, 2030, 2578, 661, 508, 0,
+ 0, 664, 526, 538, 2578, 655, 2054, 717, 2578, 0,
+ 664, 678, 2578, 2578, 670, 0, 0, 0, 0, 0,
+ 2578, 2578, 2578, 637, 2578, 2036, 2578, 2053, 2013, 699,
+ 2578, 0, 704, 735, 2578, 0, 744, 747, 750, 754,
+ 500, 0, 0, 0, 1991, 676, 1945, 470, 1924, 746,
+ 2578, 0, 1916, 0, 691, 497, 1875, 1882, 531, 1848,
+ 1503, 1499, 1501, 1499, 2578, 0, 1527, 2578, 2578, 774,
+ 782, 788, 0, 1498, 806, 1513, 1518, 0, 859, 0,
+
+ 806, 820, 687, 1498, 0, 833, 2578, 2578, 841, 856,
+ 844, 886, 889, 909, 892, 2578, 0, 0, 2578, 1490,
+ 1490, 677, 1489, 1489, 915, 911, 815, 868, 919, 1487,
+ 1487, 1477, 1479, 1480, 1480, 1471, 1473, 680, 1472, 1475,
+ 925, 967, 911, 916, 692, 937, 940, 948, 997, 943,
+ 2578, 959, 2578, 1000, 0, 0, 976, 1003, 1473, 1472,
+ 1472, 1006, 1462, 1009, 1489, 1016, 642, 1029, 1468, 1449,
+ 1437, 429, 1445, 1426, 1401, 626, 1402, 671, 1392, 1035,
+ 1352, 0, 700, 1031, 1039, 834, 1079, 1060, 1136, 1038,
+ 0, 2578, 1064, 1067, 2578, 1090, 1071, 1359, 1347, 1366,
+
+ 746, 1365, 1097, 1190, 1194, 0, 1325, 1313, 1324, 0,
+ 1312, 1286, 1294, 1278, 1276, 1115, 1256, 1254, 1276, 1100,
+ 1105, 1243, 0, 0, 1265, 887, 1300, 0, 1197, 2578,
+ 1129, 1139, 1222, 1232, 0, 1230, 1157, 1219, 1203, 1186,
+ 1349, 1190, 1204, 1203, 745, 1375, 0, 1433, 0, 1212,
+ 1228, 775, 1169, 1225, 1231, 1215, 1234, 1482, 0, 1169,
+ 817, 828, 1148, 1220, 1536, 0, 920, 1153, 731, 1270,
+ 1276, 1282, 1125, 1285, 1123, 1293, 1119, 868, 1108, 1100,
+ 922, 1092, 734, 1077, 1074, 2578, 0, 1063, 1043, 769,
+ 1023, 1022, 1011, 1003, 991, 991, 989, 845, 957, 922,
+
+ 932, 920, 916, 887, 875, 1303, 1318, 867, 865, 846,
+ 751, 941, 993, 840, 842, 810, 1321, 1330, 796, 795,
+ 764, 943, 735, 1326, 1333, 2578, 1336, 1341, 707, 625,
+ 622, 627, 980, 620, 509, 1359, 1362, 460, 411, 1365,
+ 1368, 2578, 1371, 1374, 1384, 1387, 163, 149, 1394, 1397,
+ 1421, 72, 1429, 1436, 1451, 1454, 1459, 1462, 1465, 49,
+ 1468, 1471, 1474, 1485, 2578, 1595, 1617, 1639, 1661, 1683,
+ 1705, 1727, 1749, 1771, 1793, 1815, 1837, 1859, 1881, 1903,
+ 1925, 1947, 1969, 1991, 2012, 2034, 1092, 2055, 2076, 2093,
+ 2111, 2125, 2132, 2148, 2169, 2191, 2213, 2230, 2250, 2268,
+
+ 2287, 1095, 1237, 1242, 2304, 2322, 2341, 1256, 2358, 2379,
+ 2398, 2412, 2433, 1296, 1327, 1335, 557, 2454, 1429, 1476,
+ 2475, 2492, 1477, 1478, 2513, 2535, 1479, 2556, 1480, 1481
+ } ;
+
+static const flex_int16_t yy_def[631] =
+ { 0,
+ 566, 566, 567, 567, 568, 568, 569, 569, 570, 570,
+ 571, 571, 572, 572, 572, 572, 573, 573, 574, 574,
+ 572, 572, 575, 575, 569, 569, 572, 572, 565, 29,
+ 576, 576, 565, 33, 565, 35, 577, 577, 578, 578,
+ 565, 41, 565, 43, 565, 565, 579, 565, 580, 580,
+ 565, 565, 581, 565, 565, 565, 565, 582, 583, 565,
+ 565, 565, 565, 565, 565, 584, 584, 565, 585, 583,
+ 586, 586, 587, 565, 565, 588, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 589, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+
+ 565, 565, 565, 565, 565, 565, 590, 590, 565, 565,
+ 565, 565, 565, 565, 565, 565, 591, 565, 589, 592,
+ 591, 591, 565, 565, 591, 565, 591, 565, 593, 591,
+ 591, 591, 594, 594, 594, 594, 594, 594, 595, 596,
+ 565, 597, 565, 565, 565, 565, 598, 565, 599, 579,
+ 580, 565, 565, 600, 581, 565, 565, 582, 583, 565,
+ 565, 565, 565, 565, 565, 565, 601, 584, 565, 565,
+ 602, 603, 604, 565, 586, 565, 605, 565, 588, 565,
+ 565, 565, 565, 565, 589, 565, 565, 187, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+
+ 565, 565, 565, 565, 606, 607, 565, 565, 565, 565,
+ 608, 565, 565, 565, 590, 590, 565, 565, 589, 591,
+ 591, 187, 187, 565, 565, 565, 609, 610, 565, 611,
+ 565, 565, 565, 565, 612, 591, 591, 591, 591, 594,
+ 565, 565, 565, 565, 565, 595, 565, 596, 597, 565,
+ 565, 598, 565, 599, 565, 600, 613, 601, 601, 601,
+ 565, 614, 615, 616, 605, 565, 565, 565, 565, 187,
+ 565, 270, 270, 187, 270, 187, 187, 187, 270, 565,
+ 565, 565, 565, 565, 565, 606, 607, 565, 565, 565,
+ 565, 565, 608, 590, 270, 295, 609, 610, 610, 611,
+
+ 565, 565, 612, 565, 617, 618, 565, 565, 565, 565,
+ 613, 613, 613, 613, 601, 565, 619, 620, 565, 565,
+ 565, 565, 565, 565, 565, 621, 270, 270, 270, 187,
+ 187, 187, 187, 270, 270, 565, 565, 565, 565, 565,
+ 590, 621, 565, 565, 622, 618, 618, 618, 618, 565,
+ 565, 565, 565, 613, 623, 624, 565, 565, 565, 565,
+ 565, 565, 565, 621, 625, 621, 270, 621, 187, 187,
+ 187, 187, 270, 270, 565, 565, 565, 565, 565, 565,
+ 590, 342, 295, 565, 565, 622, 626, 618, 565, 618,
+ 627, 565, 565, 565, 565, 565, 565, 565, 565, 625,
+
+ 565, 270, 621, 621, 621, 187, 187, 187, 187, 270,
+ 270, 565, 565, 565, 565, 565, 565, 590, 295, 565,
+ 565, 626, 422, 422, 422, 422, 628, 629, 565, 565,
+ 565, 565, 565, 187, 270, 565, 565, 565, 565, 565,
+ 590, 565, 565, 422, 422, 422, 422, 628, 630, 565,
+ 565, 565, 565, 187, 565, 565, 565, 565, 458, 590,
+ 590, 590, 590, 565, 565, 624, 565, 565, 565, 270,
+ 565, 270, 270, 565, 565, 565, 565, 565, 565, 590,
+ 590, 590, 590, 590, 590, 565, 465, 565, 565, 565,
+ 565, 565, 270, 565, 565, 565, 565, 590, 590, 590,
+
+ 590, 590, 590, 590, 590, 565, 565, 565, 565, 565,
+ 270, 565, 565, 565, 565, 590, 590, 590, 590, 590,
+ 590, 590, 590, 565, 565, 565, 565, 565, 565, 270,
+ 565, 565, 565, 565, 590, 590, 590, 590, 590, 590,
+ 565, 565, 565, 565, 270, 565, 565, 565, 565, 590,
+ 590, 590, 565, 565, 270, 565, 270, 565, 565, 565,
+ 565, 590, 565, 565, 0, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565
+ } ;
+
+static const flex_int16_t yy_nxt[2638] =
+ { 0,
+ 565, 565, 72, 67, 50, 56, 50, 73, 50, 50,
+ 56, 68, 565, 51, 50, 157, 50, 48, 52, 62,
+ 63, 64, 48, 565, 50, 50, 50, 50, 62, 63,
+ 64, 565, 72, 140, 65, 233, 67, 73, 234, 78,
+ 79, 78, 152, 65, 68, 80, 188, 153, 57, 69,
+ 50, 141, 142, 57, 141, 70, 50, 50, 157, 50,
+ 70, 50, 50, 189, 198, 140, 51, 50, 183, 50,
+ 81, 52, 144, 144, 144, 199, 183, 50, 50, 50,
+ 50, 563, 69, 141, 142, 216, 141, 161, 162, 162,
+ 164, 164, 164, 216, 145, 184, 184, 184, 200, 165,
+
+ 185, 152, 163, 50, 562, 166, 153, 201, 202, 50,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 75, 75, 75,
+ 75, 76, 76, 76, 76, 75, 75, 75, 76, 78,
+ 79, 78, 144, 144, 144, 80, 164, 164, 164, 181,
+ 560, 195, 182, 236, 237, 165, 196, 184, 184, 184,
+ 203, 166, 185, 197, 145, 559, 204, 204, 204, 182,
+
+ 81, 82, 83, 84, 83, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 101, 102, 103, 104, 105, 106, 82, 107,
+ 107, 107, 107, 108, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 109, 82,
+ 110, 82, 107, 107, 107, 107, 111, 112, 113, 107,
+ 114, 115, 116, 115, 117, 118, 119, 120, 121, 122,
+ 123, 124, 124, 121, 121, 124, 125, 126, 127, 128,
+ 128, 128, 129, 124, 130, 131, 132, 122, 133, 134,
+ 133, 133, 135, 133, 133, 133, 133, 133, 136, 133,
+
+ 133, 133, 133, 133, 133, 137, 138, 124, 114, 124,
+ 121, 133, 133, 137, 138, 114, 122, 114, 133, 146,
+ 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
+ 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
+ 146, 146, 146, 146, 146, 146, 146, 147, 147, 147,
+ 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
+ 147, 147, 147, 147, 147, 147, 146, 146, 146, 146,
+ 147, 147, 147, 147, 146, 146, 146, 147, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+
+ 148, 148, 148, 148, 148, 148, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 148, 148, 148, 148, 149,
+ 149, 149, 149, 148, 148, 148, 149, 170, 170, 178,
+ 178, 178, 552, 190, 181, 188, 205, 191, 218, 218,
+ 218, 206, 208, 219, 209, 209, 209, 192, 207, 261,
+ 261, 180, 189, 171, 191, 192, 229, 210, 204, 204,
+ 204, 172, 173, 208, 409, 209, 209, 209, 218, 218,
+ 218, 211, 409, 219, 225, 266, 268, 267, 210, 211,
+ 222, 283, 222, 551, 222, 222, 226, 226, 226, 222,
+
+ 222, 323, 222, 231, 222, 232, 232, 232, 324, 195,
+ 222, 222, 222, 222, 196, 250, 250, 250, 210, 316,
+ 316, 223, 253, 253, 253, 161, 162, 162, 330, 276,
+ 164, 164, 164, 277, 278, 331, 222, 251, 224, 165,
+ 163, 550, 222, 223, 255, 166, 164, 164, 164, 259,
+ 162, 162, 178, 178, 178, 165, 178, 178, 178, 276,
+ 224, 166, 334, 277, 260, 184, 184, 184, 279, 335,
+ 185, 279, 280, 281, 180, 280, 345, 345, 180, 270,
+ 270, 271, 272, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 273, 270, 270,
+
+ 270, 270, 270, 270, 270, 270, 270, 274, 274, 274,
+ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
+ 274, 274, 274, 274, 274, 274, 270, 275, 270, 270,
+ 270, 274, 274, 274, 270, 270, 270, 270, 204, 204,
+ 204, 289, 307, 290, 290, 290, 208, 308, 209, 209,
+ 209, 210, 291, 549, 291, 367, 210, 292, 292, 292,
+ 402, 210, 218, 218, 218, 547, 546, 219, 295, 545,
+ 295, 413, 295, 295, 226, 226, 226, 295, 295, 413,
+ 295, 289, 296, 301, 301, 301, 304, 305, 295, 295,
+ 295, 295, 327, 328, 329, 231, 210, 302, 302, 302,
+
+ 250, 250, 250, 304, 305, 253, 253, 253, 304, 305,
+ 210, 320, 359, 383, 295, 377, 415, 306, 419, 321,
+ 295, 299, 251, 299, 415, 299, 299, 255, 320, 359,
+ 299, 299, 377, 299, 306, 299, 253, 253, 253, 306,
+ 544, 299, 299, 299, 299, 312, 164, 164, 259, 162,
+ 162, 259, 162, 162, 313, 259, 162, 162, 255, 401,
+ 314, 425, 491, 260, 270, 502, 260, 299, 540, 492,
+ 315, 446, 503, 299, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 290, 290, 290, 538, 530, 270, 270,
+
+ 270, 292, 292, 292, 508, 530, 210, 292, 292, 292,
+ 295, 467, 295, 468, 295, 295, 327, 328, 329, 295,
+ 295, 508, 295, 343, 296, 344, 344, 344, 537, 536,
+ 295, 295, 295, 295, 346, 346, 346, 231, 210, 209,
+ 209, 209, 350, 350, 350, 312, 164, 164, 535, 348,
+ 304, 305, 210, 481, 313, 482, 295, 352, 352, 352,
+ 314, 483, 295, 299, 351, 299, 484, 299, 299, 327,
+ 328, 329, 299, 299, 534, 299, 533, 299, 529, 353,
+ 516, 306, 349, 299, 299, 299, 299, 312, 164, 164,
+ 312, 164, 164, 259, 162, 162, 313, 516, 528, 313,
+
+ 527, 469, 314, 445, 446, 314, 496, 523, 315, 299,
+ 312, 164, 164, 365, 366, 299, 362, 362, 362, 313,
+ 327, 328, 329, 522, 367, 354, 380, 380, 380, 273,
+ 384, 384, 384, 343, 447, 385, 385, 385, 346, 346,
+ 346, 346, 346, 346, 350, 350, 350, 521, 210, 346,
+ 346, 346, 520, 348, 518, 488, 348, 499, 363, 368,
+ 352, 352, 352, 489, 387, 500, 351, 519, 381, 365,
+ 366, 382, 488, 382, 499, 382, 382, 393, 393, 393,
+ 383, 382, 353, 382, 519, 296, 349, 531, 539, 349,
+ 517, 382, 382, 382, 382, 531, 539, 349, 346, 346,
+
+ 346, 312, 164, 164, 394, 394, 394, 362, 362, 362,
+ 313, 365, 366, 388, 389, 368, 354, 382, 365, 366,
+ 515, 514, 367, 382, 513, 548, 395, 273, 532, 367,
+ 403, 404, 405, 548, 273, 512, 380, 380, 380, 346,
+ 346, 346, 367, 511, 390, 532, 349, 273, 420, 363,
+ 421, 421, 421, 510, 348, 509, 343, 368, 290, 290,
+ 290, 346, 346, 346, 368, 393, 393, 393, 394, 394,
+ 394, 210, 431, 431, 431, 507, 387, 368, 417, 422,
+ 423, 346, 346, 422, 422, 422, 389, 349, 422, 422,
+ 395, 429, 429, 429, 422, 425, 506, 177, 403, 404,
+
+ 405, 422, 422, 422, 422, 505, 422, 504, 262, 349,
+ 367, 177, 177, 430, 262, 273, 439, 439, 439, 442,
+ 442, 442, 420, 501, 443, 443, 443, 422, 426, 422,
+ 431, 431, 431, 498, 422, 422, 422, 346, 346, 346,
+ 450, 450, 450, 347, 347, 368, 497, 347, 347, 347,
+ 347, 495, 348, 347, 347, 347, 347, 347, 456, 456,
+ 456, 494, 347, 493, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 347, 490, 349, 485, 427, 427, 427,
+ 427, 403, 404, 405, 427, 403, 404, 405, 429, 429,
+
+ 429, 480, 469, 367, 439, 439, 439, 367, 273, 464,
+ 464, 464, 273, 450, 450, 450, 456, 456, 456, 425,
+ 430, 420, 458, 451, 451, 451, 470, 471, 472, 451,
+ 451, 451, 474, 474, 474, 476, 476, 476, 368, 486,
+ 486, 486, 368, 422, 423, 346, 346, 422, 422, 422,
+ 263, 457, 422, 422, 452, 264, 263, 453, 422, 444,
+ 452, 264, 455, 453, 454, 422, 422, 422, 422, 293,
+ 422, 470, 471, 472, 453, 293, 473, 474, 474, 474,
+ 453, 425, 475, 470, 471, 472, 474, 474, 474, 342,
+ 441, 422, 426, 422, 476, 476, 476, 440, 422, 422,
+
+ 422, 346, 346, 346, 524, 524, 524, 438, 347, 317,
+ 437, 347, 347, 347, 347, 317, 388, 389, 347, 525,
+ 525, 525, 524, 524, 524, 436, 347, 524, 524, 524,
+ 435, 525, 525, 525, 525, 525, 525, 541, 541, 541,
+ 318, 526, 543, 543, 543, 410, 318, 390, 319, 349,
+ 459, 459, 459, 526, 319, 434, 526, 406, 406, 542,
+ 541, 541, 541, 543, 543, 543, 553, 553, 553, 541,
+ 541, 541, 543, 543, 543, 554, 554, 554, 326, 401,
+ 460, 461, 542, 433, 462, 555, 556, 557, 558, 558,
+ 558, 542, 432, 418, 463, 553, 553, 553, 561, 561,
+
+ 561, 462, 463, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 554, 554, 554, 416, 465, 465, 465, 465,
+ 553, 553, 553, 465, 346, 346, 346, 554, 554, 554,
+ 414, 347, 355, 412, 347, 347, 347, 347, 355, 388,
+ 389, 347, 555, 556, 557, 558, 558, 558, 411, 347,
+ 555, 556, 557, 558, 558, 558, 561, 561, 561, 561,
+ 561, 561, 564, 564, 564, 564, 564, 564, 410, 408,
+ 390, 407, 349, 459, 459, 459, 564, 564, 564, 356,
+ 391, 392, 428, 449, 466, 356, 391, 392, 428, 449,
+
+ 466, 406, 401, 399, 398, 397, 396, 379, 378, 376,
+ 375, 374, 373, 477, 452, 372, 371, 478, 370, 369,
+ 361, 360, 358, 357, 305, 225, 342, 479, 341, 288,
+ 340, 339, 338, 337, 478, 479, 422, 423, 346, 346,
+ 422, 422, 422, 487, 424, 422, 422, 424, 424, 424,
+ 424, 422, 445, 446, 424, 487, 487, 487, 422, 422,
+ 422, 422, 424, 422, 487, 487, 487, 487, 487, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
+ 487, 487, 487, 447, 422, 426, 422, 487, 487, 487,
+ 487, 422, 422, 422, 487, 46, 46, 46, 46, 46,
+
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+
+ 55, 55, 55, 55, 55, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 66, 66, 66, 66, 66, 66, 66, 66, 66,
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
+ 66, 66, 66, 71, 71, 71, 71, 71, 71, 71,
+
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139, 139, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 150, 150, 150, 150, 150, 150, 150, 336, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+
+ 150, 150, 150, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 333, 151, 151, 332, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 155, 155, 155, 155, 326,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 158, 158, 158,
+ 158, 158, 158, 158, 325, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 159,
+ 159, 159, 159, 159, 159, 159, 322, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
+ 159, 168, 168, 168, 168, 168, 168, 168, 176, 168,
+
+ 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
+ 168, 168, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 175, 175, 175, 175, 175, 310,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 179, 179, 309, 247,
+ 179, 225, 294, 288, 285, 284, 282, 269, 179, 268,
+ 179, 176, 257, 167, 179, 179, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 215, 247,
+
+ 245, 244, 243, 242, 241, 239, 215, 238, 230, 228,
+ 221, 217, 215, 215, 220, 214, 213, 220, 212, 194,
+ 220, 220, 193, 220, 186, 156, 176, 220, 220, 220,
+ 227, 174, 160, 167, 160, 156, 154, 565, 227, 60,
+ 60, 74, 74, 60, 227, 227, 235, 60, 60, 235,
+ 60, 235, 235, 240, 48, 48, 54, 54, 48, 48,
+ 565, 240, 565, 565, 565, 565, 565, 240, 240, 246,
+ 246, 246, 246, 565, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 246, 246, 565, 246, 565, 246, 246,
+ 246, 248, 248, 248, 248, 565, 248, 248, 248, 248,
+
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 249, 249, 249, 249, 249, 249, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
+ 249, 565, 249, 249, 249, 252, 565, 565, 565, 565,
+ 565, 565, 565, 252, 565, 565, 565, 565, 565, 252,
+ 252, 254, 254, 565, 565, 254, 565, 565, 565, 565,
+ 565, 565, 565, 254, 565, 254, 565, 565, 565, 254,
+ 254, 256, 565, 565, 256, 565, 565, 256, 256, 565,
+ 256, 565, 565, 565, 256, 256, 256, 258, 258, 258,
+ 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
+
+ 258, 258, 258, 258, 258, 258, 258, 258, 258, 265,
+ 565, 565, 565, 565, 565, 565, 565, 265, 565, 565,
+ 565, 565, 565, 265, 265, 286, 565, 565, 286, 565,
+ 565, 286, 286, 565, 286, 565, 565, 565, 286, 286,
+ 286, 287, 287, 287, 287, 287, 287, 287, 287, 287,
+ 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
+ 287, 287, 287, 297, 565, 565, 565, 565, 565, 565,
+ 565, 297, 565, 565, 565, 565, 565, 297, 297, 298,
+ 298, 565, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 300, 565, 565, 300, 565, 565, 300, 300, 565,
+ 300, 565, 565, 565, 300, 300, 300, 303, 565, 565,
+ 565, 565, 303, 303, 565, 303, 565, 565, 565, 565,
+ 565, 303, 303, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 347, 347, 565, 565, 347,
+ 347, 565, 347, 347, 347, 347, 347, 347, 565, 565,
+ 565, 565, 347, 347, 347, 364, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, 386, 565, 565,
+
+ 565, 565, 386, 386, 565, 386, 565, 565, 565, 565,
+ 565, 386, 386, 400, 400, 400, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 565, 400, 400, 400, 400,
+ 400, 400, 400, 400, 400, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 448, 448, 565,
+ 565, 448, 448, 565, 448, 448, 448, 448, 448, 448,
+ 565, 565, 565, 565, 448, 448, 448, 45, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565
+ } ;
+
+static const flex_int16_t yy_chk[2638] =
+ { 0,
+ 0, 0, 23, 19, 5, 9, 5, 23, 5, 5,
+ 10, 19, 0, 5, 5, 57, 5, 21, 5, 17,
+ 17, 17, 22, 0, 5, 5, 5, 5, 18, 18,
+ 18, 0, 24, 37, 17, 129, 20, 24, 129, 31,
+ 31, 31, 51, 18, 20, 31, 87, 51, 9, 19,
+ 5, 37, 37, 10, 37, 21, 5, 6, 57, 6,
+ 22, 6, 6, 87, 95, 38, 6, 6, 81, 6,
+ 31, 6, 39, 39, 39, 95, 81, 6, 6, 6,
+ 6, 560, 20, 38, 38, 108, 38, 62, 62, 62,
+ 63, 63, 63, 108, 39, 83, 83, 83, 97, 63,
+
+ 83, 152, 62, 6, 552, 63, 152, 97, 97, 6,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 32,
+ 32, 32, 40, 40, 40, 32, 64, 64, 64, 80,
+ 548, 94, 80, 130, 130, 64, 94, 84, 84, 84,
+ 98, 64, 84, 94, 40, 547, 98, 98, 98, 80,
+
+ 32, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 69, 69, 76,
+ 76, 76, 539, 88, 88, 185, 99, 88, 115, 115,
+ 115, 99, 100, 115, 100, 100, 100, 88, 99, 170,
+ 170, 76, 185, 69, 88, 88, 126, 100, 126, 126,
+ 126, 69, 69, 101, 372, 101, 101, 101, 116, 116,
+ 116, 100, 372, 116, 120, 181, 191, 181, 101, 100,
+ 119, 191, 119, 538, 119, 119, 120, 120, 120, 119,
+
+ 119, 268, 119, 128, 119, 128, 128, 128, 268, 195,
+ 119, 119, 119, 119, 195, 144, 144, 144, 128, 261,
+ 261, 119, 149, 149, 149, 161, 161, 161, 276, 188,
+ 162, 162, 162, 188, 188, 276, 119, 144, 119, 162,
+ 161, 535, 119, 219, 149, 162, 164, 164, 164, 167,
+ 167, 167, 178, 178, 178, 164, 179, 179, 179, 223,
+ 219, 164, 279, 223, 167, 184, 184, 184, 189, 279,
+ 184, 224, 189, 189, 178, 224, 617, 617, 179, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 204, 204,
+ 204, 208, 244, 208, 208, 208, 209, 244, 209, 209,
+ 209, 204, 210, 534, 210, 367, 208, 210, 210, 210,
+ 367, 209, 218, 218, 218, 532, 531, 218, 222, 530,
+ 222, 376, 222, 222, 226, 226, 226, 222, 222, 376,
+ 222, 231, 222, 231, 231, 231, 235, 235, 222, 222,
+ 222, 222, 275, 275, 275, 232, 231, 232, 232, 232,
+
+ 250, 250, 250, 303, 303, 253, 253, 253, 345, 345,
+ 232, 266, 322, 383, 222, 338, 378, 235, 383, 266,
+ 222, 228, 250, 228, 378, 228, 228, 253, 266, 322,
+ 228, 228, 338, 228, 303, 228, 254, 254, 254, 345,
+ 529, 228, 228, 228, 228, 257, 257, 257, 258, 258,
+ 258, 259, 259, 259, 257, 260, 260, 260, 254, 401,
+ 257, 445, 469, 258, 401, 483, 259, 228, 523, 469,
+ 260, 445, 483, 228, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 290, 290, 290, 521, 511, 270, 270,
+
+ 270, 291, 291, 291, 490, 511, 290, 292, 292, 292,
+ 295, 452, 295, 452, 295, 295, 327, 327, 327, 295,
+ 295, 490, 295, 301, 295, 301, 301, 301, 520, 519,
+ 295, 295, 295, 295, 306, 306, 306, 302, 301, 302,
+ 302, 302, 309, 309, 309, 311, 311, 311, 516, 306,
+ 386, 386, 302, 461, 311, 461, 295, 310, 310, 310,
+ 311, 462, 295, 299, 309, 299, 462, 299, 299, 328,
+ 328, 328, 299, 299, 515, 299, 514, 299, 510, 310,
+ 498, 386, 306, 299, 299, 299, 299, 312, 312, 312,
+ 313, 313, 313, 315, 315, 315, 312, 498, 509, 313,
+
+ 508, 478, 312, 426, 426, 313, 478, 505, 315, 299,
+ 314, 314, 314, 326, 326, 299, 325, 325, 325, 314,
+ 329, 329, 329, 504, 326, 314, 341, 341, 341, 326,
+ 343, 343, 343, 344, 426, 344, 344, 344, 346, 346,
+ 346, 347, 347, 347, 350, 350, 350, 503, 344, 348,
+ 348, 348, 502, 346, 500, 467, 347, 481, 325, 326,
+ 352, 352, 352, 467, 348, 481, 350, 501, 341, 342,
+ 342, 342, 467, 342, 481, 342, 342, 357, 357, 357,
+ 342, 342, 352, 342, 501, 342, 346, 512, 522, 347,
+ 499, 342, 342, 342, 342, 512, 522, 348, 349, 349,
+
+ 349, 354, 354, 354, 358, 358, 358, 362, 362, 362,
+ 354, 364, 364, 349, 349, 342, 354, 342, 366, 366,
+ 497, 496, 364, 342, 495, 533, 358, 364, 513, 366,
+ 368, 368, 368, 533, 366, 494, 380, 380, 380, 390,
+ 390, 390, 368, 493, 349, 513, 349, 368, 384, 362,
+ 384, 384, 384, 492, 390, 491, 385, 364, 385, 385,
+ 385, 388, 388, 388, 366, 393, 393, 393, 394, 394,
+ 394, 385, 397, 397, 397, 489, 388, 368, 380, 387,
+ 387, 387, 387, 387, 387, 387, 388, 390, 387, 387,
+ 394, 396, 396, 396, 387, 387, 488, 587, 403, 403,
+
+ 403, 387, 387, 387, 387, 485, 387, 484, 602, 388,
+ 403, 587, 587, 396, 602, 403, 416, 416, 416, 420,
+ 420, 420, 421, 482, 421, 421, 421, 387, 387, 387,
+ 431, 431, 431, 480, 387, 387, 387, 389, 389, 389,
+ 432, 432, 432, 389, 389, 403, 479, 389, 389, 389,
+ 389, 477, 389, 389, 389, 389, 389, 389, 437, 437,
+ 437, 475, 389, 473, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 468, 389, 463, 389, 389, 389,
+ 389, 404, 404, 404, 389, 405, 405, 405, 429, 429,
+
+ 429, 460, 453, 404, 439, 439, 439, 405, 404, 442,
+ 442, 442, 405, 450, 450, 450, 456, 456, 456, 444,
+ 429, 443, 440, 433, 433, 433, 454, 454, 454, 451,
+ 451, 451, 455, 455, 455, 457, 457, 457, 404, 464,
+ 464, 464, 405, 422, 422, 422, 422, 422, 422, 422,
+ 603, 438, 422, 422, 433, 604, 603, 433, 422, 422,
+ 451, 604, 436, 451, 434, 422, 422, 422, 422, 608,
+ 422, 470, 470, 470, 433, 608, 454, 471, 471, 471,
+ 451, 425, 455, 472, 472, 472, 474, 474, 474, 419,
+ 418, 422, 422, 422, 476, 476, 476, 417, 422, 422,
+
+ 422, 427, 427, 427, 506, 506, 506, 415, 427, 614,
+ 414, 427, 427, 427, 427, 614, 427, 427, 427, 507,
+ 507, 507, 517, 517, 517, 413, 427, 524, 524, 524,
+ 412, 518, 518, 518, 525, 525, 525, 527, 527, 527,
+ 615, 507, 528, 528, 528, 411, 615, 427, 616, 427,
+ 441, 441, 441, 518, 616, 409, 525, 408, 407, 527,
+ 536, 536, 536, 537, 537, 537, 540, 540, 540, 541,
+ 541, 541, 543, 543, 543, 544, 544, 544, 402, 400,
+ 441, 441, 536, 399, 441, 545, 545, 545, 546, 546,
+ 546, 541, 398, 381, 441, 549, 549, 549, 550, 550,
+
+ 550, 441, 441, 446, 446, 446, 446, 446, 446, 446,
+ 446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
+ 446, 446, 551, 551, 551, 379, 446, 446, 446, 446,
+ 553, 553, 553, 446, 448, 448, 448, 554, 554, 554,
+ 377, 448, 619, 375, 448, 448, 448, 448, 619, 448,
+ 448, 448, 555, 555, 555, 556, 556, 556, 374, 448,
+ 557, 557, 557, 558, 558, 558, 559, 559, 559, 561,
+ 561, 561, 562, 562, 562, 563, 563, 563, 373, 371,
+ 448, 370, 448, 458, 458, 458, 564, 564, 564, 620,
+ 623, 624, 627, 629, 630, 620, 623, 624, 627, 629,
+
+ 630, 369, 365, 363, 361, 360, 359, 340, 339, 337,
+ 336, 335, 334, 458, 458, 333, 332, 458, 331, 330,
+ 324, 323, 321, 320, 304, 297, 296, 458, 294, 287,
+ 284, 283, 282, 281, 458, 458, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 465, 465, 465, 465, 465,
+ 465, 465, 465, 465, 465, 566, 566, 566, 566, 566,
+
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567, 567, 568,
+ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
+ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
+ 568, 569, 569, 569, 569, 569, 569, 569, 569, 569,
+ 569, 569, 569, 569, 569, 569, 569, 569, 569, 569,
+ 569, 569, 569, 570, 570, 570, 570, 570, 570, 570,
+ 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
+
+ 570, 570, 570, 570, 570, 571, 571, 571, 571, 571,
+ 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
+ 571, 571, 571, 571, 571, 571, 571, 572, 572, 572,
+ 572, 572, 572, 572, 572, 572, 572, 572, 572, 572,
+ 572, 572, 572, 572, 572, 572, 572, 572, 572, 573,
+ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
+ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
+ 573, 574, 574, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 575, 575, 575, 575, 575, 575, 575,
+
+ 575, 575, 575, 575, 575, 575, 575, 575, 575, 575,
+ 575, 575, 575, 575, 575, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 577, 577, 577,
+ 577, 577, 577, 577, 577, 577, 577, 577, 577, 577,
+ 577, 577, 577, 577, 577, 577, 577, 577, 577, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 579, 579, 579, 579, 579, 579, 579, 280, 579,
+ 579, 579, 579, 579, 579, 579, 579, 579, 579, 579,
+
+ 579, 579, 579, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 278, 580, 580, 277, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 581, 581, 581, 581, 273,
+ 581, 581, 581, 581, 581, 581, 581, 581, 581, 581,
+ 581, 581, 581, 581, 581, 581, 581, 582, 582, 582,
+ 582, 582, 582, 582, 269, 582, 582, 582, 582, 582,
+ 582, 582, 582, 582, 582, 582, 582, 582, 582, 583,
+ 583, 583, 583, 583, 583, 583, 267, 583, 583, 583,
+ 583, 583, 583, 583, 583, 583, 583, 583, 583, 583,
+ 583, 584, 584, 584, 584, 584, 584, 584, 265, 584,
+
+ 584, 584, 584, 584, 584, 584, 584, 584, 584, 584,
+ 584, 584, 585, 585, 585, 585, 585, 585, 585, 585,
+ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ 585, 585, 585, 585, 586, 586, 586, 586, 586, 249,
+ 586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
+ 586, 586, 586, 586, 586, 586, 588, 588, 248, 246,
+ 588, 227, 216, 206, 202, 192, 190, 183, 588, 182,
+ 588, 177, 166, 163, 588, 588, 589, 589, 589, 589,
+ 589, 589, 589, 589, 589, 589, 589, 589, 589, 589,
+ 589, 589, 589, 589, 589, 589, 589, 589, 590, 139,
+
+ 138, 137, 136, 135, 134, 132, 590, 131, 127, 125,
+ 117, 112, 590, 590, 591, 106, 105, 591, 104, 90,
+ 591, 591, 89, 591, 85, 74, 73, 591, 591, 591,
+ 592, 70, 68, 65, 60, 54, 52, 45, 592, 28,
+ 27, 26, 25, 16, 592, 592, 593, 15, 14, 593,
+ 13, 593, 593, 594, 12, 11, 8, 7, 4, 3,
+ 0, 594, 0, 0, 0, 0, 0, 594, 594, 595,
+ 595, 595, 595, 0, 595, 595, 595, 595, 595, 595,
+ 595, 595, 595, 595, 595, 0, 595, 0, 595, 595,
+ 595, 596, 596, 596, 596, 0, 596, 596, 596, 596,
+
+ 596, 596, 596, 596, 596, 596, 596, 596, 596, 596,
+ 596, 596, 596, 597, 597, 597, 597, 597, 597, 597,
+ 597, 597, 597, 597, 597, 597, 597, 597, 597, 597,
+ 597, 0, 597, 597, 597, 598, 0, 0, 0, 0,
+ 0, 0, 0, 598, 0, 0, 0, 0, 0, 598,
+ 598, 599, 599, 0, 0, 599, 0, 0, 0, 0,
+ 0, 0, 0, 599, 0, 599, 0, 0, 0, 599,
+ 599, 600, 0, 0, 600, 0, 0, 600, 600, 0,
+ 600, 0, 0, 0, 600, 600, 600, 601, 601, 601,
+ 601, 601, 601, 601, 601, 601, 601, 601, 601, 601,
+
+ 601, 601, 601, 601, 601, 601, 601, 601, 601, 605,
+ 0, 0, 0, 0, 0, 0, 0, 605, 0, 0,
+ 0, 0, 0, 605, 605, 606, 0, 0, 606, 0,
+ 0, 606, 606, 0, 606, 0, 0, 0, 606, 606,
+ 606, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, 607, 607, 609, 0, 0, 0, 0, 0, 0,
+ 0, 609, 0, 0, 0, 0, 0, 609, 609, 610,
+ 610, 0, 610, 610, 610, 610, 610, 610, 610, 610,
+ 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
+
+ 610, 611, 0, 0, 611, 0, 0, 611, 611, 0,
+ 611, 0, 0, 0, 611, 611, 611, 612, 0, 0,
+ 0, 0, 612, 612, 0, 612, 0, 0, 0, 0,
+ 0, 612, 612, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 618, 618, 0, 0, 618,
+ 618, 0, 618, 618, 618, 618, 618, 618, 0, 0,
+ 0, 0, 618, 618, 618, 621, 621, 621, 621, 621,
+ 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
+ 621, 621, 621, 621, 621, 621, 621, 622, 0, 0,
+
+ 0, 0, 622, 622, 0, 622, 0, 0, 0, 0,
+ 0, 622, 622, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 0, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 626, 626, 626, 626, 626,
+ 626, 626, 626, 626, 626, 626, 626, 626, 626, 626,
+ 626, 626, 626, 626, 626, 626, 626, 628, 628, 0,
+ 0, 628, 628, 0, 628, 628, 628, 628, 628, 628,
+ 0, 0, 0, 0, 628, 628, 628, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565
+ } ;
+
+/* Table of booleans, true if rule could match eol. */
+static const flex_int32_t yy_rule_can_match_eol[140] =
+ { 0,
+1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+ 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ };
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "pgc.l"
+
+#line 33 "pgc.l"
+
+/* LCOV_EXCL_START */
+
+extern YYSTYPE base_yylval;
+
+static int xcdepth = 0; /* depth of nesting in slash-star comments */
+static char *dolqstart = NULL; /* current $foo$ quote start string */
+
+/*
+ * literalbuf is used to accumulate literal values when multiple rules
+ * are needed to parse a single literal. Call startlit to reset buffer
+ * to empty, addlit to add text. Note that the buffer is permanently
+ * malloc'd to the largest size needed so far in the current run.
+ */
+static char *literalbuf = NULL; /* expandable buffer */
+static int literallen; /* actual current length */
+static int literalalloc; /* current allocated buffer size */
+
+/* Used for detecting global state together with braces_open */
+static int parenths_open;
+
+/* Used to tell parse_include() whether the command was #include or #include_next */
+static bool include_next;
+
+#define startlit() (literalbuf[0] = '\0', literallen = 0)
+static void addlit(char *ytext, int yleng);
+static void addlitchar(unsigned char);
+static int process_integer_literal(const char *token, YYSTYPE *lval);
+static void parse_include(void);
+static bool ecpg_isspace(char ch);
+static bool isdefine(void);
+static bool isinformixdefine(void);
+
+char *token_start;
+
+/* vars to keep track of start conditions when scanning literals */
+static int state_before_str_start;
+static int state_before_str_stop;
+
+struct _yy_buffer
+{
+ YY_BUFFER_STATE buffer;
+ long lineno;
+ char *filename;
+ struct _yy_buffer *next;
+} *yy_buffer = NULL;
+
+static char *old;
+
+/*
+ * Vars for handling ifdef/elif/endif constructs. preproc_tos is the current
+ * nesting depth of such constructs, and stacked_if_value[preproc_tos] is the
+ * state for the innermost level. (For convenience, stacked_if_value[0] is
+ * initialized as though we are in the active branch of some outermost IF.)
+ * The active field is true if the current branch is active (being expanded).
+ * The saw_active field is true if we have found any successful branch,
+ * so that all subsequent branches of this level should be skipped.
+ * The else_branch field is true if we've found an 'else' (so that another
+ * 'else' or 'elif' at this level is an error.)
+ * For IFs nested within an inactive branch, all branches always have active
+ * set to false, but saw_active and else_branch are maintained normally.
+ * ifcond is valid only while evaluating an if-condition; it's true if we
+ * are doing ifdef, false if ifndef.
+ */
+#define MAX_NESTED_IF 128
+static short preproc_tos;
+static bool ifcond;
+static struct _if_value
+{
+ bool active;
+ bool saw_active;
+ bool else_branch;
+} stacked_if_value[MAX_NESTED_IF];
+
+#line 1619 "pgc.c"
+#define YY_NO_INPUT 1
+/*
+ * OK, here is a short description of lex/flex rules behavior.
+ * The longest pattern which matches an input string is always chosen.
+ * For equal-length patterns, the first occurring in the rules list is chosen.
+ * INITIAL is the starting state, to which all non-conditional rules apply.
+ * Exclusive states change parsing rules while the state is active. When in
+ * an exclusive state, only those rules defined for that state apply.
+ *
+ * We use exclusive states for quoted strings, extended comments,
+ * and to eliminate parsing troubles for numeric strings.
+ * Exclusive states:
+ * <xb> bit string literal
+ * <xc> extended C-style comments
+ * <xd> delimited identifiers (double-quoted identifiers)
+ * <xdc> double-quoted strings in C
+ * <xh> hexadecimal numeric string
+ * <xn> national character quoted strings
+ * <xq> standard quoted strings
+ * <xqs> quote stop (detect continued strings)
+ * <xe> extended quoted strings (support backslash escape sequences)
+ * <xqc> single-quoted strings in C
+ * <xdolq> $foo$ quoted strings
+ * <xui> quoted identifier with Unicode escapes
+ * <xus> quoted string with Unicode escapes
+ * <xcond> condition of an EXEC SQL IFDEF construct
+ * <xskip> skipping the inactive part of an EXEC SQL IFDEF construct
+ *
+ * Note: we intentionally don't mimic the backend's <xeu> state; we have
+ * no need to distinguish it from <xe> state.
+ *
+ * Remember to add an <<EOF>> case whenever you add a new exclusive state!
+ * The default one is probably not the right thing.
+ */
+
+/* Additional exclusive states that are specific to ECPG */
+
+/*
+ * In order to make the world safe for Windows and Mac clients as well as
+ * Unix ones, we accept either \n or \r as a newline. A DOS-style \r\n
+ * sequence will be seen as two successive newlines, but that doesn't cause
+ * any problems. SQL-style comments, which start with -- and extend to the
+ * next newline, are treated as equivalent to a single whitespace character.
+ *
+ * NOTE a fine point: if there is no newline following --, we will absorb
+ * everything to the end of the input as a comment. This is correct. Older
+ * versions of Postgres failed to recognize -- as a comment if the input
+ * did not end with a newline.
+ *
+ * XXX perhaps \f (formfeed) should be treated as a newline as well?
+ *
+ * XXX if you change the set of whitespace characters, fix ecpg_isspace()
+ * to agree.
+ */
+/*
+ * SQL requires at least one newline in the whitespace separating
+ * string literals that are to be concatenated. Silly, but who are we
+ * to argue? Note that {whitespace_with_newline} should not have * after
+ * it, whereas {whitespace} should generally have a * after it...
+ */
+/* If we see {quote} then {quotecontinue}, the quoted string continues */
+/*
+ * {quotecontinuefail} is needed to avoid lexer backup when we fail to match
+ * {quotecontinue}. It might seem that this could just be {whitespace}*,
+ * but if there's a dash after {whitespace_with_newline}, it must be consumed
+ * to see if there's another dash --- which would start a {comment} and thus
+ * allow continuation of the {quotecontinue} token.
+ */
+/* Bit string
+ */
+/* Hexadecimal number */
+/* National character */
+/* Quoted string that allows backslash escapes */
+/* Extended quote
+ * xqdouble implements embedded quote, ''''
+ */
+/* $foo$ style quotes ("dollar quoting")
+ * The quoted string starts with $foo$ where "foo" is an optional string
+ * in the form of an identifier, except that it may not contain "$",
+ * and extends to the first occurrence of an identical string.
+ * There is *no* processing of the quoted text.
+ *
+ * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim}
+ * fails to match its trailing "$".
+ */
+/* Double quote
+ * Allows embedded spaces and other special characters into identifiers.
+ */
+/* Quoted identifier with Unicode escapes */
+/* Quoted string with Unicode escapes */
+/* special stuff for C strings */
+/* C-style comments
+ *
+ * The "extended comment" syntax closely resembles allowable operator syntax.
+ * The tricky part here is to get lex to recognize a string starting with
+ * slash-star as a comment, when interpreting it as an operator would produce
+ * a longer match --- remember lex will prefer a longer match! Also, if we
+ * have something like plus-slash-star, lex will think this is a 3-character
+ * operator whereas we want to see it as a + operator and a comment start.
+ * The solution is two-fold:
+ * 1. append {op_chars}* to xcstart so that it matches as much text as
+ * {operator} would. Then the tie-breaker (first matching rule of same
+ * length) ensures xcstart wins. We put back the extra stuff with yyless()
+ * in case it contains a star-slash that should terminate the comment.
+ * 2. In the operator rule, check for slash-star within the operator, and
+ * if found throw it back with yyless(). This handles the plus-slash-star
+ * problem.
+ * Dash-dash comments have similar interactions with the operator rule.
+ */
+/* Assorted special-case operators and operator-like tokens */
+/*
+ * These operator-like tokens (unlike the above ones) also match the {operator}
+ * rule, which means that they might be overridden by a longer match if they
+ * are followed by a comment start or a + or - character. Accordingly, if you
+ * add to this list, you must also add corresponding code to the {operator}
+ * block to return the correct token in such cases. (This is not needed in
+ * psqlscan.l since the token value is ignored there.)
+ */
+/*
+ * "self" is the set of chars that should be returned as single-character
+ * tokens. "op_chars" is the set of chars that can make up "Op" tokens,
+ * which can be one or more characters long (but if a single-char token
+ * appears in the "self" set, it is not to be returned as an Op). Note
+ * that the sets overlap, but each has some chars that are not in the other.
+ *
+ * If you change either set, adjust the character lists appearing in the
+ * rule for "operator"!
+ */
+/* we no longer allow unary minus in numbers.
+ * instead we pass it separately to parser. there it gets
+ * coerced via doNegate() -- Leon aug 20 1999
+ *
+ * {decimalfail} is used because we would like "1..10" to lex as 1, dot_dot, 10.
+ *
+ * {realfail1} and {realfail2} are added to prevent the need for scanner
+ * backup when the {real} rule fails to match completely.
+ */
+/* special characters for other dbms */
+/* we have to react differently in compat mode */
+/*
+ * Dollar quoted strings are totally opaque, and no escaping is done on them.
+ * Other quoted strings must allow some special characters such as single-quote
+ * and newline.
+ * Embedded single-quotes are implemented both in the SQL standard
+ * style of two adjacent single quotes "''" and in the Postgres/Java style
+ * of escaped-quote "\'".
+ * Other embedded escaped characters are matched explicitly and the leading
+ * backslash is dropped from the string.
+ * Note that xcstart must appear before operator, as explained above!
+ * Also whitespace (comment) must appear before operator.
+ */
+/* some stuff needed for ecpg */
+/* C version of hex number */
+/* we might want to parse all cpp include files */
+/* take care of cpp lines, they may also be continued */
+/* first a general line for all commands not starting with "i" */
+/* and then the other commands starting with "i", we have to add these
+ * separately because the cppline production would match on "include" too
+ */
+#line 1779 "pgc.c"
+
+#define INITIAL 0
+#define xb 1
+#define xc 2
+#define xd 3
+#define xdc 4
+#define xh 5
+#define xn 6
+#define xq 7
+#define xqs 8
+#define xe 9
+#define xqc 10
+#define xdolq 11
+#define xui 12
+#define xus 13
+#define xcond 14
+#define xskip 15
+#define C 16
+#define SQL 17
+#define incl 18
+#define def 19
+#define def_ident 20
+#define undef 21
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+ static void yyunput ( int c, char *buf_ptr );
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 425 "pgc.l"
+
+
+
+#line 429 "pgc.l"
+ /* code to execute during start of each call of yylex() */
+ token_start = NULL;
+
+
+#line 2026 "pgc.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ do
+ {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 566 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ ++yy_cp;
+ }
+ while ( yy_current_state != 565 );
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+
+ yylineno++;
+;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+#line 434 "pgc.l"
+{
+ /* ignore */
+ }
+ YY_BREAK
+/* <SQL> */
+
+case 2:
+YY_RULE_SETUP
+#line 440 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ xcdepth = 0;
+ BEGIN(xc);
+ /* Put back any characters past slash-star; see above */
+ yyless(2);
+ fputs("/*", yyout);
+ }
+ YY_BREAK
+/* <C,SQL> */
+
+case 3:
+YY_RULE_SETUP
+#line 452 "pgc.l"
+{
+ if (state_before_str_start == SQL)
+ {
+ xcdepth++;
+ /* Put back any characters past slash-star; see above */
+ yyless(2);
+ fputs("/_*", yyout);
+ }
+ else if (state_before_str_start == C)
+ {
+ ECHO;
+ }
+ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 466 "pgc.l"
+{
+ if (state_before_str_start == SQL)
+ {
+ if (xcdepth <= 0)
+ {
+ ECHO;
+ BEGIN(SQL);
+ token_start = NULL;
+ }
+ else
+ {
+ xcdepth--;
+ fputs("*_/", yyout);
+ }
+ }
+ else if (state_before_str_start == C)
+ {
+ ECHO;
+ BEGIN(C);
+ token_start = NULL;
+ }
+ }
+ YY_BREAK
+case 5:
+/* rule 5 can match eol */
+YY_RULE_SETUP
+#line 489 "pgc.l"
+{
+ ECHO;
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 493 "pgc.l"
+{
+ ECHO;
+ }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 497 "pgc.l"
+{
+ ECHO;
+ }
+ YY_BREAK
+case YY_STATE_EOF(xc):
+#line 501 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "unterminated /* comment");
+ }
+ YY_BREAK
+/* <xc> */
+
+case 8:
+YY_RULE_SETUP
+#line 507 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xb);
+ startlit();
+ }
+ YY_BREAK
+/* <SQL> */
+case 9:
+/* rule 9 can match eol */
+#line 516 "pgc.l"
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+#line 516 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xb):
+#line 519 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated bit string literal"); }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 521 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xh);
+ startlit();
+ }
+ YY_BREAK
+case YY_STATE_EOF(xh):
+#line 527 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated hexadecimal string literal"); }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 529 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xqc);
+ startlit();
+ }
+ YY_BREAK
+
+case 13:
+YY_RULE_SETUP
+#line 537 "pgc.l"
+{
+ /* National character.
+ * Transfer it as-is to the backend.
+ */
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xn);
+ startlit();
+ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 547 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xq);
+ startlit();
+ }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 553 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xe);
+ startlit();
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 559 "pgc.l"
+{
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xus);
+ startlit();
+ }
+ YY_BREAK
+/* <SQL> */
+case 17:
+YY_RULE_SETUP
+#line 567 "pgc.l"
+{
+ /*
+ * When we are scanning a quoted string and see an end
+ * quote, we must look ahead for a possible continuation.
+ * If we don't see one, we know the end quote was in fact
+ * the end of the string. To reduce the lexer table size,
+ * we use a single "xqs" state to do the lookahead for all
+ * types of strings.
+ */
+ state_before_str_stop = YYSTATE;
+ BEGIN(xqs);
+ }
+ YY_BREAK
+case 18:
+/* rule 18 can match eol */
+YY_RULE_SETUP
+#line 579 "pgc.l"
+{
+ /*
+ * Found a quote continuation, so return to the in-quote
+ * state and continue scanning the literal. Nothing is
+ * added to the literal's contents.
+ */
+ BEGIN(state_before_str_stop);
+ }
+ YY_BREAK
+case 19:
+/* rule 19 can match eol */
+#line 588 "pgc.l"
+case 20:
+/* rule 20 can match eol */
+#line 589 "pgc.l"
+YY_RULE_SETUP
+case YY_STATE_EOF(xqs):
+#line 589 "pgc.l"
+{
+ /*
+ * Failed to see a quote continuation. Throw back
+ * everything after the end quote, and handle the string
+ * according to the state we were in previously.
+ */
+ yyless(0);
+ BEGIN(state_before_str_start);
+
+ switch (state_before_str_stop)
+ {
+ case xb:
+ if (literalbuf[strspn(literalbuf, "01")] != '\0')
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string literal");
+ base_yylval.str = psprintf("b'%s'", literalbuf);
+ return BCONST;
+ case xh:
+ if (literalbuf[strspn(literalbuf, "0123456789abcdefABCDEF")] != '\0')
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid hex string literal");
+ base_yylval.str = psprintf("x'%s'", literalbuf);
+ return XCONST;
+ case xq:
+ /* fallthrough */
+ case xqc:
+ base_yylval.str = psprintf("'%s'", literalbuf);
+ return SCONST;
+ case xe:
+ base_yylval.str = psprintf("E'%s'", literalbuf);
+ return SCONST;
+ case xn:
+ base_yylval.str = psprintf("N'%s'", literalbuf);
+ return SCONST;
+ case xus:
+ base_yylval.str = psprintf("U&'%s'", literalbuf);
+ return USCONST;
+ default:
+ mmfatal(PARSE_ERROR, "unhandled previous state in xqs\n");
+ }
+ }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 629 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 630 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 23:
+/* rule 23 can match eol */
+YY_RULE_SETUP
+#line 631 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 24:
+/* rule 24 can match eol */
+YY_RULE_SETUP
+#line 632 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 635 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+#line 638 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 641 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 644 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 647 "pgc.l"
+{
+ /* This is only needed for \ just before EOF */
+ addlitchar(yytext[0]);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xq):
+case YY_STATE_EOF(xqc):
+case YY_STATE_EOF(xe):
+case YY_STATE_EOF(xn):
+case YY_STATE_EOF(xus):
+#line 651 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+ YY_BREAK
+
+case 30:
+YY_RULE_SETUP
+#line 654 "pgc.l"
+{
+ token_start = yytext;
+ if (dolqstart)
+ free(dolqstart);
+ dolqstart = mm_strdup(yytext);
+ BEGIN(xdolq);
+ startlit();
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 663 "pgc.l"
+{
+ /* throw back all but the initial "$" */
+ yyless(1);
+ /* and treat it as {other} */
+ return yytext[0];
+ }
+ YY_BREAK
+/* <SQL> */
+case 32:
+YY_RULE_SETUP
+#line 671 "pgc.l"
+{
+ if (strcmp(yytext, dolqstart) == 0)
+ {
+ addlit(yytext, yyleng);
+ free(dolqstart);
+ dolqstart = NULL;
+ BEGIN(SQL);
+ base_yylval.str = mm_strdup(literalbuf);
+ return SCONST;
+ }
+ else
+ {
+ /*
+ * When we fail to match $...$ to dolqstart, transfer
+ * the $... part to the output, but put back the final
+ * $ for rescanning. Consider $delim$...$junk$delim$
+ */
+ addlit(yytext, yyleng - 1);
+ yyless(yyleng - 1);
+ }
+ }
+ YY_BREAK
+case 33:
+/* rule 33 can match eol */
+YY_RULE_SETUP
+#line 692 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 695 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 698 "pgc.l"
+{
+ /* single quote or dollar sign */
+ addlitchar(yytext[0]);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xdolq):
+#line 702 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated dollar-quoted string"); }
+ YY_BREAK
+
+case 36:
+YY_RULE_SETUP
+#line 705 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xd);
+ startlit();
+ }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 710 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xui);
+ startlit();
+ }
+ YY_BREAK
+/* <SQL> */
+case 38:
+YY_RULE_SETUP
+#line 717 "pgc.l"
+{
+ BEGIN(state_before_str_start);
+ if (literallen == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
+ /*
+ * The server will truncate the identifier here. We do
+ * not, as (1) it does not change the result; (2) we don't
+ * know what NAMEDATALEN the server might use; (3) this
+ * code path is also taken for literal query strings in
+ * PREPARE and EXECUTE IMMEDIATE, which can certainly be
+ * longer than NAMEDATALEN.
+ */
+ base_yylval.str = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 732 "pgc.l"
+{
+ BEGIN(state_before_str_start);
+ base_yylval.str = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 737 "pgc.l"
+{
+ BEGIN(state_before_str_start);
+ if (literallen == 2) /* "U&" */
+ mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
+ /* The backend will truncate the identifier here. We do not as it does not change the result. */
+ base_yylval.str = psprintf("U&\"%s\"", literalbuf);
+ return UIDENT;
+ }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 745 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 42:
+/* rule 42 can match eol */
+YY_RULE_SETUP
+#line 748 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xd):
+case YY_STATE_EOF(xui):
+#line 751 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted identifier"); }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 752 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xdc);
+ startlit();
+ }
+ YY_BREAK
+case 44:
+/* rule 44 can match eol */
+YY_RULE_SETUP
+#line 757 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xdc):
+#line 760 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+ YY_BREAK
+
+case 45:
+YY_RULE_SETUP
+#line 763 "pgc.l"
+{
+ return TYPECAST;
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 767 "pgc.l"
+{
+ return DOT_DOT;
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 771 "pgc.l"
+{
+ return COLON_EQUALS;
+ }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 775 "pgc.l"
+{
+ return EQUALS_GREATER;
+ }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 779 "pgc.l"
+{
+ return LESS_EQUALS;
+ }
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 783 "pgc.l"
+{
+ return GREATER_EQUALS;
+ }
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 787 "pgc.l"
+{
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 792 "pgc.l"
+{
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 797 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ unput(':');
+ }
+ else
+ return yytext[0];
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 807 "pgc.l"
+{
+ /*
+ * We may find a ';' inside a structure
+ * definition in a TYPE or VAR statement.
+ * This is not an EOL marker.
+ */
+ if (yytext[0] == ';' && struct_level == 0)
+ BEGIN(C);
+ return yytext[0];
+ }
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 818 "pgc.l"
+{
+ /*
+ * Check for embedded slash-star or dash-dash; those
+ * are comment starts, so operator must stop there.
+ * Note that slash-star or dash-dash at the first
+ * character will match a prior rule, not this one.
+ */
+ int nchars = yyleng;
+ char *slashstar = strstr(yytext, "/*");
+ char *dashdash = strstr(yytext, "--");
+
+ if (slashstar && dashdash)
+ {
+ /* if both appear, take the first one */
+ if (slashstar > dashdash)
+ slashstar = dashdash;
+ }
+ else if (!slashstar)
+ slashstar = dashdash;
+ if (slashstar)
+ nchars = slashstar - yytext;
+
+ /*
+ * For SQL compatibility, '+' and '-' cannot be the
+ * last char of a multi-char operator unless the operator
+ * contains chars that are not in SQL operators.
+ * The idea is to lex '=-' as two operators, but not
+ * to forbid operator names like '?-' that could not be
+ * sequences of SQL operators.
+ */
+ if (nchars > 1 &&
+ (yytext[nchars - 1] == '+' ||
+ yytext[nchars - 1] == '-'))
+ {
+ int ic;
+
+ for (ic = nchars - 2; ic >= 0; ic--)
+ {
+ char c = yytext[ic];
+ if (c == '~' || c == '!' || c == '@' ||
+ c == '#' || c == '^' || c == '&' ||
+ c == '|' || c == '`' || c == '?' ||
+ c == '%')
+ break;
+ }
+ if (ic < 0)
+ {
+ /*
+ * didn't find a qualifying character, so remove
+ * all trailing [+-]
+ */
+ do {
+ nchars--;
+ } while (nchars > 1 &&
+ (yytext[nchars - 1] == '+' ||
+ yytext[nchars - 1] == '-'));
+ }
+ }
+
+ if (nchars < yyleng)
+ {
+ /* Strip the unwanted chars from the token */
+ yyless(nchars);
+ /*
+ * If what we have left is only one char, and it's
+ * one of the characters matching "self", then
+ * return it as a character token the same way
+ * that the "self" rule would have.
+ */
+ if (nchars == 1 &&
+ strchr(",()[].;:+-*/%^<>=", yytext[0]))
+ return yytext[0];
+ /*
+ * Likewise, if what we have left is two chars, and
+ * those match the tokens ">=", "<=", "=>", "<>" or
+ * "!=", then we must return the appropriate token
+ * rather than the generic Op.
+ */
+ if (nchars == 2)
+ {
+ if (yytext[0] == '=' && yytext[1] == '>')
+ return EQUALS_GREATER;
+ if (yytext[0] == '>' && yytext[1] == '=')
+ return GREATER_EQUALS;
+ if (yytext[0] == '<' && yytext[1] == '=')
+ return LESS_EQUALS;
+ if (yytext[0] == '<' && yytext[1] == '>')
+ return NOT_EQUALS;
+ if (yytext[0] == '!' && yytext[1] == '=')
+ return NOT_EQUALS;
+ }
+ }
+
+ base_yylval.str = mm_strdup(yytext);
+ return Op;
+ }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 915 "pgc.l"
+{
+ base_yylval.ival = atol(yytext+1);
+ return PARAM;
+ }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 920 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return IP;
+ }
+ YY_BREAK
+/* <SQL> */
+
+case 58:
+YY_RULE_SETUP
+#line 927 "pgc.l"
+{
+ return process_integer_literal(yytext, &base_yylval);
+ }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 930 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 934 "pgc.l"
+{
+ /* throw back the .., and treat as integer */
+ yyless(yyleng - 2);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 939 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 943 "pgc.l"
+{
+ /*
+ * throw back the [Ee], and figure out whether what
+ * remains is an {integer} or {decimal}.
+ */
+ yyless(yyleng - 1);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 951 "pgc.l"
+{
+ /* throw back the [Ee][+-], and proceed as above */
+ yyless(yyleng - 2);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+ YY_BREAK
+/* <C,SQL> */
+
+case 64:
+/* rule 64 can match eol */
+YY_RULE_SETUP
+#line 959 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext+1);
+ return CVARIABLE;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 964 "pgc.l"
+{
+ if (!isdefine())
+ {
+ int kwvalue;
+
+ /* Is it an SQL/ECPG keyword? */
+ kwvalue = ScanECPGKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+
+ /* Is it a C keyword? */
+ kwvalue = ScanCKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+
+ /*
+ * None of the above. Return it as an identifier.
+ *
+ * The backend will attempt to truncate and case-fold
+ * the identifier, but I see no good reason for ecpg
+ * to do so; that's just another way that ecpg could get
+ * out of step with the backend.
+ */
+ base_yylval.str = mm_strdup(yytext);
+ return IDENT;
+ }
+ }
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 992 "pgc.l"
+{
+ return yytext[0];
+ }
+ YY_BREAK
+/* <SQL> */
+/*
+ * Begin ECPG-specific rules
+ */
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 1001 "pgc.l"
+{ BEGIN(SQL); return SQL_START; }
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 1002 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(SQL);
+ return SQL_START;
+ }
+ else
+ return S_ANYTHING;
+ }
+ YY_BREAK
+case 69:
+/* rule 69 can match eol */
+YY_RULE_SETUP
+#line 1012 "pgc.l"
+{ ECHO; }
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 1013 "pgc.l"
+{
+ char* endptr;
+
+ errno = 0;
+ base_yylval.ival = strtoul((char *)yytext,&endptr,16);
+ if (*endptr != '\0' || errno == ERANGE)
+ {
+ errno = 0;
+ base_yylval.str = mm_strdup(yytext);
+ return SCONST;
+ }
+ return ICONST;
+ }
+ YY_BREAK
+case 71:
+/* rule 71 can match eol */
+YY_RULE_SETUP
+#line 1026 "pgc.l"
+{
+ if (system_includes)
+ {
+ include_next = false;
+ BEGIN(incl);
+ }
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ }
+ YY_BREAK
+case 72:
+/* rule 72 can match eol */
+YY_RULE_SETUP
+#line 1038 "pgc.l"
+{
+ if (system_includes)
+ {
+ include_next = true;
+ BEGIN(incl);
+ }
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ }
+ YY_BREAK
+case 73:
+/* rule 73 can match eol */
+YY_RULE_SETUP
+#line 1050 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 1054 "pgc.l"
+{
+ /*
+ * Try to detect a function name:
+ * look for identifiers at the global scope
+ * keep the last identifier before the first '(' and '{'
+ */
+ if (braces_open == 0 && parenths_open == 0)
+ {
+ if (current_function)
+ free(current_function);
+ current_function = mm_strdup(yytext);
+ }
+ /* Informix uses SQL defines only in SQL space */
+ /* however, some defines have to be taken care of for compatibility */
+ if ((!INFORMIX_MODE || !isinformixdefine()) && !isdefine())
+ {
+ int kwvalue;
+
+ kwvalue = ScanCKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return IDENT;
+ }
+ }
+ }
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 1082 "pgc.l"
+{ mmerror(PARSE_ERROR, ET_ERROR, "nested /* ... */ comments"); }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 1083 "pgc.l"
+{ return ':'; }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 1084 "pgc.l"
+{ return ';'; }
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 1085 "pgc.l"
+{ return ','; }
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 1086 "pgc.l"
+{ return '*'; }
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 1087 "pgc.l"
+{ return '%'; }
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 1088 "pgc.l"
+{ return '/'; }
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 1089 "pgc.l"
+{ return '+'; }
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 1090 "pgc.l"
+{ return '-'; }
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 1091 "pgc.l"
+{ parenths_open++; return '('; }
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 1092 "pgc.l"
+{ parenths_open--; return ')'; }
+ YY_BREAK
+case 86:
+/* rule 86 can match eol */
+YY_RULE_SETUP
+#line 1093 "pgc.l"
+{ ECHO; }
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 1094 "pgc.l"
+{ return '{'; }
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 1095 "pgc.l"
+{ return '}'; }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 1096 "pgc.l"
+{ return '['; }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 1097 "pgc.l"
+{ return ']'; }
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 1098 "pgc.l"
+{ return '='; }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 1099 "pgc.l"
+{ return S_MEMBER; }
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 1100 "pgc.l"
+{ return S_RSHIFT; }
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 1101 "pgc.l"
+{ return S_LSHIFT; }
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 1102 "pgc.l"
+{ return S_OR; }
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 1103 "pgc.l"
+{ return S_AND; }
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 1104 "pgc.l"
+{ return S_INC; }
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 1105 "pgc.l"
+{ return S_DEC; }
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 1106 "pgc.l"
+{ return S_EQUAL; }
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 1107 "pgc.l"
+{ return S_NEQUAL; }
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 1108 "pgc.l"
+{ return S_ADD; }
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 1109 "pgc.l"
+{ return S_SUB; }
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 1110 "pgc.l"
+{ return S_MUL; }
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 1111 "pgc.l"
+{ return S_DIV; }
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 1112 "pgc.l"
+{ return S_MOD; }
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 1113 "pgc.l"
+{ return S_MEMPOINT; }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 1114 "pgc.l"
+{ return S_DOTPOINT; }
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 1115 "pgc.l"
+{ return S_ANYTHING; }
+ YY_BREAK
+case 109:
+/* rule 109 can match eol */
+YY_RULE_SETUP
+#line 1116 "pgc.l"
+{ BEGIN(def_ident); }
+ YY_BREAK
+case 110:
+/* rule 110 can match eol */
+YY_RULE_SETUP
+#line 1117 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(def_ident);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 111:
+/* rule 111 can match eol */
+YY_RULE_SETUP
+#line 1129 "pgc.l"
+{ BEGIN(undef); }
+ YY_BREAK
+case 112:
+/* rule 112 can match eol */
+YY_RULE_SETUP
+#line 1130 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(undef);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 113:
+/* rule 113 can match eol */
+YY_RULE_SETUP
+#line 1142 "pgc.l"
+{
+ struct _defines *ptr, *ptr2 = NULL;
+ int i;
+
+ /*
+ * Skip the ";" and trailing whitespace. Note that yytext
+ * contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i-- )
+ ;
+ yytext[i+1] = '\0';
+
+
+ for (ptr = defines; ptr != NULL; ptr2 = ptr, ptr = ptr->next)
+ {
+ if (strcmp(yytext, ptr->olddef) == 0)
+ {
+ if (ptr2 == NULL)
+ defines = ptr->next;
+ else
+ ptr2->next = ptr->next;
+ free(ptr->newdef);
+ free(ptr->olddef);
+ free(ptr);
+ break;
+ }
+ }
+
+ BEGIN(C);
+ }
+ YY_BREAK
+case 114:
+/* rule 114 can match eol */
+YY_RULE_SETUP
+#line 1174 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL UNDEF command");
+ yyterminate();
+ }
+ YY_BREAK
+case 115:
+/* rule 115 can match eol */
+YY_RULE_SETUP
+#line 1178 "pgc.l"
+{ BEGIN(incl); }
+ YY_BREAK
+case 116:
+/* rule 116 can match eol */
+YY_RULE_SETUP
+#line 1179 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(incl);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 117:
+/* rule 117 can match eol */
+YY_RULE_SETUP
+#line 1191 "pgc.l"
+{
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ YY_BREAK
+case 118:
+/* rule 118 can match eol */
+YY_RULE_SETUP
+#line 1201 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 119:
+/* rule 119 can match eol */
+YY_RULE_SETUP
+#line 1220 "pgc.l"
+{
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = false;
+ BEGIN(xcond);
+ }
+ YY_BREAK
+case 120:
+/* rule 120 can match eol */
+YY_RULE_SETUP
+#line 1230 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = false;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 121:
+/* rule 121 can match eol */
+YY_RULE_SETUP
+#line 1249 "pgc.l"
+{
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ YY_BREAK
+case 122:
+/* rule 122 can match eol */
+YY_RULE_SETUP
+#line 1257 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 123:
+/* rule 123 can match eol */
+YY_RULE_SETUP
+#line 1275 "pgc.l"
+{ /* only exec sql endif pops the stack, so take care of duplicated 'else' */
+ if ( preproc_tos == 0 )
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ else if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE");
+ else
+ {
+ stacked_if_value[preproc_tos].else_branch = true;
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active);
+ stacked_if_value[preproc_tos].saw_active = true;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ }
+ YY_BREAK
+case 124:
+/* rule 124 can match eol */
+YY_RULE_SETUP
+#line 1294 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if ( preproc_tos == 0 )
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ else if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE");
+ else
+ {
+ stacked_if_value[preproc_tos].else_branch = true;
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active);
+ stacked_if_value[preproc_tos].saw_active = true;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 125:
+/* rule 125 can match eol */
+YY_RULE_SETUP
+#line 1322 "pgc.l"
+{
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "unmatched EXEC SQL ENDIF");
+ else
+ preproc_tos--;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ YY_BREAK
+case 126:
+/* rule 126 can match eol */
+YY_RULE_SETUP
+#line 1333 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "unmatched EXEC SQL ENDIF");
+ else
+ preproc_tos--;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 1354 "pgc.l"
+{ /* ignore */ }
+ YY_BREAK
+case 128:
+/* rule 128 can match eol */
+YY_RULE_SETUP
+#line 1356 "pgc.l"
+{
+ {
+ struct _defines *defptr;
+ unsigned int i;
+ bool this_active;
+
+ /*
+ * Skip the ";" and trailing whitespace. Note that yytext
+ * contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i-- )
+ ;
+ yytext[i+1] = '\0';
+
+ for (defptr = defines;
+ defptr != NULL &&
+ strcmp(yytext, defptr->olddef) != 0;
+ defptr = defptr->next)
+ /* skip */ ;
+
+ this_active = (defptr ? ifcond : !ifcond);
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active &&
+ this_active);
+ stacked_if_value[preproc_tos].saw_active |= this_active;
+ }
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ YY_BREAK
+case 129:
+/* rule 129 can match eol */
+YY_RULE_SETUP
+#line 1392 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL IFDEF command");
+ yyterminate();
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 1396 "pgc.l"
+{
+ old = mm_strdup(yytext);
+ BEGIN(def);
+ startlit();
+ }
+ YY_BREAK
+case 131:
+/* rule 131 can match eol */
+YY_RULE_SETUP
+#line 1401 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL DEFINE command");
+ yyterminate();
+ }
+ YY_BREAK
+case 132:
+/* rule 132 can match eol */
+YY_RULE_SETUP
+#line 1405 "pgc.l"
+{
+ struct _defines *ptr, *this;
+
+ for (ptr = defines; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(old, ptr->olddef) == 0)
+ {
+ free(ptr->newdef);
+ ptr->newdef = mm_strdup(literalbuf);
+ }
+ }
+ if (ptr == NULL)
+ {
+ this = (struct _defines *) mm_alloc(sizeof(struct _defines));
+
+ /* initial definition */
+ this->olddef = old;
+ this->newdef = mm_strdup(literalbuf);
+ this->next = defines;
+ this->used = NULL;
+ defines = this;
+ }
+
+ BEGIN(C);
+ }
+ YY_BREAK
+case 133:
+/* rule 133 can match eol */
+YY_RULE_SETUP
+#line 1430 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 134:
+/* rule 134 can match eol */
+YY_RULE_SETUP
+#line 1431 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 135:
+/* rule 135 can match eol */
+YY_RULE_SETUP
+#line 1432 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 136:
+/* rule 136 can match eol */
+YY_RULE_SETUP
+#line 1433 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 137:
+/* rule 137 can match eol */
+YY_RULE_SETUP
+#line 1434 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "syntax error in EXEC SQL INCLUDE command");
+ yyterminate();
+ }
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(xcond):
+case YY_STATE_EOF(xskip):
+case YY_STATE_EOF(C):
+case YY_STATE_EOF(SQL):
+case YY_STATE_EOF(incl):
+case YY_STATE_EOF(def):
+case YY_STATE_EOF(def_ident):
+case YY_STATE_EOF(undef):
+#line 1439 "pgc.l"
+{
+ if (yy_buffer == NULL)
+ {
+ if ( preproc_tos > 0 )
+ {
+ preproc_tos = 0;
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ }
+ yyterminate();
+ }
+ else
+ {
+ struct _yy_buffer *yb = yy_buffer;
+ int i;
+ struct _defines *ptr;
+
+ for (ptr = defines; ptr; ptr = ptr->next)
+ if (ptr->used == yy_buffer)
+ {
+ ptr->used = NULL;
+ break;
+ }
+
+ if (yyin != NULL)
+ fclose(yyin);
+
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_switch_to_buffer(yy_buffer->buffer);
+
+ yylineno = yy_buffer->lineno;
+
+ /* We have to output the filename only if we change files here */
+ i = strcmp(input_filename, yy_buffer->filename);
+
+ free(input_filename);
+ input_filename = yy_buffer->filename;
+
+ yy_buffer = yy_buffer->next;
+ free(yb);
+
+ if (i != 0)
+ output_line_number();
+
+ }
+ }
+ YY_BREAK
+case 138:
+/* rule 138 can match eol */
+YY_RULE_SETUP
+#line 1485 "pgc.l"
+{ mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <%s>", PACKAGE_BUGREPORT); }
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+#line 1487 "pgc.l"
+YY_FATAL_ERROR( "flex scanner jammed" );
+ YY_BREAK
+#line 3734 "pgc.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 566 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 566 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_is_jam = (yy_current_state == 565);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+ static void yyunput (int c, char * yy_bp )
+{
+ char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
+
+ /* undo effects of setting up yytext */
+ *yy_cp = (yy_hold_char);
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ int number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ char *source =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ if ( c == '\n' ){
+ --yylineno;
+ }
+
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ if ( c == '\n' )
+
+ yylineno++;
+;
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ /* We do not touch yylineno unless the option is enabled. */
+ yylineno = 1;
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 1487 "pgc.l"
+
+
+/* LCOV_EXCL_STOP */
+
+void
+lex_init(void)
+{
+ braces_open = 0;
+ parenths_open = 0;
+ current_function = NULL;
+
+ yylineno = 1;
+
+ /* initialize state for if/else/endif */
+ preproc_tos = 0;
+ stacked_if_value[preproc_tos].active = true;
+ stacked_if_value[preproc_tos].saw_active = true;
+ stacked_if_value[preproc_tos].else_branch = false;
+
+ /* initialize literal buffer to a reasonable but expansible size */
+ if (literalbuf == NULL)
+ {
+ literalalloc = 1024;
+ literalbuf = (char *) mm_alloc(literalalloc);
+ }
+ startlit();
+
+ BEGIN(C);
+}
+
+static void
+addlit(char *ytext, int yleng)
+{
+ /* enlarge buffer if needed */
+ if ((literallen+yleng) >= literalalloc)
+ {
+ do
+ literalalloc *= 2;
+ while ((literallen+yleng) >= literalalloc);
+ literalbuf = (char *) realloc(literalbuf, literalalloc);
+ }
+ /* append new data, add trailing null */
+ memcpy(literalbuf+literallen, ytext, yleng);
+ literallen += yleng;
+ literalbuf[literallen] = '\0';
+}
+
+static void
+addlitchar(unsigned char ychar)
+{
+ /* enlarge buffer if needed */
+ if ((literallen+1) >= literalalloc)
+ {
+ literalalloc *= 2;
+ literalbuf = (char *) realloc(literalbuf, literalalloc);
+ }
+ /* append new data, add trailing null */
+ literalbuf[literallen] = ychar;
+ literallen += 1;
+ literalbuf[literallen] = '\0';
+}
+
+/*
+ * Process {integer}. Note this will also do the right thing with {decimal},
+ * ie digits and a decimal point.
+ */
+static int
+process_integer_literal(const char *token, YYSTYPE *lval)
+{
+ int val;
+ char *endptr;
+
+ errno = 0;
+ val = strtoint(token, &endptr, 10);
+ if (*endptr != '\0' || errno == ERANGE)
+ {
+ /* integer too large (or contains decimal pt), treat it as a float */
+ lval->str = mm_strdup(token);
+ return FCONST;
+ }
+ lval->ival = val;
+ return ICONST;
+}
+
+static void
+parse_include(void)
+{
+ /* got the include file name */
+ struct _yy_buffer *yb;
+ struct _include_path *ip;
+ char inc_file[MAXPGPATH];
+ unsigned int i;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = input_filename;
+ yb->next = yy_buffer;
+
+ yy_buffer = yb;
+
+ /*
+ * skip the ";" if there is one and trailing whitespace. Note that
+ * yytext contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i--)
+ ;
+
+ if (yytext[i] == ';')
+ i--;
+
+ yytext[i+1] = '\0';
+
+ yyin = NULL;
+
+ /* If file name is enclosed in '"' remove these and look only in '.' */
+ /* Informix does look into all include paths though, except filename starts with '/' */
+ if (yytext[0] == '"' && yytext[i] == '"' &&
+ ((compat != ECPG_COMPAT_INFORMIX && compat != ECPG_COMPAT_INFORMIX_SE) || yytext[1] == '/'))
+ {
+ yytext[i] = '\0';
+ memmove(yytext, yytext+1, strlen(yytext));
+
+ strlcpy(inc_file, yytext, sizeof(inc_file));
+ yyin = fopen(inc_file, "r");
+ if (!yyin)
+ {
+ if (strlen(inc_file) <= 2 || strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
+ {
+ strcat(inc_file, ".h");
+ yyin = fopen(inc_file, "r");
+ }
+ }
+
+ }
+ else
+ {
+ if ((yytext[0] == '"' && yytext[i] == '"') || (yytext[0] == '<' && yytext[i] == '>'))
+ {
+ yytext[i] = '\0';
+ memmove(yytext, yytext+1, strlen(yytext));
+ }
+
+ for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
+ {
+ if (strlen(ip->path) + strlen(yytext) + 4 > MAXPGPATH)
+ {
+ fprintf(stderr, _("Error: include path \"%s/%s\" is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
+ continue;
+ }
+ snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext);
+ yyin = fopen(inc_file, "r");
+ if (!yyin)
+ {
+ if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
+ {
+ strcat(inc_file, ".h");
+ yyin = fopen( inc_file, "r" );
+ }
+ }
+ /* if the command was "include_next" we have to disregard the first hit */
+ if (yyin && include_next)
+ {
+ fclose (yyin);
+ yyin = NULL;
+ include_next = false;
+ }
+ }
+ }
+ if (!yyin)
+ mmfatal(NO_INCLUDE_FILE, "could not open include file \"%s\" on line %d", yytext, yylineno);
+
+ input_filename = mm_strdup(inc_file);
+ yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ));
+ yylineno = 1;
+ output_line_number();
+
+ BEGIN(C);
+}
+
+/*
+ * ecpg_isspace() --- return true if flex scanner considers char whitespace
+ */
+static bool
+ecpg_isspace(char ch)
+{
+ if (ch == ' ' ||
+ ch == '\t' ||
+ ch == '\n' ||
+ ch == '\r' ||
+ ch == '\f')
+ return true;
+ return false;
+}
+
+static bool isdefine(void)
+{
+ struct _defines *ptr;
+
+ /* is it a define? */
+ for (ptr = defines; ptr; ptr = ptr->next)
+ {
+ if (strcmp(yytext, ptr->olddef) == 0 && ptr->used == NULL)
+ {
+ struct _yy_buffer *yb;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = mm_strdup(input_filename);
+ yb->next = yy_buffer;
+
+ ptr->used = yy_buffer = yb;
+
+ yy_scan_string(ptr->newdef);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+static bool isinformixdefine(void)
+{
+ const char *new = NULL;
+
+ if (strcmp(yytext, "dec_t") == 0)
+ new = "decimal";
+ else if (strcmp(yytext, "intrvl_t") == 0)
+ new = "interval";
+ else if (strcmp(yytext, "dtime_t") == 0)
+ new = "timestamp";
+
+ if (new)
+ {
+ struct _yy_buffer *yb;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = mm_strdup(input_filename);
+ yb->next = yy_buffer;
+ yy_buffer = yb;
+
+ yy_scan_string(new);
+ return true;
+ }
+
+ return false;
+}
+
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
new file mode 100644
index 0000000..7a03566
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -0,0 +1,1740 @@
+%top{
+/*-------------------------------------------------------------------------
+ *
+ * pgc.l
+ * lexical scanner for ecpg
+ *
+ * This is a modified version of src/backend/parser/scan.l
+ *
+ * The ecpg scanner is not backup-free, so the fail rules are
+ * only here to simplify syncing this file with scan.l.
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/ecpg/preproc/pgc.l
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <limits.h>
+
+#include "common/string.h"
+
+#include "preproc_extern.h"
+#include "preproc.h"
+}
+
+%{
+
+/* LCOV_EXCL_START */
+
+extern YYSTYPE base_yylval;
+
+static int xcdepth = 0; /* depth of nesting in slash-star comments */
+static char *dolqstart = NULL; /* current $foo$ quote start string */
+
+/*
+ * literalbuf is used to accumulate literal values when multiple rules
+ * are needed to parse a single literal. Call startlit to reset buffer
+ * to empty, addlit to add text. Note that the buffer is permanently
+ * malloc'd to the largest size needed so far in the current run.
+ */
+static char *literalbuf = NULL; /* expandable buffer */
+static int literallen; /* actual current length */
+static int literalalloc; /* current allocated buffer size */
+
+/* Used for detecting global state together with braces_open */
+static int parenths_open;
+
+/* Used to tell parse_include() whether the command was #include or #include_next */
+static bool include_next;
+
+#define startlit() (literalbuf[0] = '\0', literallen = 0)
+static void addlit(char *ytext, int yleng);
+static void addlitchar(unsigned char);
+static int process_integer_literal(const char *token, YYSTYPE *lval);
+static void parse_include(void);
+static bool ecpg_isspace(char ch);
+static bool isdefine(void);
+static bool isinformixdefine(void);
+
+char *token_start;
+
+/* vars to keep track of start conditions when scanning literals */
+static int state_before_str_start;
+static int state_before_str_stop;
+
+struct _yy_buffer
+{
+ YY_BUFFER_STATE buffer;
+ long lineno;
+ char *filename;
+ struct _yy_buffer *next;
+} *yy_buffer = NULL;
+
+static char *old;
+
+/*
+ * Vars for handling ifdef/elif/endif constructs. preproc_tos is the current
+ * nesting depth of such constructs, and stacked_if_value[preproc_tos] is the
+ * state for the innermost level. (For convenience, stacked_if_value[0] is
+ * initialized as though we are in the active branch of some outermost IF.)
+ * The active field is true if the current branch is active (being expanded).
+ * The saw_active field is true if we have found any successful branch,
+ * so that all subsequent branches of this level should be skipped.
+ * The else_branch field is true if we've found an 'else' (so that another
+ * 'else' or 'elif' at this level is an error.)
+ * For IFs nested within an inactive branch, all branches always have active
+ * set to false, but saw_active and else_branch are maintained normally.
+ * ifcond is valid only while evaluating an if-condition; it's true if we
+ * are doing ifdef, false if ifndef.
+ */
+#define MAX_NESTED_IF 128
+static short preproc_tos;
+static bool ifcond;
+static struct _if_value
+{
+ bool active;
+ bool saw_active;
+ bool else_branch;
+} stacked_if_value[MAX_NESTED_IF];
+
+%}
+
+%option 8bit
+%option never-interactive
+%option nodefault
+%option noinput
+%option noyywrap
+%option warn
+%option yylineno
+%option prefix="base_yy"
+
+/*
+ * OK, here is a short description of lex/flex rules behavior.
+ * The longest pattern which matches an input string is always chosen.
+ * For equal-length patterns, the first occurring in the rules list is chosen.
+ * INITIAL is the starting state, to which all non-conditional rules apply.
+ * Exclusive states change parsing rules while the state is active. When in
+ * an exclusive state, only those rules defined for that state apply.
+ *
+ * We use exclusive states for quoted strings, extended comments,
+ * and to eliminate parsing troubles for numeric strings.
+ * Exclusive states:
+ * <xb> bit string literal
+ * <xc> extended C-style comments
+ * <xd> delimited identifiers (double-quoted identifiers)
+ * <xdc> double-quoted strings in C
+ * <xh> hexadecimal numeric string
+ * <xn> national character quoted strings
+ * <xq> standard quoted strings
+ * <xqs> quote stop (detect continued strings)
+ * <xe> extended quoted strings (support backslash escape sequences)
+ * <xqc> single-quoted strings in C
+ * <xdolq> $foo$ quoted strings
+ * <xui> quoted identifier with Unicode escapes
+ * <xus> quoted string with Unicode escapes
+ * <xcond> condition of an EXEC SQL IFDEF construct
+ * <xskip> skipping the inactive part of an EXEC SQL IFDEF construct
+ *
+ * Note: we intentionally don't mimic the backend's <xeu> state; we have
+ * no need to distinguish it from <xe> state.
+ *
+ * Remember to add an <<EOF>> case whenever you add a new exclusive state!
+ * The default one is probably not the right thing.
+ */
+
+%x xb
+%x xc
+%x xd
+%x xdc
+%x xh
+%x xn
+%x xq
+%x xqs
+%x xe
+%x xqc
+%x xdolq
+%x xui
+%x xus
+%x xcond
+%x xskip
+
+/* Additional exclusive states that are specific to ECPG */
+%x C SQL incl def def_ident undef
+
+/*
+ * In order to make the world safe for Windows and Mac clients as well as
+ * Unix ones, we accept either \n or \r as a newline. A DOS-style \r\n
+ * sequence will be seen as two successive newlines, but that doesn't cause
+ * any problems. SQL-style comments, which start with -- and extend to the
+ * next newline, are treated as equivalent to a single whitespace character.
+ *
+ * NOTE a fine point: if there is no newline following --, we will absorb
+ * everything to the end of the input as a comment. This is correct. Older
+ * versions of Postgres failed to recognize -- as a comment if the input
+ * did not end with a newline.
+ *
+ * XXX perhaps \f (formfeed) should be treated as a newline as well?
+ *
+ * XXX if you change the set of whitespace characters, fix ecpg_isspace()
+ * to agree.
+ */
+
+space [ \t\n\r\f]
+horiz_space [ \t\f]
+newline [\n\r]
+non_newline [^\n\r]
+
+comment ("--"{non_newline}*)
+
+whitespace ({space}+|{comment})
+
+/*
+ * SQL requires at least one newline in the whitespace separating
+ * string literals that are to be concatenated. Silly, but who are we
+ * to argue? Note that {whitespace_with_newline} should not have * after
+ * it, whereas {whitespace} should generally have a * after it...
+ */
+
+horiz_whitespace ({horiz_space}|{comment})
+whitespace_with_newline ({horiz_whitespace}*{newline}{whitespace}*)
+
+quote '
+/* If we see {quote} then {quotecontinue}, the quoted string continues */
+quotecontinue {whitespace_with_newline}{quote}
+
+/*
+ * {quotecontinuefail} is needed to avoid lexer backup when we fail to match
+ * {quotecontinue}. It might seem that this could just be {whitespace}*,
+ * but if there's a dash after {whitespace_with_newline}, it must be consumed
+ * to see if there's another dash --- which would start a {comment} and thus
+ * allow continuation of the {quotecontinue} token.
+ */
+quotecontinuefail {whitespace}*"-"?
+
+/* Bit string
+ */
+xbstart [bB]{quote}
+xbinside [^']*
+
+/* Hexadecimal number */
+xhstart [xX]{quote}
+xhinside [^']*
+
+/* National character */
+xnstart [nN]{quote}
+
+/* Quoted string that allows backslash escapes */
+xestart [eE]{quote}
+xeinside [^\\']+
+xeescape [\\][^0-7]
+xeoctesc [\\][0-7]{1,3}
+xehexesc [\\]x[0-9A-Fa-f]{1,2}
+xeunicode [\\](u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})
+
+/* Extended quote
+ * xqdouble implements embedded quote, ''''
+ */
+xqstart {quote}
+xqdouble {quote}{quote}
+xqcquote [\\]{quote}
+xqinside [^']+
+
+/* $foo$ style quotes ("dollar quoting")
+ * The quoted string starts with $foo$ where "foo" is an optional string
+ * in the form of an identifier, except that it may not contain "$",
+ * and extends to the first occurrence of an identical string.
+ * There is *no* processing of the quoted text.
+ *
+ * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim}
+ * fails to match its trailing "$".
+ */
+dolq_start [A-Za-z\200-\377_]
+dolq_cont [A-Za-z\200-\377_0-9]
+dolqdelim \$({dolq_start}{dolq_cont}*)?\$
+dolqfailed \${dolq_start}{dolq_cont}*
+dolqinside [^$]+
+
+/* Double quote
+ * Allows embedded spaces and other special characters into identifiers.
+ */
+dquote \"
+xdstart {dquote}
+xdstop {dquote}
+xddouble {dquote}{dquote}
+xdinside [^"]+
+
+/* Quoted identifier with Unicode escapes */
+xuistart [uU]&{dquote}
+
+/* Quoted string with Unicode escapes */
+xusstart [uU]&{quote}
+
+/* special stuff for C strings */
+xdcqq \\\\
+xdcqdq \\\"
+xdcother [^"]
+xdcinside ({xdcqq}|{xdcqdq}|{xdcother})
+
+
+/* C-style comments
+ *
+ * The "extended comment" syntax closely resembles allowable operator syntax.
+ * The tricky part here is to get lex to recognize a string starting with
+ * slash-star as a comment, when interpreting it as an operator would produce
+ * a longer match --- remember lex will prefer a longer match! Also, if we
+ * have something like plus-slash-star, lex will think this is a 3-character
+ * operator whereas we want to see it as a + operator and a comment start.
+ * The solution is two-fold:
+ * 1. append {op_chars}* to xcstart so that it matches as much text as
+ * {operator} would. Then the tie-breaker (first matching rule of same
+ * length) ensures xcstart wins. We put back the extra stuff with yyless()
+ * in case it contains a star-slash that should terminate the comment.
+ * 2. In the operator rule, check for slash-star within the operator, and
+ * if found throw it back with yyless(). This handles the plus-slash-star
+ * problem.
+ * Dash-dash comments have similar interactions with the operator rule.
+ */
+xcstart \/\*{op_chars}*
+xcstop \*+\/
+xcinside [^*/]+
+
+digit [0-9]
+ident_start [A-Za-z\200-\377_]
+ident_cont [A-Za-z\200-\377_0-9\$]
+
+identifier {ident_start}{ident_cont}*
+
+array ({ident_cont}|{whitespace}|[\[\]\+\-\*\%\/\(\)\>\.])*
+
+/* Assorted special-case operators and operator-like tokens */
+typecast "::"
+dot_dot \.\.
+colon_equals ":="
+
+/*
+ * These operator-like tokens (unlike the above ones) also match the {operator}
+ * rule, which means that they might be overridden by a longer match if they
+ * are followed by a comment start or a + or - character. Accordingly, if you
+ * add to this list, you must also add corresponding code to the {operator}
+ * block to return the correct token in such cases. (This is not needed in
+ * psqlscan.l since the token value is ignored there.)
+ */
+equals_greater "=>"
+less_equals "<="
+greater_equals ">="
+less_greater "<>"
+not_equals "!="
+
+/*
+ * "self" is the set of chars that should be returned as single-character
+ * tokens. "op_chars" is the set of chars that can make up "Op" tokens,
+ * which can be one or more characters long (but if a single-char token
+ * appears in the "self" set, it is not to be returned as an Op). Note
+ * that the sets overlap, but each has some chars that are not in the other.
+ *
+ * If you change either set, adjust the character lists appearing in the
+ * rule for "operator"!
+ */
+self [,()\[\].;\:\+\-\*\/\%\^\<\>\=]
+op_chars [\~\!\@\#\^\&\|\`\?\+\-\*\/\%\<\>\=]
+operator {op_chars}+
+
+/* we no longer allow unary minus in numbers.
+ * instead we pass it separately to parser. there it gets
+ * coerced via doNegate() -- Leon aug 20 1999
+ *
+ * {decimalfail} is used because we would like "1..10" to lex as 1, dot_dot, 10.
+ *
+ * {realfail1} and {realfail2} are added to prevent the need for scanner
+ * backup when the {real} rule fails to match completely.
+ */
+
+integer {digit}+
+decimal (({digit}*\.{digit}+)|({digit}+\.{digit}*))
+decimalfail {digit}+\.\.
+real ({integer}|{decimal})[Ee][-+]?{digit}+
+realfail1 ({integer}|{decimal})[Ee]
+realfail2 ({integer}|{decimal})[Ee][-+]
+
+param \${integer}
+
+/* special characters for other dbms */
+/* we have to react differently in compat mode */
+informix_special [\$]
+
+other .
+
+/*
+ * Dollar quoted strings are totally opaque, and no escaping is done on them.
+ * Other quoted strings must allow some special characters such as single-quote
+ * and newline.
+ * Embedded single-quotes are implemented both in the SQL standard
+ * style of two adjacent single quotes "''" and in the Postgres/Java style
+ * of escaped-quote "\'".
+ * Other embedded escaped characters are matched explicitly and the leading
+ * backslash is dropped from the string.
+ * Note that xcstart must appear before operator, as explained above!
+ * Also whitespace (comment) must appear before operator.
+ */
+
+/* some stuff needed for ecpg */
+exec [eE][xX][eE][cC]
+sql [sS][qQ][lL]
+define [dD][eE][fF][iI][nN][eE]
+include [iI][nN][cC][lL][uU][dD][eE]
+include_next [iI][nN][cC][lL][uU][dD][eE]_[nN][eE][xX][tT]
+import [iI][mM][pP][oO][rR][tT]
+undef [uU][nN][dD][eE][fF]
+
+/* C version of hex number */
+xch 0[xX][0-9A-Fa-f]*
+
+ccomment "//".*\n
+
+if [iI][fF]
+ifdef [iI][fF][dD][eE][fF]
+ifndef [iI][fF][nN][dD][eE][fF]
+else [eE][lL][sS][eE]
+elif [eE][lL][iI][fF]
+endif [eE][nN][dD][iI][fF]
+
+struct [sS][tT][rR][uU][cC][tT]
+
+exec_sql {exec}{space}*{sql}{space}*
+ipdigit ({digit}|{digit}{digit}|{digit}{digit}{digit})
+ip {ipdigit}\.{ipdigit}\.{ipdigit}\.{ipdigit}
+
+/* we might want to parse all cpp include files */
+cppinclude {space}*#{include}{space}*
+cppinclude_next {space}*#{include_next}{space}*
+
+/* take care of cpp lines, they may also be continued */
+/* first a general line for all commands not starting with "i" */
+/* and then the other commands starting with "i", we have to add these
+ * separately because the cppline production would match on "include" too
+ */
+cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+\/)|.|\\{space}*{newline})*{newline}
+
+%%
+
+%{
+ /* code to execute during start of each call of yylex() */
+ token_start = NULL;
+%}
+
+<SQL>{
+{whitespace} {
+ /* ignore */
+ }
+} /* <SQL> */
+
+<C,SQL>{
+{xcstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ xcdepth = 0;
+ BEGIN(xc);
+ /* Put back any characters past slash-star; see above */
+ yyless(2);
+ fputs("/*", yyout);
+ }
+} /* <C,SQL> */
+
+<xc>{
+{xcstart} {
+ if (state_before_str_start == SQL)
+ {
+ xcdepth++;
+ /* Put back any characters past slash-star; see above */
+ yyless(2);
+ fputs("/_*", yyout);
+ }
+ else if (state_before_str_start == C)
+ {
+ ECHO;
+ }
+ }
+
+{xcstop} {
+ if (state_before_str_start == SQL)
+ {
+ if (xcdepth <= 0)
+ {
+ ECHO;
+ BEGIN(SQL);
+ token_start = NULL;
+ }
+ else
+ {
+ xcdepth--;
+ fputs("*_/", yyout);
+ }
+ }
+ else if (state_before_str_start == C)
+ {
+ ECHO;
+ BEGIN(C);
+ token_start = NULL;
+ }
+ }
+
+{xcinside} {
+ ECHO;
+ }
+
+{op_chars} {
+ ECHO;
+ }
+
+\*+ {
+ ECHO;
+ }
+
+<<EOF>> {
+ mmfatal(PARSE_ERROR, "unterminated /* comment");
+ }
+} /* <xc> */
+
+<SQL>{
+{xbstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xb);
+ startlit();
+ }
+} /* <SQL> */
+
+<xh>{xhinside} |
+<xb>{xbinside} {
+ addlit(yytext, yyleng);
+ }
+<xb><<EOF>> { mmfatal(PARSE_ERROR, "unterminated bit string literal"); }
+
+<SQL>{xhstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xh);
+ startlit();
+ }
+<xh><<EOF>> { mmfatal(PARSE_ERROR, "unterminated hexadecimal string literal"); }
+
+<C>{xqstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xqc);
+ startlit();
+ }
+
+<SQL>{
+{xnstart} {
+ /* National character.
+ * Transfer it as-is to the backend.
+ */
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xn);
+ startlit();
+ }
+
+{xqstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xq);
+ startlit();
+ }
+{xestart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xe);
+ startlit();
+ }
+{xusstart} {
+ token_start = yytext;
+ state_before_str_start = YYSTATE;
+ BEGIN(xus);
+ startlit();
+ }
+} /* <SQL> */
+
+<xb,xh,xq,xqc,xe,xn,xus>{quote} {
+ /*
+ * When we are scanning a quoted string and see an end
+ * quote, we must look ahead for a possible continuation.
+ * If we don't see one, we know the end quote was in fact
+ * the end of the string. To reduce the lexer table size,
+ * we use a single "xqs" state to do the lookahead for all
+ * types of strings.
+ */
+ state_before_str_stop = YYSTATE;
+ BEGIN(xqs);
+ }
+<xqs>{quotecontinue} {
+ /*
+ * Found a quote continuation, so return to the in-quote
+ * state and continue scanning the literal. Nothing is
+ * added to the literal's contents.
+ */
+ BEGIN(state_before_str_stop);
+ }
+<xqs>{quotecontinuefail} |
+<xqs>{other} |
+<xqs><<EOF>> {
+ /*
+ * Failed to see a quote continuation. Throw back
+ * everything after the end quote, and handle the string
+ * according to the state we were in previously.
+ */
+ yyless(0);
+ BEGIN(state_before_str_start);
+
+ switch (state_before_str_stop)
+ {
+ case xb:
+ if (literalbuf[strspn(literalbuf, "01")] != '\0')
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string literal");
+ base_yylval.str = psprintf("b'%s'", literalbuf);
+ return BCONST;
+ case xh:
+ if (literalbuf[strspn(literalbuf, "0123456789abcdefABCDEF")] != '\0')
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid hex string literal");
+ base_yylval.str = psprintf("x'%s'", literalbuf);
+ return XCONST;
+ case xq:
+ /* fallthrough */
+ case xqc:
+ base_yylval.str = psprintf("'%s'", literalbuf);
+ return SCONST;
+ case xe:
+ base_yylval.str = psprintf("E'%s'", literalbuf);
+ return SCONST;
+ case xn:
+ base_yylval.str = psprintf("N'%s'", literalbuf);
+ return SCONST;
+ case xus:
+ base_yylval.str = psprintf("U&'%s'", literalbuf);
+ return USCONST;
+ default:
+ mmfatal(PARSE_ERROR, "unhandled previous state in xqs\n");
+ }
+ }
+
+<xq,xe,xn,xus>{xqdouble} { addlit(yytext, yyleng); }
+<xqc>{xqcquote} { addlit(yytext, yyleng); }
+<xq,xqc,xn,xus>{xqinside} { addlit(yytext, yyleng); }
+<xe>{xeinside} {
+ addlit(yytext, yyleng);
+ }
+<xe>{xeunicode} {
+ addlit(yytext, yyleng);
+ }
+<xe>{xeescape} {
+ addlit(yytext, yyleng);
+ }
+<xe>{xeoctesc} {
+ addlit(yytext, yyleng);
+ }
+<xe>{xehexesc} {
+ addlit(yytext, yyleng);
+ }
+<xe>. {
+ /* This is only needed for \ just before EOF */
+ addlitchar(yytext[0]);
+ }
+<xq,xqc,xe,xn,xus><<EOF>> { mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+
+<SQL>{
+{dolqdelim} {
+ token_start = yytext;
+ if (dolqstart)
+ free(dolqstart);
+ dolqstart = mm_strdup(yytext);
+ BEGIN(xdolq);
+ startlit();
+ addlit(yytext, yyleng);
+ }
+{dolqfailed} {
+ /* throw back all but the initial "$" */
+ yyless(1);
+ /* and treat it as {other} */
+ return yytext[0];
+ }
+} /* <SQL> */
+
+<xdolq>{dolqdelim} {
+ if (strcmp(yytext, dolqstart) == 0)
+ {
+ addlit(yytext, yyleng);
+ free(dolqstart);
+ dolqstart = NULL;
+ BEGIN(SQL);
+ base_yylval.str = mm_strdup(literalbuf);
+ return SCONST;
+ }
+ else
+ {
+ /*
+ * When we fail to match $...$ to dolqstart, transfer
+ * the $... part to the output, but put back the final
+ * $ for rescanning. Consider $delim$...$junk$delim$
+ */
+ addlit(yytext, yyleng - 1);
+ yyless(yyleng - 1);
+ }
+ }
+<xdolq>{dolqinside} {
+ addlit(yytext, yyleng);
+ }
+<xdolq>{dolqfailed} {
+ addlit(yytext, yyleng);
+ }
+<xdolq>. {
+ /* single quote or dollar sign */
+ addlitchar(yytext[0]);
+ }
+<xdolq><<EOF>> { mmfatal(PARSE_ERROR, "unterminated dollar-quoted string"); }
+
+<SQL>{
+{xdstart} {
+ state_before_str_start = YYSTATE;
+ BEGIN(xd);
+ startlit();
+ }
+{xuistart} {
+ state_before_str_start = YYSTATE;
+ BEGIN(xui);
+ startlit();
+ }
+} /* <SQL> */
+
+<xd>{xdstop} {
+ BEGIN(state_before_str_start);
+ if (literallen == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
+ /*
+ * The server will truncate the identifier here. We do
+ * not, as (1) it does not change the result; (2) we don't
+ * know what NAMEDATALEN the server might use; (3) this
+ * code path is also taken for literal query strings in
+ * PREPARE and EXECUTE IMMEDIATE, which can certainly be
+ * longer than NAMEDATALEN.
+ */
+ base_yylval.str = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+<xdc>{xdstop} {
+ BEGIN(state_before_str_start);
+ base_yylval.str = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+<xui>{dquote} {
+ BEGIN(state_before_str_start);
+ if (literallen == 2) /* "U&" */
+ mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
+ /* The backend will truncate the identifier here. We do not as it does not change the result. */
+ base_yylval.str = psprintf("U&\"%s\"", literalbuf);
+ return UIDENT;
+ }
+<xd,xui>{xddouble} {
+ addlit(yytext, yyleng);
+ }
+<xd,xui>{xdinside} {
+ addlit(yytext, yyleng);
+ }
+<xd,xui><<EOF>> { mmfatal(PARSE_ERROR, "unterminated quoted identifier"); }
+<C>{xdstart} {
+ state_before_str_start = YYSTATE;
+ BEGIN(xdc);
+ startlit();
+ }
+<xdc>{xdcinside} {
+ addlit(yytext, yyleng);
+ }
+<xdc><<EOF>> { mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+
+<SQL>{
+{typecast} {
+ return TYPECAST;
+ }
+
+{dot_dot} {
+ return DOT_DOT;
+ }
+
+{colon_equals} {
+ return COLON_EQUALS;
+ }
+
+{equals_greater} {
+ return EQUALS_GREATER;
+ }
+
+{less_equals} {
+ return LESS_EQUALS;
+ }
+
+{greater_equals} {
+ return GREATER_EQUALS;
+ }
+
+{less_greater} {
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+
+{not_equals} {
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+
+{informix_special} {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ unput(':');
+ }
+ else
+ return yytext[0];
+ }
+
+{self} {
+ /*
+ * We may find a ';' inside a structure
+ * definition in a TYPE or VAR statement.
+ * This is not an EOL marker.
+ */
+ if (yytext[0] == ';' && struct_level == 0)
+ BEGIN(C);
+ return yytext[0];
+ }
+
+{operator} {
+ /*
+ * Check for embedded slash-star or dash-dash; those
+ * are comment starts, so operator must stop there.
+ * Note that slash-star or dash-dash at the first
+ * character will match a prior rule, not this one.
+ */
+ int nchars = yyleng;
+ char *slashstar = strstr(yytext, "/*");
+ char *dashdash = strstr(yytext, "--");
+
+ if (slashstar && dashdash)
+ {
+ /* if both appear, take the first one */
+ if (slashstar > dashdash)
+ slashstar = dashdash;
+ }
+ else if (!slashstar)
+ slashstar = dashdash;
+ if (slashstar)
+ nchars = slashstar - yytext;
+
+ /*
+ * For SQL compatibility, '+' and '-' cannot be the
+ * last char of a multi-char operator unless the operator
+ * contains chars that are not in SQL operators.
+ * The idea is to lex '=-' as two operators, but not
+ * to forbid operator names like '?-' that could not be
+ * sequences of SQL operators.
+ */
+ if (nchars > 1 &&
+ (yytext[nchars - 1] == '+' ||
+ yytext[nchars - 1] == '-'))
+ {
+ int ic;
+
+ for (ic = nchars - 2; ic >= 0; ic--)
+ {
+ char c = yytext[ic];
+ if (c == '~' || c == '!' || c == '@' ||
+ c == '#' || c == '^' || c == '&' ||
+ c == '|' || c == '`' || c == '?' ||
+ c == '%')
+ break;
+ }
+ if (ic < 0)
+ {
+ /*
+ * didn't find a qualifying character, so remove
+ * all trailing [+-]
+ */
+ do {
+ nchars--;
+ } while (nchars > 1 &&
+ (yytext[nchars - 1] == '+' ||
+ yytext[nchars - 1] == '-'));
+ }
+ }
+
+ if (nchars < yyleng)
+ {
+ /* Strip the unwanted chars from the token */
+ yyless(nchars);
+ /*
+ * If what we have left is only one char, and it's
+ * one of the characters matching "self", then
+ * return it as a character token the same way
+ * that the "self" rule would have.
+ */
+ if (nchars == 1 &&
+ strchr(",()[].;:+-*/%^<>=", yytext[0]))
+ return yytext[0];
+ /*
+ * Likewise, if what we have left is two chars, and
+ * those match the tokens ">=", "<=", "=>", "<>" or
+ * "!=", then we must return the appropriate token
+ * rather than the generic Op.
+ */
+ if (nchars == 2)
+ {
+ if (yytext[0] == '=' && yytext[1] == '>')
+ return EQUALS_GREATER;
+ if (yytext[0] == '>' && yytext[1] == '=')
+ return GREATER_EQUALS;
+ if (yytext[0] == '<' && yytext[1] == '=')
+ return LESS_EQUALS;
+ if (yytext[0] == '<' && yytext[1] == '>')
+ return NOT_EQUALS;
+ if (yytext[0] == '!' && yytext[1] == '=')
+ return NOT_EQUALS;
+ }
+ }
+
+ base_yylval.str = mm_strdup(yytext);
+ return Op;
+ }
+
+{param} {
+ base_yylval.ival = atol(yytext+1);
+ return PARAM;
+ }
+
+{ip} {
+ base_yylval.str = mm_strdup(yytext);
+ return IP;
+ }
+} /* <SQL> */
+
+<C,SQL>{
+{integer} {
+ return process_integer_literal(yytext, &base_yylval);
+ }
+{decimal} {
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+{decimalfail} {
+ /* throw back the .., and treat as integer */
+ yyless(yyleng - 2);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+{real} {
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+{realfail1} {
+ /*
+ * throw back the [Ee], and figure out whether what
+ * remains is an {integer} or {decimal}.
+ */
+ yyless(yyleng - 1);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+{realfail2} {
+ /* throw back the [Ee][+-], and proceed as above */
+ yyless(yyleng - 2);
+ return process_integer_literal(yytext, &base_yylval);
+ }
+} /* <C,SQL> */
+
+<SQL>{
+:{identifier}((("->"|\.){identifier})|(\[{array}\]))* {
+ base_yylval.str = mm_strdup(yytext+1);
+ return CVARIABLE;
+ }
+
+{identifier} {
+ if (!isdefine())
+ {
+ int kwvalue;
+
+ /* Is it an SQL/ECPG keyword? */
+ kwvalue = ScanECPGKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+
+ /* Is it a C keyword? */
+ kwvalue = ScanCKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+
+ /*
+ * None of the above. Return it as an identifier.
+ *
+ * The backend will attempt to truncate and case-fold
+ * the identifier, but I see no good reason for ecpg
+ * to do so; that's just another way that ecpg could get
+ * out of step with the backend.
+ */
+ base_yylval.str = mm_strdup(yytext);
+ return IDENT;
+ }
+ }
+
+{other} {
+ return yytext[0];
+ }
+} /* <SQL> */
+
+ /*
+ * Begin ECPG-specific rules
+ */
+
+<C>{exec_sql} { BEGIN(SQL); return SQL_START; }
+<C>{informix_special} {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(SQL);
+ return SQL_START;
+ }
+ else
+ return S_ANYTHING;
+ }
+<C>{ccomment} { ECHO; }
+<C>{xch} {
+ char* endptr;
+
+ errno = 0;
+ base_yylval.ival = strtoul((char *)yytext,&endptr,16);
+ if (*endptr != '\0' || errno == ERANGE)
+ {
+ errno = 0;
+ base_yylval.str = mm_strdup(yytext);
+ return SCONST;
+ }
+ return ICONST;
+ }
+<C>{cppinclude} {
+ if (system_includes)
+ {
+ include_next = false;
+ BEGIN(incl);
+ }
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ }
+<C>{cppinclude_next} {
+ if (system_includes)
+ {
+ include_next = true;
+ BEGIN(incl);
+ }
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ }
+<C,SQL>{cppline} {
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+<C>{identifier} {
+ /*
+ * Try to detect a function name:
+ * look for identifiers at the global scope
+ * keep the last identifier before the first '(' and '{'
+ */
+ if (braces_open == 0 && parenths_open == 0)
+ {
+ if (current_function)
+ free(current_function);
+ current_function = mm_strdup(yytext);
+ }
+ /* Informix uses SQL defines only in SQL space */
+ /* however, some defines have to be taken care of for compatibility */
+ if ((!INFORMIX_MODE || !isinformixdefine()) && !isdefine())
+ {
+ int kwvalue;
+
+ kwvalue = ScanCKeywordLookup(yytext);
+ if (kwvalue >= 0)
+ return kwvalue;
+ else
+ {
+ base_yylval.str = mm_strdup(yytext);
+ return IDENT;
+ }
+ }
+ }
+<C>{xcstop} { mmerror(PARSE_ERROR, ET_ERROR, "nested /* ... */ comments"); }
+<C>":" { return ':'; }
+<C>";" { return ';'; }
+<C>"," { return ','; }
+<C>"*" { return '*'; }
+<C>"%" { return '%'; }
+<C>"/" { return '/'; }
+<C>"+" { return '+'; }
+<C>"-" { return '-'; }
+<C>"(" { parenths_open++; return '('; }
+<C>")" { parenths_open--; return ')'; }
+<C,xskip>{space} { ECHO; }
+<C>\{ { return '{'; }
+<C>\} { return '}'; }
+<C>\[ { return '['; }
+<C>\] { return ']'; }
+<C>\= { return '='; }
+<C>"->" { return S_MEMBER; }
+<C>">>" { return S_RSHIFT; }
+<C>"<<" { return S_LSHIFT; }
+<C>"||" { return S_OR; }
+<C>"&&" { return S_AND; }
+<C>"++" { return S_INC; }
+<C>"--" { return S_DEC; }
+<C>"==" { return S_EQUAL; }
+<C>"!=" { return S_NEQUAL; }
+<C>"+=" { return S_ADD; }
+<C>"-=" { return S_SUB; }
+<C>"*=" { return S_MUL; }
+<C>"/=" { return S_DIV; }
+<C>"%=" { return S_MOD; }
+<C>"->*" { return S_MEMPOINT; }
+<C>".*" { return S_DOTPOINT; }
+<C>{other} { return S_ANYTHING; }
+<C>{exec_sql}{define}{space}* { BEGIN(def_ident); }
+<C>{informix_special}{define}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(def_ident);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<C>{exec_sql}{undef}{space}* { BEGIN(undef); }
+<C>{informix_special}{undef}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(undef);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<undef>{identifier}{space}*";" {
+ struct _defines *ptr, *ptr2 = NULL;
+ int i;
+
+ /*
+ * Skip the ";" and trailing whitespace. Note that yytext
+ * contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i-- )
+ ;
+ yytext[i+1] = '\0';
+
+
+ for (ptr = defines; ptr != NULL; ptr2 = ptr, ptr = ptr->next)
+ {
+ if (strcmp(yytext, ptr->olddef) == 0)
+ {
+ if (ptr2 == NULL)
+ defines = ptr->next;
+ else
+ ptr2->next = ptr->next;
+ free(ptr->newdef);
+ free(ptr->olddef);
+ free(ptr);
+ break;
+ }
+ }
+
+ BEGIN(C);
+ }
+<undef>{other}|\n {
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL UNDEF command");
+ yyterminate();
+ }
+<C>{exec_sql}{include}{space}* { BEGIN(incl); }
+<C>{informix_special}{include}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ BEGIN(incl);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<C,xskip>{exec_sql}{ifdef}{space}* {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = true;
+ BEGIN(xcond);
+ }
+<C,xskip>{informix_special}{ifdef}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<C,xskip>{exec_sql}{ifndef}{space}* {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = false;
+ BEGIN(xcond);
+ }
+<C,xskip>{informix_special}{ifndef}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos >= MAX_NESTED_IF-1)
+ mmfatal(PARSE_ERROR, "too many nested EXEC SQL IFDEF conditions");
+ preproc_tos++;
+ stacked_if_value[preproc_tos].active = false;
+ stacked_if_value[preproc_tos].saw_active = false;
+ stacked_if_value[preproc_tos].else_branch = false;
+ ifcond = false;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<C,xskip>{exec_sql}{elif}{space}* {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ ifcond = true;
+ BEGIN(xcond);
+ }
+<C,xskip>{informix_special}{elif}{space}* {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ ifcond = true;
+ BEGIN(xcond);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+
+<C,xskip>{exec_sql}{else}{space}*";" { /* only exec sql endif pops the stack, so take care of duplicated 'else' */
+ if ( preproc_tos == 0 )
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ else if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE");
+ else
+ {
+ stacked_if_value[preproc_tos].else_branch = true;
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active);
+ stacked_if_value[preproc_tos].saw_active = true;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ }
+<C,xskip>{informix_special}{else}{space}*";" {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if ( preproc_tos == 0 )
+ mmfatal(PARSE_ERROR, "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"");
+ else if (stacked_if_value[preproc_tos].else_branch)
+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE");
+ else
+ {
+ stacked_if_value[preproc_tos].else_branch = true;
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active);
+ stacked_if_value[preproc_tos].saw_active = true;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+<C,xskip>{exec_sql}{endif}{space}*";" {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "unmatched EXEC SQL ENDIF");
+ else
+ preproc_tos--;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+<C,xskip>{informix_special}{endif}{space}*";" {
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ if (preproc_tos == 0)
+ mmfatal(PARSE_ERROR, "unmatched EXEC SQL ENDIF");
+ else
+ preproc_tos--;
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+ else
+ {
+ yyless(1);
+ return S_ANYTHING;
+ }
+ }
+
+<xskip>{other} { /* ignore */ }
+
+<xcond>{identifier}{space}*";" {
+ {
+ struct _defines *defptr;
+ unsigned int i;
+ bool this_active;
+
+ /*
+ * Skip the ";" and trailing whitespace. Note that yytext
+ * contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i-- )
+ ;
+ yytext[i+1] = '\0';
+
+ for (defptr = defines;
+ defptr != NULL &&
+ strcmp(yytext, defptr->olddef) != 0;
+ defptr = defptr->next)
+ /* skip */ ;
+
+ this_active = (defptr ? ifcond : !ifcond);
+ stacked_if_value[preproc_tos].active =
+ (stacked_if_value[preproc_tos-1].active &&
+ !stacked_if_value[preproc_tos].saw_active &&
+ this_active);
+ stacked_if_value[preproc_tos].saw_active |= this_active;
+ }
+
+ if (stacked_if_value[preproc_tos].active)
+ BEGIN(C);
+ else
+ BEGIN(xskip);
+ }
+
+<xcond>{other}|\n {
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL IFDEF command");
+ yyterminate();
+ }
+<def_ident>{identifier} {
+ old = mm_strdup(yytext);
+ BEGIN(def);
+ startlit();
+ }
+<def_ident>{other}|\n {
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL DEFINE command");
+ yyterminate();
+ }
+<def>{space}*";" {
+ struct _defines *ptr, *this;
+
+ for (ptr = defines; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(old, ptr->olddef) == 0)
+ {
+ free(ptr->newdef);
+ ptr->newdef = mm_strdup(literalbuf);
+ }
+ }
+ if (ptr == NULL)
+ {
+ this = (struct _defines *) mm_alloc(sizeof(struct _defines));
+
+ /* initial definition */
+ this->olddef = old;
+ this->newdef = mm_strdup(literalbuf);
+ this->next = defines;
+ this->used = NULL;
+ defines = this;
+ }
+
+ BEGIN(C);
+ }
+<def>[^;] { addlit(yytext, yyleng); }
+<incl>\<[^\>]+\>{space}*";"? { parse_include(); }
+<incl>{dquote}{xdinside}{dquote}{space}*";"? { parse_include(); }
+<incl>[^;\<\>\"]+";" { parse_include(); }
+<incl>{other}|\n {
+ mmfatal(PARSE_ERROR, "syntax error in EXEC SQL INCLUDE command");
+ yyterminate();
+ }
+
+<<EOF>> {
+ if (yy_buffer == NULL)
+ {
+ if ( preproc_tos > 0 )
+ {
+ preproc_tos = 0;
+ mmfatal(PARSE_ERROR, "missing \"EXEC SQL ENDIF;\"");
+ }
+ yyterminate();
+ }
+ else
+ {
+ struct _yy_buffer *yb = yy_buffer;
+ int i;
+ struct _defines *ptr;
+
+ for (ptr = defines; ptr; ptr = ptr->next)
+ if (ptr->used == yy_buffer)
+ {
+ ptr->used = NULL;
+ break;
+ }
+
+ if (yyin != NULL)
+ fclose(yyin);
+
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_switch_to_buffer(yy_buffer->buffer);
+
+ yylineno = yy_buffer->lineno;
+
+ /* We have to output the filename only if we change files here */
+ i = strcmp(input_filename, yy_buffer->filename);
+
+ free(input_filename);
+ input_filename = yy_buffer->filename;
+
+ yy_buffer = yy_buffer->next;
+ free(yb);
+
+ if (i != 0)
+ output_line_number();
+
+ }
+ }
+
+<INITIAL>{other}|\n { mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <%s>", PACKAGE_BUGREPORT); }
+
+%%
+
+/* LCOV_EXCL_STOP */
+
+void
+lex_init(void)
+{
+ braces_open = 0;
+ parenths_open = 0;
+ current_function = NULL;
+
+ yylineno = 1;
+
+ /* initialize state for if/else/endif */
+ preproc_tos = 0;
+ stacked_if_value[preproc_tos].active = true;
+ stacked_if_value[preproc_tos].saw_active = true;
+ stacked_if_value[preproc_tos].else_branch = false;
+
+ /* initialize literal buffer to a reasonable but expansible size */
+ if (literalbuf == NULL)
+ {
+ literalalloc = 1024;
+ literalbuf = (char *) mm_alloc(literalalloc);
+ }
+ startlit();
+
+ BEGIN(C);
+}
+
+static void
+addlit(char *ytext, int yleng)
+{
+ /* enlarge buffer if needed */
+ if ((literallen+yleng) >= literalalloc)
+ {
+ do
+ literalalloc *= 2;
+ while ((literallen+yleng) >= literalalloc);
+ literalbuf = (char *) realloc(literalbuf, literalalloc);
+ }
+ /* append new data, add trailing null */
+ memcpy(literalbuf+literallen, ytext, yleng);
+ literallen += yleng;
+ literalbuf[literallen] = '\0';
+}
+
+static void
+addlitchar(unsigned char ychar)
+{
+ /* enlarge buffer if needed */
+ if ((literallen+1) >= literalalloc)
+ {
+ literalalloc *= 2;
+ literalbuf = (char *) realloc(literalbuf, literalalloc);
+ }
+ /* append new data, add trailing null */
+ literalbuf[literallen] = ychar;
+ literallen += 1;
+ literalbuf[literallen] = '\0';
+}
+
+/*
+ * Process {integer}. Note this will also do the right thing with {decimal},
+ * ie digits and a decimal point.
+ */
+static int
+process_integer_literal(const char *token, YYSTYPE *lval)
+{
+ int val;
+ char *endptr;
+
+ errno = 0;
+ val = strtoint(token, &endptr, 10);
+ if (*endptr != '\0' || errno == ERANGE)
+ {
+ /* integer too large (or contains decimal pt), treat it as a float */
+ lval->str = mm_strdup(token);
+ return FCONST;
+ }
+ lval->ival = val;
+ return ICONST;
+}
+
+static void
+parse_include(void)
+{
+ /* got the include file name */
+ struct _yy_buffer *yb;
+ struct _include_path *ip;
+ char inc_file[MAXPGPATH];
+ unsigned int i;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = input_filename;
+ yb->next = yy_buffer;
+
+ yy_buffer = yb;
+
+ /*
+ * skip the ";" if there is one and trailing whitespace. Note that
+ * yytext contains at least one non-space character plus the ";"
+ */
+ for (i = strlen(yytext)-2;
+ i > 0 && ecpg_isspace(yytext[i]);
+ i--)
+ ;
+
+ if (yytext[i] == ';')
+ i--;
+
+ yytext[i+1] = '\0';
+
+ yyin = NULL;
+
+ /* If file name is enclosed in '"' remove these and look only in '.' */
+ /* Informix does look into all include paths though, except filename starts with '/' */
+ if (yytext[0] == '"' && yytext[i] == '"' &&
+ ((compat != ECPG_COMPAT_INFORMIX && compat != ECPG_COMPAT_INFORMIX_SE) || yytext[1] == '/'))
+ {
+ yytext[i] = '\0';
+ memmove(yytext, yytext+1, strlen(yytext));
+
+ strlcpy(inc_file, yytext, sizeof(inc_file));
+ yyin = fopen(inc_file, "r");
+ if (!yyin)
+ {
+ if (strlen(inc_file) <= 2 || strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
+ {
+ strcat(inc_file, ".h");
+ yyin = fopen(inc_file, "r");
+ }
+ }
+
+ }
+ else
+ {
+ if ((yytext[0] == '"' && yytext[i] == '"') || (yytext[0] == '<' && yytext[i] == '>'))
+ {
+ yytext[i] = '\0';
+ memmove(yytext, yytext+1, strlen(yytext));
+ }
+
+ for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
+ {
+ if (strlen(ip->path) + strlen(yytext) + 4 > MAXPGPATH)
+ {
+ fprintf(stderr, _("Error: include path \"%s/%s\" is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
+ continue;
+ }
+ snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext);
+ yyin = fopen(inc_file, "r");
+ if (!yyin)
+ {
+ if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
+ {
+ strcat(inc_file, ".h");
+ yyin = fopen( inc_file, "r" );
+ }
+ }
+ /* if the command was "include_next" we have to disregard the first hit */
+ if (yyin && include_next)
+ {
+ fclose (yyin);
+ yyin = NULL;
+ include_next = false;
+ }
+ }
+ }
+ if (!yyin)
+ mmfatal(NO_INCLUDE_FILE, "could not open include file \"%s\" on line %d", yytext, yylineno);
+
+ input_filename = mm_strdup(inc_file);
+ yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ));
+ yylineno = 1;
+ output_line_number();
+
+ BEGIN(C);
+}
+
+/*
+ * ecpg_isspace() --- return true if flex scanner considers char whitespace
+ */
+static bool
+ecpg_isspace(char ch)
+{
+ if (ch == ' ' ||
+ ch == '\t' ||
+ ch == '\n' ||
+ ch == '\r' ||
+ ch == '\f')
+ return true;
+ return false;
+}
+
+static bool isdefine(void)
+{
+ struct _defines *ptr;
+
+ /* is it a define? */
+ for (ptr = defines; ptr; ptr = ptr->next)
+ {
+ if (strcmp(yytext, ptr->olddef) == 0 && ptr->used == NULL)
+ {
+ struct _yy_buffer *yb;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = mm_strdup(input_filename);
+ yb->next = yy_buffer;
+
+ ptr->used = yy_buffer = yb;
+
+ yy_scan_string(ptr->newdef);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+static bool isinformixdefine(void)
+{
+ const char *new = NULL;
+
+ if (strcmp(yytext, "dec_t") == 0)
+ new = "decimal";
+ else if (strcmp(yytext, "intrvl_t") == 0)
+ new = "interval";
+ else if (strcmp(yytext, "dtime_t") == 0)
+ new = "timestamp";
+
+ if (new)
+ {
+ struct _yy_buffer *yb;
+
+ yb = mm_alloc(sizeof(struct _yy_buffer));
+
+ yb->buffer = YY_CURRENT_BUFFER;
+ yb->lineno = yylineno;
+ yb->filename = mm_strdup(input_filename);
+ yb->next = yy_buffer;
+ yy_buffer = yb;
+
+ yy_scan_string(new);
+ return true;
+ }
+
+ return false;
+}
diff --git a/src/interfaces/ecpg/preproc/po/cs.po b/src/interfaces/ecpg/preproc/po/cs.po
new file mode 100644
index 0000000..0112bad
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/cs.po
@@ -0,0 +1,695 @@
+# Czech message translation file for ecpg
+# Copyright (C) 2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Tomáš Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-31 16:09+0000\n"
+"PO-Revision-Date: 2021-09-16 09:06+0200\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "proměnná \"%s\" musí mít číselný typ"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "descriptor \"%s\" neexistuje"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "descriptor header item \"%d\" neexistuje"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable je vždy 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member je vždy 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "descriptor item \"%s\" není implementován"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "descriptor item \"%s\" nelze nastavit"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s je PostgreSQL preprocesor vloženého SQL pro C programy.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Použití:\n"
+" %s [VOLBA]... SOUBOR...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Volby:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c automaticky generuje C kód z vložných SQL příkazů;\n"
+" toto ovlivňuje EXEC SQL TYPE\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MÓD nastaví mód kompatibility; MÓD může být jedno z \n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d zapne generování ladicích informací parseru\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL definuje SYMBOL\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h naparsuje hlavičkový soubor, tato volba zahrnuje volbu \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i naparsuje také systémové hlavičkové soubory\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I ADRESÁŘ vyhledá include soubory v ADRESÁŘi\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o SOUBOR zapíše výsledek do SOUBORu\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r VOLBA určuje run-time chování; VOLBA může být:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression běh v módu regresních testů\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t zapne autocommit transakcí\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version vypíše informaci o verzi, poté skončí\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help zobrazí tuto nápovědu; poté skončí\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Pokud není zadán žádný výstupní soubor, je jméno získáno přidáním .c\n"
+"na konec jména vstupního souboru, po odstranění koncovky .pgc pokud\n"
+"je přítomna.\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Chyby hlašte na <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s domácí stránka: <%s>\n"
+
+#: ecpg.c:140
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: nelze nalézt cestu k vlastnímu spustitelnému souboru\n"
+
+#: ecpg.c:175 ecpg.c:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nelze otevřít soubor \"%s\": %s\n"
+
+#: ecpg.c:218 ecpg.c:231 ecpg.c:247 ecpg.c:273
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Zkuste \"%s --help\" pro více informací.\n"
+
+#: ecpg.c:242
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: podpora pro ladicí informace parseru (-d) není dostupná\n"
+
+#: ecpg.c:261
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL embedded C preprocessor, verze %s\n"
+
+#: ecpg.c:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... hledání začíná zde:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "konec vyhledávacího seznamu\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: nebyl zadán žádný vstupní soubor\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "kurzor \"%s\" byl deklarován ale nebyl otevřen"
+
+#: ecpg.c:479 preproc.y:128
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "nelze odstranit výstupní soubor \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "neukončený /* komentář"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "neukončený literál - bitový řetězec"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "neukončený literál - hexadecimální řetězec"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "neplatný bit string literál"
+
+#: pgc.l:623
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "neošetřený předchozí stav v xqs\n"
+
+#: pgc.l:652 pgc.l:754
+#, c-format
+msgid "unterminated quoted string"
+msgstr "neukončený řetězec v uvozovkách"
+
+#: pgc.l:703
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "neukončený dollar-quoted řetězec"
+
+#: pgc.l:721 pgc.l:734
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "ohraničený (delimited) identifikátor s nulovou délkou"
+
+#: pgc.l:745
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "neukončený identifikátor v uvozovkách"
+
+#: pgc.l:1076
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "vnořené /* ... */ komentáře"
+
+#: pgc.l:1169
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "chybějící identifikátor v příkazu EXEC SQL UNDEF"
+
+#: pgc.l:1187 pgc.l:1200 pgc.l:1216 pgc.l:1229
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "příliš mnoho zanořených EXEC SQL IFDEF podmínek"
+
+#: pgc.l:1245 pgc.l:1256 pgc.l:1271 pgc.l:1293
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "chybějící odpovídající \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1439
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "chybějící \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "více než jedna větev EXEC SQL ELSE"
+
+#: pgc.l:1318 pgc.l:1332
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "neodpovídající EXEC SQL ENDIF"
+
+#: pgc.l:1387
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "chybějící identifikátor v příkazu EXEC SQL IFDEF"
+
+#: pgc.l:1396
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "chybějící identifikátor v příkazu EXEC SQL DEFINE"
+
+#: pgc.l:1429
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "syntaktická chyba v příkazu EXEC SQL INCLUDE"
+
+#: pgc.l:1479
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "interní chyba: nedosažitelný stav; oznamte toto prosím na <%s>"
+
+#: pgc.l:1631
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Chyba: include path \"%s/%s\" na řádku %d je příliš dlouhá, přeskakuji\n"
+
+#: pgc.l:1654
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "nelze otevřít soubor \"%s\" na řádku %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "syntaktická chyba"
+
+#: preproc.y:82
+#, c-format
+msgid "WARNING: "
+msgstr "VAROVÁNÍ: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "CHYBA: "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "kurzor \"%s\" neexistuje"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicializátor (initializer) není v definici typu povolen"
+
+#: preproc.y:543
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "název typu \"string\" je vyhrazen pro mód Informix"
+
+#: preproc.y:550 preproc.y:15960
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "typ \"%s\" je již definován"
+
+#: preproc.y:575 preproc.y:16603 preproc.y:16928 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "vícerozměrná pole pro jednoduché datové typy nejsou podporována"
+
+#: preproc.y:1704
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT volba není v příkazu CLOSE DATABASE povolena"
+
+#: preproc.y:1952
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT volba není v příkazu CONNECT povolena"
+
+#: preproc.y:1986
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT volba není v příkazu DISCONNECT povolena"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT volba není v příkazu SET CONNECTION povolena"
+
+#: preproc.y:2063
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT volba není v příkazu TYPE povolena"
+
+#: preproc.y:2072
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT volba není v příkazu VAR povolena"
+
+#: preproc.y:2079
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT volba není v příkazu WHENEVER povolena"
+
+#: preproc.y:2156 preproc.y:2328 preproc.y:2333 preproc.y:2456 preproc.y:4034
+#: preproc.y:4682 preproc.y:5624 preproc.y:5924 preproc.y:7542 preproc.y:9081
+#: preproc.y:9086 preproc.y:11921
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "nepodporovaná vlastnost bude předána serveru"
+
+#: preproc.y:2714
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "příkaz SHOW ALL není implementován"
+
+#: preproc.y:3382
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "příkaz COPY FROM STDIN není implementován"
+
+#: preproc.y:10060 preproc.y:15545
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "použití proměnné \"%s\" v dalších deklaracích není podporováno"
+
+#: preproc.y:10062 preproc.y:15547
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "kurzor \"%s\" je již definován"
+
+#: preproc.y:10502
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "již neopdporovaná syntaxe LIMIT #,# předána serveru"
+
+#: preproc.y:10835 preproc.y:10842
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "poddotaz ve FROM musí mít alias"
+
+#: preproc.y:15268 preproc.y:15275
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS nemůže specifikovat INTO"
+
+#: preproc.y:15311
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "očekáváno \"@\", nalezeno \"%s\""
+
+#: preproc.y:15323
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "podporovány jsou pouze protokoly \"tcp\" a \"unix\" a typ databáze \"postgresql\""
+
+#: preproc.y:15326
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "očekáváno \"://\", nalezeno \"%s\""
+
+#: preproc.y:15331
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unixové sockety fungují pouze na \"localhost\" ale ne na \"%s\""
+
+#: preproc.y:15357
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "očekáváno \"postgresql\", nalezeno \"%s\""
+
+#: preproc.y:15360
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "chybný typ spojení: %s"
+
+#: preproc.y:15369
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "očekáváno \"@\" nebo \"://\", nalezeno \"%s\""
+
+#: preproc.y:15444 preproc.y:15462
+#, c-format
+msgid "invalid data type"
+msgstr "chybný datový typ"
+
+#: preproc.y:15473 preproc.y:15490
+#, c-format
+msgid "incomplete statement"
+msgstr "neúplný příkaz"
+
+#: preproc.y:15476 preproc.y:15493
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "nerozpoznaný token \"%s\""
+
+#: preproc.y:15763
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "pouze datové typy numeric a decimal mají argumenty přesnost/velikost"
+
+#: preproc.y:15775
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "specifikace intervalu zde není povolena"
+
+#: preproc.y:15935 preproc.y:15987
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "příliš mnoho úrovní v definici vnořené struktury/union"
+
+#: preproc.y:16110
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "ukazatele na varchar nejsou implementovány"
+
+#: preproc.y:16297 preproc.y:16322
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "použití nepodporovaného příkazu DESCRIBE"
+
+#: preproc.y:16569
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicializátor není v příkazu EXEC SQL VAR podporován"
+
+#: preproc.y:16886
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "pole identifikátorů nejsou na vstupu povolena"
+
+#: preproc.y:17073
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operátor není povolen v definici proměnné"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17114
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s na nebo blízko \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "paměť vyčerpána"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "nerozpoznaný kód typu proměnné %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "proměnná \"%s\" je překryta lokální proměnnou s jiným datovým typem"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "proměnná \"%s\" je překryta lokální proměnnou"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "indicator variable \"%s\" je překryta lokální proměnnou s jiným datovým typem"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "indicator variable \"%s\" je překryta lokální proměnnou"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "indicator variable pro pole/ukaztel musí být pole/ukazatel"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "vnořená pole nejsou podporována (kromě řetězců)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "indikátor pro strukturu musí být struktura"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "indikátor pro jednoduché datové typy musí být jednoduchý"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "indikátor pro strukturu \"%s\" má příliš málo položek"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "indikátor pro strukturu \"%s\" má příliš mnoho položek"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "nerozpoznaný kód deskriptoru položky %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "nesprávně vytvořený název proměnné \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "proměnná \"%s\" není ukazatel"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "proměnná \"%s\" není ukazatel na strukturu nebo sjednocení"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "proměnná \"%s\" není ani struktura ani sjednocení"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "proměnná \"%s\" není pole"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "proměnná \"%s\" není deklarována"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "indicator variable musí mít celočíselný typ"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "nerozpoznaný název datového typu \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "vícerozměrná pole nejsou podporována"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "víceúrovňové ukazatele (více než 2 úrovně) nejsou podporovány; nalezena %d úroveň"
+msgstr[1] "víceúrovňové ukazatele (více než 2 úrovně) nejsou podporovány; nalezeny %d úrovně"
+msgstr[2] "víceúrovňové ukazatele (více než 2 úrovně) nejsou podporovány; nalezeny %d úrovně"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "ukazatel na ukazatel není pro tento datový typ podporován"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "vícerozměrná pole pro struktury nejsou podporována"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "příkaz COPY TO STDIN nelze použít"
+
+#~ msgid "COPY FROM STDOUT is not possible"
+#~ msgstr "příkaz COPY FROM STDOUT nelze použít"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/interfaces/ecpg/preproc/po/de.po b/src/interfaces/ecpg/preproc/po/de.po
new file mode 100644
index 0000000..caadb67
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/de.po
@@ -0,0 +1,700 @@
+# German message translation file for ecpg
+# Copyright (C) 2009-2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-09-16 09:39+0000\n"
+"PO-Revision-Date: 2021-09-16 14:00+0200\n"
+"Last-Translator: Peter Eisentraut <peter@eisentraut.org>\n"
+"Language-Team: German <pgsql-translators@postgresql.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "Variable »%s« muss einen numerischen Typ haben"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "Deskriptor %s gebunden an Verbindung %s existiert nicht"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "Deskriptor %s gebunden an die Standardverbindung existiert nicht"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "Deskriptorkopfelement »%d« existiert nicht"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable ist immer 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member ist immer 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "Deskriptorelement »%s« ist nicht implementiert"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "Deskriptorelement »%s« kann nicht gesetzt werden"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s ist der Embedded-SQL-Präprozessor von PostgreSQL für C-Programme.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Aufruf:\n"
+" %s [OPTION]... DATEI...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Optionen:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c automatisch C-Code aus eingebettetem SQL-Code erzeugen;\n"
+" betrifft EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODUS Kompatibilitätsmodus setzen; MODUS kann sein:\n"
+" »INFORMIX«, »INFORMIX_SE«, »ORACLE«\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d Parser-Debug-Ausgabe erzeugen\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL SYMBOL definieren\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h eine Headerdatei parsen, schließt Option »-c« ein\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i Systemheaderdateien ebenfalls parsen\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I VERZ VERZ nach Include-Dateien durchsuchen\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o DATEI Ausgabe in DATEI schreiben\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION Laufzeitverhalten bestimmen; OPTION kann sein:\n"
+" »no_indicator«, »prepare«, »questionmarks«\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression Regressiontestmodus verwenden\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t Autocommit von Transaktionen anschalten\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help diese Hilfe anzeigen, dann beenden\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Wenn keine Ausgabedatei angegeben ist, dann wird .c an den Namen der\n"
+"Eingabedatei angehängt und vorher .pgc, falls vorhanden, entfernt.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Berichten Sie Fehler an <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s Homepage: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: konnte Pfad des eigenen Programs nicht finden\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht öffnen: %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: Unterstützung für Parserdebugging (-d) nicht verfügbar\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, der PostgreSQL-Embedded-C-Präprozessor, Version %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... Suche beginnt hier:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "Ende der Suchliste\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: keine Eingabedateien angegeben\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "Cursor »%s« wurde deklariert aber nicht geöffnet"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "konnte Ausgabedatei »%s« nicht entfernen\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/*-Kommentar nicht abgeschlossen"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "Bitkettenkonstante nicht abgeschlossen"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "hexadezimale Zeichenkette nicht abgeschlossen"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "ungültige Bitkettenkonstante"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "ungültige hexadezimale Zeichenkettenkonstante"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "unbehandelter vorheriger Zustand in xqs\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "Zeichenkette in Anführungszeichen nicht abgeschlossen"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "Dollar-Quotes nicht abgeschlossen"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "Bezeichner in Anführungszeichen hat Länge null"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "Bezeichner in Anführungszeichen nicht abgeschlossen"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "geschachtelte /* ... */-Kommentare"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL UNDEF"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "zu viele verschachtelte EXEC SQL IFDEF-Bedingungen"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "passendes »EXEC SQL IFDEF« / »EXEC SQL IFNDEF« fehlt"
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "»EXEC SQL ENDIF;« fehlt"
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mehr als ein EXEC SQL ENDIF"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "unzusammenhängendes EXEC SQL ENDIF"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL IFDEF"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL DEFINE"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "Syntaxfehler im Befehl EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "interner Fehler: unerreichbarer Zustand; bitte an <%s> berichten"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Fehler: Include-Pfad »%s/%s« ist zu lang auf Zeile %d, wird übersprungen\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "konnte Include-Datei »%s« nicht öffnen auf Zeile %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "Syntaxfehler"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "WARNUNG: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "FEHLER: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "Cursor »%s« existiert nicht"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "Initialisierungswert nicht erlaubt in Typdefinition"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "Typname »string« ist im Informix-Modus reserviert"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "Typ »%s« ist bereits definiert"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "mehrdimensionale Arrays für einfache Datentypen werden nicht unterstützt"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "Verbindung %s wird mit %s überschrieben, durch DECLARE-Anweisung %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl CLOSE DATABASE"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl CONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl DISCONNECT"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl SET CONNECTION"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT-Option ist nicht erlaubt im TYPE-Befehl"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT-Option ist nicht erlaubt im VAR-Befehl"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT-Option ist nicht erlaubt im WHENEVER-Befehl"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "nicht mehr unterstütztes Feature wird an Server weitergereicht werden"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL ist nicht implementiert"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN ist nicht implementiert"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "»database« kann im INFORMIX-Modus nicht als Cursorname verwendet werden"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "Verwendung der Variable »%s« in verschiedenen DECLARE-Anweisungen wird nicht unterstützt"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "Cursor »%s« ist bereits definiert"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "nicht mehr unterstützte Syntax LIMIT x,y wird an Server weitergereicht"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "Unteranfrage in FROM muss Aliasnamen erhalten"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS kann INTO nicht verwenden"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "»@« erwartet, »%s« gefunden"
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "er werden nur die Protokolle »tcp« und »unix« und der Datenbanktyp »postgresql« unterstützt"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "»://« erwartet, »%s« gefunden"
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-Domain-Sockets funktionieren nur mit »localhost«, aber nicht mit »%s«"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "»postgresql« erwartet, »%s« gefunden"
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "ungültiger Verbindungstyp: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "»@« oder »://« erwartet, »%s« gefunden"
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "ungültiger Datentyp"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "unvollständige Anweisung"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "nicht erkanntes Token »%s«"
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "Name »%s« ist bereits deklariert"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "nur die Datentypen NUMERIC und DECIMAL haben Argumente für Präzision und Skala"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "Intervallangabe hier nicht erlaubt"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "zu viele Ebenen in verschachtelter Definition von Struktur/Union"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "Zeiger auf varchar sind nicht implementiert"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "Initialisierungswert nicht erlaubt in Befehl EXEC SQL VAR"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "Array aus Indikatoren bei der Eingabe nicht erlaubt"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "Operator nicht erlaubt in Variablendefinition"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s bei »%s«"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "Speicher aufgebraucht"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "unbekannter Variablentypcode %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "Variable »%s« wird durch eine lokale Variable eines anderen Typs versteckt"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "Variable »%s« wird durch eine lokale Variable versteckt"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "Indikatorvariable »%s« wird durch eine lokale Variable eines anderen Typs versteckt"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "Indikatorvariable »%s« wird durch eine lokale Variable versteckt"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "Indikator für Array/Zeiger muss Array/Zeiger sein"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "verschachtelte Arrays werden nicht unterstützt (außer Zeichenketten)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "Indikator für struct muss ein struct sein"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "Indikator für einfachen Typ muss einfachen Typ haben"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "Indikator-Struct »%s« hat zu wenige Mitglieder"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "Indikator-Struct »%s« hat zu viele Mitglieder"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "unbekannter Deskriptorelementcode %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "falsch geformte Variable »%s«"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "Variable »%s« ist kein Zeiger"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "Variable »%s« ist kein Zeiger auf eine Struktur oder Union"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "Variable »%s« ist keine Struktur oder Union"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "Variable »%s« ist kein Array"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "Variable »%s« ist nicht deklariert"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "Indikatorvariable muss einen ganzzahligen Typ haben"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "unbekannter Datentypname »%s«"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "mehrdimensionale Arrays werden nicht unterstützt"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "Zeiger mit mehr als 2 Ebenen werden nicht unterstützt; %d Ebene gefunden"
+msgstr[1] "Zeiger mit mehr als 2 Ebenen werden nicht unterstützt; %d Ebenen gefunden"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "Zeiger auf Zeiger wird für diesen Datentyp nicht unterstützt"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "mehrdimensionale Arrays für Strukturen werden nicht unterstützt"
diff --git a/src/interfaces/ecpg/preproc/po/el.po b/src/interfaces/ecpg/preproc/po/el.po
new file mode 100644
index 0000000..e0e1d55
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/el.po
@@ -0,0 +1,700 @@
+# Greek message translation file for ecpg
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the ecpg (PostgreSQL) package.
+# Georgios Kokolatos <gkokolatos@pm.me>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-11-03 18:09+0000\n"
+"PO-Revision-Date: 2021-11-05 11:17+0100\n"
+"Last-Translator: Georgios Kokolatos <gkokolatos@pm.me>\n"
+"Language-Team: \n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 3.0\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "η μεταβλητή «%s» πρέπει να έχει αριθμητικό τύπο"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "ο περιγραφέας %s δεσμευμένος στη σύνδεση %s δεν υπάρχει"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "ο περιγραφέας %s δεσμευμένος στη προεπιλεγμένη σύνδεση δεν υπάρχει"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "ο περιγραφέας στοιχείου κεφαλίδας «%d» δεν υπάρχει"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable είναι πάντα 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member είναι πάντα 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "το στοιχείο περιγραφής «%s» δεν έχει υλοποιηθεί"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "το στοιχείο περιγραφής «%s» δεν δύναται να οριστεί"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s είναι ο ενσωματωμένος SQL προεπεξεργαστής της PostgreSQL για προγράμματα γραμμένα σε C.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Χρήση:\n"
+" %s [ΕΠΙΛΟΓΗ]... ΑΡΧΕΙΟ...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Επιλογές:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c δημιούργησε αυτόματα κώδικα σε C από ενσωματωμένο SQL κώδικα·\n"
+" αυτό επηρεάζει την εντολή EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE όρισε λειτουργία συμβατότητας; MODE μπορεί να είναι ένα από\n"
+" «INFORMIX», «INFORMIX_SE», «ORACLE»\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d παράξε έξοδο αποσφαλμάτωσης parser\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL όρισε SYMBOL\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h ανάλυσε αρχείο header, αυτή η επιλογή περιλαμβάνει την επιλογή «-c»\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i ανάλυσε επίσης αρχεία include του συστήματος\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY ψάξε στο DIRECTORY για αρχεία include\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE γράψε το αποτέλεσμα στο αρχείο OUTFILE\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION καθόρισε τη συμπεριφορά χρόνου εκτέλεσης. OPTION μπορεί να είναι:\n"
+" «no_indicator», «prepare», «questionmarks»\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression εκτέλεσε σε λειτουργία ελέγχου αναδρομής\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t ενεργοποίησε την αυτόματη ολοκλήρωση συναλλαγών\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version εμφάνισε πληροφορίες έκδοσης, στη συνέχεια έξοδος\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help εμφάνισε αυτό το μήνυμα βοήθειας, στη συνέχεια έξοδος\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Εάν δεν καθοριστεί αρχείο εξόδου, το όνομα σχηματίζεται προσθέτοντας .c στο\n"
+"όνομα αρχείου εισόδου, μετά την αφαίρεση του .pgc, εάν αυτό υπάρχει.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Υποβάλετε αναφορές σφάλματων σε <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s αρχική σελίδα: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: δεν ήταν δυνατός ο εντοπισμός της ιδίας εκτελέσιμης διαδρομής\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: δεν ήταν δυνατό το άνοιγμα του αρχείου «%s»: %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Δοκιμάστε «%s --help» για περισσότερες πληροφορίες.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: η υποστήριξη εντοπισμού σφαλμάτων (-d) του αναλυτή δεν είναι διαθέσιμη\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, ο ενσωματωμένος προεπεξεργαστής C της PostgreSQL, έκδοση %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... η αναζήτηση ξεκινάει εδώ:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "τέλος της λίστας αναζήτησης\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: δεν καθορίστηκαν αρχεία εισόδου\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "ο δρομέας «%s» έχει δηλωθεί αλλά δεν έχει ανοιχτεί"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "δεν ήταν δυνατή η αφαίρεση του αρχείου εξόδου «%s»\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "ατερμάτιστο /* σχόλιο"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "ατερμάτιστη bit κυριολεκτική συμβολοσειρά"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "ατερμάτιστη δεκαεξαδική κυριολεκτική συμβολοσειρά"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "μη έγκυρη bit κυριολεκτική συμβολοσειρά"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "μη έγκυρη hex κυριολεκτική συμβολοσειρά"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "μη χειρισμένη προηγούμενη κατάσταση σε xqs\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "ανολοκλήρωτη συμβολοσειρά με εισαγωγικά"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "ατερμάτιστη dollar-quoted συμβολοσειρά"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "μηδενικού μήκους οριοθετημένο αναγνωριστικό"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "ατερμάτιστο αναγνωριστικό σε εισαγωγικά"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "ένθετα /* ... */ σχόλια"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "λείπει αναγνωριστικό στην εντολή EXEC SQL UNDEF"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "πάρα πολλές ένθετες συνθήκες EXEC SQL IFDEF"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "λείπει αντιστοίχιση «EXEC SQL IFDEF» / «EXEC SQL IFNDEF»"
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "λείπει «EXEC SQL ENDIF;»"
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "περισσότερες από μία EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "μη αντιστοιχισμένο EXEC SQL ENDIF"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "λείπει αναγνωριστικό στην εντολή EXEC SQL IFDEF"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "λείπει αναγνωριστικό στην εντολή EXEC SQL DEFINE"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "συντακτικό σφάλμα στην εντολή EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "εσωτερικό σφάλμα: μη δυνατή κατάσταση· Παρακαλούμε όπως το αναφέρετε σε <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Σφάλμα: η διαδρομή ενσωμάτωσης «%s/%s» είναι πολύ μακρυά στη γραμμή %d, παρακάμπτεται\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου ενσωμάτωσης «%s» στη γραμμή %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "συντακτικό σφάλμα"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "ΣΦΑΛΜΑ: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "ο δρομέας «%s» δεν υπάρχει"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "δεν επιτρέπεται εκκινητής σε ορισμό τύπου"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "το όνομα τύπου «string» είναι δεσμευμένο σε λειτουργία Informix"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "ο τύπος «%s» έχει ήδη οριστεί"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "οι πολυδιάστατες συστυχίες για απλούς τύπους δεδομένων δεν υποστηρίζονται"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "η σύνδεση %s αντικαθίσταται με %s από τη δήλωση DECLARE %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση CLOSE DATABASE"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση CONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση DISCONNECT"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση SET CONNECTION"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση TYPE"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση VAR"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "η επιλογή AT δεν επιτρέπεται σε δήλωση WHENEVER"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "μη υποστηριζόμενο χαρακτηριστικό που θα προωθηθεί στον διακομιστή"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL δεν είναι υλοποιημένο"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN δεν είναι υλοποιημένο"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "το «database» δεν μπορεί να χρησιμοποιηθεί ως όνομα δρομέα σε λειτουργία INFORMIX"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "η χρήση της μεταβλητής «%s» σε διαφορετικές δηλώσεις προτάσεων δεν υποστηρίζεται"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "ο δρομέας «%s» έχει ήδη οριστεί"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "μη υποστηριζόμενη πλέον σύνταξη LIMIT #,# που θα προωθηθεί στον διακομιστή"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "υποερώτημα σε FROM πρέπει να έχει ένα alias"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS δεν δύναται να ορίσει INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "ανέμενε «@», βρήκε «%s»."
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "μόνο τα πρωτόκολλα \"TCP\" και \"UNIX\" και ο τύπος βάσης δεδομένων «postgresql» υποστηρίζονται"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "ανέμενε «://», βρήκε «%s»."
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "οι υποδοχές πεδίου-Unix λειτουργούν μόνο στο «localhost» αλλά όχι στο «%s»"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "ανέμενε «postgresql», βρήκε «%s»."
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "άκυρη επιλογή σύνδεσης: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "ανέμενε «@» ή «://», βρήκε «%s»."
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "μη έγκυρος τύπος δεδομένων"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "ανολοκλήρωτη δήλωση"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "μη αναγνωρίσιμο διακριτικό «%s»"
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "το όνομα «%s» έχει ήδη δηλωθεί"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "μόνο οι αριθμητικοί και δεκαδικοί τύποι δεδομένων έχουν όρισμα ακρίβειας/κλίμακας"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "προδιαγραφές διαστήματος δεν επιτρέπονται εδώ"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "πάρα πολλά επίπεδα σε ένθετο ορισμό δομής/ένωσης"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "δείκτες σε varchar δεν είναι υλοποιημένοι"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "δεν επιτρέπεται αρχικοποιητής σε εντολή EXEC SQL VAR"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "δεν επιτρέπονται δείκτες συστάδων για είσοδο"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "δεν επιτρέπεται χειριστής σε ορισμό μεταβλητής"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s σε ή κοντά σε «%s»"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "έλλειψη μνήμης"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "μη αναγνωρίσιμος κωδικός τύπου μεταβλητής %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "η μεταβλητή «%s» αποκρύπτεται από μια τοπική μεταβλητή διαφορετικού τύπου"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "η μεταβλητή «%s» αποκρύπτεται από μια τοπική μεταβλητή"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "ο δείκτης μεταβλητής «%s» αποκρύπτεται από μια τοπική μεταβλητή διαφορετικού τύπου"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "ο δείκτης μεταβλητής «%s» αποκρύπτεται από μια τοπική μεταβλητή"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "ο δείκτης για συστάδα/δείκτη πρέπει να είναι πίνακας/δείκτης"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "οι ένθετες συστάδες δεν υποστηρίζονται (εξαιρούνται οι συμβολοσειρές)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "ο δείκτης για δομή πρέπει να είναι μια δομή"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "ο δείκτης για απλό τύπο δεδομένων πρέπει να είναι απλός"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "ο δείκτης δομής «%s» έχει πολύ λίγα μέλη"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "ο δείκτης δομής «%s» έχει πάρα πολλά μέλη"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "μη αναγνωρίσιμος κωδικός στοιχείου περιγραφέα %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "εσφαλμένα σχηματισμένη μεταβλητή «%s»"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "η μεταβλητή «%s» δεν είναι δείκτης"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "η μεταβλητή «%s» δεν είναι δείκτης προς μια δομή ή μια ένωση"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "η μεταβλητή «%s» δεν είναι ούτε δομή ούτε ένωση"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "η μεταβλητή «%s» δεν είναι μία συστάδα"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "η μεταβλητή «%s» δεν έχει δηλωθεί"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "ο δείκτης μεταβλητής πρέπει να έχει ακέραιο τύπο"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "μη αναγνωρίσιμο όνομα τύπου δεδομένων «%s»"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "οι πολυδιάστατες συστάδες δεν υποστηρίζονται"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "οι δείκτες πολλαπλών επιπέδων (περισσότερα από 2 επίπεδα) δεν υποστηρίζονται· βρέθηκε %d επίπεδο"
+msgstr[1] "οι δείκτες πολλαπλών επιπέδων (περισσότερα από 2 επίπεδα) δεν υποστηρίζονται· βρέθηκαν %d επίπεδα"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "δεν υποστηρίζεται δείκτης προς δείκτη για αυτόν τον τύπο δεδομένων"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "οι πολυδιάστατες συστάδες για δομές δεν υποστηρίζονται"
diff --git a/src/interfaces/ecpg/preproc/po/es.po b/src/interfaces/ecpg/preproc/po/es.po
new file mode 100644
index 0000000..a7daca4
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/es.po
@@ -0,0 +1,706 @@
+# Spanish translation file for ecpg
+#
+# Copyright (c) 2009-2021, PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Emanuel Calvo Franco <postgres.arg@gmail.com>, 2009.
+# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2009-2012
+# Franco Catena, <francocatena@gmail.com>, 2009
+# Carlos Chapi <carloswaldo@babelruins.org>, 2018, 2021
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-07 20:26+0000\n"
+"PO-Revision-Date: 2021-10-13 23:43-0500\n"
+"Last-Translator: Carlos Chapi <carloswaldo@babelruins.org>\n"
+"Language-Team: PgSQL-es-Ayuda <pgsql-es-ayuda@lists.postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: BlackCAT 1.1\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "la variable «%s» debe tener tipo numérico"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "el descriptor %s vinculado a la conexión %s no existe"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "el descriptor %s vinculado a la conexión predeterminada no existe"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "no existe el descriptor del elemento de cabecera «%d»"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable es siempre 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member es siempre 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "elemento del descriptor «%s» no está implementado"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "no se puede establecer el elemento del descriptor «%s»"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s es el preprocesador de SQL incrustado para programas en C de PostgreSQL.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Empleo:\n"
+" %s [OPCIÓN]... ARCHIVO...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Opciones:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c genera automáticamente código en C desde código SQL\n"
+" incrustado; esto afecta EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODO establece el modo de compatibilidad;\n"
+" MODO puede ser \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d genera salida depurada del analizador\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL define SYMBOL\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h analiza un archivo de cabecera; esto incluye «-c»\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i analiza además los archivos de inclusión de sistema\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORIO busca los archivos de inclusión en DIRECTORIO\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o ARCHIVO escribe la salida en ARCHIVO\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPCIÓN especifica el comportamiento en tiempo de ejecución;\n"
+" OPCIÓN puede ser: «no_indicator», «prepare»,\n"
+" «questionmarks»\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression ejecuta en modo de prueba de regresión\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t activa el compromiso (commit) automático de transacciones\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version muestra información de la versión, luego sale\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help muestra esta ayuda, luego sale\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Si no se especifica un archivo de salida, el nombre se forma agregando .c al\n"
+"archivo de entrada, luego de quitar .pgc si está presente.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Reporte errores a <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sitio web de %s: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: no se pudo localizar la ruta de mi propio ejecutable\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el archivo «%s»: %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Utilice «%s --help» para obtener mayor información.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: la depuración del analizador (parser, -d) no está disponible)\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, el preprocesador de C incrustado de PostgreSQL, versión %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... la búsqueda comienza aquí:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "fin de la lista de búsqueda\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: no se especificaron archivos de entrada\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "el cursor «%s» fue declarado pero no abierto"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "no se pudo eliminar el archivo de salida «%s»\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "comentario /* no cerrado"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "una cadena de bits está inconclusa"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "una cadena hexadecimal está inconclusa"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "cadena de bits no válida"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "cadena hexadecimal no válida"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "estado previo no manejado en xqs\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "una cadena en comillas está inconclusa"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "una cadena separada por $ está inconclusa"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identificador delimitado de longitud cero"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "un identificador en comillas está inconcluso"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "comentarios /* ... */ anidados"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "falta un identificador en la orden EXEC SQL UNDEF"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "demasiadas condiciones EXEC SQL IFDEF anidadas"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "falta el «EXEC SQL IFDEF» / «EXEC SQL IFNDEF»"
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "falta el «EXEC SQL ENDIF;»"
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "hay más de un EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF sin coincidencia"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "identificador faltante en la orden EXEC SQL IFDEF"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "identificador faltante en la orden EXEC SQL DEFINE"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "error de sintaxis en orden EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "error interno: estado no esperado; por favor reporte a <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Error: ruta de inclusión «%s/%s» es demasiada larga en la línea %d, omitiendo\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "no se pudo abrir el archivo a incluir «%s» en la línea %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "error de sintaxis"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "ATENCIÓN: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "ERROR: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "no existe el cursor «%s»"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicializador no permitido en definición de tipo"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "el nombre de tipo «string» está reservado en modo Informix"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "el tipo «%s» ya está definido"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "los arrays multidimensionales para tipos de datos simples no están soportados"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "la conexión %s es sobrescrita con %s por la sentencia DECLARE %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "la opción AT no está permitida en la sentencia CLOSE DATABASE"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "la opción AT no está permitida en la sentencia CONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "la opción AT no está permitida en la sentencia DISCONNECT"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "la opción AT no está permitida en la sentencia SET CONNECTION"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "la opción AT no está permitida en la sentencia TYPE"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "la opción AT no está permitida en la sentencia VAR"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "la opción AT no está permitida en la sentencia WHENEVER"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "característica no soportada será pasada al servidor"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL no está implementado"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN no está implementado"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "no se puede usar «database» como nombre de cursor en modo INFORMIX"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "el uso de la variable «%s» en diferentes sentencias declare no está soportado"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "el cursor «%s» ya está definido"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "la sintaxis LIMIT #,# que ya no está soportada ha sido pasada al servidor"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "las subconsultas en FROM deben tener un alias"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS no puede especificar INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "se esperaba «@», se encontró «%s»"
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "sólo los protocolos «tcp» y «unix» y tipo de bases de datos «postgresql» están soportados"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "se esperaba «://», se encontró «%s»"
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "los sockets de dominio unix sólo trabajan en «localhost» pero no en «%s»"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "se esperaba «postgresql», se encontró «%s»"
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "tipo de conexión no válido: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "se esperaba «@» o «://», se encontró «%s»"
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "tipo de dato no válido"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "sentencia incompleta"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "elemento «%s» no reconocido"
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "el nombre «%s» ya está declarado"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "sólo los tipos de dato numeric y decimal tienen argumento de precisión/escala"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "la especificación de intervalo no está permitida aquí"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "demasiados niveles en la definición anidada de estructura/unión"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "los punteros a varchar no están implementados"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicializador no permitido en la orden EXEC SQL VAR"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "no se permiten los arrays de indicadores en la entrada"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operador no permitido en definición de variable"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s en o cerca de «%s»"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "memoria agotada"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "código de tipo de variable %d no reconocido"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "la variable «%s» está escondida por una variable local de tipo diferente"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "la variable «%s» está escondida por una variable local"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "la variable de indicador «%s» está escondida por una variable local de tipo diferente"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "variable de indicador «%s» está escondida por una variable local"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "indicador para array/puntero debe ser array/puntero"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "no se permiten arrays anidados (excepto cadenas de caracteres)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "el indicador para struct debe ser struct"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "el indicador para tipo dato simple debe ser simple"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "struct para indicador «%s» no tiene suficientes miembros"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "struct para indicador «%s» tiene demasiados miembros"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "código de descriptor de elemento %d no reconocido"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "variable formada incorrectamente «%s»"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "la variable «%s» no es un puntero"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "la variable «%s» no es un puntero a una estructura o unión"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "la variable «%s» no es una estructura ni una unión"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "la variable «%s» no es un array"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "la variable «%s» no está declarada"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "la variable de un indicador debe ser de algún tipo numérico entero"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "nombre de tipo de datos «%s» no reconocido"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "los arrays multidimensionales no están soportados"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "no se soportan los punteros multinivel (más de 2); se encontró 1 nivel"
+msgstr[1] "no se soportan los punteros multinivel (más de 2); se encontraron %d niveles"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "los punteros a puntero no están soportados para este tipo de dato"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "los arrays multidimensionales para estructuras no están soportados"
diff --git a/src/interfaces/ecpg/preproc/po/fr.po b/src/interfaces/ecpg/preproc/po/fr.po
new file mode 100644
index 0000000..5b09eb1
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/fr.po
@@ -0,0 +1,757 @@
+# translation of ecpg.po to fr_fr
+# french message translation file for ecpg
+#
+# Use these quotes: « %s »
+#
+# Guillaume Lelarge <guillaume@lelarge.info>, 2009.
+# Stéphane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-27 02:09+0000\n"
+"PO-Revision-Date: 2021-08-27 17:30+0200\n"
+"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
+"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 3.0\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "la variable « %s » doit avoir un type numeric"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "le descripteur %s lié à la connexion %s n'existe pas"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "le descripteur %s lié à la connexion par défaut n'existe pas"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "l'élément d'en-tête du descripteur « %d » n'existe pas"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable vaut toujours 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member vaut toujours 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "l'élément du descripteur « %s » n'est pas implanté"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "l'élément du descripteur « %s » ne peut pas être initialisé"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s est le préprocesseur SQL embarqué de PostgreSQL pour les programmes C.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Usage:\n"
+" %s [OPTION]... FICHIER...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Options :\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c produit automatiquement le code C à partir du code SQL\n"
+" embarqué ; ceci affecte EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE configure le mode de compatibilité ; MODE peut être\n"
+" « INFORMIX », « INFORMIX_SE » ou « ORACLE »\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d produit la sortie de débogage de l'analyseur\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOLE définit SYMBOLE\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr ""
+" -h analyse un fichier d'en-tête, cette option inclut l'option\n"
+" « -c »\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i analyse en plus les fichiers d'en-tête systèmes\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I RÉPERTOIRE recherche les fichiers d'en-têtes dans RÉPERTOIRE\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o FICHIER écrit le résultat dans FICHIER\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION indique le comportement à l'exécution ; OPTION peut valoir :\n"
+" « no_indicator », « prepare », « questionmarks »\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression s'exécute en mode de tests des régressions\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t active la validation automatique des transactions\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version affiche la version et quitte\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help affiche cette aide et quitte\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Si aucun nom de fichier en sortie n'est fourni, le nom est formaté en ajoutant\n"
+"le suffixe .c au nom du fichier en entrée après avoir supprimé le suffixe .pgc\n"
+"s'il est présent.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Rapporter les bogues à <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Page d'accueil de %s : <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s : n'a pas pu localiser le chemin de mon propre exécutable\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s : n'a pas pu ouvrir le fichier « %s » : %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayer « %s --help » pour plus d'informations.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s : support de débogage de l'analyseur (-d) non disponible\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, le préprocesseur C embarqué de PostgreSQL, version %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "la recherche EXEC SQL INCLUDE ... commence ici :\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "fin de la liste de recherche\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s : aucun fichier précisé en entrée\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "le curseur « %s » est déclaré mais non ouvert"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "n'a pas pu supprimer le fichier « %s » en sortie\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "commentaire /* non terminé"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "chaîne bit litéral non terminée"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "chaîne hexadécimale litérale non terminée"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "chaîne bit litéral invalide"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "chaîne hexadécimale litéralle invalide"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "état précédent non géré dans xqs\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "chaîne entre guillemets non terminée"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "chaîne entre guillemets dollars non terminée"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identifiant délimité de longueur nulle"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identifiant entre guillemets non terminé"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "commentaires /* ... */ imbriqués"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "identifiant manquant dans la commande EXEC SQL UNDEF"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "trop de conditions EXEC SQL IFDEF imbriquées"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "correspondance manquante « EXEC SQL IFDEF » / « EXEC SQL IFNDEF »"
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "« EXEC SQL ENDIF; » manquant"
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "plusieurs EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF différent"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "identifiant manquant dans la commande EXEC SQL IFDEF"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "identifiant manquant dans la commande EXEC SQL DEFINE"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "erreur de syntaxe dans la commande EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "erreur interne : l'état ne peut être atteint ; merci de rapporter ceci à <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr ""
+"Erreur : le chemin d'en-tête « %s/%s » est trop long sur la ligne %d,\n"
+"ignoré\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "n'a pas pu ouvrir le fichier d'en-tête « %s » sur la ligne %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "erreur de syntaxe"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "ATTENTION : "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "ERREUR : "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "le curseur « %s » n'existe pas"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "initialiseur non autorisé dans la définition du type"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "le nom du type « string » est réservé dans le mode Informix"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "le type « %s » est déjà défini"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr ""
+"les tableaux multi-dimensionnels pour les types de données simples ne sont\n"
+"pas supportés"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "la connexion %s est surchargée avec %s par l'instruction DECLARE %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "option AT non autorisée dans une instruction CLOSE DATABASE"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "option AT non autorisée dans une instruction CONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "option AT non autorisée dans une instruction DISCONNECT"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "option AT non autorisée dans une instruction SET CONNECTION"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "option AT non autorisée dans une instruction TYPE"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "option AT non autorisée dans une instruction VAR"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "option AT non autorisée dans une instruction WHENEVER"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143 preproc.y:4807
+#: preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514 preproc.y:9082 preproc.y:9087
+#: preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "la fonctionnalité non supportée sera passée au serveur"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL n'est pas implanté"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN n'est pas implanté"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "« database » ne peut pas être utilisé comme nom de curseur dans le mode INFORMIX"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr ""
+"l'utilisation de la variable « %s » dans différentes instructions de déclaration\n"
+"n'est pas supportée"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "le curseur « %s » est déjà défini"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "la syntaxe obsolète LIMIT #,# a été passée au serveur"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "la sous-requête du FROM doit avoir un alias"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS ne peut pas indiquer INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "« @ » attendu, « %s » trouvé"
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr ""
+"seuls les protocoles « tcp » et « unix » et les types de base de données\n"
+"« postgresql » sont supportés"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "« :// » attendu, « %s » trouvé"
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "les sockets de domaine Unix fonctionnent seulement sur « localhost », mais pas sur « %s »"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "« postgresql » attendu, « %s » trouvé"
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "type de connexion invalide : %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "« @ » ou « :// » attendu, « %s » trouvé"
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "type de données invalide"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "instruction incomplète"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "jeton « %s » non reconnu"
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "le nom « %s » est déjà défini"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr ""
+"seuls les types de données numeric et decimal ont des arguments de\n"
+"précision et d'échelle"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "interval de spécification non autorisé ici"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "trop de niveaux dans la définition de structure/union imbriquée"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "les pointeurs sur des chaînes de caractères (varchar) ne sont pas implantés"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initialiseur non autorisé dans la commande EXEC SQL VAR"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "les tableaux d'indicateurs ne sont pas autorisés en entrée"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "opérateur non autorisé dans la définition de la variable"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s sur ou près de « %s »"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "mémoire épuisée"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "code %d du type de variable non reconnu"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "la variable « %s » est cachée par une variable locale d'un type différent"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "la variable « %s » est cachée par une variable locale"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr ""
+"la variable indicateur « %s » est caché par une variable locale d'un type\n"
+"différent"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "la variable indicateur « %s » est cachée par une variable locale"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "l'indicateur pour le tableau/pointeur doit être tableau/pointeur"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr ""
+"les tableaux imbriqués ne sont pas supportés (sauf les chaînes de\n"
+"caractères)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "l'indicateur d'un struct doit être un struct"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "l'indicateur d'un type de données simple doit être simple"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "le struct indicateur « %s » a trop peu de membres"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "le struct indicateur « %s » a trop de membres"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "code %d de l'élément du descripteur non reconnu"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "variable « %s » mal formée"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "la variable « %s » n'est pas un pointeur"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "la variable « %s » n'est pas un pointeur vers une structure ou une union"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "la variable « %s » n'est ni une structure ni une union"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "la variable « %s » n'est pas un tableau"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "la variable « %s » n'est pas déclarée"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "la variable d'indicateur doit avoir un type integer"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "nom « %s » non reconnu pour un type de données"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "les tableaux multidimensionnels ne sont pas supportés"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] ""
+"les pointeurs multi-niveaux (plus de deux) ne sont pas supportés :\n"
+"%d niveau trouvé"
+msgstr[1] ""
+"les pointeurs multi-niveaux (plus de deux) ne sont pas supportés :\n"
+"%d niveaux trouvés"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "ce type de données ne supporte pas les pointeurs de pointeur"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "les tableaux multidimensionnels ne sont pas supportés pour les structures"
+
+#~ msgid "declared name %s is already defined"
+#~ msgstr "le nom déclaré %s est déjà défini"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "COPY TO STDIN n'est pas possible"
+
+#~ msgid "COPY FROM STDOUT is not possible"
+#~ msgstr "COPY FROM STDOUT n'est pas possible"
+
+#~ msgid "NEW used in query that is not in a rule"
+#~ msgstr "NEW utilisé dans une requête qui n'est pas dans une règle"
+
+#~ msgid "OLD used in query that is not in a rule"
+#~ msgstr "OLD utilisé dans une requête qui n'est pas dans une règle"
+
+#~ msgid "constraint declared INITIALLY DEFERRED must be DEFERRABLE"
+#~ msgstr "une contrainte déclarée INITIALLY DEFERRED doit être DEFERRABLE"
+
+#~ msgid "AT option not allowed in DEALLOCATE statement"
+#~ msgstr "option AT non autorisée dans une instruction DEALLOCATE"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version affiche la version et quitte\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Rapporter les bogues à <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid "using unsupported DESCRIBE statement"
+#~ msgstr "utilisation de l'instruction DESCRIBE non supporté"
diff --git a/src/interfaces/ecpg/preproc/po/it.po b/src/interfaces/ecpg/preproc/po/it.po
new file mode 100644
index 0000000..bfdd9ea
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/it.po
@@ -0,0 +1,679 @@
+#
+# ecpg.po
+# Italian message translation file for ecpg
+#
+# For development and bug report please use:
+# https://github.com/dvarrazzo/postgresql-it
+#
+# Copyright (C) 2012-2017 PostgreSQL Global Development Group
+# Copyright (C) 2010, Associazione Culturale ITPUG
+#
+# Daniele Varrazzo <daniele.varrazzo@gmail.com>, 2012-2017.
+# Maurizio Totti <maurizio.totti@gmail.com>, 2010.
+#
+# This file is distributed under the same license as the PostgreSQL package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 11\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2018-10-08 14:08+0000\n"
+"PO-Revision-Date: 2018-10-08 21:54+0100\n"
+"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
+"Language-Team: https://github.com/dvarrazzo/postgresql-it\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Generator: Poedit 2.0.6\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "la variabile \"%s\" deve essere di tipo numerico"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "il descrittore \"%s\" non esiste"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "la voce \"%d\" dell'header del descrittore non esiste"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable è sempre 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member è sempre 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "la voce \"%s\" del descrittore non è implementata"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "la voce \"%s\" del descrittore non può essere impostata"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s è il preprocessore SQL embedded di PostgreSQL per programmi scritti in C.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Utilizzo:\n"
+" %s [OPZIONE]... FILE...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Opzioni:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c genera automaticamente il codice C dal codice SQL embedded;\n"
+" questo ha effetto su EXEC SQL TYPE\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODO imposta la modalità di compatibilità; MODO può essere uno\n"
+" tra \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d genera l'output di debug del parser\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SIMBOLO definisci SIMBOLO\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h analizza un file header, questa opzione include \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i analizza anche i file di sistema\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY cerca gli include file in DIRECTORY\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o FILEOUT scrive il risultato in FILEOUT\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPZIONE specifica il comportamento run-time; OPZIONE può essere:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression esegui in modalità test di regressione\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t attiva il commit automatico delle transazioni\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V --version mostra informazioni sulla versione ed esci\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostra questo aiuto ed esci\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Se non viene specificato nessun file di output, il nome è composto aggiungendo\n"
+".c al nome del file di input, dopo aver tolto .pgc se presente.\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Puoi segnalare eventuali bug a <pgsql-bugs@postgresql.org>.\n"
+
+#: ecpg.c:139
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: percorso del proprio eseguibile non trovato\n"
+
+#: ecpg.c:174 ecpg.c:331 ecpg.c:342
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: apertura del file \"%s\" fallita: %s\n"
+
+#: ecpg.c:217 ecpg.c:230 ecpg.c:246 ecpg.c:272
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Prova \"%s --help\" per maggiori informazioni.\n"
+
+#: ecpg.c:241
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: il supporto al debug del parser (-d) non è disponibile\n"
+
+#: ecpg.c:260
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, il preprocessore di PostgreSQL per programmi in C, versione %s\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... la ricerca inizia da qui:\n"
+
+#: ecpg.c:265
+#, c-format
+msgid "end of search list\n"
+msgstr "fine della lista di ricerca\n"
+
+#: ecpg.c:271
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: non è stato specificato nessun file di input\n"
+
+#: ecpg.c:465
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "il cursore \"%s\" è stato dichiarato, ma non aperto"
+
+#: ecpg.c:478 preproc.y:127
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "rimozione del file di output \"%s\" fallita\n"
+
+#: pgc.l:444
+#, c-format
+msgid "unterminated /* comment"
+msgstr "commento /* non terminato"
+
+# string literal sarebbe intraducubile infatti è come la stringa viene rappresentata nel linguaggio di programmazione, ma come si fa a tradurlo?....
+# Secondo me "stringa letterale" -- Daniele
+#: pgc.l:457
+#, c-format
+msgid "invalid bit string literal"
+msgstr "bit nella stringa letterale non valido"
+
+#: pgc.l:466
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "letterale di stringa di bit non terminato"
+
+#: pgc.l:482
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "letterale di stringa esadecimale non terminato"
+
+#: pgc.l:560
+#, c-format
+msgid "unterminated quoted string"
+msgstr "stringa tra virgolette non terminata"
+
+#: pgc.l:618 pgc.l:631
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identificativo delimitato di lunghezza zero"
+
+#: pgc.l:639
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identificativo tra virgolette non terminato"
+
+#: pgc.l:921
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "commenti /* ... */ annidati"
+
+#: pgc.l:1014
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "identificativo mancante nel comando EXEC SQL UNDEF"
+
+#: pgc.l:1060 pgc.l:1074
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "mancata corrispondenza fra \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1063 pgc.l:1076 pgc.l:1252
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "manca \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1092 pgc.l:1111
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "più di un EXEC SQL ELSE"
+
+#: pgc.l:1133 pgc.l:1147
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF non corrispondente"
+
+#: pgc.l:1167
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "troppe condizioni EXEC SQL IFDEF annidate"
+
+#: pgc.l:1200
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "identificativo mancante nel comando EXEC SQL IFDEF"
+
+#: pgc.l:1209
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "identificativo mancante nel comando EXEC SQL DEFINE"
+
+#: pgc.l:1242
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "errore di sintassi nel comando EXEC SQL INCLUDE"
+
+#: pgc.l:1291
+#, c-format
+msgid "internal error: unreachable state; please report this to <pgsql-bugs@postgresql.org>"
+msgstr "errore interno: stato non raggiungibile, si prega di segnalarlo a <pgsql-bugs@postgresql.org>"
+
+#: pgc.l:1420
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Errore: il percorso delle inclusioni \"%s/%s\" è troppo lungo alla riga %d, perciò viene saltato\n"
+
+#: pgc.l:1443
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "apertura del file di include \"%s\" alla riga %d fallita"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "errore di sintassi"
+
+#: preproc.y:81
+#, c-format
+msgid "WARNING: "
+msgstr "ATTENZIONE: "
+
+#: preproc.y:84
+#, c-format
+msgid "ERROR: "
+msgstr "ERRORE: "
+
+#: preproc.y:508
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "il cursore \"%s\" non esiste"
+
+#: preproc.y:537
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "l'inizializzatore non è permesso nella definizione del tipo di dato"
+
+#: preproc.y:539
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "il nome di tipo \"string\" è riservato alla modalità Informix"
+
+#: preproc.y:546 preproc.y:15744
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "il tipo \"%s\" è già definito"
+
+#: preproc.y:570 preproc.y:16402 preproc.y:16727 variable.c:620
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "gli array multidimensionali per tipi dato semplici non sono supportati"
+
+#: preproc.y:1694
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "l'opzione AT non è permessa nell'istruzione CLOSE DATABASE"
+
+#: preproc.y:1903
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "l'opzione AT non è permessa nell'istruzione CONNECT"
+
+#: preproc.y:1937
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "l'opzione AT non è permessa nell'istruzione DISCONNECT"
+
+#: preproc.y:1992
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "l'opzione AT non è permessa nell'istruzione SET CONNECTION"
+
+#: preproc.y:2014
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "l'opzione AT non è permessa nell'istruzione TYPE"
+
+#: preproc.y:2023
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "l'opzione AT non è permessa nell'istruzione VAR"
+
+#: preproc.y:2030
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "l'opzione AT non è permessa nell'istruzione WHENEVER"
+
+#: preproc.y:2107 preproc.y:2279 preproc.y:2284 preproc.y:2400 preproc.y:4045
+#: preproc.y:5615 preproc.y:5624 preproc.y:5924 preproc.y:7523 preproc.y:9016
+#: preproc.y:9021 preproc.y:11812
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "al server è stata richiesta una funzionalità non supportata"
+
+#: preproc.y:2658
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL non è implementato"
+
+#: preproc.y:3386
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN non è implementato"
+
+#: preproc.y:9969 preproc.y:15333
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "usare la variabile \"%s\" in una diversa istruzione declare non è supportato"
+
+#: preproc.y:9971 preproc.y:15335
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "il cursore \"%s\" è già definito"
+
+#: preproc.y:10401
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "la sintassi LIMIT #,# passata al server non è più supportata"
+
+#: preproc.y:10726 preproc.y:10733
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "la sottoquery in FROM deve avere un alias"
+
+#: preproc.y:15063
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS non può specificare INTO"
+
+#: preproc.y:15099
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "atteso \"@\", trovato \"%s\""
+
+#: preproc.y:15111
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "soltanto i protocolli \"tcp\" e \"unix\" ed il tipo database \"postgresql\" sono supportati"
+
+#: preproc.y:15114
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "atteso \"://\", trovato \"%s\""
+
+#: preproc.y:15119
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "i socket di dominio Unix funzionano solo con \"localhost\" ma non con \"%s\""
+
+#: preproc.y:15145
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "atteso \"postgresql\", trovato \"%s\""
+
+#: preproc.y:15148
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "tipo di connessione non valido: %s"
+
+#: preproc.y:15157
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "atteso \"@\" oppure \"://\", trovato \"%s\""
+
+#: preproc.y:15232 preproc.y:15250
+#, c-format
+msgid "invalid data type"
+msgstr "tipo dato non valido"
+
+#: preproc.y:15261 preproc.y:15278
+#, c-format
+msgid "incomplete statement"
+msgstr "istruzione incompleta"
+
+#: preproc.y:15264 preproc.y:15281
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "token \"%s\" sconosciuto"
+
+#: preproc.y:15555
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "solo i dati di tipo numeric e decimal hanno argomento precisione/scala"
+
+#: preproc.y:15567
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "specificazione di intervallo non permessa qui"
+
+#: preproc.y:15719 preproc.y:15771
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "troppi livelli nidificati nella definizione della struttura/unione"
+
+#: preproc.y:15910
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "i puntatori a varchar non sono implementati"
+
+#: preproc.y:16097 preproc.y:16122
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "si sta utilizzando una istruzione DESCRIBE non supportata"
+
+#: preproc.y:16369
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initializer non è permesso nel comando EXEC SQL VAR"
+
+#: preproc.y:16685
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "array di indicatori non sono permessi"
+
+#: preproc.y:16906
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operatore non permesso nella definizione di variabile"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:16947
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s a o presso \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "memoria esaurita"
+
+#: type.c:212 type.c:676
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "tipo di variabile sconosciuto codice %d"
+
+#: type.c:261
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "la variabile \"%s\" è nascosta da una variabile locale di tipo diverso"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "la variabile \"%s\" è nascosta da una variabile locale"
+
+#: type.c:275
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "la variabile di indicatore \"%s\" è nascosta da una variabile locale di tipo diverso"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "la variabile di indicatore \"%s\" è nascosta da una variabile locale"
+
+#: type.c:285
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "un indicatore per un array/puntatore deve essere un array/puntatore"
+
+#: type.c:289
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "array annidati non sono supportati (tranne che per le stringhe)"
+
+#: type.c:331
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "un indicatore per una struttura deve essere una struttura"
+
+# capire meglio i "simple data types"
+#: type.c:351 type.c:372 type.c:392
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "un indicatore per un tipo di dato semplice deve essere semplice"
+
+#: type.c:616
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "l'indicatore struttura \"%s\" non ha abbastanza membri"
+
+#: type.c:624
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "l'indicatore struttura \"%s\" ha troppi membri"
+
+#: type.c:735
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "descrittore di codice %d sconosciuto"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "variabile \"%s\" composta in maniera scorretta"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "la variabile \"%s\" non è un puntatore"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "la variabile \"%s\" non è un puntatore ad una struttura o ad una unione"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "la variabile \"%s\" non è né una struttura né una unione"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "la variabile \"%s\" non è un array"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "la variabile \"%s\" non è stata dichiarata"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "il tipo di variabile di un indicatore deve essere intero"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "tipo di dato chiamato \"%s\" è sconosciuto"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "gli array multidimensionali non sono supportati"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "puntatori a più livelli (più di 2) non sono supportati; trovato %d livello"
+msgstr[1] "puntatori a più livelli (più di 2) non sono supportati; trovati %d livelli"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "il puntatore a puntatore non è supportato per questo tipo di dato"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "gli array multidimensionali per strutture non sono supportati"
diff --git a/src/interfaces/ecpg/preproc/po/ja.po b/src/interfaces/ecpg/preproc/po/ja.po
new file mode 100644
index 0000000..30196c1
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/ja.po
@@ -0,0 +1,701 @@
+# Japanese message translation file for ecpg-preproc
+# Copyright (C) 2022 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_archivecleanup (PostgreSQL) package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL 14)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-25 17:29+0900\n"
+"PO-Revision-Date: 2021-08-25 17:34+0900\n"
+"Last-Translator: Kyotaro Horiguchi <horikyota.ntt@gmail.com>\n"
+"Language-Team: jpug-doc <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.8.13\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "変数\"%s\"は数値型でなければなりません"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "接続%2$sに関連付けられている記述子%1$sは存在しません"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "デフォルト接続に関連付けられている記述し%sは存在しません"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "記述子ヘッダ項目%dは存在しません"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullableは常に1です"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_memberは常に0です"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "記述子項目%sは実装されていません"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "記述子項目%sは設定できません"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%sはCプログラム用のPostgreSQL埋込みSQLプリプロセッサです。\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"使用方法:\n"
+" %s [オプション]... ファイル...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "オプション:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c 埋め込まれたSQLコードを元にC言語コードを自動的に生成します\n"
+" これはEXEC SQL TYPEに影響を与えます\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE 互換モードを設定; MODEは\"INFORMIX\"、 \"INFORMIX_SE\"、\n"
+" \"ORACLE\"のいずれかです\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d パーサのデバッグ出力を有効にします\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL シンボル SYMBOL を定義します\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr ""
+" -h ヘッダファイルをパースします。このオプションには\"-c\"オプション\n"
+" が含まれます\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i システムインクルードファイルもパースします\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY DIRECTORYからインクルードファイルを検索します\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE 結果をOUTFILEに出力します\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION 実行時の動作を指定します。オプションは次のいずれかです\n"
+" \"no_indicator\"、\"prepare\"、\"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression リグレッション試験モードで実行します\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t トランザクションの自動コミットを有効にします\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version バージョン情報を出力して、終了します\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help このヘルプを表示して、終了します\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"出力ファイルの指定がない場合は、入力ファイルの名前に.cを付けた名前になります。\n"
+"ただし、もし.pgcがある場合はこれを取り除いてから.cが付けられます。\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"バグは<%s>に報告してください。\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s ホームページ: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: 自身の実行ファイルが見つかりませんでした\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"をオープンできませんでした: %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "詳細は\"%s --help\"で確認してください。\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: パーサデバッグのサポート(-d)を利用できません\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL埋込みC言語プリプロセッサ, バージョン%s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 検索が始まります\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "検索リストの終端です\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 入力ファイルが指定されていません\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "カーソル%sは宣言されましたが、オープンされていません"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "出力ファイル\"%s\"を削除できませんでした\n"
+
+#: pgc.l:501
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/*コメントが閉じていません"
+
+#: pgc.l:518
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "ビット列リテラルの終端がありません"
+
+#: pgc.l:526
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "16進数文字列リテラルの終端がありません"
+
+#: pgc.l:601
+#, c-format
+msgid "invalid bit string literal"
+msgstr "無効なビット列リテラルです"
+
+#: pgc.l:606
+#, c-format
+msgid "invalid hex string literal"
+msgstr "不正な16進文字列リテラルです"
+
+#: pgc.l:624
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "xqsの中で処理されない前ステート\n"
+
+#: pgc.l:650 pgc.l:759
+#, c-format
+msgid "unterminated quoted string"
+msgstr "文字列の引用符が閉じていません"
+
+#: pgc.l:701
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "文字列のドル引用符が閉じていません"
+
+#: pgc.l:719 pgc.l:739
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "二重引用符で囲まれた識別子の長さがゼロです"
+
+#: pgc.l:750
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "識別子の引用符が閉じていません"
+
+#: pgc.l:1081
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "入れ子状の /* ... */ コメント"
+
+#: pgc.l:1174
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "EXEC SQL UNDEFコマンドにおいて識別子がありません"
+
+#: pgc.l:1192 pgc.l:1205 pgc.l:1221 pgc.l:1234
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "入れ子状のEXEC SQL IFDEF条件が多すぎます"
+
+#: pgc.l:1250 pgc.l:1261 pgc.l:1276 pgc.l:1298
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "対応する\"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"がありません"
+
+#: pgc.l:1252 pgc.l:1263 pgc.l:1444
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "\"EXEC SQL ENDIF;\"がありません"
+
+#: pgc.l:1278 pgc.l:1300
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "1つ以上のEXEC SQL ELSE\"が存在します"
+
+#: pgc.l:1323 pgc.l:1337
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIFに対応するものがありません"
+
+#: pgc.l:1392
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "EXEC SQL IFDEFコマンドにおいて識別子がありません"
+
+#: pgc.l:1401
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "EXEC SQL DEFINEコマンドにおいて識別子がありません"
+
+#: pgc.l:1434
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "EXEC SQL INCLUDEコマンドにおいて構文エラーがあります"
+
+#: pgc.l:1484
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "内部エラー: 到達しないはずの状態です。<%s>まで報告してください"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "エラー:行番号%3$dのインクルードパス\"%1$s/%2$s\"が長すぎます。無視しました。\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "行番号%2$dのインクルードファイル\"%1$s\"をオープンすることができませんでした"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "構文エラー"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "警告: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "エラー: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "カーソル\"%s\"は存在しません"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "型定義では初期化子は許されません"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "型名\"string\"はInformixモードですでに予約されています"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "\"%s\"型はすでに定義されています"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "単純なデータ型の多次元配列はサポートされていません"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "接続%1$sはDECLARE文%3$sで%2$sに上書きされます"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "CLOSE DATABASE文ではATオプションは許されません"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "CONNECT文ではATオプションは許されません"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "DISCONNECT文ではATオプションは許されません"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "SET CONNECTION文ではATオプションは許されません"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "TYPE文ではATオプションは許されません"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "VAR文ではATオプションは許されません"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "WHENEVER文ではATオプションは許されません"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "非サポートの機能がサーバに渡されます"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALLは実装されていません"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDINは実装されていません"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "INFORMIXモードでは\"database\"をカーソル名として使用できません"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "異なったdeclareステートメントにおける変数\"%s\"の使用はサポートされていません"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "カーソル\"%s\"はすでに定義されています"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "サーバに渡されるLIMIT #,#構文はもはやサポートされていません"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM句の副問い合わせには別名が必要です"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE ASはINTOを指定できません"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "想定では\"@\"、結果では\"%s\""
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "プロトコルでは\"tcp\"および\"unix\"のみ、データベースの種類では\"postgresql\"のみがサポートされています"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "想定では\"://\"、結果では\"%s\""
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unixドメインソケットは\"localhost\"でのみで動作し、\"%s\"では動作しません"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "想定では\"postgresql\"、結果では\"%s\""
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "無効な接続種類: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "想定では\"@または\"\"://\"、結果では\"%s\""
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "無効なデータ型"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "不完全な文"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "認識できないトークン\"%s\""
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "名前\"%s\"はすでに定義されています"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "数値データ型または10進数データ型のみが精度/位取りの引数を取ることができます"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "時間間隔の指定はここでは許されません"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "構造体/ユニオンの定義の入れ子レベルが深すぎます"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "varcharを指し示すポインタは実装されていません"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "EXEC SQL VARコマンドでは初期化子は許されません"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "指示子配列は入力として許されません"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "変数定義では演算子は許されません"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "\"%2$s\"またはその近辺で%1$s"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "メモリ不足"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "認識できない変数型コード%d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "変数\"%s\"は、異なった型を持つローカル変数により隠蔽されています"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "変数\"%s\"はローカル変数により隠蔽されています"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "指示子変数\"%s\"は、異なった型を持つローカル変数により隠蔽されています"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "指示子変数\"%s\"はローカル変数により隠蔽されています"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "配列/ポインタ用の指示子は配列/ポインタでなければなりません"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "入れ子状の配列はサポートされません (文字列は除きます)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "構造体用の指示子は構造体でなければなりません"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "単純なデータ型用の指示子は単純型でなければなりません"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "指示子構造体\"%s\"のメンバが足りません"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "指示子構造体\"%s\"のメンバが多すぎます"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "認識できない記述子項目コード%dです"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "正しく成形されていない変数\"%s\"です"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "変数\"%s\"はポインタではありません"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "変数\"%s\"は構造体またはユニオンを指し示すポインタではありません"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "変数\"%s\"は構造体でもユニオンでもありません"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "変数\"%s\"は配列ではありません"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "変数\"%s\"は宣言されていません"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "指示子変数は整数型でなければなりません"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "データ型名\"%s\"は認識できません"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "多次元配列はサポートされません"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "複数レベルのポインタ(3レベル以上)はサポートされません。%dレベルあります"
+msgstr[1] "複数レベルのポインタ(3レベル以上)はサポートされません。%dレベルあります"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "このデータ型では、ポインタを指し示すポインタはサポートされていません"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "構造体の多次元配列はサポートされていません"
diff --git a/src/interfaces/ecpg/preproc/po/ko.po b/src/interfaces/ecpg/preproc/po/ko.po
new file mode 100644
index 0000000..43516f9
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/ko.po
@@ -0,0 +1,690 @@
+# LANGUAGE message translation file for ecpg
+# Copyright (C) 2017 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Ioseph Kim <ioseph@uri.sarang.net>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-05 01:09+0000\n"
+"PO-Revision-Date: 2020-10-05 16:55+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean Team <pgsql-kr@postgresql.kr>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "\"%s\" 변수는 숫자 형식이어야 함"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "\"%s\" 설명자가 없음"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "설명자 헤더 항목 \"%d\"이(가) 없음"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "null 허용 여부는 항상 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member는 항상 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "설명자 항목 \"%s\"이(가) 구현되지 않음"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "설명자 항목 \"%s\"을(를) 설정할 수 없음"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s은(는) C 프로그램용 PostgreSQL 포함 SQL 전처리기입니다.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"사용:\n"
+" %s [OPTION]... 파일...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "옵션들:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c 포함된 SQL 코드에서 자동으로 C 코드를 생성합니다.\n"
+" EXEC SQL TYPE에 영향을 줍니다.\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE 호환성 모드를 설정합니다. MODE는 다음 중 하나일 수 있습니"
+"다.\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d 파서 디버그 출력 생성\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL SYMBOL 정의\n"
+
+#: ecpg.c:49
+#, c-format
+msgid ""
+" -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h 헤더 파일 구문 분석. 이 옵션은 \"-c\" 옵션 포함\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i 시스템 포함 파일도 구문 분석\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY DIRECTORY에서 포함 파일 검색\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE OUTFILE에 결과 쓰기\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION 런타임 동작을 지정합니다. 사용 가능한 OPTION은 다음과 같습니"
+"다.\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression 회귀 테스트 모드에서 실행\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t 트랜잭션 자동 커밋 설정\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 버전 정보 보여주고 마침\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 이 도움말을 보여주고 마침\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"출력 파일 이름을 지정하지 않으면 입력 파일 이름에 .pgc가 있을 경우 제거하고\n"
+".c를 추가하여 이름이 지정됩니다.\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"문제점 보고 주소: <%s>\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 홈페이지: <%s>\n"
+
+#: ecpg.c:140
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: 실행 가능한 경로를 지정할 수 없습니다\n"
+
+#: ecpg.c:175 ecpg.c:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: \"%s\" 파일 열 수 없음: %s\n"
+
+#: ecpg.c:218 ecpg.c:231 ecpg.c:247 ecpg.c:273
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "자제한 사항은 \"%s --help\" 명령으로 살펴보십시오.\n"
+
+#: ecpg.c:242
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: 파서 디버그 지원(-d)을 사용할 수 없음\n"
+
+#: ecpg.c:261
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL 포함 C 전처리기, 버전 %s\n"
+
+#: ecpg.c:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 여기서 검색 시작:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "검색 목록의 끝\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 지정된 입력 파일 없음\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "\"%s\" 커서가 선언되었지만 열리지 않음"
+
+#: ecpg.c:479 preproc.y:128
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "출력 파일 \"%s\"을(를) 제거할 수 없음\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "마무리 안된 /* 주석"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "마무리 안된 비트 문자열 문자"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "마무리 안된 16진수 문자열 문자"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "잘못된 비트 문자열 리터럴"
+
+#: pgc.l:623
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "xqs 안에 다룰 수 없는 이전 상태값 있음\n"
+
+#: pgc.l:652 pgc.l:754
+#, c-format
+msgid "unterminated quoted string"
+msgstr "마무리 안된 따옴표 안의 문자열"
+
+#: pgc.l:703
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "마무리 안된 따옴표 안의 문자열"
+
+#: pgc.l:721 pgc.l:734
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "길이가 0인 구분 식별자"
+
+#: pgc.l:745
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "마무리 안된 따옴표 안의 식별자"
+
+#: pgc.l:1076
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "중첩된 /* ... */ 주석"
+
+#: pgc.l:1169
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "EXEC SQL UNDEF 명령에 식별자 누락"
+
+#: pgc.l:1187 pgc.l:1200 pgc.l:1216 pgc.l:1229
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "중첩된 EXEC SQL IFDEF 조건이 너무 많음"
+
+#: pgc.l:1245 pgc.l:1256 pgc.l:1271 pgc.l:1293
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "일치하는 \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\" 누락"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1439
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "\"EXEC SQL ENDIF;\" 누락"
+
+#: pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "두 개 이상의 EXEC SQL ELSE"
+
+#: pgc.l:1318 pgc.l:1332
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "일치하지 않는 EXEC SQL ENDIF"
+
+#: pgc.l:1387
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "EXEC SQL IFDEF 명령에 식별자 누락"
+
+#: pgc.l:1396
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "EXEC SQL DEFINE 명령에 식별자 누락"
+
+#: pgc.l:1429
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "EXEC SQL INCLUDE 명령에 구문 오류 발생"
+
+#: pgc.l:1479
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr ""
+"내부 오류: 상태값을 알 수 없습니다. 이 문제를 <%s> 주소로 "
+"알려주십시오."
+
+#: pgc.l:1631
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "오류: 포함 경로 \"%s/%s\"이(가) %d줄에서 너무 길어서 건너뜀\n"
+
+#: pgc.l:1654
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "포함 파일 \"%s\"을(를) %d줄에서 열 수 없음"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "구문 오류"
+
+#: preproc.y:82
+#, c-format
+msgid "WARNING: "
+msgstr "경고: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "오류: "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "\"%s\" 이름의 커서가 없음"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "형식 정의에 이니셜라이저가 허용되지 않음"
+
+#: preproc.y:543
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "\"string\" 자료형 이름은 인포믹스 모드에서 예약어로 쓰입니다"
+
+#: preproc.y:550 preproc.y:15960
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "\"%s\" 형식이 이미 정의됨"
+
+#: preproc.y:575 preproc.y:16603 preproc.y:16928 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "단순 데이터 형식에 다차원 배열이 지원되지 않음"
+
+#: preproc.y:1704
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "CLOSE DATABASE 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:1952
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "CONNECT 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:1986
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "DISCONNECT 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "SET CONNECTION 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:2063
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "TYPE 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:2072
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "VAR 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:2079
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "WHENEVER 문에 AT 옵션이 허용되지 않음"
+
+#: preproc.y:2156 preproc.y:2328 preproc.y:2333 preproc.y:2456 preproc.y:4034
+#: preproc.y:4682 preproc.y:5624 preproc.y:5924 preproc.y:7542 preproc.y:9081
+#: preproc.y:9086 preproc.y:11921
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "지원되지 않는 기능이 서버에 전달됨"
+
+#: preproc.y:2714
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL이 구현되지 않음"
+
+#: preproc.y:3382
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN이 구현되지 않음"
+
+#: preproc.y:10060 preproc.y:15545
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "서로 다른 선언 구문에서 \"%s\" 변수 사용은 지원하지 않습니다"
+
+#: preproc.y:10062 preproc.y:15547
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "\"%s\" 커서가 이미 정의됨"
+
+#: preproc.y:10502
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "더 이상 지원되지 않는 LIMIT #,# 구문이 서버에 전달됨"
+
+#: preproc.y:10835 preproc.y:10842
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM 절 내의 subquery 에는 반드시 alias 를 가져야만 합니다"
+
+#: preproc.y:15268 preproc.y:15275
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS에서 INTO를 지정할 수 없음"
+
+#: preproc.y:15311
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "\"@\"이 필요한데 \"%s\"이(가) 있음"
+
+#: preproc.y:15323
+#, c-format
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr ""
+"\"tcp\" 및 \"unix\" 프로토콜과 데이터베이스 형식 \"postgresql\"만 지원됨"
+
+#: preproc.y:15326
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "\"://\"가 필요한데 \"%s\"이(가) 있음"
+
+#: preproc.y:15331
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr ""
+"Unix-domain 소켓은 \"localhost\"에서만 작동하며 \"%s\"에서는 작동하지 않음"
+
+#: preproc.y:15357
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "\"postgresql\"이 필요한데 \"%s\"이(가) 있음"
+
+#: preproc.y:15360
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "잘못된 연결 형식: %s"
+
+#: preproc.y:15369
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "\"@\" 또는 \"://\"가 필요한데 \"%s\"이(가) 있음"
+
+#: preproc.y:15444 preproc.y:15462
+#, c-format
+msgid "invalid data type"
+msgstr "잘못된 데이터 형식"
+
+#: preproc.y:15473 preproc.y:15490
+#, c-format
+msgid "incomplete statement"
+msgstr "불완전한 문"
+
+#: preproc.y:15476 preproc.y:15493
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "인식할 수 없는 토큰 \"%s\""
+
+#: preproc.y:15763
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "숫자 및 10진수 데이터 형식에만 전체 자릿수/소수 자릿수 인수 포함"
+
+#: preproc.y:15775
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "여기에는 간격 지정이 허용되지 않음"
+
+#: preproc.y:15935 preproc.y:15987
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "중첩된 구조/union 정의에 수준이 너무 많음"
+
+#: preproc.y:16110
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "varchar에 대한 포인터가 구현되지 않음"
+
+#: preproc.y:16297 preproc.y:16322
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "지원되지 않는 DESCRIBE 문 사용"
+
+#: preproc.y:16569
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "EXEC SQL VAR 명령에 이니셜라이저가 허용되지 않음"
+
+#: preproc.y:16886
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "입력에서 표시기의 배열이 허용되지 않음"
+
+#: preproc.y:17073
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "연산자는 동적 정의 영역에서는 사용할 수 없음"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17114
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s, \"%s\" 부근"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "메모리 부족"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "인식할 수 없는 변수 형식 코드 %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "\"%s\" 변수가 다른 자료형의 지역 변수에 의해 숨겨졌음"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "\"%s\" 변수가 지역 변수에 의해 숨겨졌음"
+
+#: type.c:277
+#, c-format
+msgid ""
+"indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "\"%s\" 지시자 변수가 지역 변수의 다른 자료형 때문에 숨겨졌음"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "\"%s\" 지시자 변수가 지역 변수에 의해 숨겨졌음"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "배열/포인터의 표시기는 배열/포인터여야 함"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "중첩된 배열은 지원되지 않음(문자열 제외)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "구조의 표시기는 구조여야 함"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "단순 데이터 형식의 표시기는 단순이어야 함"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "\"%s\" 지시 구조체는 맴버가 너무 적음"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "\"%s\" 지시 구조체는 맴버가 너무 많음"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "인식할 수 없는 설명자 항목 코드 %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "잘못된 형식의 변수 \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "\"%s\" 변수가 포인터가 아님"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "\"%s\" 변수가 구조나 union의 포인터가 아님"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "\"%s\" 변수가 구조나 union이 아님"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "\"%s\" 변수가 배열이 아님"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "\"%s\" 변수가 선언되지 않음"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "표시기 변수에 정수 형식이 있어야 함"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "인식할 수 없는 데이터 형식 이름 \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "다차원 배열이 지원되지 않음"
+
+#: variable.c:534
+#, c-format
+msgid ""
+"multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural ""
+"multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "다중단계 포인터(2단계 이상)는 지원하지 않음; 발견된 레벨: %d"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "이 데이터 형식에는 포인터에 대한 포인터가 지원되지 않음"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "구조에는 다차원 배열이 지원되지 않음"
diff --git a/src/interfaces/ecpg/preproc/po/pl.po b/src/interfaces/ecpg/preproc/po/pl.po
new file mode 100644
index 0000000..c3a2fe2
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/pl.po
@@ -0,0 +1,674 @@
+# Polish message translation file for ecpg
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Begina Felicysym <begina.felicysym@wp.eu>, 2011, 2012.
+# grzegorz <begina.felicysym@wp.eu>, 2014, 2017.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL 9.1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2017-03-14 17:38+0000\n"
+"PO-Revision-Date: 2017-03-14 19:42+0200\n"
+"Last-Translator: grzegorz <begina.felicysym@wp.eu>\n"
+"Language-Team: begina.felicysym@wp.eu\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "zmienna \"%s\" musi mieć typ numeryczny"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "deskryptor \"%s\" nie istnieje"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "element nagłówka deskryptora \"%d\" nie istnieje"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable jest zawsze 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member jest zawsze 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "element deskryptora \"%s\" nie jest zaimplementowany"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "element deskryptora \"%s\" nie może zostać ustawiony"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s jest osadzonym w PostgreSQL preprocesorem SQL dla programów C.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Sposób użycia:\n"
+" %s [OPCJE]... PLIK...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Opcje:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c automatycznie generuje kod w C z osadzonego kodu SQL;\n"
+" dotyczy to EXEC SQL TYPE\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\"\n"
+msgstr ""
+" -C TRYB ustala tryb kompatybilności; TRYB może być jednym z\n"
+" \"INFORMIX\", \"INFORMIX_SE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d generuje wyjście debugowania parsera\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL definiuje SYMBOL\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h parsuje plik nagłówkowy, opcja ta zawiera opcję \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i parsuje również systemowe pliki nagłówkowe\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I FOLDER przeszukuje FOLDER w poszukiwaniu plików nagłówkowych\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o PLIKOUT zapisuje wynik do PLIKOUT\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPCJA określa zachowanie uruchomienia; OPTCJA może być:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression wykonanie w trybie testów regresyjnych\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t włącza automatyczne zatwierdzanie transakcji\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version wypisuje informacje o wersji i kończy\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help pokazuje ten ekran pomocy i kończy\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Jeżeli nie wskazano pliku wyjścia, nazwa jest tworzona przez dodanie .c\n"
+"do nazwy pliku wejścia, po usunięciu .pgc jeśli obecne.\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Błędy proszę przesyłać na adres <pgsql-bugs@postgresql.org>.\n"
+
+#: ecpg.c:139
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: nie można odnaleźć własnej ścieżki programu wykonywalnego\n"
+
+#: ecpg.c:174 ecpg.c:327 ecpg.c:337
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nie można otworzyć pliku \"%s\": %s\n"
+
+#: ecpg.c:213 ecpg.c:226 ecpg.c:242 ecpg.c:268
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Spróbuj \"%s --help\" aby uzyskać więcej informacji.\n"
+
+#: ecpg.c:237
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: wsparcie debugu analizatora (-d) niedostępne\n"
+
+#: ecpg.c:256
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, preprocesor C osadzony w PostgreSQL, wersja %s\n"
+
+#: ecpg.c:258
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... wyszukiwanie zaczyna się tutaj:\n"
+
+#: ecpg.c:261
+#, c-format
+msgid "end of search list\n"
+msgstr "koniec listy wyszukiwania\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: nie wskazano pliku wejściowego\n"
+
+#: ecpg.c:460
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "kursor \"%s\" został zadeklarowany, ale nie otwarty"
+
+#: ecpg.c:473 preproc.y:127
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "nie można usunąć pliku wyjścia \"%s\"\n"
+
+#: pgc.l:431
+#, c-format
+msgid "unterminated /* comment"
+msgstr "nie zakończony komentarz /*"
+
+#: pgc.l:444
+#, c-format
+msgid "invalid bit string literal"
+msgstr "nieprawidłowa stała łańcucha bitów"
+
+#: pgc.l:453
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "niezakończona stała łańcucha bitów"
+
+#: pgc.l:469
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "niezakończona stała łańcucha szesnastkowego"
+
+#: pgc.l:547
+#, c-format
+msgid "unterminated quoted string"
+msgstr "niezakończona stała łańcuchowa"
+
+#: pgc.l:605 pgc.l:618
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "ograniczony identyfikator o długości zero"
+
+#: pgc.l:626
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "niezakończony łańcuch identyfikatora"
+
+#: pgc.l:881
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "zagnieżdżone komentarze /* ... */"
+
+#: pgc.l:974
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "brakujący identyfikator w poleceniu EXEC SQL UNDEF"
+
+#: pgc.l:1020 pgc.l:1034
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "brak pasującego \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1023 pgc.l:1036 pgc.l:1212
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "brak \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1052 pgc.l:1071
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "więcej niż jeden EXEC SQL ELSE"
+
+#: pgc.l:1093 pgc.l:1107
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "niedopasowany EXEC SQL ENDIF"
+
+#: pgc.l:1127
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "zbyt wiele zagłębień warunków EXEC SQL IFDEF"
+
+#: pgc.l:1160
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "brakujący identyfikator w poleceniu EXEC SQL IFDEF"
+
+#: pgc.l:1169
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "brakujący identyfikator w poleceniu EXEC SQL DEFINE"
+
+#: pgc.l:1202
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "błąd składni w poleceniu EXEC SQL INCLUDE"
+
+#: pgc.l:1251
+#, c-format
+msgid "internal error: unreachable state; please report this to <pgsql-bugs@postgresql.org>"
+msgstr ""
+"błąd wewnętrzny: nieosiągalny stan; proszę przesłać go na adres <pgsql-"
+"bugs@postgresql.org>"
+
+#: pgc.l:1375
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Błąd: załączona ścieżka \"%s/%s\" jest zbyt długa w linii %d, pominięto\n"
+
+#: pgc.l:1398
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "nie można otworzyć załączonego pliku \"%s\" w linii %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "błąd składni"
+
+#: preproc.y:81
+#, c-format
+msgid "WARNING: "
+msgstr "OSTRZEŻENIE: "
+
+#: preproc.y:84
+#, c-format
+msgid "ERROR: "
+msgstr "BŁĄD: "
+
+#: preproc.y:508
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "kursor \"%s\" nie istnieje"
+
+#: preproc.y:537
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicjator niedozwolony w definicji typu"
+
+#: preproc.y:539
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "nazwa typu \"string\" jest zarezerwowana w trybie Informix"
+
+#: preproc.y:546 preproc.y:15234
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "typ \"%s\" już istnieje"
+
+#: preproc.y:570 preproc.y:15892 preproc.y:16212 variable.c:620
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "wielowymiarowe tablice dla prostych typów danych nie są wspierane"
+
+#: preproc.y:1675
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "opcja AT niedozwolona w wyrażeniu CLOSE DATABASE"
+
+#: preproc.y:1886
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "opcja AT niedozwolona w wyrażeniu CONNECT"
+
+#: preproc.y:1920
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "opcja AT niedozwolona w wyrażeniu DISCONNECT"
+
+#: preproc.y:1975
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "opcja AT niedozwolona w wyrażeniu SET CONNECTION"
+
+#: preproc.y:1997
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "opcja AT niedozwolona w wyrażeniu TYPE"
+
+#: preproc.y:2006
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "opcja AT niedozwolona w wyrażeniu VAR"
+
+#: preproc.y:2013
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "opcja AT niedozwolona w wyrażeniu WHENEVER"
+
+#: preproc.y:2265 preproc.y:2270 preproc.y:2386 preproc.y:3923 preproc.y:5434
+#: preproc.y:5443 preproc.y:5751 preproc.y:7247 preproc.y:8659 preproc.y:8664
+#: preproc.y:11368 preproc.y:11989
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "niewspierana cecha zostanie przekazana na serwer"
+
+#: preproc.y:2644
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL nie jest zaimplementowane"
+
+#: preproc.y:3268
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN nie zostało zaimplementowane"
+
+#: preproc.y:9534 preproc.y:14823
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "użycie zmiennej \"%s\" w innych wyrażeniach deklaracji nie jest wspierane"
+
+#: preproc.y:9536 preproc.y:14825
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "kursor \"%s\" już istnieje"
+
+#: preproc.y:9966
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "już nie wspierana składnia LIMIT #,# przesłana na serwer"
+
+#: preproc.y:10282 preproc.y:10289
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "podzapytanie z FROM musi mieć alias"
+
+#: preproc.y:14553
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS nie może zawierać INTO"
+
+#: preproc.y:14589
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "oczekiwano \"@\", znaleziono \"%s\""
+
+#: preproc.y:14601
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr ""
+"tylko protokoły \"tcp\" i \"unix\" oraz typ bazy danych \"postgresql\" są "
+"wspierane"
+
+#: preproc.y:14604
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "oczekiwano \"://\", znaleziono \"%s\""
+
+#: preproc.y:14609
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Gniazda dziedziny Uniksa działają tylko na \"localhost\" a nie na \"%s\""
+
+#: preproc.y:14635
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "oczekiwano \"postgresql\", znaleziono \"%s\""
+
+#: preproc.y:14638
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "niepoprawny typ połączenia: %s"
+
+#: preproc.y:14647
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "oczekiwano \"@\" lub \"://\", znaleziono \"%s\""
+
+#: preproc.y:14722 preproc.y:14740
+#, c-format
+msgid "invalid data type"
+msgstr "niepoprawny typ danych"
+
+#: preproc.y:14751 preproc.y:14768
+#, c-format
+msgid "incomplete statement"
+msgstr "niepełne wyrażenie"
+
+#: preproc.y:14754 preproc.y:14771
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "niezrozumiały token \"%s\""
+
+#: preproc.y:15045
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "tylko typy danych numeric i decimal mają argument precyzji/skali"
+
+#: preproc.y:15057
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "specyfikacja interwału niedozwolona tutaj"
+
+#: preproc.y:15209 preproc.y:15261
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "zbyt wiele poziomów w zagnieżdżonej definicji structure/union"
+
+#: preproc.y:15400
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "wskazania na varchar nie są zaimplementowane"
+
+#: preproc.y:15587 preproc.y:15612
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "użycie niewspieranego wyrażenia DESCRIBE"
+
+#: preproc.y:15859
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicjator niedopuszczalny w poleceniu EXEC SQL VAR"
+
+#: preproc.y:16170
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "tabele wskazań nie są dozwolone w wejściu"
+
+#: preproc.y:16391
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operator niedozwolony w definicji zmiennej"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:16429
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s w lub pobliżu \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "brak pamięci"
+
+#: type.c:212 type.c:664
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "niezrozumiały kod typu zmiennej %d"
+
+#: type.c:261
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "zmienna \"%s\" została przykryta przez zmienną lokalną innego typu"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "zmienna \"%s\" została przykryta przez zmienną lokalną"
+
+#: type.c:275
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr ""
+"zmienna wskaźnikowa \"%s\" została przykryta przez zmienną lokalną innego typu"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "zmienna wskaźnikowa \"%s\" została przykryta przez zmienną lokalną"
+
+#: type.c:285
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "wskaźnik do array/pointer musi być array/pointer"
+
+#: type.c:289
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "tabele zagnieżdżone nie są wspierane (poza ciągami znaków)"
+
+#: type.c:331
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "wskaźnik do struct musi być struct"
+
+#: type.c:351 type.c:372 type.c:392
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "wskaźnik do prostego typu danych musi być prosty"
+
+#: type.c:723
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "niezrozumiały kod deskryptora elementu %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "niepoprawnie utworzona zmienna \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "zmienna \"%s\" nie jest wskaźnikiem"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "zmienna \"%s\" nie jest wskazaniem na structure ani union"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "zmienna \"%s\" nie jest ani structure ani union"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "zmienna \"%s\" nie jest tablicą"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "zmienna \"%s\" nie została zadeklarowana"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "zmienna wskaźnikowa musi mieć typ integer"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "niezrozumiała nazwa typu danych \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "wielowymiarowe tablice nie są wspierane"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] ""
+"wielopoziomowe wskaźniki (więcej niż 2 poziomy) nie są wspierane; znaleziono "
+"%d poziom"
+msgstr[1] ""
+"wielopoziomowe wskaźniki (więcej niż 2 poziomy) nie są wspierane; znaleziono "
+"%d poziomy"
+msgstr[2] ""
+"wielopoziomowe wskaźniki (więcej niż 2 poziomy) nie są wspierane; znaleziono "
+"%d poziomów"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "wskazanie na wskaźnik nie jest wspierane dla tego typu danych"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "wielowymiarowe tablice dla struktur nie są wspierane"
+
+#~ msgid "COPY FROM STDOUT is not possible"
+#~ msgstr "COPY FROM STDOUT nie jest możliwe"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "COPY TO STDIN nie jest możliwe"
diff --git a/src/interfaces/ecpg/preproc/po/pt_BR.po b/src/interfaces/ecpg/preproc/po/pt_BR.po
new file mode 100644
index 0000000..f64ecae
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/pt_BR.po
@@ -0,0 +1,653 @@
+# Brazilian Portuguese message translation file for ecpg
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Fernando Ike de Oliveira <fike@midstorm.org>, 2009.
+# Euler Taveira de Oliveira <euler@timbira.com>, 2010-2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-10-25 16:32-0300\n"
+"PO-Revision-Date: 2018-06-25 08:59+0200\n"
+"Last-Translator: Euler Taveira de Oliveira <euler@timbira.com>\n"
+"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n>1);\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "variável \"%s\" deve ter um tipo númerico"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "descritor \"%s\" não existe"
+
+#: descriptor.c:161 descriptor.c:212
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "item do cabeçalho do descritor \"%d\" não existe"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable é sempre 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member é sempre 0"
+
+#: descriptor.c:279
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "item do descritor \"%s\" não está implementado"
+
+#: descriptor.c:289
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "item do descritor \"%s\" não pode ser definido"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr "%s é o pré-processador SQL embutido do PostgreSQL para programas em C.\n\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Uso:\n"
+" %s [OPÇÃO]... ARQUIVO...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Opções:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c gera automaticamente código C a partir do código SQL embutido;\n"
+" isso afeta o EXEC SQL TYPE\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\"\n"
+msgstr ""
+" -C mode define o modo de compatilidade; MODE pode ser um de\n"
+" \"INFORMIX\", \"INFORMIX_SE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d gera saída de depuração do analisador\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SÍMBOLO define SÍMBOLO\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h analisa um arquivo de cabeçalho, essa opção inclui a opção \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i analisa arquivos de cabeçalho do sistema também\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRETÓRIO procura DIRETÓRIO para incluir arquivos\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o ARQUIVO grava resultado no ARQUIVO\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPÇÃO especifica comportamento em tempo de execução; OPÇÃO pode ser:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression executa em modo de teste de regressão\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t habilita o auto efetivação de transações\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version mostra informação sobre a versão e termina\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostra essa ajuda e termina\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Se nenhum arquivo de saída for especificado, o nome é formado adicionando .c ao\n"
+"nome do arquivo de entrada, após remover .pgc se presente.\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Relate erros a <pgsql-bugs@postgresql.org>.\n"
+
+#: ecpg.c:139
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: não pôde localizar meu próprio caminho executável\n"
+
+#: ecpg.c:175 ecpg.c:326 ecpg.c:336
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: não pôde abrir arquivo \"%s\": %s\n"
+
+#: ecpg.c:214 ecpg.c:227 ecpg.c:243 ecpg.c:268
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Tente \"%s --help\" para obter informações adicionais.\n"
+
+#: ecpg.c:238
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: suporte a depuração do analisador (-d) não está disponível\n"
+
+#: ecpg.c:256
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %d.%d.%d\n"
+msgstr "%s, the pré-processador C embutido do PostgreSQL, versão %d.%d.%d\n"
+
+#: ecpg.c:258
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... pesquisa inicia aqui:\n"
+
+#: ecpg.c:261
+#, c-format
+msgid "end of search list\n"
+msgstr "fim da lista de pesquisa\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: nenhum arquivo de entrada foi especificado\n"
+
+#: ecpg.c:459
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "cursor \"%s\" foi declarado mas não foi aberto"
+
+#: ecpg.c:472 preproc.y:127
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "não pôde remover arquivo de saída \"%s\"\n"
+
+#: pgc.l:440
+#, c-format
+msgid "unterminated /* comment"
+msgstr "comentário /* não foi terminado"
+
+#: pgc.l:453
+#, c-format
+msgid "invalid bit string literal"
+msgstr "cadeia de bits inválida"
+
+#: pgc.l:462
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "cadeia de bits não foi terminada"
+
+#: pgc.l:478
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "cadeia de caracteres hexadecimal não foi terminada"
+
+#: pgc.l:556
+#, c-format
+msgid "unterminated quoted string"
+msgstr "cadeia de caracteres entre aspas não foi terminada"
+
+#: pgc.l:613 pgc.l:626
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identificador delimitado tem tamanho zero"
+
+#: pgc.l:634
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identificador entre aspas não foi terminado"
+
+#: pgc.l:889
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "comentários /* ... */ aninhados"
+
+#: pgc.l:982
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "faltando identificador no comando EXEC SQL UNDEF"
+
+#: pgc.l:1028 pgc.l:1042
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "faltando correspondente \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1031 pgc.l:1044 pgc.l:1220
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "faltando \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1060 pgc.l:1079
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mais de um EXEC SQL ELSE"
+
+#: pgc.l:1101 pgc.l:1115
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF não tem correspondente"
+
+#: pgc.l:1135
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "muitas condições EXEC SQL IFDEF aninhadas"
+
+#: pgc.l:1168
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "faltando identificador no comando EXEC SQL IFDEF"
+
+#: pgc.l:1177
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "faltando identificador no comando EXEC SQL IFDEF"
+
+#: pgc.l:1210
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "erro de sintaxe no comando EXEC SQL INCLUDE"
+
+#: pgc.l:1259
+#, c-format
+msgid "internal error: unreachable state; please report this to <pgsql-bugs@postgresql.org>"
+msgstr "erro interno: estado inacessível; por favor relato isso a <pgsql-bugs@postgresql.org>"
+
+#: pgc.l:1383
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Erro: caminho de inclusão \"%s/%s\" é muito longo na linha %d, ignorando\n"
+
+#: pgc.l:1406
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "não pôde abrir arquivo de inclusão \"%s\" na linha %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "erro de sintaxe"
+
+#: preproc.y:81
+#, c-format
+msgid "WARNING: "
+msgstr "AVISO: "
+
+#: preproc.y:84
+#, c-format
+msgid "ERROR: "
+msgstr "ERRO: "
+
+#: preproc.y:508
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "cursor \"%s\" não existe"
+
+#: preproc.y:537
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicializador não é permitido na definição do tipo"
+
+#: preproc.y:539
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "nome de tipo \"string\" é reservado no modo Informix"
+
+#: preproc.y:546 preproc.y:14626
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "tipo \"%s\" já está definido"
+
+#: preproc.y:570 preproc.y:15284 preproc.y:15604 variable.c:620
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "matrizes multidimensionais para tipo de dados simples não são suportadas"
+
+#: preproc.y:1634
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "opção AT não é permitida no comando CLOSE DATABASE"
+
+#: preproc.y:1849
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "opção AT não é permitida no comando CONNECT"
+
+#: preproc.y:1883
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "opção AT não é permitida no comando DISCONNECT"
+
+#: preproc.y:1938
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "opção AT não é permitida no comando SET CONNECTION"
+
+#: preproc.y:1960
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "opção AT não é permitida no comando TYPE"
+
+#: preproc.y:1969
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "opção AT não é permitida no comando VAR"
+
+#: preproc.y:1976
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "opção AT não é permitida no comando WHENEVER"
+
+#: preproc.y:2228 preproc.y:2233 preproc.y:2349 preproc.y:3759 preproc.y:5173
+#: preproc.y:5182 preproc.y:5466 preproc.y:6902 preproc.y:8140 preproc.y:8145
+#: preproc.y:10776 preproc.y:11393
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "funcionalidade não suportada será enviada ao servidor"
+
+#: preproc.y:2607
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL não está implementado"
+
+#: preproc.y:3147
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN não está implementado"
+
+#: preproc.y:9035 preproc.y:14215
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "utilizar variável \"%s\" em comandos de declaração diferentes não é suportado"
+
+#: preproc.y:9037 preproc.y:14217
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "cursor \"%s\" já está definido"
+
+#: preproc.y:9467
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "sintaxe LIMIT #,# que não é suportada foi enviada ao servidor"
+
+#: preproc.y:9775 preproc.y:9782
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "subconsulta no FROM deve ter um aliás"
+
+#: preproc.y:13945
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS não pode especificar INTO"
+
+#: preproc.y:13981
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "esperado \"@\", encontrado \"%s\""
+
+#: preproc.y:13993
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "somente os protocolos \"tcp\" e \"unix\" e tipo banco de dados \"postgressql\" sãosuportados"
+
+#: preproc.y:13996
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "esperado \"://\", encontrado \"%s\""
+
+#: preproc.y:14001
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Soquetes de domínio Unix trabalham somente com \"localhost\" e não com \"%s\""
+
+#: preproc.y:14027
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "esperado \"postgresql\", encontrado \"%s\""
+
+#: preproc.y:14030
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "tipo de conexão inválido: %s"
+
+#: preproc.y:14039
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "esperado \"@\" ou \"://\", encontrado \"%s\""
+
+#: preproc.y:14114 preproc.y:14132
+#, c-format
+msgid "invalid data type"
+msgstr "tipo de dado inválido"
+
+#: preproc.y:14143 preproc.y:14160
+#, c-format
+msgid "incomplete statement"
+msgstr "comando incompleto"
+
+#: preproc.y:14146 preproc.y:14163
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "informação desconhecida \"%s\""
+
+#: preproc.y:14437
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "somente os tipos de dados numeric e decimal possuem argumento de precisão/escala"
+
+#: preproc.y:14449
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "especificação de intervalo não é permitida aqui"
+
+#: preproc.y:14601 preproc.y:14653
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "muitos níveis em definição aninhada de estrutura/união"
+
+#: preproc.y:14792
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "ponteiros para varchar não estão implentados"
+
+#: preproc.y:14979 preproc.y:15004
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "utilizando comando DESCRIBE que não é suportado"
+
+#: preproc.y:15251
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicilização não é permitido no comando EXEC SQL VAR"
+
+#: preproc.y:15562
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "matrizes do indicadores não são permitidas na entrada"
+
+#: preproc.y:15783
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operador não é permitido na definição da variável"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:15821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s em ou próximo a \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "sem memória"
+
+#: type.c:212 type.c:664
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "tipo de código de variável %d é desconhecido"
+
+#: type.c:261
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "variável \"%s\" está escondida por uma variável local de um tipo diferente"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "variável \"%s\" está escondida por uma variável local"
+
+#: type.c:275
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "variável de indicador \"%s\" está escondida por uma variável local de um tipo diferente"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "variável de indicador \"%s\" está escondida por uma variável local"
+
+#: type.c:285
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "indicador para matriz/ponteiro tem de ser matriz/ponteiro"
+
+#: type.c:289
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "matrizes aninhadas não são suportadas (exceto cadeia de caracteres)"
+
+#: type.c:331
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "indicador para struct tem que ser struct"
+
+#: type.c:351 type.c:372 type.c:392
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "indicador para tipo de dados simples tem que ser simples"
+
+#: type.c:723
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "código do item do descritor %d é desconhecido"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "variável \"%s\" possui formato incorreto"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "variável \"%s\" não é um ponteiro"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "variável \"%s\" não é um ponteiro para uma estrutura ou uma união"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "variável \"%s\" não é nem uma estrutura nem uma união"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "variável \"%s\" não é uma matriz"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "variável \"%s\" não foi declarada"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "variável de indicador deve ter um tipo inteiro"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "nome do tipo dados \"%s\" é desconhecido"
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "matrizes multidimensionais não são suportadas"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "ponteiros com múltiplos níveis (mais do que 2 níveis) não são suportados; %d nível encontrado"
+msgstr[1] "ponteiros com múltiplos níveis (mais do que 2 níveis) não são suportados; %d níveis encontrados"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "ponteiro para ponteiro não é suportado para esse tipo de dado"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "matrizes multidimensionais para estruturas não são suportadas"
diff --git a/src/interfaces/ecpg/preproc/po/ru.po b/src/interfaces/ecpg/preproc/po/ru.po
new file mode 100644
index 0000000..056cd13
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/ru.po
@@ -0,0 +1,741 @@
+# Russian message translation file for ecpg
+# Copyright (C) 2012-2016 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Alexander Lakhin <exclusion@gmail.com>, 2012-2017, 2018, 2019, 2020, 2021.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-09-01 12:57+0300\n"
+"PO-Revision-Date: 2021-09-04 10:54+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "переменная \"%s\" должна иметь числовой тип"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "дескриптор %s, привязанный к соединению %s, не существует"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "дескриптор %s, привязанный к соединению по умолчанию, не существует"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "заголовок дескриптора не содержит элемент \"%d\""
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "NULLABLE всегда равно 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "KEY_MEMBER всегда равно 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "поле \"%s\" в дескрипторе не реализовано"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "установить поле \"%s\" в дескрипторе нельзя"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s - препроцессор SQL-вставок в программах на C для PostgreSQL.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Использование:\n"
+" %s [ПАРАМЕТР]... ФАЙЛ...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Параметры:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c автоматически генерировать код C из внедрённого SQL-кода;\n"
+" (это касается EXEC SQL TYPE)\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C РЕЖИМ установить режим совместимости; допустимый РЕЖИМ:\n"
+" \"INFORMIX\", \"INFORMIX_SE\" или \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d генерировать отладочные сообщения при разборе\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D СИМВОЛ определить (define) СИМВОЛ\n"
+
+#: ecpg.c:50
+#, c-format
+msgid ""
+" -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h разобрать файл заголовка (включает параметр \"-c\")\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i разобрать также системные включаемые файлы\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I КАТАЛОГ искать включаемые файлы в указанном каталоге\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o ФАЙЛ записать результат в ФАЙЛ\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r ПАРАМЕТР определить режим выполнения; допустимый ПАРАМЕТР:\n"
+" \"no_indicator\", \"prepare\" или \"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression запустить в режиме тестирования регрессии\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t включить автофиксацию транзакций\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version показать версию и выйти\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показать эту справку и выйти\n"
+
+# skip-rule: space-before-period
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Если выходной файл не указан, к имени входного файла без расширения .pgc\n"
+"добавляется .c.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Об ошибках сообщайте по адресу <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашняя страница %s: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: не удалось найти путь к собственному исполняемому файлу\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: не удалось открыть файл \"%s\": %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Для дополнительной информации попробуйте \"%s --help\".\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: отладочные сообщения при разборе (-d) не поддерживаются\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, препроцессор внедрённого в С языка СУБД PostgreSQL, версия %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "поиск файлов для EXEC SQL INCLUDE ... начинается в каталогах:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "конец списка поиска\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: нет входных файлов\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "курсор \"%s\" был объявлен, но не открыт"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "ошибка при удалении выходного файла \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "незавершённый комментарий /*"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "оборванная битовая строка"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "оборванная шестнадцатеричная строка"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "неверная битовая строка"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "неверная шестнадцатеричная строка"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr ""
+"необрабатываемое предыдущее состояние при обнаружении закрывающего "
+"апострофа\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "незавершённая строка в кавычках"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "незавершённая строка с $"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "пустой идентификатор в кавычках"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "незавершённый идентификатор в кавычках"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "вложенные комментарии /* ... */"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "в команде EXEC SQL UNDEF отсутствует идентификатор"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "слишком много вложенных условий EXEC SQL IFDEF"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "нет соответствующего \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "отсутствует \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "неоднократная команда EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "непарная команда EXEC SQL ENDIF"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "в команде EXEC SQL IFDEF отсутствует идентификатор"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "в команде EXEC SQL DEFINE отсутствует идентификатор"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "ошибка синтаксиса в команде EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "внутренняя ошибка: недостижимое состояние; пожалуйста, сообщите в <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr ""
+"Ошибка: путь включаемых файлов \"%s/%s\" в строке %d слишком длинный, "
+"пропускается\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "не удалось открыть включаемый файл \"%s\" (строка %d)"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "ошибка синтаксиса"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "ПРЕДУПРЕЖДЕНИЕ: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "ОШИБКА: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "курсор \"%s\" не существует"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "определение типа не может включать инициализатор"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "имя типа \"string\" в режиме Informix зарезервировано"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "тип \"%s\" уже определён"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "многомерные массивы с простыми типами данных не поддерживаются"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "подключение %s заменяется на %s оператором DECLARE %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "оператор CLOSE DATABASE с параметром AT не поддерживается"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "оператор CONNECT с параметром AT не поддерживается"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "оператор DISCONNECT с параметром AT не поддерживается"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "оператор SET CONNECTION с параметром AT не поддерживается"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "оператор TYPE с параметром AT не поддерживается"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "оператор VAR с параметром AT не поддерживается"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "оператор WHENEVER с параметром AT не поддерживается"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "неподдерживаемая функция будет передана серверу"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL не реализовано"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "операция COPY FROM STDIN не реализована"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr ""
+"в режиме INFORMIX нельзя использовать \"database\" в качестве имени курсора"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr ""
+"использование переменной \"%s\" в разных операторах DECLARE не поддерживается"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "курсор \"%s\" уже определён"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "не поддерживаемое более предложение LIMIT #,# передано на сервер"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "подзапрос во FROM должен иметь псевдоним"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "в CREATE TABLE AS нельзя указать INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "ожидался знак \"@\", но на этом месте \"%s\""
+
+#: preproc.y:16997
+#, c-format
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr ""
+"поддерживаются только протоколы \"tcp\" и \"unix\", а тип базы данных - "
+"\"postgresql\""
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "ожидалось \"://\", но на этом месте \"%s\""
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-сокеты работают только с \"localhost\", но не с адресом \"%s\""
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "ожидался тип \"postgresql\", но на этом месте \"%s\""
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "неверный тип подключения: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "ожидалось \"@\" или \"://\", но на этом месте \"%s\""
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "неверный тип данных"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "неполный оператор"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "нераспознанное ключевое слово \"%s\""
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "имя \"%s\" уже объявлено"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr ""
+"точность/масштаб можно указать только для типов данных numeric и decimal"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "определение интервала здесь не допускается"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "слишком много уровней в определении вложенной структуры/объединения"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "указатели на varchar не реализованы"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "команда EXEC SQL VAR не может включать инициализатор"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "массивы индикаторов на входе недопустимы"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "недопустимый оператор в определении переменной"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s (примерное положение: \"%s\")"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "нехватка памяти"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "нераспознанный код типа переменной %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "переменная \"%s\" скрыта локальной переменной другого типа"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "переменная \"%s\" скрыта локальной переменной"
+
+#: type.c:277
+#, c-format
+msgid ""
+"indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "переменная-индикатор \"%s\" скрыта локальной переменной другого типа"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "переменная-индикатор \"%s\" скрыта локальной переменной"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "индикатор для массива/указателя должен быть массивом/указателем"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "вложенные массивы не поддерживаются (за исключением строк)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "индикатор структуры должен быть структурой"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "индикатор простого типа должен быть простым"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "в структуре индикаторе \"%s\" слишком мало членов"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "в структуре индикаторе \"%s\" слишком много членов"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "нераспознанный код элемента дескриптора %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "неправильно оформленная переменная \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "переменная \"%s\" - не указатель"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "переменная \"%s\" - не указатель на структуру или объединение"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "переменная \"%s\" - не структура и не объединение"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "переменная \"%s\" - не массив"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "переменная \"%s\" не объявлена"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "переменная-индикатор должна быть целочисленной"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "нераспознанное имя типа данных \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "многомерные массивы не поддерживаются"
+
+#: variable.c:534
+#, c-format
+msgid ""
+"multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural ""
+"multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] ""
+"многоуровневые указатели (больше 2 уровней) не поддерживаются, обнаружен %d "
+"уровень"
+msgstr[1] ""
+"многоуровневые указатели (больше 2 уровней) не поддерживаются, обнаружено %d "
+"уровня"
+msgstr[2] ""
+"многоуровневые указатели (больше 2 уровней) не поддерживаются, обнаружено %d "
+"уровней"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "для этого типа данных указатели на указатели не поддерживаются"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "многомерные массивы структур не поддерживаются"
+
+#~ msgid "using unsupported DESCRIBE statement"
+#~ msgstr "используется неподдерживаемый оператор DESCRIBE"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Об ошибках сообщайте по адресу <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid "declared name \"%s\" is already defined"
+#~ msgstr "объявленное имя \"%s\" уже определено"
+
+#~ msgid "COPY FROM STDOUT is not possible"
+#~ msgstr "операция COPY FROM STDOUT невозможна"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "операция COPY TO STDIN невозможна"
diff --git a/src/interfaces/ecpg/preproc/po/sv.po b/src/interfaces/ecpg/preproc/po/sv.po
new file mode 100644
index 0000000..a0ff805
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/sv.po
@@ -0,0 +1,699 @@
+# SWEDISHE message translation file for ecpg
+# Copyright (C) 2017 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Dennis Björklund <db@zigo.dhs.org>, 2017, 2018, 2019, 2020, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-11-06 17:09+0000\n"
+"PO-Revision-Date: 2021-11-06 21:58+0100\n"
+"Last-Translator: Dennis Björklund <db@zigo.dhs.org>\n"
+"Language-Team: Swedish <pgsql-translators@postgresql.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "variabel \"%s\" måste ha en numerisk typ"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "deskriptor %s kopplad till anslutning %s finns inte"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "deskriptor %s kopplad till standardanslutning finns inte"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "deskriptor-header-post \"%d\" finns inte"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable är alltid 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member är alltid 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "deskriptor-post \"%s\" är inte implementerad"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "deskriptor-post \"%s\" kan inte sättas"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s är PostgreSQLs inbäddade SQL-preprocessor för C-program.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Användning:\n"
+" %s [FLAGGA]... FIL...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Flaggor:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c generera automatiskt C-kod från inbäddad SQL-kod;\n"
+" detta påverkar EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C LÄGE sätt kompabilitetsläge; LÄGE kan vara en av\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d generera parser-debug-utmatning\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL definiera SYMBOL\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h parsa en header-fil, denna flagga inkluderar flaggan \"-c\"\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i parsa system-include-filer dessutom\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I KATALOG sök i KATALOG efter include-filer\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o UTFIL skriv resultat till UTFIL\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r FLAGGA ange runtime-beteende; FLAGGA kan vara en av:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression kör i regressions-test-läge\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t slå på auto-commit av transaktioner\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help visa denna hjälp, avsluta sedan\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Om ingen utdatafil anges så skapas namnet genom att lägga till .c till\n"
+"indatafilnamnet, detta efter att .pgc strippats bort om det var med.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Rapportera fel till <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "hemsida för %s: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: kunde inte hitta min egna körbara fils sökväg\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: kunde inte öppna fil \"%s\": %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Försök med \"%s --help\" för mer information.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: parser-debug-stöd (-d) är inte tillgängligt\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQLs inbäddade C-preprocessor, version %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... sökning startar här:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "slut på söklista\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: inga indatafiler angivna\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "markören \"%s\" har deklarerats men inte öppnats"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "kunde inte ta bort utdatafil \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "ej avslutad /*-kommentar"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "ej avslutad bitsträngslitteral"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "ej avslutad hexadecimal stränglitteral"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "ogiltig bit-sträng-literal"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "ogiltig hex-sträng-literal"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "tidigare state i xqs som ej kan hanteras\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "icketerminerad citerad sträng"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "icke terminerad dollarciterad sträng"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "noll-längds avdelad identifierare"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "ej avslutad citerad identifierare"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "nästlade /* ... */-kommentarer"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "saknar identifierare i EXEC SQL UNDEF-kommando"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "för många nästlade EXEC SQL IFDEF-villkor"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "saknar matchande \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "saknar \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mer än en EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "ej matchad EXEC SQL ENDIF"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "saknar identifierare i EXEC SQL IFDEF-kommando"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "saknar identifierare i EXEC SQL DEFINE-kommando"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "syntaxfel i EXEC SQL INCLUDE-kommando"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "internt fel: state som ej skall kunna nås; vänligen rapportera detta till <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Fel: include-sökväg \"%s/%s\" är för lång på rad %d, hoppar över\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "kunde inte öppna inkludefil \"%s\" på rad %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "syntaxfel"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "VARNING: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "FEL: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "markör \"%s\" existerar inte"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "initialiserare tillåts inte i typdefinition"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "typnamn \"string\" är reserverat i Informix-läge"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "typen \"%s\" är redan definierad"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "multidimensionella array:er för enkla datatyper stöds inte"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "anslutning %s överskriven med %s av DECLARE-sats %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT-flaggan tillåts inte i CLOSE DATABASE-sats"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT-flaggan tillåts inte i CONNECT-sats"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT-flaggan tillåts inte i DISCONNECT-sats"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT-flaggan tillåts inte i SET CONNECTION-sats"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT-flaggan tillåts inte i TYPE-sats"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT-flaggan tillåts inte i VAR-sats"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT-flaggan tillåts inte i WHENEVER-sats"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "ej stödd funktion skickass till servern"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL är inte implementerad"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN är inte implementerad"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "\"database\" kan inte användas som markörsnamn i INFORMIX-läge"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "använda variabel \"%s\" i olika deklarationssatser stöds inte"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "markören \"%s\" är redan definierad"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "ej längre stödd syntax LIMIT #,# har skickats till servern"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "subfråga i FROM måste ha ett alias"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS kan inte ange INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "förväntade \"@\", hittade \"%s\""
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "bara protokoll \"tcp\" och \"unix\" samt databastyp \"postgresql\" stöds"
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "förväntade \"://\", hittade \"%s\""
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-domän-socket fungerart bara på \"localhost\" men inte på \"%s\""
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "förväntade \"postgresql\", hittade \"%s\""
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "ogiltig anslutningstyp: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "förväntade \"@\" eller \"://\", hittade \"%s\""
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "ogiltig datatyp"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "ofullständig sats"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "okänd symbol \"%s\""
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "namnet \"%s\" är redan deklarerat"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "bara datatyperna numeric och decimal har precision/skala-argument"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "intervallspecifikation tillåts inte här"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "för många nästlade nivåer i struktur/union-definition"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "pekare till varchar är inte implementerat"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initialiserare tillåts inte i EXEC SQL VAR-kommando"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "array:er av indikatorer tillåts inte vid indata"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "operator tillåts inte i variabeldefinition"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s vid eller nära \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "slut på minne"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "okänd variabeltypkod %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "variabel \"%s\" döljs av en lokal variabel av annan typ"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "variabel \"%s\" döljs av en lokal variabel"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "indikatorvariabel \"%s\" döljs av en lokal variabel av annan typ"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "indikatorvariabel \"%s\" döljs av en lokal variabel"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "indikator för array/pekare måste vara en array/pekare"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "nästlade array:er stöds inte (förutom strängar)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "indikator för en struktur måste vara en struktur"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "indikator för enkla datatyper måste vara enkel"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "indikatorstruktur \"%s\" har för få medlemmar"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "indikatorstruktur \"%s\" har för många medlemmar"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "okänd deskriptor-post-kod %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "inkorrekt formatterad variabel \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "variabel \"%s\" är inte en pekare"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "variabel \"%s\" är inte en pekare till en struktur eller union"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "variabel \"%s\" är varken en struktur eller en union"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "variabel \"%s\" är inte en array"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "variabel \"%s\" är inte deklarerad"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "indikatorvariabel måste ha en heltalstyp"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "okänt datatypsnamn \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "multidimensionella array:er stöds inte"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "multinivåpekare (mer än 2 nivåer) stöds inte; hittade %d nivå"
+msgstr[1] "multinivåpekare (mer än 2 nivåer) stöds inte; hittade %d nivåer"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "pekare till pekare stöds inte för denna datatyp"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "multidimensionella array:er av strukturer stöds inte"
diff --git a/src/interfaces/ecpg/preproc/po/tr.po b/src/interfaces/ecpg/preproc/po/tr.po
new file mode 100644
index 0000000..dc19759
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/tr.po
@@ -0,0 +1,699 @@
+# LANGUAGE message translation file for ecpg
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+# Abdullah GÜLNER <agulner@gmail.com>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 8.4\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-04-26 13:39+0000\n"
+"PO-Revision-Date: 2021-09-16 09:37+0200\n"
+"Last-Translator: Abdullah GÜLNER <agulner@gmail.com>\n"
+"Language-Team: Turkish <ceviri@postgresql.org.tr>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "\"%s\" değişkeninin sayısal veri tipi olmalı"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "\"%s\" açıklayıcısı mevcut değil"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "\"%d\" açıklayıcı başlık maddesi mevcut değil"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable her zaman 1'dir"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member her zaman 0'dır."
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "\"%s\" açıklayıcı öğesi kodlanmamıştır"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "\"%s\" açıklayıcı öğesi ayarlanamaz"
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s C programları için PostgreSQL'e gömüşü SQL önişlemcisidir.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Kullanımı:\n"
+" %s [SEÇENEK]... DOSYA...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Seçenekler:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c gömülü SQL kodundan otomatik olarak C kodu üret;\n"
+" bu EXEC SQL TYPE'ı etkiler\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MOD uyumluluk modunu ayarla; MOD aşağıdakilerden birisi olabilir\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d ayrıştırıcı hata ayıklama çıktısını oluştur\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SEMBOL SEMBOLü tanımla\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h başlık dosyasını ayrıştır; bu seçenek \"-c\" seçeneğini içerir\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i sistem include dosyalarını da ayrıştırl\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DİZİN dosyaları içermek için DİZİN dizinini araştır\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o ÇIKTI DOSYASI sonucu ÇIKTI DOSYASIna yaz\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r SEÇENEK çalışma zamanı davranışını belirt; SEÇENEK şunlardan birisi olabilir:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression regression testi modunda çalış\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t transactionların otomatik commit olması özelliğini aç\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version sürüm bilgisini göster, sonra çık\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help bu yardımı göster, sonra çık\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Eğer çıktı dosyası belirtilmediyse, dosyanın adı eğer sonunda .pgc varsa\n"
+"kaldırıldıktan sonra girdi dosyasının sonuna .c eklenerek oluşturulur.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+msgstr ""
+"\n"
+"Hataları <pgsql-bugs@lists.postgresql.org> adresine bildirebilirsiniz.\n"
+
+#: ecpg.c:182
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: kendi çalıştırılabilir dosyamın yolunu bulamadım\n"
+
+#: ecpg.c:217 ecpg.c:374 ecpg.c:385
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: \"%s\" dosyası açılamadı: %s\n"
+
+#: ecpg.c:260 ecpg.c:273 ecpg.c:289 ecpg.c:315
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Daha fazla bilgi için \"%s --help\" yazın\n"
+
+#: ecpg.c:284
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: ayrıştırıcı hata ayıklama desteği (-d) yok\n"
+
+#: ecpg.c:303
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL gömülü C önişlemcisi, %s sürümü\n"
+
+#: ecpg.c:305
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... araması burada başlıyor:\n"
+
+#: ecpg.c:308
+#, c-format
+msgid "end of search list\n"
+msgstr "arama listesinin sonu\n"
+
+#: ecpg.c:314
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: girdi dosyası belirtilmedi\n"
+
+#: ecpg.c:497
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "\"%s\" imleci tanımlanmış ama açılmamış"
+
+#: ecpg.c:510 preproc.y:129
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "\"%s\" çıktı dosyası kaldırılamadı\n"
+
+#: pgc.l:472
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/* açıklama sonlandırılmamış"
+
+#: pgc.l:490
+#, c-format
+msgid "invalid bit string literal"
+msgstr "geçersiz bit dizini bilgisi"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "sonuçlandırılmamış bit string literal"
+
+#: pgc.l:518
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "sonuçlandırılmamış hexadecimal string literal"
+
+#: pgc.l:614 pgc.l:718
+#, c-format
+msgid "unterminated quoted string"
+msgstr "sonuçlandırılmamış tırnakla sınırlandırılmış satır"
+
+#: pgc.l:665
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "sonlandırılmamış dolar işaretiyle sınırlandırılmış satır"
+
+#: pgc.l:684 pgc.l:697
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "sınırlandırılmış tanım sıfır uzunluklu"
+
+#: pgc.l:709
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "sonuçlandırılmamış tırnakla sınırlandırılmış tanım"
+
+#: pgc.l:1040
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "iç içe /* ... */ açıklamalar (comment)"
+
+#: pgc.l:1133
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "EXEC SQL UNDEF komutunda eksik tanımlayıcı"
+
+#: pgc.l:1179 pgc.l:1193
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "eksik \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\" eşleşmesi"
+
+#: pgc.l:1182 pgc.l:1195 pgc.l:1371
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "eksik \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1211 pgc.l:1230
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "birden fazla EXEC SQL ELSE"
+
+#: pgc.l:1252 pgc.l:1266
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "eşlenmeyen EXEC SQL ENDIF"
+
+#: pgc.l:1286
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "Çok fazla yuvalanmış EXEC SQL IFDEF koşulu"
+
+#: pgc.l:1319
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "EXEC SQL IFDEF komutunda eksik belirteç"
+
+#: pgc.l:1328
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "EXEC SQL DEFINE komutunda eksik tanımlayıcı"
+
+#: pgc.l:1361
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "EXEC SQL INCLUDE komutunda sözdizimi hatası"
+
+#: pgc.l:1411
+#, c-format
+msgid "internal error: unreachable state; please report this to <pgsql-bugs@lists.postgresql.org>"
+msgstr "dahili hata: erişilemeyen durum: bunu lütfen <pgsql-bugs@lists.postgresql.org> adresine bildiriniz."
+
+#: pgc.l:1562
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Hata: \"%s/%s\" include yolu çok uzun, satır numarası %d; atlanıyor\n"
+
+#: pgc.l:1585
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr " \"%s\" include dosyası %d. satırda açılamadı"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "söz dizim hatası "
+
+#: preproc.y:83
+#, c-format
+msgid "WARNING: "
+msgstr "UYARI:"
+
+#: preproc.y:86
+#, c-format
+msgid "ERROR: "
+msgstr "HATA:"
+
+#: preproc.y:510
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "\"%s\" imleci mevcut değil"
+
+#: preproc.y:539
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "tip tanımlamasında ilklendiriciye izin verilmez"
+
+#: preproc.y:541
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "\"string\" tip adı Informix modunda ayrılmıştır"
+
+#: preproc.y:548 preproc.y:15828
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "\"%s\" tipi zaten tanımlanmış"
+
+#: preproc.y:573 preproc.y:16499 preproc.y:16824 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "basit veri tipleri için çok boyutlu diziler desteklenmemektedir."
+
+#: preproc.y:1896
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT seçeneğine CONNECT ifadesinde izin verilmemektedir"
+
+#: preproc.y:1934
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT seçeneğine DISCONNECT ifadesinde izin verilmemektedir"
+
+#: preproc.y:1996
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT seçeneğine SET CONNECTION ifadesinde izin verilmemektedir"
+
+#: preproc.y:2018
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT seçeneğine TYPE ifadesinde izin verilmemektedir"
+
+#: preproc.y:2027
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT seçeneğine VAR ifadesinde izin verilmemektedir"
+
+#: preproc.y:2034
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT seçeneğine WHENEVER ifadesinde izin verilmemektedir"
+
+#: preproc.y:2111 preproc.y:2283 preproc.y:2288 preproc.y:2411 preproc.y:4004
+#: preproc.y:5593 preproc.y:5893 preproc.y:7521 preproc.y:9033 preproc.y:9038
+#: preproc.y:11831
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "desteklenmeyen özellik sunucuya aktarılacaktır"
+
+#: preproc.y:2669
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL kodlanmamıştır"
+
+#: preproc.y:3327
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT seçeneğine CLOSE DATABASE ifadesinde izin verilmemektedir"
+
+#: preproc.y:3352
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN kodlanmamıştır"
+
+#: preproc.y:9977 preproc.y:15411
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "\"%s\" değşkenini farklı declare ifadeleri arasında kullanmak desteklenmemektedir"
+
+#: preproc.y:9979 preproc.y:15413
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "\"%s\" imleci zaten tanımlanmış"
+
+#: preproc.y:10420
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "artık desteklenmeyen LIMIT #,# sözdizimi sunucuya aktarıldı"
+
+#: preproc.y:10745 preproc.y:10752
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM öğesindeki subquery bir aliası almalıdır"
+
+#: preproc.y:15102 preproc.y:15109
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS işleminde INTO kullanılamaz"
+
+#: preproc.y:15145
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "\"@\" bekleniyordu; \"%s\" bulundu"
+
+#: preproc.y:15157
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "sadece \"tcp\" ve \"unix\" protokolleri ile \"postgresql\" veritabanı tipi desteklenmektedir."
+
+#: preproc.y:15160
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "\"://\" bekleniyordu; \"%s\" bulundu"
+
+#: preproc.y:15165
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-domain soketleri sadece \"localhost\" üzerinde çalışabilir; ancak \"%s\" üzerinde çalışamaz."
+
+#: preproc.y:15191
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "\"postgresql\" bekleniyordu; \"%s\" bulundu"
+
+#: preproc.y:15194
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "Geçersiz bağlantı tipi: %s"
+
+#: preproc.y:15203
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "\"@\" or \"://\" bekleniyordu; \"%s\" bulundu"
+
+#: preproc.y:15278 preproc.y:15296
+#, c-format
+msgid "invalid data type"
+msgstr "geçersiz veri tipi"
+
+#: preproc.y:15307 preproc.y:15324
+#, c-format
+msgid "incomplete statement"
+msgstr "eksik ifade"
+
+#: preproc.y:15310 preproc.y:15327
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "tanımlanmayan imge \"%s\""
+
+#: preproc.y:15373
+#, c-format
+msgid "declared name %s is already defined"
+msgstr "belirtilen isim, %s zaten tanımlanmış"
+
+#: preproc.y:15631
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "sadece sayısal ve ondalıklı verip tiplerinin ondalık bilgisi vardır"
+
+#: preproc.y:15643
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "aralık belirtimine burada izin verilmiyor"
+
+#: preproc.y:15803 preproc.y:15855
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "içiçe gelmiş yapı/birleşme tanımında çok fazla seviye"
+
+#: preproc.y:16006
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "varcharlara işaretçiler henüz uyarlanmadı"
+
+#: preproc.y:16193 preproc.y:16218
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "desteklenmeyen DESCRIBE ifadesi kullanılıyor"
+
+#: preproc.y:16465
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "EXEC SQL VAR konutunda ilklendiriciye izin verilmemektedir"
+
+#: preproc.y:16782
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "belirticilerin dizilerine girdide izin verilmez"
+
+#: preproc.y:17003
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "değişken tanımlamasında operatöre izin verilmez"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17044
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "\"%2$s\" yerinde %1$s"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "yetersiz bellek"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "tanımsız değişken tipi kodu %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "\"%s\" değişkeni farklı tipteki yerel bir değişken tarafından gizlenmiştir"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "\"%s\" değişkeni yerel bir değişken tarafından gizlenmiştir"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "\"%s\" belirteç değişkeni farklı tipteki yerel bir değişken tarafından gizlenmiştir"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "\"%s\" gösterge değişkeni yerel bir değişken tarafından gizlenmektedir"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "array/pointer için gösterici array/pointer olmalıdır"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "içiçe geçmiş diziler, dizgiler haricinde desteklenmez"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "struct için gösterici (indicator) yine struct olmalı"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "basit veri tipinin göstergesi basit olmalı"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "\"%s\" gösterge yapısının (struct) çok az üyesi var"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "\"%s\" gösterge yapısının (struct) çok fazla üyesi var"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "tanımlanmayan açıklayıcı madde kodu %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "doğru şekilde oluşturulmamış \"%s\" değişkeni"
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "\"%s\" değişkeni bir pointer değil"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "\"%s\" değişkeni structure ya da union'a pointer değil"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "\"%s\" değişkeni structure ya da union değil"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "\"%s\" değişkeni bir dizi değil"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "\"%s\" değişkeni bildirilmemiş"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "belirteç değişkeni tamsayı veri tipine sahip olmalı"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "tanımlanmayan veri tipi adı \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "çok boyutlu diziler desteklenmiyor"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "çoklu seviye işaretçileri (İkiden fazla) desteklenmiyor: %d seviye bulundu"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "Bu veri tipi için işaretçiden işaretçiye desteklenmemektedir"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "yapılar için çok boyutlu diziler desteklenmemektedir"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help bu yardımı göster ve çık\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version sürüm numarasını yaz ve çık\n"
+
+#~ msgid "AT option not allowed in DEALLOCATE statement"
+#~ msgstr "AT seçeneğine DEALLOCATE ifadesinde izin verilmemektedir"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "COPY TO STDIN mümkün değildir"
+
+#~ msgid "COPY FROM STDOUT is not possible"
+#~ msgstr "COPY FROM STDOUT mümkün değildir"
+
+#~ msgid "constraint declared INITIALLY DEFERRED must be DEFERRABLE"
+#~ msgstr "INITIALLY DEFERRED olarak tanımlanan kısıtlayıcı DEFERRABLE özelliğine sahip olmalıdır"
+
+#~ msgid "OLD used in query that is not in a rule"
+#~ msgstr "rule olmayan sorgusunda OLD kullanıldı"
+
+#~ msgid "NEW used in query that is not in a rule"
+#~ msgstr "rule olmayan sorgusunda NEW kullanıldı"
diff --git a/src/interfaces/ecpg/preproc/po/uk.po b/src/interfaces/ecpg/preproc/po/uk.po
new file mode 100644
index 0000000..717def4
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/uk.po
@@ -0,0 +1,683 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-03-16 09:09+0000\n"
+"PO-Revision-Date: 2022-06-19 10:10\n"
+"Last-Translator: \n"
+"Language-Team: Ukrainian\n"
+"Language: uk_UA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
+"X-Crowdin-Project: postgresql\n"
+"X-Crowdin-Project-ID: 324573\n"
+"X-Crowdin-Language: uk\n"
+"X-Crowdin-File: /REL_14_STABLE/ecpg.pot\n"
+"X-Crowdin-File-ID: 782\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "змінна \"%s\" повинна мати числовий тип"
+
+#: descriptor.c:125 descriptor.c:156
+#, c-format
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "дескриптор %s, прив'язаний до підключення %s, не існує"
+
+#: descriptor.c:127 descriptor.c:158
+#, c-format
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "дескриптор %s, прив'язаний до підключення за замовчуванням, не існує"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "елемент заголовка дескриптору \"%d\" не існує"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable завжди 1"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member завжди 0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "елемент дескриптору \"%s\" не реалізовано"
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "елемент дескриптору \"%s\" не можна встановити"
+
+#: ecpg.c:36
+#, c-format
+msgid "%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n"
+msgstr "%s - це препроцесор SQL-вставок PostgreSQL для C програм.\n\n"
+
+#: ecpg.c:38
+#, c-format
+msgid "Usage:\n"
+" %s [OPTION]... FILE...\n\n"
+msgstr "Використання: \n"
+" %s [OPTION]... FILE...\n\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "Параметри:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid " -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr " -c автоматично генерувати C-код з вбудованого SQL-коду;\n"
+" це стосується EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid " -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr " -C MODE встановити режим сумісності; допустимий режим може бути одним з:\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d генерувати налагоджувальні повідомлення при аналізі\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL визначити СИМВОЛ\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h аналізувати файл заголовку, цей параметр включає параметр \"-c\"\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i аналізувати системні файли include\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY шукати файли для включення у зазначенному каталозі\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE записати результат до OUTFILE\n"
+
+#: ecpg.c:54
+#, c-format
+msgid " -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr " -r OPTION визначити поведінку під час виконання; допустимий парамтер може бути:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression запустити в режимі тестування регресії\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t увімкнути автопідтвердження транзакцій\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version показати версію, потім вийти\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показати цю довідку, потім вийти\n"
+
+#: ecpg.c:60
+#, c-format
+msgid "\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr "\n"
+"Якщо файл виводу не вказано, ім'я файла формується додаванням .c до введеного імені файла, після обрізання розширення .pgc, якщо присутнє.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "\n"
+"Report bugs to <%s>.\n"
+msgstr "\n"
+"Повідомляти про помилки на <%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашня сторінка %s: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: не вдалося знайти свій власний шлях для виконання\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: не вдалося відкрити файл \"%s\": %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Спробуйте \"%s --help\" для додаткової інформації.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: налагоджувальні повідомлення під час аналізу (-d) не підтримуються\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, вбудований препроцесор PostgreSQL, версія %s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... пошук починається тут:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "кінець списку пошуку\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: не вказано вхідні файли\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "курсор \"%s\" був оголошений, але не відкритий"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "не вдалося видалити файл виводу \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "незавершений коментар /*"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "незавершений бітовий рядок"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "незавершений шістнадцятковий рядок"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "неприпустимий літерал бітового рядка"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "неприпустимий шістнадцятковий рядок"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "необроблений попередній стан у xqs\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "незавершений рядок в лапках"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "незавершений рядок з $"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "пустий ідентифікатор із роздільниками"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "незавершений ідентифікатор в лапках"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "вкладені /* ... */ коменарі"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "відсутній ідентифікатор у команді EXEC SQL UNDEF"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "забагато вкладених умов EXEC SQL IFDEF"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "немає відповідного \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "відсутній \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "більше ніж один EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "невідповідний EXEC SQL ENDIF"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "відсутній ідентифікатор у команді EXEC SQL IFDEF"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "відсутній ідентифікатор у команді EXEC SQL DEFINE"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "синтаксична помилка у команді EXEC SQL INCLUDE"
+
+#: pgc.l:1485
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "внутрішня помилка: недосяжний стан; будь ласка, повідомте про це на <%s>"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Помилка: шлях включення \"%s/%s\" занадто довгий у рядку %d, пропускається\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "не вдалося відкрити файл включення \"%s\" у рядку %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "синтаксична помилка"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "ПОПЕРЕДЖЕННЯ: "
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "ПОМИЛКА: "
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "курсор \"%s\" не існує"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "ініціалізація заборонена у визначенні типу"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "ім’я типу \"string\" зарезервовано у режимі Informix"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "тип \"%s\" вже визначений"
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "багатовимірні масиви для простих типів даних не підтримуються"
+
+#: preproc.y:599
+#, c-format
+msgid "connection %s is overwritten with %s by DECLARE statement %s"
+msgstr "підключення %s було перезаписано з %s командою DECLARE %s"
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "Параметр AT не дозволений в інструкції CLOSE DATABASE"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "Параметр AT не дозволений в інструкції CONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "Параметр AT не дозволений в інструкції DISCONNECT"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "Параметр AT не дозволений в інструкції SET CONNECTION"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "Параметр AT не дозволений в інструкції TYPE"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "Параметр AT не дозволений в інструкції VAR"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "Параметр AT не дозволений в інструкції WHENEVER"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "непідтримувана функція буде передана до сервера"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL не реалізовано"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN не реалізовано"
+
+#: preproc.y:10014 preproc.y:17250
+#, c-format
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "\"database\" не може використовуватись як назва курсора в режимі INFORMIX"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "використання змінної \"%s\" у різних інструкціях declare не підтримується"
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "курсор \"%s\" вже визначено"
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "непідтримуваний синтаксис LIMIT #,# передано до сервера"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "підзапит в FROM повинен мати псевдонім"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS не може містити INTO"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "очікувалося \"@\", знайдено \"%s\""
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "підтримуються лише протоколи \"tcp\" та \"unix\" і тип бази даних \"postgresql\""
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "очікувалося \"://\", знайдено \"%s\""
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-сокети працюють лише з \"localhost\", але не з \"%s\""
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "очікувалось \"postgresql\", знайдено \"%s\""
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "неприпустимий тип підключення: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "очікувалось \"@\" або \"://\", знайдено \"%s\""
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "неприпустимий тип даних"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "неповний оператор"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "нерозпізнаний токен \"%s\""
+
+#: preproc.y:17212
+#, c-format
+msgid "name \"%s\" is already declared"
+msgstr "ім'я \"%s\" вже оголошена"
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "точність/масштаб можна вказати лише для типів даних numeric і decimal"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "специфікація інтервалу тут не допускається"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "занадто багато рівнів у визначенні вкладеної структури/об'єднання"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "вказівників на varchar не реалізовано"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "команда EXEC SQL VAR не допускає ініціалізатор"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "вхідні масиви індикаторів не допускаються"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "у визначенні змінної оператор не допускається"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s в або поблизу \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "недостатньо пам'яті"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "нерозпізнаний код типу змінної %d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "змінна \"%s\" прихована локальною змінною іншого типу"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "змінна \"%s\" прихована локальною змінною"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "змінна-індикатор \"%s\" прихована локальною змінною іншого типу"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "змінна-індикатор \"%s\" прихована локальною змінною"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "індикатор для масиву/вказівника повинен бути масивом/вказівником"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "вкладені масиви не підтримуються (окрім рядків)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "індикатор структури повинен бути структурою"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "індикатор для простого типу даних повинен бути простим"
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "індикатор структури \"%s\" має занадто мало елементів"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "індикатор структури \"%s\" має занадто багато елементів"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "нерозпізнаний код елементу дескриптора %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "неправильно створена змінна \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "змінна \"%s\" не є вказівником"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "змінна \"%s\" не є вказівником на структуру або об'єднання"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "змінна \"%s\" не є структурою або об'єднанням"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "змінна \"%s\" не є масивом"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "змінна \"%s\" не проголошена"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "змінна-індикатор повинна бути цілим числом"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "нерозпізнане ім'я типу даних \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "багатовимірні масиви не підтримуються"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "багаторівневі вказівники (більше 2 рівнів) не підтримуються; знайдено %d рівень"
+msgstr[1] "багаторівневі вказівники (більше 2 рівнів) не підтримуються; знайдено %d рівні"
+msgstr[2] "багаторівневі вказівники (більше 2 рівнів) не підтримуються; знайдено %d рівнів"
+msgstr[3] "багаторівневі вказівники (більше 2 рівнів) не підтримуються; знайдено %d рівень"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "для цього типу даних вказівники на вказівники не підтримуються"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "багатовимірні масиви структур не підтримуються"
+
diff --git a/src/interfaces/ecpg/preproc/po/vi.po b/src/interfaces/ecpg/preproc/po/vi.po
new file mode 100644
index 0000000..5c7c357
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/vi.po
@@ -0,0 +1,684 @@
+# LANGUAGE message translation file for ecpg
+# Copyright (C) 2018 PostgreSQL Global Development Group
+# This file is distributed under the same license as the ecpg (PostgreSQL) package.
+# FIRST AUTHOR <kakalot49@gmail.com>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 11\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2018-04-22 12:08+0000\n"
+"PO-Revision-Date: 2018-05-04 22:20+0900\n"
+"Language-Team: <pgvn_translators@postgresql.vn>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.0.6\n"
+"Last-Translator: Dang Minh Huong <kakalot49@gmail.com>\n"
+"Language: vi_VN\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "biến \"%s\" phải là kiểu numeric"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "descriptor \"%s\" không tồn tại"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "descriptor header item \"%d\" không tồn tại"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "giá trị có thể là NULL luôn là 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member luôn là 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "descriptor item \"%s\" chưa được thực thi"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "descriptor item \"%s\" không thể thiết lập được"
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s là tiền xử lý nhúng SQL của PostgreSQL cho ngôn ngữ C.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Cách sử dụng:\n"
+" %s [TÙY CHỌN]... TỆP...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Tùy chọn:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c tự động sinh mã C từ mã SQL nhúng;\n"
+" điều này ảnh hưởng tới EXEC SQL TYPE\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE thiết lập chế độ tương thích; MODE có thể là \n"
+" \"INFORMIX\", \"INFORMIX_SE\" hoặc \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d xuất debug log cho trình phân tích cú pháp\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL định nghĩa SYMBOL\n"
+
+#: ecpg.c:49
+#, c-format
+msgid ""
+" -h parse a header file, this option includes option \"-c\"\n"
+msgstr ""
+" -h phân tích cú pháp tệp header, tùy chọn này bao gồm \n"
+" cả tùy chọn \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i phân tích cả cú pháp của các tệp include files\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY tìm kiếm THƯ MỤC cho các include files\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE ghi kết quả ra OUTFILE\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION chỉ định cách thức run-time; OPTION có thể là:\n"
+" \"no_indicator\", \"prepare\" hay \"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression chạy trong chế độ regression test\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr ""
+" -t thiết lập autocommit sang on trong các transactions\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version xuât thông tin phiên bản, sau đó thoát\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help hiển thị nội dung hướng dẫn này, sau đó thoát\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"Nếu tệp xuất ra (OUTFILE) không được chỉ định, tên của tệp .c sẽ được \n"
+"lấy từ tên tệp .pgc đầu vào sau khi đã bỏ đi phần mở rộng .pgc\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Báo cáo lỗi tới <pgsql-bugs@postgresql.org>.\n"
+
+#: ecpg.c:139
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: không thể xác định ví trí đường dẫn để thực thi\n"
+
+#: ecpg.c:174 ecpg.c:331 ecpg.c:342
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: không thể mở file \"%s\": %s\n"
+
+#: ecpg.c:217 ecpg.c:230 ecpg.c:246 ecpg.c:272
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Thử \"%s --help\" để biết thêm thông tin.\n"
+
+#: ecpg.c:241
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr ""
+"%s: chế độ hỗ trợ debug (-d) cho trình phân tích cú pháp chưa sẵn sàng\n"
+
+#: ecpg.c:260
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, tiền xử lý nhúng ngôn ngữ C cho PostgreSQL, phiên bản %s\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... tìm kiếm bắt đầu từ đây:\n"
+
+#: ecpg.c:265
+#, c-format
+msgid "end of search list\n"
+msgstr "cuối danh sách tìm kiếm\n"
+
+#: ecpg.c:271
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: không có tệp đầu vào nào được chỉ định\n"
+
+#: ecpg.c:465
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "con trỏ \"%s\" đã được định nghĩa nhưng chưa được open"
+
+#: ecpg.c:478 preproc.y:127
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "không thể xóa tệp đầu ra \"%s\"\n"
+
+#: pgc.l:435
+#, c-format
+msgid "unterminated /* comment"
+msgstr "dấu bình luận /* chưa được kết thúc"
+
+#: pgc.l:448
+#, c-format
+msgid "invalid bit string literal"
+msgstr "chuỗi ký tự bit không hợp lệ"
+
+#: pgc.l:457
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "chuỗi bít ký tự chưa hoàn chỉnh"
+
+#: pgc.l:473
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "chuỗi ký tự thập lục phân chưa hoàn chỉnh"
+
+#: pgc.l:551
+#, c-format
+msgid "unterminated quoted string"
+msgstr "chuỗi trích dẫn chưa hoàn chỉnh"
+
+#: pgc.l:609 pgc.l:622
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "ký tự phân cách có độ dài bằng 0"
+
+#: pgc.l:630
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identifier trích dẫn chưa hoàn chỉnh"
+
+#: pgc.l:880
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "dấu bình luận /* ... */ lồng nhau"
+
+#: pgc.l:973
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "thiếu identifier trong câu lệnh EXEC SQL UNDEF"
+
+#: pgc.l:1019 pgc.l:1033
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "không khớp giữa \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1022 pgc.l:1035 pgc.l:1211
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "thiếu câu lệnh \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1051 pgc.l:1070
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "có nhiều hơn một câu lệnh EXEC SQL ELSE"
+
+#: pgc.l:1092 pgc.l:1106
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "câu lệnh EXEC SQL ENDIF không khớp"
+
+#: pgc.l:1126
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "quá nhiều điều kiện lồng EXEC SQL IFDEF"
+
+#: pgc.l:1159
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "thiếu identifier trong câu lệnh EXEC SQL IFDEF"
+
+#: pgc.l:1168
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "thiếu identifier trong câu lệnh EXEC SQL DEFINE"
+
+#: pgc.l:1201
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "lỗi cú pháp trong câu lệnh EXEC SQL INCLUDE"
+
+#: pgc.l:1250
+#, c-format
+msgid ""
+"internal error: unreachable state; please report this to <pgsql-"
+"bugs@postgresql.org>"
+msgstr ""
+"lỗi nội bộ: trạng thái không thể truy cập; vui lòng báo cáo điều này với "
+"<pgsql-bugs@postgresql.org>"
+
+#: pgc.l:1379
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "Lỗi: đường dẫn include \"%s/%s\" quá dài trên dòng %d, bỏ qua\n"
+
+#: pgc.l:1402
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "không thể mở tệp include \"%s\" trên dòng %d"
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "lỗi cú pháp"
+
+#: preproc.y:81
+#, c-format
+msgid "WARNING: "
+msgstr "CẢNH BÁO: "
+
+#: preproc.y:84
+#, c-format
+msgid "ERROR: "
+msgstr "LỖI: "
+
+#: preproc.y:508
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "on trỏ \"%s\" không tồn tại"
+
+#: preproc.y:537
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "initializer không được cho phép trong định nghĩa kiểu"
+
+#: preproc.y:539
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "kiểu \"string\" được dành riêng trong chế độ Informix"
+
+#: preproc.y:546 preproc.y:15714
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "kiểu \"%s\" đã được định nghĩa"
+
+#: preproc.y:570 preproc.y:16372 preproc.y:16697 variable.c:620
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "mảng đa chiều cho các kiểu dữ liệu đơn giản không được hỗ trợ"
+
+#: preproc.y:1693
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh CLOSE DATABASE"
+
+#: preproc.y:1902
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh CONNECT"
+
+#: preproc.y:1936
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh DISCONNECT"
+
+#: preproc.y:1991
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "Tùy chọn AT không được cho phép trong câu lệnh SET CONNECTION"
+
+#: preproc.y:2013
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh TYPE"
+
+#: preproc.y:2022
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh VAR"
+
+#: preproc.y:2029
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "Tùy chọn AT không được phép trong câu lệnh WHENEVER"
+
+#: preproc.y:2106 preproc.y:2278 preproc.y:2283 preproc.y:2399 preproc.y:4036
+#: preproc.y:5594 preproc.y:5603 preproc.y:5903 preproc.y:7502 preproc.y:8995
+#: preproc.y:9000 preproc.y:11782
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "tính năng không được hỗ trợ sẽ được chuyển đến server"
+
+#: preproc.y:2657
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "Lệnh SHOW ALL chưa được thực thi"
+
+#: preproc.y:3377
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "Lệnh COPY FROM STDIN chưa được thực thi"
+
+#: preproc.y:9948 preproc.y:15303
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr ""
+"sử dụng biến \"%s\" trong các câu lệnh khai báo khác nhau không được hỗ trợ"
+
+#: preproc.y:9950 preproc.y:15305
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "con trỏ \"%s\" đã được định nghĩa"
+
+#: preproc.y:10380
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "cú pháp không còn được hỗ trợ LIMIT #, # được chuyển đến server"
+
+#: preproc.y:10696 preproc.y:10703
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "truy vấn phụ trong FROM phải có bí danh"
+
+#: preproc.y:15033
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "Không thể sử dụng INTO trong câu lệnh CREATE TABLE AS"
+
+#: preproc.y:15069
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "kì vọng \"@\", tìm thấy \"%s\""
+
+#: preproc.y:15081
+#, c-format
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr ""
+"chỉ các giao thức \"tcp\" và \"unix\" và kiểu cơ sở dữ liệu \"postgresql\" "
+"được hỗ trợ"
+
+#: preproc.y:15084
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "kỳ vọng \"://\", tìm thấy \"%s\""
+
+#: preproc.y:15089
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr ""
+"Unix-domain sockets chỉ hoạt động trên \"localhost\" nhưng không hoạt động "
+"trên \"%s\""
+
+#: preproc.y:15115
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "kỳ vọng \"postgresql\", tìm thấy \"%s\""
+
+#: preproc.y:15118
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "loại kết nối không hợp lệ: %s"
+
+#: preproc.y:15127
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "kỳ vọng \"@\" or \"://\", tìm được \"%s\""
+
+#: preproc.y:15202 preproc.y:15220
+#, c-format
+msgid "invalid data type"
+msgstr "kiểu dữ liệu không hợp lệ"
+
+#: preproc.y:15231 preproc.y:15248
+#, c-format
+msgid "incomplete statement"
+msgstr "câu lệnh chưa hoàn chỉnh"
+
+#: preproc.y:15234 preproc.y:15251
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "không nhận ra token \"%s\""
+
+#: preproc.y:15525
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "chỉ các kiểu dữ liệu numeric và decimal có đối số precision và scale"
+
+#: preproc.y:15537
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "chỉ định interval không được phép ở đây"
+
+#: preproc.y:15689 preproc.y:15741
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "quá nhiều cấp độ lồng nhau trong định nghĩa structure/union"
+
+#: preproc.y:15880
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "con trỏ đến kiểu varchar chưa được thực thi"
+
+#: preproc.y:16067 preproc.y:16092
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "sử dụng câu lệnh chưa được hỗ trợ DESCRIBE"
+
+#: preproc.y:16339
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initializer không được phép trong câu lệnh EXEC SQL VAR"
+
+#: preproc.y:16655
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "đầu vào là mảng của các indicators không được cho phép"
+
+#: preproc.y:16876
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "toán tử không được phép trong định nghĩa biến"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:16917
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s tại hoặc gần \"%s\""
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "hết bộ nhớ"
+
+#: type.c:212 type.c:674
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "không nhận ra kiểu mã biến %d"
+
+#: type.c:261
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "biến \"%s\" bị ẩn bởi biến cục bộ thuộc một kiểu khác"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "biến \"%s\" bị ẩn bởi biến cục bộ"
+
+#: type.c:275
+#, c-format
+msgid ""
+"indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "biến indicator \"%s\" bị ẩn bởi một biến cục bộ thuộc một kiểu khác"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "biến indicator \"%s\" bị ẩn bởi biến cục bộ"
+
+#: type.c:285
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "mảng/con trỏ cho indicator phải là mảng/con trỏ"
+
+#: type.c:289
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "mảng lồng nhau không được hỗ trợ (ngoại trừ chuỗi)"
+
+#: type.c:331
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "indicator cho structure phải là một structure"
+
+#: type.c:351 type.c:372 type.c:392
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "indicator cho kiểu dữ liệu đơn giản phải đơn giản"
+
+#: type.c:615
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "cấu trúc của indicator \"%s\" có quá ít thành viên"
+
+#: type.c:622
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "cấu trúc của indicator \"%s\" có quá nhiều thành viên"
+
+#: type.c:733
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "không nhận ra mã descriptor item %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "biến được định dạng không chính xác \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "biến \"%s\" không phải là con trỏ"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "biến \"%s\" không phải là con trỏ trỏ tới structure hoặc union"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "biến \"%s\" không phải là kiểu structure hay union"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "biến \"%s\" không phải là mảng"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "biến \"%s\" chưa được định nghĩa"
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "biến indicator phải có kiểu integer"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "không nhận ra kiểu dữ liệu \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "mảng đa chiều không được hỗ trợ"
+
+#: variable.c:534
+#, c-format
+msgid ""
+"multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural ""
+"multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] ""
+"các con trỏ đa cấp (nhiều hơn 2 cấp) không được hỗ trợ; đã tìm thấy %d cấp"
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "con trỏ đến con trỏ không được hỗ trợ cho kiểu dữ liệu này"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "mảng đa chiều cho kiểu cấu trúc không được hỗ trợ"
diff --git a/src/interfaces/ecpg/preproc/po/zh_CN.po b/src/interfaces/ecpg/preproc/po/zh_CN.po
new file mode 100644
index 0000000..74fd9da
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/zh_CN.po
@@ -0,0 +1,693 @@
+# LANGUAGE message translation file for ecpg
+# Copyright (C) 2010 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 05:39+0000\n"
+"PO-Revision-Date: 2021-08-15 18:42+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@fujitsu.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "变量 \"%s\"必须是数值类型"
+
+#: descriptor.c:125 descriptor.c:156
+msgid "descriptor %s bound to connection %s does not exist"
+msgstr "绑定到连接%2$s的描述符%1$s不存在"
+
+#: descriptor.c:127 descriptor.c:158
+msgid "descriptor %s bound to the default connection does not exist"
+msgstr "绑定到默认连接%2$s的描述符%1$s不存在"
+
+#: descriptor.c:173 descriptor.c:225
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "描述符标题成员\"%d\"不存在"
+
+#: descriptor.c:195
+#, c-format
+msgid "nullable is always 1"
+msgstr "可为空永远用1表示"
+
+#: descriptor.c:198
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member永远是0"
+
+#: descriptor.c:292
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "没有使用描述符成员\"%s\"."
+
+#: descriptor.c:302
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "无法设置描述符成员 \"%s\""
+
+#: ecpg.c:36
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s是用于C语言程序的PostgreSQL嵌入式SQL预处理器.\n"
+"\n"
+
+#: ecpg.c:38
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+
+#: ecpg.c:41
+#, c-format
+msgid "Options:\n"
+msgstr "选项:\n"
+
+#: ecpg.c:42
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c 从嵌入式SQL代码中自动产生C代码;\n"
+" 这将影响EXEC SQL TYPE\n"
+
+#: ecpg.c:44
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+msgstr ""
+" -C MODE 设置兼容模式;MODE可以是下列模式之一\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:47
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d 产生解析器的调试输出\n"
+
+#: ecpg.c:49
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL 定义SYMBOL\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h 分析一个头文件,这个选项包含选项\"-c\"\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i 分析系统引用文件\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I DIRECTORY 为引用文件搜索变量DIRECTORY\n"
+
+#: ecpg.c:53
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o OUTFILE 将结果写入到OUTFILE\n"
+
+#: ecpg.c:54
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r OPTION 指定运行时的系统行为; OPTION可以是:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression 在回归测试模式下运行\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t 打开事务的自动提交功能\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 输出版本信息,然后退出\n"
+
+#: ecpg.c:59
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 显示帮助信息,然后退出\n"
+
+#: ecpg.c:60
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"如果没有指定输出文件,那么输出文件名将由输入文件名(如果有后缀,那么去掉.pgc)\n"
+"加上.c的后缀名组成.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"臭虫报告至<%s>.\n"
+
+#: ecpg.c:63
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 主页: <%s>\n"
+
+#: ecpg.c:141
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: 找不到我的可执行文件路径\n"
+
+#: ecpg.c:176 ecpg.c:333 ecpg.c:344
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: 无法打开文件 \"%s\": %s\n"
+
+#: ecpg.c:219 ecpg.c:232 ecpg.c:248 ecpg.c:274
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "请用 \"%s --help\" 获取更多的信息.\n"
+
+#: ecpg.c:243
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: 解析器跟踪调试支持(-d)无效\n"
+
+#: ecpg.c:262
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL嵌入式C语言预处理器, 版本%s\n"
+
+#: ecpg.c:264
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 从这里开始搜索:\n"
+
+#: ecpg.c:267
+#, c-format
+msgid "end of search list\n"
+msgstr "搜索列表的结束部分\n"
+
+#: ecpg.c:273
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 没有指定输入文件\n"
+
+#: ecpg.c:477
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "已经声明了游标\"%s\",但是没有打开"
+
+#: ecpg.c:490 preproc.y:130
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "无法删除输出文件 \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/* 注释没有结束"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "未结束的bit字符串常量"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "未结束的16进制字符串常量"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "无效的bit字符串常量"
+
+#: pgc.l:607
+msgid "invalid hex string literal"
+msgstr "无效的十六进制字符串常量"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "xqs中未处理的先前状态\n"
+
+#: pgc.l:651 pgc.l:760
+#, c-format
+msgid "unterminated quoted string"
+msgstr "未结束的引用字符串"
+
+#: pgc.l:702
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "未结束的用$符号引用的字符串"
+
+#: pgc.l:720 pgc.l:740
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "长度为0的分隔标识符"
+
+#: pgc.l:751
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "未结束的引用标识符"
+
+#: pgc.l:1082
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "有嵌套注释/*...*/"
+
+#: pgc.l:1175
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "在EXEC SQL UNDEF命令中丢失标识符"
+
+#: pgc.l:1193 pgc.l:1206 pgc.l:1222 pgc.l:1235
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "嵌套EXEC SQL IFDEF条件太多"
+
+#: pgc.l:1251 pgc.l:1262 pgc.l:1277 pgc.l:1299
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "丢失匹配 \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1253 pgc.l:1264 pgc.l:1445
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "\"EXEC SQL ENDIF;\"丢失"
+
+#: pgc.l:1279 pgc.l:1301
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "多个EXEC SQL ELSE"
+
+#: pgc.l:1324 pgc.l:1338
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF不匹配"
+
+#: pgc.l:1393
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "在EXEC SQL IFDEF命令中丢失标识符"
+
+#: pgc.l:1402
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "在EXEC SQL DEFINE命令中丢失标识符"
+
+#: pgc.l:1435
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "在EXEC SQL INCLUDE命令中出现语法错误"
+
+#: pgc.l:1485
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "内部错误:不可到达的状态;请向<%s>发送报告"
+
+#: pgc.l:1637
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "错误:在第%3$d行上包含路径\"%1$s/%2$s\"太长,跳过\n"
+
+#: pgc.l:1660
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "在第%2$d行无法打开应用文件\"%1$s\""
+
+#: preproc.y:31
+msgid "syntax error"
+msgstr "语法错误"
+
+#: preproc.y:84
+#, c-format
+msgid "WARNING: "
+msgstr "警告:"
+
+#: preproc.y:87
+#, c-format
+msgid "ERROR: "
+msgstr "错误:"
+
+#: preproc.y:514
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "游标 \"%s\" 不存在"
+
+#: preproc.y:543
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "在类型定义中不允许进行初始化"
+
+#: preproc.y:545
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "在Informix模式中类型名称\"string\" 是被保留的"
+
+#: preproc.y:552 preproc.y:17675
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "已定义类型\"%s\" "
+
+#: preproc.y:577 preproc.y:18310 preproc.y:18635 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "不支持针对简单数据类型的多维数组"
+
+#: preproc.y:599
+msgid "connection %s is overwritten to %s."
+msgstr "连接%s被覆盖到%s."
+
+#: preproc.y:1753
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "在CLOSE DATABASE语句中不允许使用AT选项"
+
+#: preproc.y:2001
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "在CONNECT语句中不允许使用AT选项"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "在DISCONNECT语句中不允许使用AT选项"
+
+#: preproc.y:2096
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "在SET CONNECTION语句中不允许使用AT选项"
+
+#: preproc.y:2118
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "在TYPE语句中不允许使用AT选项"
+
+#: preproc.y:2127
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "在VAR语句中不允许使用AT选项"
+
+#: preproc.y:2134
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "在WHENEVER语句中不允许使用AT选项"
+
+#: preproc.y:2211 preproc.y:2383 preproc.y:2388 preproc.y:2511 preproc.y:4143
+#: preproc.y:4807 preproc.y:5340 preproc.y:5678 preproc.y:5978 preproc.y:7514
+#: preproc.y:9082 preproc.y:9087 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "不支持的功能特性将会传递给服务器"
+
+#: preproc.y:2769
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "没有使用SHOW ALL"
+
+#: preproc.y:3464
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "不能进行COPY FROM STDIN的操作"
+
+#: preproc.y:10014 preproc.y:17250
+msgid "\"database\" cannot be used as cursor name in INFORMIX mode"
+msgstr "在INFORMIX模式下,\"database\"不能用作游标名称"
+
+#: preproc.y:10021 preproc.y:17260
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "不支持在不同的声明语句中使用变量\"%s\""
+
+#: preproc.y:10023 preproc.y:17262
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "已经定义了游标\"%s\""
+
+#: preproc.y:10497
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "不再支持将LIMIT #,#语法传递给服务器"
+
+#: preproc.y:10830 preproc.y:10837
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM 中的子查询必须有一个别名"
+
+#: preproc.y:16942 preproc.y:16949
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "在CREATE TABLE AS语句中不能指定INTO子句"
+
+#: preproc.y:16985
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "期望 \"@\", 但是找到了\"%s\""
+
+#: preproc.y:16997
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "只支持协议\"tcp\"和 \"unix\"以及数据库类型 \"postgresql\""
+
+#: preproc.y:17000
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "期望得到 \"://\",但是找到了\"%s\""
+
+#: preproc.y:17005
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-域的sockets只能在\"localhost\"上运行,而不能在\"%s\"上运行"
+
+#: preproc.y:17031
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "期望\"postgresql\", 但是只找到了\"%s\""
+
+#: preproc.y:17034
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "无效的连接类型: %s"
+
+#: preproc.y:17043
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "期望\"@\"或\"://\",但是只找到了\"%s\""
+
+#: preproc.y:17118 preproc.y:17136
+#, c-format
+msgid "invalid data type"
+msgstr "无效数据类型"
+
+#: preproc.y:17147 preproc.y:17164
+#, c-format
+msgid "incomplete statement"
+msgstr "未结束的语句"
+
+#: preproc.y:17150 preproc.y:17167
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "无法识别的符号\"%s\""
+
+#: preproc.y:17212
+msgid "name \"%s\" is already declared"
+msgstr "已声明名称\"%s\""
+
+#: preproc.y:17478
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "只有数据类型numeric和decimal有精度/范围参数"
+
+#: preproc.y:17490
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "在这里不允许使用间隔定义"
+
+#: preproc.y:17650 preproc.y:17702
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "在嵌套结构/联合定义中存在太多的层次"
+
+#: preproc.y:17825
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "没有实现指向varchar类型值的指针"
+
+#: preproc.y:18276
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "在EXEC SQL VAR命令中不允许初始化"
+
+#: preproc.y:18593
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "在输入上不允许使用标识数组"
+
+#: preproc.y:18780
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "操作符不允许出现在变量定义当中"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:18821
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "%s 在 \"%s\" 或附近的"
+
+#: type.c:18 type.c:30
+#, c-format
+msgid "out of memory"
+msgstr "内存不足"
+
+#: type.c:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "无法识别的变量类型代码%d"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "变量\"%s\"是由一个不同类型的局部变量隐藏的"
+
+#: type.c:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "变量\"%s\"是由一个局部变量隐藏的"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "标记变量(indicator variable)\"%s\"是由一个不同类型的局部变量隐藏的。"
+
+#: type.c:279
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "标记变量(indicator variable)\"%s\"是由一个局部变量隐藏的"
+
+#: type.c:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "对于数组/指针的记号必须是array/pointer"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "不支持嵌套数组(除了字符串外)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "结构的记号必须是struct"
+
+#: type.c:353 type.c:374 type.c:394
+#, c-format
+msgid "indicator for simple data type has to be simple"
+msgstr "对简单数据类型的指标要简单 "
+
+#: type.c:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "结构\"%s\"的记号的成员太少"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "结构\"%s\"的记号成员太多"
+
+#: type.c:744
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "无法识别的描述符成员代码 %d"
+
+#: variable.c:89 variable.c:116
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "不正确形成的变量 \"%s\""
+
+#: variable.c:139
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "变量\"%s\"不是一个指针"
+
+#: variable.c:142 variable.c:167
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "变量\"%s\" 不是一个指向结构或联合的指针"
+
+#: variable.c:154
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "变量\"%s\"既不是一个结构也不是一个联合"
+
+#: variable.c:164
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "变量\"%s\"不是一个数组"
+
+#: variable.c:233 variable.c:255
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "没有声明变量\"%s\""
+
+#: variable.c:494
+#, c-format
+msgid "indicator variable must have an integer type"
+msgstr "标记变量必须有一个整数类型"
+
+#: variable.c:506
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr "无法识别的数据类型名称 \"%s\""
+
+#: variable.c:517 variable.c:525 variable.c:542 variable.c:545
+#, c-format
+msgid "multidimensional arrays are not supported"
+msgstr "不支持多维数组"
+
+#: variable.c:534
+#, c-format
+msgid "multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural "multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "不支持多级指针(超过2级);找到了%d级指针."
+
+#: variable.c:539
+#, c-format
+msgid "pointer to pointer is not supported for this data type"
+msgstr "对于这种数据类型不支持指向指针的指针"
+
+#: variable.c:559
+#, c-format
+msgid "multidimensional arrays for structures are not supported"
+msgstr "不支持结构类型的多维数组"
+
diff --git a/src/interfaces/ecpg/preproc/po/zh_TW.po b/src/interfaces/ecpg/preproc/po/zh_TW.po
new file mode 100644
index 0000000..9d94f8c
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/zh_TW.po
@@ -0,0 +1,645 @@
+# Traditional Chinese message translation file for ecpg
+# Copyright (C) 2010 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.1\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2011-05-11 20:42+0000\n"
+"PO-Revision-Date: 2013-09-03 23:28-0400\n"
+"Last-Translator: Zhenbang Wei <znbang@gmail.com>\n"
+"Language-Team: EnterpriseDB translation team <dev-escalations@enterprisedb.com>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "變數 \"%s\" 必須具有數值型別"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "描述子 \"%s\" 不存在"
+
+#: descriptor.c:161 descriptor.c:210
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "描述子標頭項目 \"%d\" 不存在"
+
+#: descriptor.c:182
+msgid "nullable is always 1"
+msgstr "Nullable 一律為 1"
+
+#: descriptor.c:185
+msgid "key_member is always 0"
+msgstr "key_member 一律為 0"
+
+#: descriptor.c:277
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "未實作描述子項目 \"%s\""
+
+#: descriptor.c:287
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "不能設定描述子項目 \"%s\""
+
+#: ecpg.c:35
+#, c-format
+msgid ""
+"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n"
+"\n"
+msgstr ""
+"%s 是 PostgreSQL 內嵌 SQL 前置處理器,適用於 C 程式。\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"使用方法:\n"
+"%s [選項]...檔案...\n"
+"\n"
+
+# postmaster/postmaster.c:1017 tcop/postgres.c:2115
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "選項:\n"
+
+#: ecpg.c:41
+#, c-format
+msgid ""
+" -c automatically generate C code from embedded SQL code;\n"
+" this affects EXEC SQL TYPE\n"
+msgstr ""
+" -c 自動從內嵌 SQL 程式碼產生 C 程式碼,\n"
+" EXEC SQL TYPE 會受到影響\n"
+
+#: ecpg.c:43
+#, c-format
+msgid ""
+" -C MODE set compatibility mode; MODE can be one of\n"
+" \"INFORMIX\", \"INFORMIX_SE\"\n"
+msgstr ""
+" -C 模式 設定相容性模式,模式可以是下列其中一項\n"
+" \"INFORMIX\"、\"INFORMIX_SE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d 產生解譯器偵錯輸出\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D 符號 定義符號\n"
+
+#: ecpg.c:49
+#, c-format
+msgid ""
+" -h parse a header file, this option includes option \"-c\"\n"
+msgstr " -h 解譯標頭檔,此選項包含選項 \"-c\"\n"
+
+#: ecpg.c:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i 同時解譯系統引用檔案\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I 目錄 搜尋引用檔案的目錄\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o 輸出檔 將結果寫入輸出檔\n"
+
+#: ecpg.c:53
+#, c-format
+msgid ""
+" -r OPTION specify run-time behavior; OPTION can be:\n"
+" \"no_indicator\", \"prepare\", \"questionmarks\"\n"
+msgstr ""
+" -r 選項 指定執行階段行為,選項可以是:\n"
+" \"no_indicator\"、\"prepare\"、\"questionmarks\"\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression 以迴歸測試模式執行\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t 開啟交易自動提交功能\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " --help show this help, then exit\n"
+msgstr " --help 顯示此說明然後結束\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " --version output version information, then exit\n"
+msgstr " --version 輸出版本資訊然後結束\n"
+
+#: ecpg.c:59
+#, c-format
+msgid ""
+"\n"
+"If no output file is specified, the name is formed by adding .c to the\n"
+"input file name, after stripping off .pgc if present.\n"
+msgstr ""
+"\n"
+"如果未指定輸出檔,檔名就是將輸入檔的檔名\n"
+"去掉 .pgc (如果有的話) 再加上 .c。\n"
+
+# tcop/postgres.c:2140
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"回報錯誤給 <pgsql-bugs@postgresql.org>。\n"
+
+#: ecpg.c:182 ecpg.c:333 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: 無法開啟檔案\"%s\": %s\n"
+
+# postmaster/postmaster.c:512 postmaster/postmaster.c:525
+#: ecpg.c:221 ecpg.c:234 ecpg.c:250 ecpg.c:275
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "執行\"%s --help\"顯示更多資訊。\n"
+
+#: ecpg.c:245
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: 解譯器偵錯支援 (-d) 無法使用\n"
+
+#: ecpg.c:263
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %d.%d.%d\n"
+msgstr "%s,PostgreSQL 內嵌 C 前置處理器,版本 %d.%d.%d\n"
+
+#: ecpg.c:265
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 在此處開始搜尋:\n"
+
+#: ecpg.c:268
+#, c-format
+msgid "end of search list\n"
+msgstr "搜尋清單結尾\n"
+
+#: ecpg.c:274
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 未指定輸入檔\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "指標 \"%s\" 已宣告但尚未開啟"
+
+#: ecpg.c:479 preproc.y:109
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "無法移除輸出檔 \"%s\"\n"
+
+# scan.l:312
+#: pgc.l:402
+msgid "unterminated /* comment"
+msgstr "未結束的 /* 註解"
+
+#: pgc.l:415
+msgid "invalid bit string literal"
+msgstr "位元字串實量無效"
+
+# scan.l:339
+#: pgc.l:424
+msgid "unterminated bit string literal"
+msgstr "未結束的位元字串實量"
+
+# scan.l:358
+#: pgc.l:440
+msgid "unterminated hexadecimal string literal"
+msgstr "未結束的十六進位字串實量"
+
+# scan.l:407
+#: pgc.l:518
+msgid "unterminated quoted string"
+msgstr "未結束的引號字串"
+
+#: pgc.l:573 pgc.l:586
+msgid "zero-length delimited identifier"
+msgstr "長度為零的分隔識別字"
+
+#: pgc.l:594
+msgid "unterminated quoted identifier"
+msgstr "未結束的引號識別字"
+
+#: pgc.l:940
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "EXEC SQL UNDEF 指令遺漏識別字"
+
+#: pgc.l:986 pgc.l:1000
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "遺漏相符的 \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:989 pgc.l:1002 pgc.l:1178
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "遺漏 \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1018 pgc.l:1037
+msgid "more than one EXEC SQL ELSE"
+msgstr "多個 EXEC SQL ELSE"
+
+#: pgc.l:1059 pgc.l:1073
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF 不相符"
+
+#: pgc.l:1093
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "過多巢狀 EXEC SQL IFDEF 條件"
+
+#: pgc.l:1126
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "EXEC SQL IFDEF 指令遺漏識別字"
+
+#: pgc.l:1135
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "EXEC SQL DEFINE 指令遺漏識別字"
+
+#: pgc.l:1168
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "EXEC SQL INCLUDE 指令的語法錯誤"
+
+#: pgc.l:1217
+msgid ""
+"internal error: unreachable state; please report this to <pgsql-"
+"bugs@postgresql.org>"
+msgstr "內部錯誤: 無法連線狀態,請將錯誤回報給 <pgsql-bugs@postgresql.org>"
+
+#: pgc.l:1342
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr "錯誤: 引用檔路徑 \"%s/%s\" 太長 (位於行 %d),略過\n"
+
+#: pgc.l:1364
+#, c-format
+msgid "could not open include file \"%s\" on line %d"
+msgstr "無法開啟引用檔 \"%s\" (位於行 %d)"
+
+# gram.y:8218 gram.y:8220 y.tab.c:19175
+#: preproc.y:31
+msgid "syntax error"
+msgstr "語法錯誤"
+
+#: preproc.y:81
+#, c-format
+msgid "WARNING: "
+msgstr "警告:"
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "錯誤:"
+
+# commands/portalcmds.c:182 commands/portalcmds.c:229
+#: preproc.y:391
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "指標 \"%s\"不存在"
+
+#: preproc.y:419
+msgid "initializer not allowed in type definition"
+msgstr "型別定義中不允許使用初始設定式"
+
+# commands/user.c:1396
+#: preproc.y:421
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "型別名稱 \"string\" 在 Informix 是保留字"
+
+#: preproc.y:428 preproc.y:13035
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "型別 \"%s\" 已定義"
+
+#: preproc.y:452 preproc.y:13675 preproc.y:13996 variable.c:610
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "不支援簡單資料型別的多維度陣列"
+
+#: preproc.y:1426
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "CLOSE DATABASE 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1496 preproc.y:1640
+msgid "AT option not allowed in DEALLOCATE statement"
+msgstr "DEALLOCATE 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1626
+msgid "AT option not allowed in CONNECT statement"
+msgstr "CONNECT 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1662
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "DISCONNECT 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1717
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "SET CONNECTION 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1739
+msgid "AT option not allowed in TYPE statement"
+msgstr "TYPE 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1748
+msgid "AT option not allowed in VAR statement"
+msgstr "VAR 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:1755
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "WHENEVER 陳述式中不允許使用 AT 選項"
+
+#: preproc.y:2101 preproc.y:3272 preproc.y:3344 preproc.y:4550 preproc.y:4559
+#: preproc.y:4840 preproc.y:7127 preproc.y:7132 preproc.y:7137 preproc.y:9471
+#: preproc.y:10014
+msgid "unsupported feature will be passed to server"
+msgstr "不支援的功能將會傳遞到伺服器"
+
+#: preproc.y:2327
+msgid "SHOW ALL is not implemented"
+msgstr "未實作 SHOW ALL"
+
+#: preproc.y:2750 preproc.y:2761
+msgid "COPY TO STDIN is not possible"
+msgstr "COPY TO STDIN 不可行"
+
+#: preproc.y:2752
+msgid "COPY FROM STDOUT is not possible"
+msgstr "COPY FROM STDOUT 不可行"
+
+#: preproc.y:2754
+msgid "COPY FROM STDIN is not implemented"
+msgstr "未實作 COPY FROM STDIN"
+
+#: preproc.y:4490 preproc.y:4501
+msgid "constraint declared INITIALLY DEFERRED must be DEFERRABLE"
+msgstr "限制宣告的 INITIALLY DEFERRED 必須是 DEFERRABLE"
+
+#: preproc.y:7933 preproc.y:12624
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "在多個宣告陳述式中使用變數 \"%s\" 未被支援"
+
+#: preproc.y:7935 preproc.y:12626
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "指標 \"%s\" 已定義"
+
+#: preproc.y:8353
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "不再支援的 LIMIT #,# 語法已傳遞到伺服器"
+
+# gram.y:5166 parser/parse_clause.c:423
+#: preproc.y:8588
+msgid "subquery in FROM must have an alias"
+msgstr "FROM中的子查詢要有別名"
+
+#: preproc.y:12356
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS 不能指定 INTO"
+
+#: preproc.y:12393
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "預期 \"@\",找到 \"%s\""
+
+#: preproc.y:12405
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr "只支援通訊協定 \"tcp\" 和 \"unix\" 以及資料庫類型 \"postgresql\""
+
+#: preproc.y:12408
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "預期 \"://\",找到 \"%s\""
+
+#: preproc.y:12413
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-可用域通訊端僅適用 \"localhost\",不適用 \"%s\""
+
+#: preproc.y:12439
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "預期 \"postgresql\",找到 \"%s\""
+
+#: preproc.y:12442
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "連線類型無效:%s"
+
+#: preproc.y:12451
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "預期 \"@\" 或 \"://\",找到 \"%s\""
+
+#: preproc.y:12526 preproc.y:12544
+msgid "invalid data type"
+msgstr "資料型別無效"
+
+#: preproc.y:12555 preproc.y:12570
+msgid "incomplete statement"
+msgstr "陳述式不完整"
+
+#: preproc.y:12558 preproc.y:12573
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "無法辨識的 token \"%s\""
+
+#: preproc.y:12846
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "只有數值和十進位資料型別有精確度/小數位數參數"
+
+#: preproc.y:12858
+msgid "interval specification not allowed here"
+msgstr "這裡不允許使用間隔規格"
+
+#: preproc.y:13010 preproc.y:13062
+msgid "too many levels in nested structure/union definition"
+msgstr "巢狀結構/聯集定義中的層級過多"
+
+#: preproc.y:13193
+msgid "pointers to varchar are not implemented"
+msgstr "Varchar 的指標未實作"
+
+#: preproc.y:13380 preproc.y:13405
+msgid "using unsupported DESCRIBE statement"
+msgstr "使用不支援的 DESCRIBE 陳述式"
+
+#: preproc.y:13642
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "EXEC SQL VAR 指令中不允許使用初始設定式"
+
+#: preproc.y:13954
+msgid "arrays of indicators are not allowed on input"
+msgstr "輸入中不允許使用指標陣列"
+
+# translator: first %s is typically "syntax error"
+# scan.l:629
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:14208
+#, c-format
+msgid "%s at or near \"%s\""
+msgstr "在\"%s\"附近發生 %s"
+
+# commands/sequence.c:798 executor/execGrouping.c:328
+# executor/execGrouping.c:388 executor/nodeIndexscan.c:1051 lib/dllist.c:43
+# lib/dllist.c:88 libpq/auth.c:637 postmaster/pgstat.c:1006
+# postmaster/pgstat.c:1023 postmaster/pgstat.c:2452 postmaster/pgstat.c:2527
+# postmaster/pgstat.c:2572 postmaster/pgstat.c:2623
+# postmaster/postmaster.c:755 postmaster/postmaster.c:1625
+# postmaster/postmaster.c:2344 storage/buffer/localbuf.c:139
+# storage/file/fd.c:587 storage/file/fd.c:620 storage/file/fd.c:766
+# storage/ipc/sinval.c:789 storage/lmgr/lock.c:497 storage/smgr/md.c:138
+# storage/smgr/md.c:848 storage/smgr/smgr.c:213 utils/adt/cash.c:297
+# utils/adt/cash.c:312 utils/adt/oracle_compat.c:73
+# utils/adt/oracle_compat.c:124 utils/adt/regexp.c:191
+# utils/adt/ri_triggers.c:3471 utils/cache/relcache.c:164
+# utils/cache/relcache.c:178 utils/cache/relcache.c:1130
+# utils/cache/typcache.c:165 utils/cache/typcache.c:487
+# utils/fmgr/dfmgr.c:127 utils/fmgr/fmgr.c:521 utils/fmgr/fmgr.c:532
+# utils/init/miscinit.c:213 utils/init/miscinit.c:234
+# utils/init/miscinit.c:244 utils/misc/guc.c:1898 utils/misc/guc.c:1911
+# utils/misc/guc.c:1924 utils/mmgr/aset.c:337 utils/mmgr/aset.c:503
+# utils/mmgr/aset.c:700 utils/mmgr/aset.c:893 utils/mmgr/portalmem.c:75
+#: type.c:18 type.c:30
+msgid "out of memory"
+msgstr "記憶體用盡"
+
+#: type.c:212 type.c:594
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "無法辨識的變數型別程式碼 %d "
+
+#: type.c:261
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable of a different type"
+msgstr "變數 \"%s\" 被不同型別的區域變數遮蔽"
+
+#: type.c:263
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "變數 \"%s\" 被區域變數遮蔽"
+
+#: type.c:275
+#, c-format
+msgid ""
+"indicator variable \"%s\" is hidden by a local variable of a different type"
+msgstr "指標變數 \"%s\" 被不同型別的區域變數遮蔽"
+
+#: type.c:277
+#, c-format
+msgid "indicator variable \"%s\" is hidden by a local variable"
+msgstr "指標變數 \"%s\" 被區域變數遮蔽"
+
+#: type.c:285
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "陣列/指標的指標必須是陣列/指標"
+
+#: type.c:289
+msgid "nested arrays are not supported (except strings)"
+msgstr "不支援巢狀陣列 (字串除外)"
+
+#: type.c:322
+msgid "indicator for struct has to be a struct"
+msgstr "建構的指標必須是建構"
+
+#: type.c:331 type.c:339 type.c:347
+msgid "indicator for simple data type has to be simple"
+msgstr "簡單資料型別的指標必須簡單"
+
+#: type.c:653
+#, c-format
+msgid "unrecognized descriptor item code %d"
+msgstr "無法辨識的描述子項目程式碼 %d"
+
+#: variable.c:89 variable.c:112
+#, c-format
+msgid "incorrectly formed variable \"%s\""
+msgstr "變數 \"%s\" 的格式不正確"
+
+#: variable.c:135
+#, c-format
+msgid "variable \"%s\" is not a pointer"
+msgstr "變數 \"%s\" 不是指標"
+
+#: variable.c:138 variable.c:163
+#, c-format
+msgid "variable \"%s\" is not a pointer to a structure or a union"
+msgstr "變數 \"%s\" 不是結構或聯集的指標"
+
+#: variable.c:150
+#, c-format
+msgid "variable \"%s\" is neither a structure nor a union"
+msgstr "變數 \"%s\" 不是結構或聯集"
+
+#: variable.c:160
+#, c-format
+msgid "variable \"%s\" is not an array"
+msgstr "變數 \"%s\" 不是陣列"
+
+#: variable.c:229 variable.c:251
+#, c-format
+msgid "variable \"%s\" is not declared"
+msgstr "變數 \"%s\" 未宣告"
+
+#: variable.c:484
+msgid "indicator variable must have an integer type"
+msgstr "指標變數必須是整數型別"
+
+#: variable.c:496
+#, c-format
+msgid "unrecognized data type name \"%s\""
+msgstr " 無法辨識的資料型別名稱 \"%s\""
+
+#: variable.c:507 variable.c:515 variable.c:532 variable.c:535
+msgid "multidimensional arrays are not supported"
+msgstr "不支援多維度陣列"
+
+#: variable.c:524
+#, c-format
+msgid ""
+"multilevel pointers (more than 2 levels) are not supported; found %d level"
+msgid_plural ""
+"multilevel pointers (more than 2 levels) are not supported; found %d levels"
+msgstr[0] "不支援多層指標(2層以上),發現 %d 層"
+
+#: variable.c:529
+msgid "pointer to pointer is not supported for this data type"
+msgstr "此資料型別不支援指標的指標"
+
+#: variable.c:549
+msgid "multidimensional arrays for structures are not supported"
+msgstr "不支援多維度的結構陣列"
+
+#~ msgid "OLD used in query that is not in a rule"
+#~ msgstr "查詢中使用的 OLD 不在規則中"
+
+#~ msgid "NEW used in query that is not in a rule"
+#~ msgstr "查詢中使用的 NEW 不在規則中"
diff --git a/src/interfaces/ecpg/preproc/preproc.c b/src/interfaces/ecpg/preproc/preproc.c
new file mode 100644
index 0000000..074e508
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.c
@@ -0,0 +1,65497 @@
+/* A Bison parser, made by GNU Bison 3.7.5. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output, and Bison version. */
+#define YYBISON 30705
+
+/* Bison version string. */
+#define YYBISON_VERSION "3.7.5"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse base_yyparse
+#define yylex base_yylex
+#define yyerror base_yyerror
+#define yydebug base_yydebug
+#define yynerrs base_yynerrs
+#define yylval base_yylval
+#define yychar base_yychar
+#define yylloc base_yylloc
+
+/* First part of user prologue. */
+#line 5 "preproc.y"
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+#include "ecpg_config.h"
+#include <unistd.h>
+
+/* Location tracking support --- simpler than bison's default */
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do { \
+ if (N) \
+ (Current) = (Rhs)[1]; \
+ else \
+ (Current) = (Rhs)[0]; \
+ } while (0)
+
+/*
+ * The %name-prefix option below will make bison call base_yylex, but we
+ * really want it to call filtered_base_yylex (see parser.c).
+ */
+#define base_yylex filtered_base_yylex
+
+/*
+ * This is only here so the string gets into the POT. Bison uses it
+ * internally.
+ */
+#define bison_gettext_dummy gettext_noop("syntax error")
+
+/*
+ * Variables containing simple states.
+ */
+int struct_level = 0;
+int braces_open; /* brace level counter */
+char *current_function;
+int ecpg_internal_var = 0;
+char *connection = NULL;
+char *input_filename = NULL;
+
+static int FoundInto = 0;
+static int initializer = 0;
+static int pacounter = 1;
+static char pacounter_buffer[sizeof(int) * CHAR_BIT * 10 / 3]; /* a rough guess at the size we need */
+static struct this_type actual_type[STRUCT_DEPTH];
+static char *actual_startline[STRUCT_DEPTH];
+static int varchar_counter = 1;
+static int bytea_counter = 1;
+
+/* temporarily store struct members while creating the data structure */
+struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH] = { NULL };
+
+/* also store struct type so we can do a sizeof() later */
+static char *ECPGstruct_sizeof = NULL;
+
+/* for forward declarations we have to store some data as well */
+static char *forward_name = NULL;
+
+struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR, NULL, NULL, NULL, {NULL}, 0};
+struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
+
+static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
+
+static void vmmerror(int error_code, enum errortype type, const char *error, va_list ap) pg_attribute_printf(3, 0);
+
+static bool check_declared_list(const char*);
+
+/*
+ * Handle parsing errors and warnings
+ */
+static void
+vmmerror(int error_code, enum errortype type, const char *error, va_list ap)
+{
+ /* localize the error message string */
+ error = _(error);
+
+ fprintf(stderr, "%s:%d: ", input_filename, base_yylineno);
+
+ switch(type)
+ {
+ case ET_WARNING:
+ fprintf(stderr, _("WARNING: "));
+ break;
+ case ET_ERROR:
+ fprintf(stderr, _("ERROR: "));
+ break;
+ }
+
+ vfprintf(stderr, error, ap);
+
+ fprintf(stderr, "\n");
+
+ switch(type)
+ {
+ case ET_WARNING:
+ break;
+ case ET_ERROR:
+ ret_value = error_code;
+ break;
+ }
+}
+
+void
+mmerror(int error_code, enum errortype type, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, type, error, ap);
+ va_end(ap);
+}
+
+void
+mmfatal(int error_code, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, ET_ERROR, error, ap);
+ va_end(ap);
+
+ if (base_yyin)
+ fclose(base_yyin);
+ if (base_yyout)
+ fclose(base_yyout);
+
+ if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
+ fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
+ exit(error_code);
+}
+
+/*
+ * string concatenation
+ */
+
+static char *
+cat2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
+
+ strcpy(res_str, str1);
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+cat_str(int count, ...)
+{
+ va_list args;
+ int i;
+ char *res_str;
+
+ va_start(args, count);
+
+ res_str = va_arg(args, char *);
+
+ /* now add all other strings */
+ for (i = 1; i < count; i++)
+ res_str = cat2_str(res_str, va_arg(args, char *));
+
+ va_end(args);
+
+ return res_str;
+}
+
+static char *
+make2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+make3_str(char *str1, char *str2, char *str3)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) +strlen(str3) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ strcat(res_str, str3);
+ free(str1);
+ free(str2);
+ free(str3);
+ return res_str;
+}
+
+/* and the rest */
+static char *
+make_name(void)
+{
+ return mm_strdup(base_yytext);
+}
+
+static char *
+create_questionmarks(char *name, bool array)
+{
+ struct variable *p = find_variable(name);
+ int count;
+ char *result = EMPTY;
+
+ /* In case we have a struct, we have to print as many "?" as there are attributes in the struct
+ * An array is only allowed together with an element argument
+ * This is essentially only used for inserts, but using a struct as input parameter is an error anywhere else
+ * so we don't have to worry here. */
+
+ if (p->type->type == ECPGt_struct || (array && p->type->type == ECPGt_array && p->type->u.element->type == ECPGt_struct))
+ {
+ struct ECPGstruct_member *m;
+
+ if (p->type->type == ECPGt_struct)
+ m = p->type->u.members;
+ else
+ m = p->type->u.element->u.members;
+
+ for (count = 0; m != NULL; m=m->next, count++);
+ }
+ else
+ count = 1;
+
+ for (; count > 0; count --)
+ {
+ sprintf(pacounter_buffer, "$%d", pacounter++);
+ result = cat_str(3, result, mm_strdup(pacounter_buffer), mm_strdup(" , "));
+ }
+
+ /* removed the trailing " ," */
+
+ result[strlen(result)-3] = '\0';
+ return result;
+}
+
+static char *
+adjust_outofscope_cursor_vars(struct cursor *cur)
+{
+ /* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
+ * For instance you can DECLARE a cursor in one function, and OPEN/FETCH/CLOSE
+ * it in another functions. This is very useful for e.g. event-driver programming,
+ * but may also lead to dangerous programming. The limitation when this is allowed
+ * and doesn't cause problems have to be documented, like the allocated variables
+ * must not be realloc()'ed.
+ *
+ * We have to change the variables to our own struct and just store the pointer
+ * instead of the variable. Do it only for local variables, not for globals.
+ */
+
+ char *result = EMPTY;
+ int insert;
+
+ for (insert = 1; insert >= 0; insert--)
+ {
+ struct arguments *list;
+ struct arguments *ptr;
+ struct arguments *newlist = NULL;
+ struct variable *newvar, *newind;
+
+ list = (insert ? cur->argsinsert : cur->argsresult);
+
+ for (ptr = list; ptr != NULL; ptr = ptr->next)
+ {
+ char var_text[20];
+ char *original_var;
+ bool skip_set_var = false;
+ bool var_ptr = false;
+
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->variable->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+
+ /* Don't emit ECPGset_var() calls for global variables */
+ if (ptr->variable->brace_level == 0)
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type == ECPGt_char_variable)
+ && (strncmp(ptr->variable->name, "ECPGprepared_statement", strlen("ECPGprepared_statement")) == 0))
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type != ECPGt_varchar
+ && ptr->variable->type->type != ECPGt_char
+ && ptr->variable->type->type != ECPGt_unsigned_char
+ && ptr->variable->type->type != ECPGt_string
+ && ptr->variable->type->type != ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ mm_strdup("1"),
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ }
+ else if ((ptr->variable->type->type == ECPGt_varchar
+ || ptr->variable->type->type == ECPGt_char
+ || ptr->variable->type->type == ECPGt_unsigned_char
+ || ptr->variable->type->type == ECPGt_string
+ || ptr->variable->type->type == ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ if (ptr->variable->type->type == ECPGt_varchar ||
+ ptr->variable->type->type == ECPGt_bytea)
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_struct
+ || ptr->variable->type->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.members,
+ ptr->variable->type->type,
+ ptr->variable->type->type_name,
+ ptr->variable->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_array)
+ {
+ if (ptr->variable->type->u.element->type == ECPGt_struct
+ || ptr->variable->type->u.element->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.element->u.members,
+ ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->type_name,
+ ptr->variable->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->size,
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <connection>, <pointer>. <line number>)" */
+ if (!skip_set_var)
+ {
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ /* now the indicator if there is one and it's not a global variable */
+ if ((ptr->indicator->type->type == ECPGt_NO_INDICATOR) || (ptr->indicator->brace_level == 0))
+ {
+ newind = ptr->indicator;
+ }
+ else
+ {
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->indicator->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+ var_ptr = false;
+
+ if (ptr->indicator->type->type == ECPGt_struct
+ || ptr->indicator->type->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.members,
+ ptr->indicator->type->type,
+ ptr->indicator->type->type_name,
+ ptr->indicator->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->indicator->type->type == ECPGt_array)
+ {
+ if (ptr->indicator->type->u.element->type == ECPGt_struct
+ || ptr->indicator->type->u.element->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.element->u.members,
+ ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->type_name,
+ ptr->indicator->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("), mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->size,
+ ptr->indicator->type->u.element->counter),
+ ptr->indicator->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else if (atoi(ptr->indicator->type->size) > 1)
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <pointer>. <line number>)" */
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ add_variable_to_tail(&newlist, newvar, newind);
+ }
+
+ if (insert)
+ cur->argsinsert_oos = newlist;
+ else
+ cur->argsresult_oos = newlist;
+ }
+
+ return result;
+}
+
+/* This tests whether the cursor was declared and opened in the same function. */
+#define SAMEFUNC(cur) \
+ ((cur->function == NULL) || \
+ (cur->function != NULL && strcmp(cur->function, current_function) == 0))
+
+static struct cursor *
+add_additional_variables(char *name, bool insert)
+{
+ struct cursor *ptr;
+ struct arguments *p;
+ int (* strcmp_fn)(const char *, const char *) = ((name[0] == ':' || name[0] == '"') ? strcmp : pg_strcasecmp);
+
+ for (ptr = cur; ptr != NULL; ptr=ptr->next)
+ {
+ if (strcmp_fn(ptr->name, name) == 0)
+ break;
+ }
+
+ if (ptr == NULL)
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" does not exist", name);
+ return NULL;
+ }
+
+ if (insert)
+ {
+ /* add all those input variables that were given earlier
+ * note that we have to append here but have to keep the existing order */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsinsert : ptr->argsinsert_oos); p; p = p->next)
+ add_variable_to_tail(&argsinsert, p->variable, p->indicator);
+ }
+
+ /* add all those output variables that were given earlier */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsresult : ptr->argsresult_oos); p; p = p->next)
+ add_variable_to_tail(&argsresult, p->variable, p->indicator);
+
+ return ptr;
+}
+
+static void
+add_typedef(char *name, char *dimension, char *length, enum ECPGttype type_enum,
+ char *type_dimension, char *type_index, int initializer, int array)
+{
+ /* add entry to list */
+ struct typedefs *ptr, *this;
+
+ if ((type_enum == ECPGt_struct ||
+ type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in type definition");
+ else if (INFORMIX_MODE && strcmp(name, "string") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "type name \"string\" is reserved in Informix mode");
+ else
+ {
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(name, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", name);
+ }
+ adjust_array(type_enum, &dimension, &length, type_dimension, type_index, array, true);
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = name;
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = type_enum;
+ this->type->type_str = mm_strdup(name);
+ this->type->type_dimension = dimension; /* dimension of array */
+ this->type->type_index = length; /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = (type_enum == ECPGt_struct || type_enum == ECPGt_union) ?
+ ECPGstruct_member_dup(struct_member_list[struct_level]) : NULL;
+
+ if (type_enum != ECPGt_varchar &&
+ type_enum != ECPGt_bytea &&
+ type_enum != ECPGt_char &&
+ type_enum != ECPGt_unsigned_char &&
+ type_enum != ECPGt_string &&
+ atoi(this->type->type_index) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ types = this;
+ }
+}
+
+/*
+ * check an SQL identifier is declared or not.
+ * If it is already declared, the global variable
+ * connection will be changed to the related connection.
+ */
+static bool
+check_declared_list(const char *name)
+{
+ struct declared_list *ptr = NULL;
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr -> next)
+ {
+ if (!ptr->connection)
+ continue;
+ if (strcmp(name, ptr -> name) == 0)
+ {
+ if (connection && strcmp(ptr->connection, connection) != 0)
+ mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten with %s by DECLARE statement %s", connection, ptr->connection, name);
+ connection = mm_strdup(ptr -> connection);
+ return true;
+ }
+ }
+ return false;
+}
+
+#line 682 "preproc.c"
+
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+#include "preproc.h"
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_SQL_ALLOCATE = 3, /* SQL_ALLOCATE */
+ YYSYMBOL_SQL_AUTOCOMMIT = 4, /* SQL_AUTOCOMMIT */
+ YYSYMBOL_SQL_BOOL = 5, /* SQL_BOOL */
+ YYSYMBOL_SQL_BREAK = 6, /* SQL_BREAK */
+ YYSYMBOL_SQL_CARDINALITY = 7, /* SQL_CARDINALITY */
+ YYSYMBOL_SQL_CONNECT = 8, /* SQL_CONNECT */
+ YYSYMBOL_SQL_COUNT = 9, /* SQL_COUNT */
+ YYSYMBOL_SQL_DATETIME_INTERVAL_CODE = 10, /* SQL_DATETIME_INTERVAL_CODE */
+ YYSYMBOL_SQL_DATETIME_INTERVAL_PRECISION = 11, /* SQL_DATETIME_INTERVAL_PRECISION */
+ YYSYMBOL_SQL_DESCRIBE = 12, /* SQL_DESCRIBE */
+ YYSYMBOL_SQL_DESCRIPTOR = 13, /* SQL_DESCRIPTOR */
+ YYSYMBOL_SQL_DISCONNECT = 14, /* SQL_DISCONNECT */
+ YYSYMBOL_SQL_FOUND = 15, /* SQL_FOUND */
+ YYSYMBOL_SQL_FREE = 16, /* SQL_FREE */
+ YYSYMBOL_SQL_GET = 17, /* SQL_GET */
+ YYSYMBOL_SQL_GO = 18, /* SQL_GO */
+ YYSYMBOL_SQL_GOTO = 19, /* SQL_GOTO */
+ YYSYMBOL_SQL_IDENTIFIED = 20, /* SQL_IDENTIFIED */
+ YYSYMBOL_SQL_INDICATOR = 21, /* SQL_INDICATOR */
+ YYSYMBOL_SQL_KEY_MEMBER = 22, /* SQL_KEY_MEMBER */
+ YYSYMBOL_SQL_LENGTH = 23, /* SQL_LENGTH */
+ YYSYMBOL_SQL_LONG = 24, /* SQL_LONG */
+ YYSYMBOL_SQL_NULLABLE = 25, /* SQL_NULLABLE */
+ YYSYMBOL_SQL_OCTET_LENGTH = 26, /* SQL_OCTET_LENGTH */
+ YYSYMBOL_SQL_OPEN = 27, /* SQL_OPEN */
+ YYSYMBOL_SQL_OUTPUT = 28, /* SQL_OUTPUT */
+ YYSYMBOL_SQL_REFERENCE = 29, /* SQL_REFERENCE */
+ YYSYMBOL_SQL_RETURNED_LENGTH = 30, /* SQL_RETURNED_LENGTH */
+ YYSYMBOL_SQL_RETURNED_OCTET_LENGTH = 31, /* SQL_RETURNED_OCTET_LENGTH */
+ YYSYMBOL_SQL_SCALE = 32, /* SQL_SCALE */
+ YYSYMBOL_SQL_SECTION = 33, /* SQL_SECTION */
+ YYSYMBOL_SQL_SHORT = 34, /* SQL_SHORT */
+ YYSYMBOL_SQL_SIGNED = 35, /* SQL_SIGNED */
+ YYSYMBOL_SQL_SQLERROR = 36, /* SQL_SQLERROR */
+ YYSYMBOL_SQL_SQLPRINT = 37, /* SQL_SQLPRINT */
+ YYSYMBOL_SQL_SQLWARNING = 38, /* SQL_SQLWARNING */
+ YYSYMBOL_SQL_START = 39, /* SQL_START */
+ YYSYMBOL_SQL_STOP = 40, /* SQL_STOP */
+ YYSYMBOL_SQL_STRUCT = 41, /* SQL_STRUCT */
+ YYSYMBOL_SQL_UNSIGNED = 42, /* SQL_UNSIGNED */
+ YYSYMBOL_SQL_VAR = 43, /* SQL_VAR */
+ YYSYMBOL_SQL_WHENEVER = 44, /* SQL_WHENEVER */
+ YYSYMBOL_S_ADD = 45, /* S_ADD */
+ YYSYMBOL_S_AND = 46, /* S_AND */
+ YYSYMBOL_S_ANYTHING = 47, /* S_ANYTHING */
+ YYSYMBOL_S_AUTO = 48, /* S_AUTO */
+ YYSYMBOL_S_CONST = 49, /* S_CONST */
+ YYSYMBOL_S_DEC = 50, /* S_DEC */
+ YYSYMBOL_S_DIV = 51, /* S_DIV */
+ YYSYMBOL_S_DOTPOINT = 52, /* S_DOTPOINT */
+ YYSYMBOL_S_EQUAL = 53, /* S_EQUAL */
+ YYSYMBOL_S_EXTERN = 54, /* S_EXTERN */
+ YYSYMBOL_S_INC = 55, /* S_INC */
+ YYSYMBOL_S_LSHIFT = 56, /* S_LSHIFT */
+ YYSYMBOL_S_MEMPOINT = 57, /* S_MEMPOINT */
+ YYSYMBOL_S_MEMBER = 58, /* S_MEMBER */
+ YYSYMBOL_S_MOD = 59, /* S_MOD */
+ YYSYMBOL_S_MUL = 60, /* S_MUL */
+ YYSYMBOL_S_NEQUAL = 61, /* S_NEQUAL */
+ YYSYMBOL_S_OR = 62, /* S_OR */
+ YYSYMBOL_S_REGISTER = 63, /* S_REGISTER */
+ YYSYMBOL_S_RSHIFT = 64, /* S_RSHIFT */
+ YYSYMBOL_S_STATIC = 65, /* S_STATIC */
+ YYSYMBOL_S_SUB = 66, /* S_SUB */
+ YYSYMBOL_S_VOLATILE = 67, /* S_VOLATILE */
+ YYSYMBOL_S_TYPEDEF = 68, /* S_TYPEDEF */
+ YYSYMBOL_CSTRING = 69, /* CSTRING */
+ YYSYMBOL_CVARIABLE = 70, /* CVARIABLE */
+ YYSYMBOL_CPP_LINE = 71, /* CPP_LINE */
+ YYSYMBOL_IP = 72, /* IP */
+ YYSYMBOL_IDENT = 73, /* IDENT */
+ YYSYMBOL_UIDENT = 74, /* UIDENT */
+ YYSYMBOL_FCONST = 75, /* FCONST */
+ YYSYMBOL_SCONST = 76, /* SCONST */
+ YYSYMBOL_USCONST = 77, /* USCONST */
+ YYSYMBOL_BCONST = 78, /* BCONST */
+ YYSYMBOL_XCONST = 79, /* XCONST */
+ YYSYMBOL_Op = 80, /* Op */
+ YYSYMBOL_ICONST = 81, /* ICONST */
+ YYSYMBOL_PARAM = 82, /* PARAM */
+ YYSYMBOL_TYPECAST = 83, /* TYPECAST */
+ YYSYMBOL_DOT_DOT = 84, /* DOT_DOT */
+ YYSYMBOL_COLON_EQUALS = 85, /* COLON_EQUALS */
+ YYSYMBOL_EQUALS_GREATER = 86, /* EQUALS_GREATER */
+ YYSYMBOL_LESS_EQUALS = 87, /* LESS_EQUALS */
+ YYSYMBOL_GREATER_EQUALS = 88, /* GREATER_EQUALS */
+ YYSYMBOL_NOT_EQUALS = 89, /* NOT_EQUALS */
+ YYSYMBOL_ABORT_P = 90, /* ABORT_P */
+ YYSYMBOL_ABSOLUTE_P = 91, /* ABSOLUTE_P */
+ YYSYMBOL_ACCESS = 92, /* ACCESS */
+ YYSYMBOL_ACTION = 93, /* ACTION */
+ YYSYMBOL_ADD_P = 94, /* ADD_P */
+ YYSYMBOL_ADMIN = 95, /* ADMIN */
+ YYSYMBOL_AFTER = 96, /* AFTER */
+ YYSYMBOL_AGGREGATE = 97, /* AGGREGATE */
+ YYSYMBOL_ALL = 98, /* ALL */
+ YYSYMBOL_ALSO = 99, /* ALSO */
+ YYSYMBOL_ALTER = 100, /* ALTER */
+ YYSYMBOL_ALWAYS = 101, /* ALWAYS */
+ YYSYMBOL_ANALYSE = 102, /* ANALYSE */
+ YYSYMBOL_ANALYZE = 103, /* ANALYZE */
+ YYSYMBOL_AND = 104, /* AND */
+ YYSYMBOL_ANY = 105, /* ANY */
+ YYSYMBOL_ARRAY = 106, /* ARRAY */
+ YYSYMBOL_AS = 107, /* AS */
+ YYSYMBOL_ASC = 108, /* ASC */
+ YYSYMBOL_ASENSITIVE = 109, /* ASENSITIVE */
+ YYSYMBOL_ASSERTION = 110, /* ASSERTION */
+ YYSYMBOL_ASSIGNMENT = 111, /* ASSIGNMENT */
+ YYSYMBOL_ASYMMETRIC = 112, /* ASYMMETRIC */
+ YYSYMBOL_ATOMIC = 113, /* ATOMIC */
+ YYSYMBOL_AT = 114, /* AT */
+ YYSYMBOL_ATTACH = 115, /* ATTACH */
+ YYSYMBOL_ATTRIBUTE = 116, /* ATTRIBUTE */
+ YYSYMBOL_AUTHORIZATION = 117, /* AUTHORIZATION */
+ YYSYMBOL_BACKWARD = 118, /* BACKWARD */
+ YYSYMBOL_BEFORE = 119, /* BEFORE */
+ YYSYMBOL_BEGIN_P = 120, /* BEGIN_P */
+ YYSYMBOL_BETWEEN = 121, /* BETWEEN */
+ YYSYMBOL_BIGINT = 122, /* BIGINT */
+ YYSYMBOL_BINARY = 123, /* BINARY */
+ YYSYMBOL_BIT = 124, /* BIT */
+ YYSYMBOL_BOOLEAN_P = 125, /* BOOLEAN_P */
+ YYSYMBOL_BOTH = 126, /* BOTH */
+ YYSYMBOL_BREADTH = 127, /* BREADTH */
+ YYSYMBOL_BY = 128, /* BY */
+ YYSYMBOL_CACHE = 129, /* CACHE */
+ YYSYMBOL_CALL = 130, /* CALL */
+ YYSYMBOL_CALLED = 131, /* CALLED */
+ YYSYMBOL_CASCADE = 132, /* CASCADE */
+ YYSYMBOL_CASCADED = 133, /* CASCADED */
+ YYSYMBOL_CASE = 134, /* CASE */
+ YYSYMBOL_CAST = 135, /* CAST */
+ YYSYMBOL_CATALOG_P = 136, /* CATALOG_P */
+ YYSYMBOL_CHAIN = 137, /* CHAIN */
+ YYSYMBOL_CHAR_P = 138, /* CHAR_P */
+ YYSYMBOL_CHARACTER = 139, /* CHARACTER */
+ YYSYMBOL_CHARACTERISTICS = 140, /* CHARACTERISTICS */
+ YYSYMBOL_CHECK = 141, /* CHECK */
+ YYSYMBOL_CHECKPOINT = 142, /* CHECKPOINT */
+ YYSYMBOL_CLASS = 143, /* CLASS */
+ YYSYMBOL_CLOSE = 144, /* CLOSE */
+ YYSYMBOL_CLUSTER = 145, /* CLUSTER */
+ YYSYMBOL_COALESCE = 146, /* COALESCE */
+ YYSYMBOL_COLLATE = 147, /* COLLATE */
+ YYSYMBOL_COLLATION = 148, /* COLLATION */
+ YYSYMBOL_COLUMN = 149, /* COLUMN */
+ YYSYMBOL_COLUMNS = 150, /* COLUMNS */
+ YYSYMBOL_COMMENT = 151, /* COMMENT */
+ YYSYMBOL_COMMENTS = 152, /* COMMENTS */
+ YYSYMBOL_COMMIT = 153, /* COMMIT */
+ YYSYMBOL_COMMITTED = 154, /* COMMITTED */
+ YYSYMBOL_COMPRESSION = 155, /* COMPRESSION */
+ YYSYMBOL_CONCURRENTLY = 156, /* CONCURRENTLY */
+ YYSYMBOL_CONFIGURATION = 157, /* CONFIGURATION */
+ YYSYMBOL_CONFLICT = 158, /* CONFLICT */
+ YYSYMBOL_CONNECTION = 159, /* CONNECTION */
+ YYSYMBOL_CONSTRAINT = 160, /* CONSTRAINT */
+ YYSYMBOL_CONSTRAINTS = 161, /* CONSTRAINTS */
+ YYSYMBOL_CONTENT_P = 162, /* CONTENT_P */
+ YYSYMBOL_CONTINUE_P = 163, /* CONTINUE_P */
+ YYSYMBOL_CONVERSION_P = 164, /* CONVERSION_P */
+ YYSYMBOL_COPY = 165, /* COPY */
+ YYSYMBOL_COST = 166, /* COST */
+ YYSYMBOL_CREATE = 167, /* CREATE */
+ YYSYMBOL_CROSS = 168, /* CROSS */
+ YYSYMBOL_CSV = 169, /* CSV */
+ YYSYMBOL_CUBE = 170, /* CUBE */
+ YYSYMBOL_CURRENT_P = 171, /* CURRENT_P */
+ YYSYMBOL_CURRENT_CATALOG = 172, /* CURRENT_CATALOG */
+ YYSYMBOL_CURRENT_DATE = 173, /* CURRENT_DATE */
+ YYSYMBOL_CURRENT_ROLE = 174, /* CURRENT_ROLE */
+ YYSYMBOL_CURRENT_SCHEMA = 175, /* CURRENT_SCHEMA */
+ YYSYMBOL_CURRENT_TIME = 176, /* CURRENT_TIME */
+ YYSYMBOL_CURRENT_TIMESTAMP = 177, /* CURRENT_TIMESTAMP */
+ YYSYMBOL_CURRENT_USER = 178, /* CURRENT_USER */
+ YYSYMBOL_CURSOR = 179, /* CURSOR */
+ YYSYMBOL_CYCLE = 180, /* CYCLE */
+ YYSYMBOL_DATA_P = 181, /* DATA_P */
+ YYSYMBOL_DATABASE = 182, /* DATABASE */
+ YYSYMBOL_DAY_P = 183, /* DAY_P */
+ YYSYMBOL_DEALLOCATE = 184, /* DEALLOCATE */
+ YYSYMBOL_DEC = 185, /* DEC */
+ YYSYMBOL_DECIMAL_P = 186, /* DECIMAL_P */
+ YYSYMBOL_DECLARE = 187, /* DECLARE */
+ YYSYMBOL_DEFAULT = 188, /* DEFAULT */
+ YYSYMBOL_DEFAULTS = 189, /* DEFAULTS */
+ YYSYMBOL_DEFERRABLE = 190, /* DEFERRABLE */
+ YYSYMBOL_DEFERRED = 191, /* DEFERRED */
+ YYSYMBOL_DEFINER = 192, /* DEFINER */
+ YYSYMBOL_DELETE_P = 193, /* DELETE_P */
+ YYSYMBOL_DELIMITER = 194, /* DELIMITER */
+ YYSYMBOL_DELIMITERS = 195, /* DELIMITERS */
+ YYSYMBOL_DEPENDS = 196, /* DEPENDS */
+ YYSYMBOL_DEPTH = 197, /* DEPTH */
+ YYSYMBOL_DESC = 198, /* DESC */
+ YYSYMBOL_DETACH = 199, /* DETACH */
+ YYSYMBOL_DICTIONARY = 200, /* DICTIONARY */
+ YYSYMBOL_DISABLE_P = 201, /* DISABLE_P */
+ YYSYMBOL_DISCARD = 202, /* DISCARD */
+ YYSYMBOL_DISTINCT = 203, /* DISTINCT */
+ YYSYMBOL_DO = 204, /* DO */
+ YYSYMBOL_DOCUMENT_P = 205, /* DOCUMENT_P */
+ YYSYMBOL_DOMAIN_P = 206, /* DOMAIN_P */
+ YYSYMBOL_DOUBLE_P = 207, /* DOUBLE_P */
+ YYSYMBOL_DROP = 208, /* DROP */
+ YYSYMBOL_EACH = 209, /* EACH */
+ YYSYMBOL_ELSE = 210, /* ELSE */
+ YYSYMBOL_ENABLE_P = 211, /* ENABLE_P */
+ YYSYMBOL_ENCODING = 212, /* ENCODING */
+ YYSYMBOL_ENCRYPTED = 213, /* ENCRYPTED */
+ YYSYMBOL_END_P = 214, /* END_P */
+ YYSYMBOL_ENUM_P = 215, /* ENUM_P */
+ YYSYMBOL_ESCAPE = 216, /* ESCAPE */
+ YYSYMBOL_EVENT = 217, /* EVENT */
+ YYSYMBOL_EXCEPT = 218, /* EXCEPT */
+ YYSYMBOL_EXCLUDE = 219, /* EXCLUDE */
+ YYSYMBOL_EXCLUDING = 220, /* EXCLUDING */
+ YYSYMBOL_EXCLUSIVE = 221, /* EXCLUSIVE */
+ YYSYMBOL_EXECUTE = 222, /* EXECUTE */
+ YYSYMBOL_EXISTS = 223, /* EXISTS */
+ YYSYMBOL_EXPLAIN = 224, /* EXPLAIN */
+ YYSYMBOL_EXPRESSION = 225, /* EXPRESSION */
+ YYSYMBOL_EXTENSION = 226, /* EXTENSION */
+ YYSYMBOL_EXTERNAL = 227, /* EXTERNAL */
+ YYSYMBOL_EXTRACT = 228, /* EXTRACT */
+ YYSYMBOL_FALSE_P = 229, /* FALSE_P */
+ YYSYMBOL_FAMILY = 230, /* FAMILY */
+ YYSYMBOL_FETCH = 231, /* FETCH */
+ YYSYMBOL_FILTER = 232, /* FILTER */
+ YYSYMBOL_FINALIZE = 233, /* FINALIZE */
+ YYSYMBOL_FIRST_P = 234, /* FIRST_P */
+ YYSYMBOL_FLOAT_P = 235, /* FLOAT_P */
+ YYSYMBOL_FOLLOWING = 236, /* FOLLOWING */
+ YYSYMBOL_FOR = 237, /* FOR */
+ YYSYMBOL_FORCE = 238, /* FORCE */
+ YYSYMBOL_FOREIGN = 239, /* FOREIGN */
+ YYSYMBOL_FORWARD = 240, /* FORWARD */
+ YYSYMBOL_FREEZE = 241, /* FREEZE */
+ YYSYMBOL_FROM = 242, /* FROM */
+ YYSYMBOL_FULL = 243, /* FULL */
+ YYSYMBOL_FUNCTION = 244, /* FUNCTION */
+ YYSYMBOL_FUNCTIONS = 245, /* FUNCTIONS */
+ YYSYMBOL_GENERATED = 246, /* GENERATED */
+ YYSYMBOL_GLOBAL = 247, /* GLOBAL */
+ YYSYMBOL_GRANT = 248, /* GRANT */
+ YYSYMBOL_GRANTED = 249, /* GRANTED */
+ YYSYMBOL_GREATEST = 250, /* GREATEST */
+ YYSYMBOL_GROUP_P = 251, /* GROUP_P */
+ YYSYMBOL_GROUPING = 252, /* GROUPING */
+ YYSYMBOL_GROUPS = 253, /* GROUPS */
+ YYSYMBOL_HANDLER = 254, /* HANDLER */
+ YYSYMBOL_HAVING = 255, /* HAVING */
+ YYSYMBOL_HEADER_P = 256, /* HEADER_P */
+ YYSYMBOL_HOLD = 257, /* HOLD */
+ YYSYMBOL_HOUR_P = 258, /* HOUR_P */
+ YYSYMBOL_IDENTITY_P = 259, /* IDENTITY_P */
+ YYSYMBOL_IF_P = 260, /* IF_P */
+ YYSYMBOL_ILIKE = 261, /* ILIKE */
+ YYSYMBOL_IMMEDIATE = 262, /* IMMEDIATE */
+ YYSYMBOL_IMMUTABLE = 263, /* IMMUTABLE */
+ YYSYMBOL_IMPLICIT_P = 264, /* IMPLICIT_P */
+ YYSYMBOL_IMPORT_P = 265, /* IMPORT_P */
+ YYSYMBOL_IN_P = 266, /* IN_P */
+ YYSYMBOL_INCLUDE = 267, /* INCLUDE */
+ YYSYMBOL_INCLUDING = 268, /* INCLUDING */
+ YYSYMBOL_INCREMENT = 269, /* INCREMENT */
+ YYSYMBOL_INDEX = 270, /* INDEX */
+ YYSYMBOL_INDEXES = 271, /* INDEXES */
+ YYSYMBOL_INHERIT = 272, /* INHERIT */
+ YYSYMBOL_INHERITS = 273, /* INHERITS */
+ YYSYMBOL_INITIALLY = 274, /* INITIALLY */
+ YYSYMBOL_INLINE_P = 275, /* INLINE_P */
+ YYSYMBOL_INNER_P = 276, /* INNER_P */
+ YYSYMBOL_INOUT = 277, /* INOUT */
+ YYSYMBOL_INPUT_P = 278, /* INPUT_P */
+ YYSYMBOL_INSENSITIVE = 279, /* INSENSITIVE */
+ YYSYMBOL_INSERT = 280, /* INSERT */
+ YYSYMBOL_INSTEAD = 281, /* INSTEAD */
+ YYSYMBOL_INT_P = 282, /* INT_P */
+ YYSYMBOL_INTEGER = 283, /* INTEGER */
+ YYSYMBOL_INTERSECT = 284, /* INTERSECT */
+ YYSYMBOL_INTERVAL = 285, /* INTERVAL */
+ YYSYMBOL_INTO = 286, /* INTO */
+ YYSYMBOL_INVOKER = 287, /* INVOKER */
+ YYSYMBOL_IS = 288, /* IS */
+ YYSYMBOL_ISNULL = 289, /* ISNULL */
+ YYSYMBOL_ISOLATION = 290, /* ISOLATION */
+ YYSYMBOL_JOIN = 291, /* JOIN */
+ YYSYMBOL_KEY = 292, /* KEY */
+ YYSYMBOL_LABEL = 293, /* LABEL */
+ YYSYMBOL_LANGUAGE = 294, /* LANGUAGE */
+ YYSYMBOL_LARGE_P = 295, /* LARGE_P */
+ YYSYMBOL_LAST_P = 296, /* LAST_P */
+ YYSYMBOL_LATERAL_P = 297, /* LATERAL_P */
+ YYSYMBOL_LEADING = 298, /* LEADING */
+ YYSYMBOL_LEAKPROOF = 299, /* LEAKPROOF */
+ YYSYMBOL_LEAST = 300, /* LEAST */
+ YYSYMBOL_LEFT = 301, /* LEFT */
+ YYSYMBOL_LEVEL = 302, /* LEVEL */
+ YYSYMBOL_LIKE = 303, /* LIKE */
+ YYSYMBOL_LIMIT = 304, /* LIMIT */
+ YYSYMBOL_LISTEN = 305, /* LISTEN */
+ YYSYMBOL_LOAD = 306, /* LOAD */
+ YYSYMBOL_LOCAL = 307, /* LOCAL */
+ YYSYMBOL_LOCALTIME = 308, /* LOCALTIME */
+ YYSYMBOL_LOCALTIMESTAMP = 309, /* LOCALTIMESTAMP */
+ YYSYMBOL_LOCATION = 310, /* LOCATION */
+ YYSYMBOL_LOCK_P = 311, /* LOCK_P */
+ YYSYMBOL_LOCKED = 312, /* LOCKED */
+ YYSYMBOL_LOGGED = 313, /* LOGGED */
+ YYSYMBOL_MAPPING = 314, /* MAPPING */
+ YYSYMBOL_MATCH = 315, /* MATCH */
+ YYSYMBOL_MATERIALIZED = 316, /* MATERIALIZED */
+ YYSYMBOL_MAXVALUE = 317, /* MAXVALUE */
+ YYSYMBOL_METHOD = 318, /* METHOD */
+ YYSYMBOL_MINUTE_P = 319, /* MINUTE_P */
+ YYSYMBOL_MINVALUE = 320, /* MINVALUE */
+ YYSYMBOL_MODE = 321, /* MODE */
+ YYSYMBOL_MONTH_P = 322, /* MONTH_P */
+ YYSYMBOL_MOVE = 323, /* MOVE */
+ YYSYMBOL_NAME_P = 324, /* NAME_P */
+ YYSYMBOL_NAMES = 325, /* NAMES */
+ YYSYMBOL_NATIONAL = 326, /* NATIONAL */
+ YYSYMBOL_NATURAL = 327, /* NATURAL */
+ YYSYMBOL_NCHAR = 328, /* NCHAR */
+ YYSYMBOL_NEW = 329, /* NEW */
+ YYSYMBOL_NEXT = 330, /* NEXT */
+ YYSYMBOL_NFC = 331, /* NFC */
+ YYSYMBOL_NFD = 332, /* NFD */
+ YYSYMBOL_NFKC = 333, /* NFKC */
+ YYSYMBOL_NFKD = 334, /* NFKD */
+ YYSYMBOL_NO = 335, /* NO */
+ YYSYMBOL_NONE = 336, /* NONE */
+ YYSYMBOL_NORMALIZE = 337, /* NORMALIZE */
+ YYSYMBOL_NORMALIZED = 338, /* NORMALIZED */
+ YYSYMBOL_NOT = 339, /* NOT */
+ YYSYMBOL_NOTHING = 340, /* NOTHING */
+ YYSYMBOL_NOTIFY = 341, /* NOTIFY */
+ YYSYMBOL_NOTNULL = 342, /* NOTNULL */
+ YYSYMBOL_NOWAIT = 343, /* NOWAIT */
+ YYSYMBOL_NULL_P = 344, /* NULL_P */
+ YYSYMBOL_NULLIF = 345, /* NULLIF */
+ YYSYMBOL_NULLS_P = 346, /* NULLS_P */
+ YYSYMBOL_NUMERIC = 347, /* NUMERIC */
+ YYSYMBOL_OBJECT_P = 348, /* OBJECT_P */
+ YYSYMBOL_OF = 349, /* OF */
+ YYSYMBOL_OFF = 350, /* OFF */
+ YYSYMBOL_OFFSET = 351, /* OFFSET */
+ YYSYMBOL_OIDS = 352, /* OIDS */
+ YYSYMBOL_OLD = 353, /* OLD */
+ YYSYMBOL_ON = 354, /* ON */
+ YYSYMBOL_ONLY = 355, /* ONLY */
+ YYSYMBOL_OPERATOR = 356, /* OPERATOR */
+ YYSYMBOL_OPTION = 357, /* OPTION */
+ YYSYMBOL_OPTIONS = 358, /* OPTIONS */
+ YYSYMBOL_OR = 359, /* OR */
+ YYSYMBOL_ORDER = 360, /* ORDER */
+ YYSYMBOL_ORDINALITY = 361, /* ORDINALITY */
+ YYSYMBOL_OTHERS = 362, /* OTHERS */
+ YYSYMBOL_OUT_P = 363, /* OUT_P */
+ YYSYMBOL_OUTER_P = 364, /* OUTER_P */
+ YYSYMBOL_OVER = 365, /* OVER */
+ YYSYMBOL_OVERLAPS = 366, /* OVERLAPS */
+ YYSYMBOL_OVERLAY = 367, /* OVERLAY */
+ YYSYMBOL_OVERRIDING = 368, /* OVERRIDING */
+ YYSYMBOL_OWNED = 369, /* OWNED */
+ YYSYMBOL_OWNER = 370, /* OWNER */
+ YYSYMBOL_PARALLEL = 371, /* PARALLEL */
+ YYSYMBOL_PARSER = 372, /* PARSER */
+ YYSYMBOL_PARTIAL = 373, /* PARTIAL */
+ YYSYMBOL_PARTITION = 374, /* PARTITION */
+ YYSYMBOL_PASSING = 375, /* PASSING */
+ YYSYMBOL_PASSWORD = 376, /* PASSWORD */
+ YYSYMBOL_PLACING = 377, /* PLACING */
+ YYSYMBOL_PLANS = 378, /* PLANS */
+ YYSYMBOL_POLICY = 379, /* POLICY */
+ YYSYMBOL_POSITION = 380, /* POSITION */
+ YYSYMBOL_PRECEDING = 381, /* PRECEDING */
+ YYSYMBOL_PRECISION = 382, /* PRECISION */
+ YYSYMBOL_PRESERVE = 383, /* PRESERVE */
+ YYSYMBOL_PREPARE = 384, /* PREPARE */
+ YYSYMBOL_PREPARED = 385, /* PREPARED */
+ YYSYMBOL_PRIMARY = 386, /* PRIMARY */
+ YYSYMBOL_PRIOR = 387, /* PRIOR */
+ YYSYMBOL_PRIVILEGES = 388, /* PRIVILEGES */
+ YYSYMBOL_PROCEDURAL = 389, /* PROCEDURAL */
+ YYSYMBOL_PROCEDURE = 390, /* PROCEDURE */
+ YYSYMBOL_PROCEDURES = 391, /* PROCEDURES */
+ YYSYMBOL_PROGRAM = 392, /* PROGRAM */
+ YYSYMBOL_PUBLICATION = 393, /* PUBLICATION */
+ YYSYMBOL_QUOTE = 394, /* QUOTE */
+ YYSYMBOL_RANGE = 395, /* RANGE */
+ YYSYMBOL_READ = 396, /* READ */
+ YYSYMBOL_REAL = 397, /* REAL */
+ YYSYMBOL_REASSIGN = 398, /* REASSIGN */
+ YYSYMBOL_RECHECK = 399, /* RECHECK */
+ YYSYMBOL_RECURSIVE = 400, /* RECURSIVE */
+ YYSYMBOL_REF = 401, /* REF */
+ YYSYMBOL_REFERENCES = 402, /* REFERENCES */
+ YYSYMBOL_REFERENCING = 403, /* REFERENCING */
+ YYSYMBOL_REFRESH = 404, /* REFRESH */
+ YYSYMBOL_REINDEX = 405, /* REINDEX */
+ YYSYMBOL_RELATIVE_P = 406, /* RELATIVE_P */
+ YYSYMBOL_RELEASE = 407, /* RELEASE */
+ YYSYMBOL_RENAME = 408, /* RENAME */
+ YYSYMBOL_REPEATABLE = 409, /* REPEATABLE */
+ YYSYMBOL_REPLACE = 410, /* REPLACE */
+ YYSYMBOL_REPLICA = 411, /* REPLICA */
+ YYSYMBOL_RESET = 412, /* RESET */
+ YYSYMBOL_RESTART = 413, /* RESTART */
+ YYSYMBOL_RESTRICT = 414, /* RESTRICT */
+ YYSYMBOL_RETURN = 415, /* RETURN */
+ YYSYMBOL_RETURNING = 416, /* RETURNING */
+ YYSYMBOL_RETURNS = 417, /* RETURNS */
+ YYSYMBOL_REVOKE = 418, /* REVOKE */
+ YYSYMBOL_RIGHT = 419, /* RIGHT */
+ YYSYMBOL_ROLE = 420, /* ROLE */
+ YYSYMBOL_ROLLBACK = 421, /* ROLLBACK */
+ YYSYMBOL_ROLLUP = 422, /* ROLLUP */
+ YYSYMBOL_ROUTINE = 423, /* ROUTINE */
+ YYSYMBOL_ROUTINES = 424, /* ROUTINES */
+ YYSYMBOL_ROW = 425, /* ROW */
+ YYSYMBOL_ROWS = 426, /* ROWS */
+ YYSYMBOL_RULE = 427, /* RULE */
+ YYSYMBOL_SAVEPOINT = 428, /* SAVEPOINT */
+ YYSYMBOL_SCHEMA = 429, /* SCHEMA */
+ YYSYMBOL_SCHEMAS = 430, /* SCHEMAS */
+ YYSYMBOL_SCROLL = 431, /* SCROLL */
+ YYSYMBOL_SEARCH = 432, /* SEARCH */
+ YYSYMBOL_SECOND_P = 433, /* SECOND_P */
+ YYSYMBOL_SECURITY = 434, /* SECURITY */
+ YYSYMBOL_SELECT = 435, /* SELECT */
+ YYSYMBOL_SEQUENCE = 436, /* SEQUENCE */
+ YYSYMBOL_SEQUENCES = 437, /* SEQUENCES */
+ YYSYMBOL_SERIALIZABLE = 438, /* SERIALIZABLE */
+ YYSYMBOL_SERVER = 439, /* SERVER */
+ YYSYMBOL_SESSION = 440, /* SESSION */
+ YYSYMBOL_SESSION_USER = 441, /* SESSION_USER */
+ YYSYMBOL_SET = 442, /* SET */
+ YYSYMBOL_SETS = 443, /* SETS */
+ YYSYMBOL_SETOF = 444, /* SETOF */
+ YYSYMBOL_SHARE = 445, /* SHARE */
+ YYSYMBOL_SHOW = 446, /* SHOW */
+ YYSYMBOL_SIMILAR = 447, /* SIMILAR */
+ YYSYMBOL_SIMPLE = 448, /* SIMPLE */
+ YYSYMBOL_SKIP = 449, /* SKIP */
+ YYSYMBOL_SMALLINT = 450, /* SMALLINT */
+ YYSYMBOL_SNAPSHOT = 451, /* SNAPSHOT */
+ YYSYMBOL_SOME = 452, /* SOME */
+ YYSYMBOL_SQL_P = 453, /* SQL_P */
+ YYSYMBOL_STABLE = 454, /* STABLE */
+ YYSYMBOL_STANDALONE_P = 455, /* STANDALONE_P */
+ YYSYMBOL_START = 456, /* START */
+ YYSYMBOL_STATEMENT = 457, /* STATEMENT */
+ YYSYMBOL_STATISTICS = 458, /* STATISTICS */
+ YYSYMBOL_STDIN = 459, /* STDIN */
+ YYSYMBOL_STDOUT = 460, /* STDOUT */
+ YYSYMBOL_STORAGE = 461, /* STORAGE */
+ YYSYMBOL_STORED = 462, /* STORED */
+ YYSYMBOL_STRICT_P = 463, /* STRICT_P */
+ YYSYMBOL_STRIP_P = 464, /* STRIP_P */
+ YYSYMBOL_SUBSCRIPTION = 465, /* SUBSCRIPTION */
+ YYSYMBOL_SUBSTRING = 466, /* SUBSTRING */
+ YYSYMBOL_SUPPORT = 467, /* SUPPORT */
+ YYSYMBOL_SYMMETRIC = 468, /* SYMMETRIC */
+ YYSYMBOL_SYSID = 469, /* SYSID */
+ YYSYMBOL_SYSTEM_P = 470, /* SYSTEM_P */
+ YYSYMBOL_TABLE = 471, /* TABLE */
+ YYSYMBOL_TABLES = 472, /* TABLES */
+ YYSYMBOL_TABLESAMPLE = 473, /* TABLESAMPLE */
+ YYSYMBOL_TABLESPACE = 474, /* TABLESPACE */
+ YYSYMBOL_TEMP = 475, /* TEMP */
+ YYSYMBOL_TEMPLATE = 476, /* TEMPLATE */
+ YYSYMBOL_TEMPORARY = 477, /* TEMPORARY */
+ YYSYMBOL_TEXT_P = 478, /* TEXT_P */
+ YYSYMBOL_THEN = 479, /* THEN */
+ YYSYMBOL_TIES = 480, /* TIES */
+ YYSYMBOL_TIME = 481, /* TIME */
+ YYSYMBOL_TIMESTAMP = 482, /* TIMESTAMP */
+ YYSYMBOL_TO = 483, /* TO */
+ YYSYMBOL_TRAILING = 484, /* TRAILING */
+ YYSYMBOL_TRANSACTION = 485, /* TRANSACTION */
+ YYSYMBOL_TRANSFORM = 486, /* TRANSFORM */
+ YYSYMBOL_TREAT = 487, /* TREAT */
+ YYSYMBOL_TRIGGER = 488, /* TRIGGER */
+ YYSYMBOL_TRIM = 489, /* TRIM */
+ YYSYMBOL_TRUE_P = 490, /* TRUE_P */
+ YYSYMBOL_TRUNCATE = 491, /* TRUNCATE */
+ YYSYMBOL_TRUSTED = 492, /* TRUSTED */
+ YYSYMBOL_TYPE_P = 493, /* TYPE_P */
+ YYSYMBOL_TYPES_P = 494, /* TYPES_P */
+ YYSYMBOL_UESCAPE = 495, /* UESCAPE */
+ YYSYMBOL_UNBOUNDED = 496, /* UNBOUNDED */
+ YYSYMBOL_UNCOMMITTED = 497, /* UNCOMMITTED */
+ YYSYMBOL_UNENCRYPTED = 498, /* UNENCRYPTED */
+ YYSYMBOL_UNION = 499, /* UNION */
+ YYSYMBOL_UNIQUE = 500, /* UNIQUE */
+ YYSYMBOL_UNKNOWN = 501, /* UNKNOWN */
+ YYSYMBOL_UNLISTEN = 502, /* UNLISTEN */
+ YYSYMBOL_UNLOGGED = 503, /* UNLOGGED */
+ YYSYMBOL_UNTIL = 504, /* UNTIL */
+ YYSYMBOL_UPDATE = 505, /* UPDATE */
+ YYSYMBOL_USER = 506, /* USER */
+ YYSYMBOL_USING = 507, /* USING */
+ YYSYMBOL_VACUUM = 508, /* VACUUM */
+ YYSYMBOL_VALID = 509, /* VALID */
+ YYSYMBOL_VALIDATE = 510, /* VALIDATE */
+ YYSYMBOL_VALIDATOR = 511, /* VALIDATOR */
+ YYSYMBOL_VALUE_P = 512, /* VALUE_P */
+ YYSYMBOL_VALUES = 513, /* VALUES */
+ YYSYMBOL_VARCHAR = 514, /* VARCHAR */
+ YYSYMBOL_VARIADIC = 515, /* VARIADIC */
+ YYSYMBOL_VARYING = 516, /* VARYING */
+ YYSYMBOL_VERBOSE = 517, /* VERBOSE */
+ YYSYMBOL_VERSION_P = 518, /* VERSION_P */
+ YYSYMBOL_VIEW = 519, /* VIEW */
+ YYSYMBOL_VIEWS = 520, /* VIEWS */
+ YYSYMBOL_VOLATILE = 521, /* VOLATILE */
+ YYSYMBOL_WHEN = 522, /* WHEN */
+ YYSYMBOL_WHERE = 523, /* WHERE */
+ YYSYMBOL_WHITESPACE_P = 524, /* WHITESPACE_P */
+ YYSYMBOL_WINDOW = 525, /* WINDOW */
+ YYSYMBOL_WITH = 526, /* WITH */
+ YYSYMBOL_WITHIN = 527, /* WITHIN */
+ YYSYMBOL_WITHOUT = 528, /* WITHOUT */
+ YYSYMBOL_WORK = 529, /* WORK */
+ YYSYMBOL_WRAPPER = 530, /* WRAPPER */
+ YYSYMBOL_WRITE = 531, /* WRITE */
+ YYSYMBOL_XML_P = 532, /* XML_P */
+ YYSYMBOL_XMLATTRIBUTES = 533, /* XMLATTRIBUTES */
+ YYSYMBOL_XMLCONCAT = 534, /* XMLCONCAT */
+ YYSYMBOL_XMLELEMENT = 535, /* XMLELEMENT */
+ YYSYMBOL_XMLEXISTS = 536, /* XMLEXISTS */
+ YYSYMBOL_XMLFOREST = 537, /* XMLFOREST */
+ YYSYMBOL_XMLNAMESPACES = 538, /* XMLNAMESPACES */
+ YYSYMBOL_XMLPARSE = 539, /* XMLPARSE */
+ YYSYMBOL_XMLPI = 540, /* XMLPI */
+ YYSYMBOL_XMLROOT = 541, /* XMLROOT */
+ YYSYMBOL_XMLSERIALIZE = 542, /* XMLSERIALIZE */
+ YYSYMBOL_XMLTABLE = 543, /* XMLTABLE */
+ YYSYMBOL_YEAR_P = 544, /* YEAR_P */
+ YYSYMBOL_YES_P = 545, /* YES_P */
+ YYSYMBOL_ZONE = 546, /* ZONE */
+ YYSYMBOL_NOT_LA = 547, /* NOT_LA */
+ YYSYMBOL_NULLS_LA = 548, /* NULLS_LA */
+ YYSYMBOL_WITH_LA = 549, /* WITH_LA */
+ YYSYMBOL_MODE_TYPE_NAME = 550, /* MODE_TYPE_NAME */
+ YYSYMBOL_MODE_PLPGSQL_EXPR = 551, /* MODE_PLPGSQL_EXPR */
+ YYSYMBOL_MODE_PLPGSQL_ASSIGN1 = 552, /* MODE_PLPGSQL_ASSIGN1 */
+ YYSYMBOL_MODE_PLPGSQL_ASSIGN2 = 553, /* MODE_PLPGSQL_ASSIGN2 */
+ YYSYMBOL_MODE_PLPGSQL_ASSIGN3 = 554, /* MODE_PLPGSQL_ASSIGN3 */
+ YYSYMBOL_555_ = 555, /* '<' */
+ YYSYMBOL_556_ = 556, /* '>' */
+ YYSYMBOL_557_ = 557, /* '=' */
+ YYSYMBOL_558_ = 558, /* '+' */
+ YYSYMBOL_559_ = 559, /* '-' */
+ YYSYMBOL_560_ = 560, /* '*' */
+ YYSYMBOL_561_ = 561, /* '/' */
+ YYSYMBOL_562_ = 562, /* '%' */
+ YYSYMBOL_563_ = 563, /* '^' */
+ YYSYMBOL_UMINUS = 564, /* UMINUS */
+ YYSYMBOL_565_ = 565, /* '[' */
+ YYSYMBOL_566_ = 566, /* ']' */
+ YYSYMBOL_567_ = 567, /* '(' */
+ YYSYMBOL_568_ = 568, /* ')' */
+ YYSYMBOL_569_ = 569, /* '.' */
+ YYSYMBOL_570_ = 570, /* ',' */
+ YYSYMBOL_571_ = 571, /* ';' */
+ YYSYMBOL_572_ = 572, /* ':' */
+ YYSYMBOL_573_ = 573, /* '{' */
+ YYSYMBOL_574_ = 574, /* '}' */
+ YYSYMBOL_YYACCEPT = 575, /* $accept */
+ YYSYMBOL_prog = 576, /* prog */
+ YYSYMBOL_toplevel_stmt = 577, /* toplevel_stmt */
+ YYSYMBOL_stmt = 578, /* stmt */
+ YYSYMBOL_CallStmt = 579, /* CallStmt */
+ YYSYMBOL_CreateRoleStmt = 580, /* CreateRoleStmt */
+ YYSYMBOL_opt_with = 581, /* opt_with */
+ YYSYMBOL_OptRoleList = 582, /* OptRoleList */
+ YYSYMBOL_AlterOptRoleList = 583, /* AlterOptRoleList */
+ YYSYMBOL_AlterOptRoleElem = 584, /* AlterOptRoleElem */
+ YYSYMBOL_CreateOptRoleElem = 585, /* CreateOptRoleElem */
+ YYSYMBOL_CreateUserStmt = 586, /* CreateUserStmt */
+ YYSYMBOL_AlterRoleStmt = 587, /* AlterRoleStmt */
+ YYSYMBOL_opt_in_database = 588, /* opt_in_database */
+ YYSYMBOL_AlterRoleSetStmt = 589, /* AlterRoleSetStmt */
+ YYSYMBOL_DropRoleStmt = 590, /* DropRoleStmt */
+ YYSYMBOL_CreateGroupStmt = 591, /* CreateGroupStmt */
+ YYSYMBOL_AlterGroupStmt = 592, /* AlterGroupStmt */
+ YYSYMBOL_add_drop = 593, /* add_drop */
+ YYSYMBOL_CreateSchemaStmt = 594, /* CreateSchemaStmt */
+ YYSYMBOL_OptSchemaName = 595, /* OptSchemaName */
+ YYSYMBOL_OptSchemaEltList = 596, /* OptSchemaEltList */
+ YYSYMBOL_schema_stmt = 597, /* schema_stmt */
+ YYSYMBOL_VariableSetStmt = 598, /* VariableSetStmt */
+ YYSYMBOL_set_rest = 599, /* set_rest */
+ YYSYMBOL_generic_set = 600, /* generic_set */
+ YYSYMBOL_set_rest_more = 601, /* set_rest_more */
+ YYSYMBOL_var_name = 602, /* var_name */
+ YYSYMBOL_var_list = 603, /* var_list */
+ YYSYMBOL_var_value = 604, /* var_value */
+ YYSYMBOL_iso_level = 605, /* iso_level */
+ YYSYMBOL_opt_boolean_or_string = 606, /* opt_boolean_or_string */
+ YYSYMBOL_zone_value = 607, /* zone_value */
+ YYSYMBOL_opt_encoding = 608, /* opt_encoding */
+ YYSYMBOL_NonReservedWord_or_Sconst = 609, /* NonReservedWord_or_Sconst */
+ YYSYMBOL_VariableResetStmt = 610, /* VariableResetStmt */
+ YYSYMBOL_reset_rest = 611, /* reset_rest */
+ YYSYMBOL_generic_reset = 612, /* generic_reset */
+ YYSYMBOL_SetResetClause = 613, /* SetResetClause */
+ YYSYMBOL_FunctionSetResetClause = 614, /* FunctionSetResetClause */
+ YYSYMBOL_VariableShowStmt = 615, /* VariableShowStmt */
+ YYSYMBOL_ConstraintsSetStmt = 616, /* ConstraintsSetStmt */
+ YYSYMBOL_constraints_set_list = 617, /* constraints_set_list */
+ YYSYMBOL_constraints_set_mode = 618, /* constraints_set_mode */
+ YYSYMBOL_CheckPointStmt = 619, /* CheckPointStmt */
+ YYSYMBOL_DiscardStmt = 620, /* DiscardStmt */
+ YYSYMBOL_AlterTableStmt = 621, /* AlterTableStmt */
+ YYSYMBOL_alter_table_cmds = 622, /* alter_table_cmds */
+ YYSYMBOL_partition_cmd = 623, /* partition_cmd */
+ YYSYMBOL_index_partition_cmd = 624, /* index_partition_cmd */
+ YYSYMBOL_alter_table_cmd = 625, /* alter_table_cmd */
+ YYSYMBOL_alter_column_default = 626, /* alter_column_default */
+ YYSYMBOL_opt_drop_behavior = 627, /* opt_drop_behavior */
+ YYSYMBOL_opt_collate_clause = 628, /* opt_collate_clause */
+ YYSYMBOL_alter_using = 629, /* alter_using */
+ YYSYMBOL_replica_identity = 630, /* replica_identity */
+ YYSYMBOL_reloptions = 631, /* reloptions */
+ YYSYMBOL_opt_reloptions = 632, /* opt_reloptions */
+ YYSYMBOL_reloption_list = 633, /* reloption_list */
+ YYSYMBOL_reloption_elem = 634, /* reloption_elem */
+ YYSYMBOL_alter_identity_column_option_list = 635, /* alter_identity_column_option_list */
+ YYSYMBOL_alter_identity_column_option = 636, /* alter_identity_column_option */
+ YYSYMBOL_PartitionBoundSpec = 637, /* PartitionBoundSpec */
+ YYSYMBOL_hash_partbound_elem = 638, /* hash_partbound_elem */
+ YYSYMBOL_hash_partbound = 639, /* hash_partbound */
+ YYSYMBOL_AlterCompositeTypeStmt = 640, /* AlterCompositeTypeStmt */
+ YYSYMBOL_alter_type_cmds = 641, /* alter_type_cmds */
+ YYSYMBOL_alter_type_cmd = 642, /* alter_type_cmd */
+ YYSYMBOL_ClosePortalStmt = 643, /* ClosePortalStmt */
+ YYSYMBOL_CopyStmt = 644, /* CopyStmt */
+ YYSYMBOL_copy_from = 645, /* copy_from */
+ YYSYMBOL_opt_program = 646, /* opt_program */
+ YYSYMBOL_copy_file_name = 647, /* copy_file_name */
+ YYSYMBOL_copy_options = 648, /* copy_options */
+ YYSYMBOL_copy_opt_list = 649, /* copy_opt_list */
+ YYSYMBOL_copy_opt_item = 650, /* copy_opt_item */
+ YYSYMBOL_opt_binary = 651, /* opt_binary */
+ YYSYMBOL_copy_delimiter = 652, /* copy_delimiter */
+ YYSYMBOL_opt_using = 653, /* opt_using */
+ YYSYMBOL_copy_generic_opt_list = 654, /* copy_generic_opt_list */
+ YYSYMBOL_copy_generic_opt_elem = 655, /* copy_generic_opt_elem */
+ YYSYMBOL_copy_generic_opt_arg = 656, /* copy_generic_opt_arg */
+ YYSYMBOL_copy_generic_opt_arg_list = 657, /* copy_generic_opt_arg_list */
+ YYSYMBOL_copy_generic_opt_arg_list_item = 658, /* copy_generic_opt_arg_list_item */
+ YYSYMBOL_CreateStmt = 659, /* CreateStmt */
+ YYSYMBOL_OptTemp = 660, /* OptTemp */
+ YYSYMBOL_OptTableElementList = 661, /* OptTableElementList */
+ YYSYMBOL_OptTypedTableElementList = 662, /* OptTypedTableElementList */
+ YYSYMBOL_TableElementList = 663, /* TableElementList */
+ YYSYMBOL_TypedTableElementList = 664, /* TypedTableElementList */
+ YYSYMBOL_TableElement = 665, /* TableElement */
+ YYSYMBOL_TypedTableElement = 666, /* TypedTableElement */
+ YYSYMBOL_columnDef = 667, /* columnDef */
+ YYSYMBOL_columnOptions = 668, /* columnOptions */
+ YYSYMBOL_column_compression = 669, /* column_compression */
+ YYSYMBOL_opt_column_compression = 670, /* opt_column_compression */
+ YYSYMBOL_ColQualList = 671, /* ColQualList */
+ YYSYMBOL_ColConstraint = 672, /* ColConstraint */
+ YYSYMBOL_ColConstraintElem = 673, /* ColConstraintElem */
+ YYSYMBOL_generated_when = 674, /* generated_when */
+ YYSYMBOL_ConstraintAttr = 675, /* ConstraintAttr */
+ YYSYMBOL_TableLikeClause = 676, /* TableLikeClause */
+ YYSYMBOL_TableLikeOptionList = 677, /* TableLikeOptionList */
+ YYSYMBOL_TableLikeOption = 678, /* TableLikeOption */
+ YYSYMBOL_TableConstraint = 679, /* TableConstraint */
+ YYSYMBOL_ConstraintElem = 680, /* ConstraintElem */
+ YYSYMBOL_opt_no_inherit = 681, /* opt_no_inherit */
+ YYSYMBOL_opt_column_list = 682, /* opt_column_list */
+ YYSYMBOL_columnList = 683, /* columnList */
+ YYSYMBOL_columnElem = 684, /* columnElem */
+ YYSYMBOL_opt_c_include = 685, /* opt_c_include */
+ YYSYMBOL_key_match = 686, /* key_match */
+ YYSYMBOL_ExclusionConstraintList = 687, /* ExclusionConstraintList */
+ YYSYMBOL_ExclusionConstraintElem = 688, /* ExclusionConstraintElem */
+ YYSYMBOL_OptWhereClause = 689, /* OptWhereClause */
+ YYSYMBOL_key_actions = 690, /* key_actions */
+ YYSYMBOL_key_update = 691, /* key_update */
+ YYSYMBOL_key_delete = 692, /* key_delete */
+ YYSYMBOL_key_action = 693, /* key_action */
+ YYSYMBOL_OptInherit = 694, /* OptInherit */
+ YYSYMBOL_OptPartitionSpec = 695, /* OptPartitionSpec */
+ YYSYMBOL_PartitionSpec = 696, /* PartitionSpec */
+ YYSYMBOL_part_params = 697, /* part_params */
+ YYSYMBOL_part_elem = 698, /* part_elem */
+ YYSYMBOL_table_access_method_clause = 699, /* table_access_method_clause */
+ YYSYMBOL_OptWith = 700, /* OptWith */
+ YYSYMBOL_OnCommitOption = 701, /* OnCommitOption */
+ YYSYMBOL_OptTableSpace = 702, /* OptTableSpace */
+ YYSYMBOL_OptConsTableSpace = 703, /* OptConsTableSpace */
+ YYSYMBOL_ExistingIndex = 704, /* ExistingIndex */
+ YYSYMBOL_CreateStatsStmt = 705, /* CreateStatsStmt */
+ YYSYMBOL_stats_params = 706, /* stats_params */
+ YYSYMBOL_stats_param = 707, /* stats_param */
+ YYSYMBOL_AlterStatsStmt = 708, /* AlterStatsStmt */
+ YYSYMBOL_create_as_target = 709, /* create_as_target */
+ YYSYMBOL_opt_with_data = 710, /* opt_with_data */
+ YYSYMBOL_CreateMatViewStmt = 711, /* CreateMatViewStmt */
+ YYSYMBOL_create_mv_target = 712, /* create_mv_target */
+ YYSYMBOL_OptNoLog = 713, /* OptNoLog */
+ YYSYMBOL_RefreshMatViewStmt = 714, /* RefreshMatViewStmt */
+ YYSYMBOL_CreateSeqStmt = 715, /* CreateSeqStmt */
+ YYSYMBOL_AlterSeqStmt = 716, /* AlterSeqStmt */
+ YYSYMBOL_OptSeqOptList = 717, /* OptSeqOptList */
+ YYSYMBOL_OptParenthesizedSeqOptList = 718, /* OptParenthesizedSeqOptList */
+ YYSYMBOL_SeqOptList = 719, /* SeqOptList */
+ YYSYMBOL_SeqOptElem = 720, /* SeqOptElem */
+ YYSYMBOL_opt_by = 721, /* opt_by */
+ YYSYMBOL_NumericOnly = 722, /* NumericOnly */
+ YYSYMBOL_NumericOnly_list = 723, /* NumericOnly_list */
+ YYSYMBOL_CreatePLangStmt = 724, /* CreatePLangStmt */
+ YYSYMBOL_opt_trusted = 725, /* opt_trusted */
+ YYSYMBOL_handler_name = 726, /* handler_name */
+ YYSYMBOL_opt_inline_handler = 727, /* opt_inline_handler */
+ YYSYMBOL_validator_clause = 728, /* validator_clause */
+ YYSYMBOL_opt_validator = 729, /* opt_validator */
+ YYSYMBOL_opt_procedural = 730, /* opt_procedural */
+ YYSYMBOL_CreateTableSpaceStmt = 731, /* CreateTableSpaceStmt */
+ YYSYMBOL_OptTableSpaceOwner = 732, /* OptTableSpaceOwner */
+ YYSYMBOL_DropTableSpaceStmt = 733, /* DropTableSpaceStmt */
+ YYSYMBOL_CreateExtensionStmt = 734, /* CreateExtensionStmt */
+ YYSYMBOL_create_extension_opt_list = 735, /* create_extension_opt_list */
+ YYSYMBOL_create_extension_opt_item = 736, /* create_extension_opt_item */
+ YYSYMBOL_AlterExtensionStmt = 737, /* AlterExtensionStmt */
+ YYSYMBOL_alter_extension_opt_list = 738, /* alter_extension_opt_list */
+ YYSYMBOL_alter_extension_opt_item = 739, /* alter_extension_opt_item */
+ YYSYMBOL_AlterExtensionContentsStmt = 740, /* AlterExtensionContentsStmt */
+ YYSYMBOL_CreateFdwStmt = 741, /* CreateFdwStmt */
+ YYSYMBOL_fdw_option = 742, /* fdw_option */
+ YYSYMBOL_fdw_options = 743, /* fdw_options */
+ YYSYMBOL_opt_fdw_options = 744, /* opt_fdw_options */
+ YYSYMBOL_AlterFdwStmt = 745, /* AlterFdwStmt */
+ YYSYMBOL_create_generic_options = 746, /* create_generic_options */
+ YYSYMBOL_generic_option_list = 747, /* generic_option_list */
+ YYSYMBOL_alter_generic_options = 748, /* alter_generic_options */
+ YYSYMBOL_alter_generic_option_list = 749, /* alter_generic_option_list */
+ YYSYMBOL_alter_generic_option_elem = 750, /* alter_generic_option_elem */
+ YYSYMBOL_generic_option_elem = 751, /* generic_option_elem */
+ YYSYMBOL_generic_option_name = 752, /* generic_option_name */
+ YYSYMBOL_generic_option_arg = 753, /* generic_option_arg */
+ YYSYMBOL_CreateForeignServerStmt = 754, /* CreateForeignServerStmt */
+ YYSYMBOL_opt_type = 755, /* opt_type */
+ YYSYMBOL_foreign_server_version = 756, /* foreign_server_version */
+ YYSYMBOL_opt_foreign_server_version = 757, /* opt_foreign_server_version */
+ YYSYMBOL_AlterForeignServerStmt = 758, /* AlterForeignServerStmt */
+ YYSYMBOL_CreateForeignTableStmt = 759, /* CreateForeignTableStmt */
+ YYSYMBOL_ImportForeignSchemaStmt = 760, /* ImportForeignSchemaStmt */
+ YYSYMBOL_import_qualification_type = 761, /* import_qualification_type */
+ YYSYMBOL_import_qualification = 762, /* import_qualification */
+ YYSYMBOL_CreateUserMappingStmt = 763, /* CreateUserMappingStmt */
+ YYSYMBOL_auth_ident = 764, /* auth_ident */
+ YYSYMBOL_DropUserMappingStmt = 765, /* DropUserMappingStmt */
+ YYSYMBOL_AlterUserMappingStmt = 766, /* AlterUserMappingStmt */
+ YYSYMBOL_CreatePolicyStmt = 767, /* CreatePolicyStmt */
+ YYSYMBOL_AlterPolicyStmt = 768, /* AlterPolicyStmt */
+ YYSYMBOL_RowSecurityOptionalExpr = 769, /* RowSecurityOptionalExpr */
+ YYSYMBOL_RowSecurityOptionalWithCheck = 770, /* RowSecurityOptionalWithCheck */
+ YYSYMBOL_RowSecurityDefaultToRole = 771, /* RowSecurityDefaultToRole */
+ YYSYMBOL_RowSecurityOptionalToRole = 772, /* RowSecurityOptionalToRole */
+ YYSYMBOL_RowSecurityDefaultPermissive = 773, /* RowSecurityDefaultPermissive */
+ YYSYMBOL_RowSecurityDefaultForCmd = 774, /* RowSecurityDefaultForCmd */
+ YYSYMBOL_row_security_cmd = 775, /* row_security_cmd */
+ YYSYMBOL_CreateAmStmt = 776, /* CreateAmStmt */
+ YYSYMBOL_am_type = 777, /* am_type */
+ YYSYMBOL_CreateTrigStmt = 778, /* CreateTrigStmt */
+ YYSYMBOL_TriggerActionTime = 779, /* TriggerActionTime */
+ YYSYMBOL_TriggerEvents = 780, /* TriggerEvents */
+ YYSYMBOL_TriggerOneEvent = 781, /* TriggerOneEvent */
+ YYSYMBOL_TriggerReferencing = 782, /* TriggerReferencing */
+ YYSYMBOL_TriggerTransitions = 783, /* TriggerTransitions */
+ YYSYMBOL_TriggerTransition = 784, /* TriggerTransition */
+ YYSYMBOL_TransitionOldOrNew = 785, /* TransitionOldOrNew */
+ YYSYMBOL_TransitionRowOrTable = 786, /* TransitionRowOrTable */
+ YYSYMBOL_TransitionRelName = 787, /* TransitionRelName */
+ YYSYMBOL_TriggerForSpec = 788, /* TriggerForSpec */
+ YYSYMBOL_TriggerForOptEach = 789, /* TriggerForOptEach */
+ YYSYMBOL_TriggerForType = 790, /* TriggerForType */
+ YYSYMBOL_TriggerWhen = 791, /* TriggerWhen */
+ YYSYMBOL_FUNCTION_or_PROCEDURE = 792, /* FUNCTION_or_PROCEDURE */
+ YYSYMBOL_TriggerFuncArgs = 793, /* TriggerFuncArgs */
+ YYSYMBOL_TriggerFuncArg = 794, /* TriggerFuncArg */
+ YYSYMBOL_OptConstrFromTable = 795, /* OptConstrFromTable */
+ YYSYMBOL_ConstraintAttributeSpec = 796, /* ConstraintAttributeSpec */
+ YYSYMBOL_ConstraintAttributeElem = 797, /* ConstraintAttributeElem */
+ YYSYMBOL_CreateEventTrigStmt = 798, /* CreateEventTrigStmt */
+ YYSYMBOL_event_trigger_when_list = 799, /* event_trigger_when_list */
+ YYSYMBOL_event_trigger_when_item = 800, /* event_trigger_when_item */
+ YYSYMBOL_event_trigger_value_list = 801, /* event_trigger_value_list */
+ YYSYMBOL_AlterEventTrigStmt = 802, /* AlterEventTrigStmt */
+ YYSYMBOL_enable_trigger = 803, /* enable_trigger */
+ YYSYMBOL_CreateAssertionStmt = 804, /* CreateAssertionStmt */
+ YYSYMBOL_DefineStmt = 805, /* DefineStmt */
+ YYSYMBOL_definition = 806, /* definition */
+ YYSYMBOL_def_list = 807, /* def_list */
+ YYSYMBOL_def_elem = 808, /* def_elem */
+ YYSYMBOL_def_arg = 809, /* def_arg */
+ YYSYMBOL_old_aggr_definition = 810, /* old_aggr_definition */
+ YYSYMBOL_old_aggr_list = 811, /* old_aggr_list */
+ YYSYMBOL_old_aggr_elem = 812, /* old_aggr_elem */
+ YYSYMBOL_opt_enum_val_list = 813, /* opt_enum_val_list */
+ YYSYMBOL_enum_val_list = 814, /* enum_val_list */
+ YYSYMBOL_AlterEnumStmt = 815, /* AlterEnumStmt */
+ YYSYMBOL_opt_if_not_exists = 816, /* opt_if_not_exists */
+ YYSYMBOL_CreateOpClassStmt = 817, /* CreateOpClassStmt */
+ YYSYMBOL_opclass_item_list = 818, /* opclass_item_list */
+ YYSYMBOL_opclass_item = 819, /* opclass_item */
+ YYSYMBOL_opt_default = 820, /* opt_default */
+ YYSYMBOL_opt_opfamily = 821, /* opt_opfamily */
+ YYSYMBOL_opclass_purpose = 822, /* opclass_purpose */
+ YYSYMBOL_opt_recheck = 823, /* opt_recheck */
+ YYSYMBOL_CreateOpFamilyStmt = 824, /* CreateOpFamilyStmt */
+ YYSYMBOL_AlterOpFamilyStmt = 825, /* AlterOpFamilyStmt */
+ YYSYMBOL_opclass_drop_list = 826, /* opclass_drop_list */
+ YYSYMBOL_opclass_drop = 827, /* opclass_drop */
+ YYSYMBOL_DropOpClassStmt = 828, /* DropOpClassStmt */
+ YYSYMBOL_DropOpFamilyStmt = 829, /* DropOpFamilyStmt */
+ YYSYMBOL_DropOwnedStmt = 830, /* DropOwnedStmt */
+ YYSYMBOL_ReassignOwnedStmt = 831, /* ReassignOwnedStmt */
+ YYSYMBOL_DropStmt = 832, /* DropStmt */
+ YYSYMBOL_object_type_any_name = 833, /* object_type_any_name */
+ YYSYMBOL_object_type_name = 834, /* object_type_name */
+ YYSYMBOL_drop_type_name = 835, /* drop_type_name */
+ YYSYMBOL_object_type_name_on_any_name = 836, /* object_type_name_on_any_name */
+ YYSYMBOL_any_name_list = 837, /* any_name_list */
+ YYSYMBOL_any_name = 838, /* any_name */
+ YYSYMBOL_attrs = 839, /* attrs */
+ YYSYMBOL_type_name_list = 840, /* type_name_list */
+ YYSYMBOL_TruncateStmt = 841, /* TruncateStmt */
+ YYSYMBOL_opt_restart_seqs = 842, /* opt_restart_seqs */
+ YYSYMBOL_CommentStmt = 843, /* CommentStmt */
+ YYSYMBOL_comment_text = 844, /* comment_text */
+ YYSYMBOL_SecLabelStmt = 845, /* SecLabelStmt */
+ YYSYMBOL_opt_provider = 846, /* opt_provider */
+ YYSYMBOL_security_label = 847, /* security_label */
+ YYSYMBOL_FetchStmt = 848, /* FetchStmt */
+ YYSYMBOL_fetch_args = 849, /* fetch_args */
+ YYSYMBOL_from_in = 850, /* from_in */
+ YYSYMBOL_opt_from_in = 851, /* opt_from_in */
+ YYSYMBOL_GrantStmt = 852, /* GrantStmt */
+ YYSYMBOL_RevokeStmt = 853, /* RevokeStmt */
+ YYSYMBOL_privileges = 854, /* privileges */
+ YYSYMBOL_privilege_list = 855, /* privilege_list */
+ YYSYMBOL_privilege = 856, /* privilege */
+ YYSYMBOL_privilege_target = 857, /* privilege_target */
+ YYSYMBOL_grantee_list = 858, /* grantee_list */
+ YYSYMBOL_grantee = 859, /* grantee */
+ YYSYMBOL_opt_grant_grant_option = 860, /* opt_grant_grant_option */
+ YYSYMBOL_GrantRoleStmt = 861, /* GrantRoleStmt */
+ YYSYMBOL_RevokeRoleStmt = 862, /* RevokeRoleStmt */
+ YYSYMBOL_opt_grant_admin_option = 863, /* opt_grant_admin_option */
+ YYSYMBOL_opt_granted_by = 864, /* opt_granted_by */
+ YYSYMBOL_AlterDefaultPrivilegesStmt = 865, /* AlterDefaultPrivilegesStmt */
+ YYSYMBOL_DefACLOptionList = 866, /* DefACLOptionList */
+ YYSYMBOL_DefACLOption = 867, /* DefACLOption */
+ YYSYMBOL_DefACLAction = 868, /* DefACLAction */
+ YYSYMBOL_defacl_privilege_target = 869, /* defacl_privilege_target */
+ YYSYMBOL_IndexStmt = 870, /* IndexStmt */
+ YYSYMBOL_opt_unique = 871, /* opt_unique */
+ YYSYMBOL_opt_concurrently = 872, /* opt_concurrently */
+ YYSYMBOL_opt_index_name = 873, /* opt_index_name */
+ YYSYMBOL_access_method_clause = 874, /* access_method_clause */
+ YYSYMBOL_index_params = 875, /* index_params */
+ YYSYMBOL_index_elem_options = 876, /* index_elem_options */
+ YYSYMBOL_index_elem = 877, /* index_elem */
+ YYSYMBOL_opt_include = 878, /* opt_include */
+ YYSYMBOL_index_including_params = 879, /* index_including_params */
+ YYSYMBOL_opt_collate = 880, /* opt_collate */
+ YYSYMBOL_opt_class = 881, /* opt_class */
+ YYSYMBOL_opt_asc_desc = 882, /* opt_asc_desc */
+ YYSYMBOL_opt_nulls_order = 883, /* opt_nulls_order */
+ YYSYMBOL_CreateFunctionStmt = 884, /* CreateFunctionStmt */
+ YYSYMBOL_opt_or_replace = 885, /* opt_or_replace */
+ YYSYMBOL_func_args = 886, /* func_args */
+ YYSYMBOL_func_args_list = 887, /* func_args_list */
+ YYSYMBOL_function_with_argtypes_list = 888, /* function_with_argtypes_list */
+ YYSYMBOL_function_with_argtypes = 889, /* function_with_argtypes */
+ YYSYMBOL_func_args_with_defaults = 890, /* func_args_with_defaults */
+ YYSYMBOL_func_args_with_defaults_list = 891, /* func_args_with_defaults_list */
+ YYSYMBOL_func_arg = 892, /* func_arg */
+ YYSYMBOL_arg_class = 893, /* arg_class */
+ YYSYMBOL_param_name = 894, /* param_name */
+ YYSYMBOL_func_return = 895, /* func_return */
+ YYSYMBOL_func_type = 896, /* func_type */
+ YYSYMBOL_func_arg_with_default = 897, /* func_arg_with_default */
+ YYSYMBOL_aggr_arg = 898, /* aggr_arg */
+ YYSYMBOL_aggr_args = 899, /* aggr_args */
+ YYSYMBOL_aggr_args_list = 900, /* aggr_args_list */
+ YYSYMBOL_aggregate_with_argtypes = 901, /* aggregate_with_argtypes */
+ YYSYMBOL_aggregate_with_argtypes_list = 902, /* aggregate_with_argtypes_list */
+ YYSYMBOL_opt_createfunc_opt_list = 903, /* opt_createfunc_opt_list */
+ YYSYMBOL_createfunc_opt_list = 904, /* createfunc_opt_list */
+ YYSYMBOL_common_func_opt_item = 905, /* common_func_opt_item */
+ YYSYMBOL_createfunc_opt_item = 906, /* createfunc_opt_item */
+ YYSYMBOL_func_as = 907, /* func_as */
+ YYSYMBOL_ReturnStmt = 908, /* ReturnStmt */
+ YYSYMBOL_opt_routine_body = 909, /* opt_routine_body */
+ YYSYMBOL_routine_body_stmt_list = 910, /* routine_body_stmt_list */
+ YYSYMBOL_routine_body_stmt = 911, /* routine_body_stmt */
+ YYSYMBOL_transform_type_list = 912, /* transform_type_list */
+ YYSYMBOL_opt_definition = 913, /* opt_definition */
+ YYSYMBOL_table_func_column = 914, /* table_func_column */
+ YYSYMBOL_table_func_column_list = 915, /* table_func_column_list */
+ YYSYMBOL_AlterFunctionStmt = 916, /* AlterFunctionStmt */
+ YYSYMBOL_alterfunc_opt_list = 917, /* alterfunc_opt_list */
+ YYSYMBOL_opt_restrict = 918, /* opt_restrict */
+ YYSYMBOL_RemoveFuncStmt = 919, /* RemoveFuncStmt */
+ YYSYMBOL_RemoveAggrStmt = 920, /* RemoveAggrStmt */
+ YYSYMBOL_RemoveOperStmt = 921, /* RemoveOperStmt */
+ YYSYMBOL_oper_argtypes = 922, /* oper_argtypes */
+ YYSYMBOL_any_operator = 923, /* any_operator */
+ YYSYMBOL_operator_with_argtypes_list = 924, /* operator_with_argtypes_list */
+ YYSYMBOL_operator_with_argtypes = 925, /* operator_with_argtypes */
+ YYSYMBOL_DoStmt = 926, /* DoStmt */
+ YYSYMBOL_dostmt_opt_list = 927, /* dostmt_opt_list */
+ YYSYMBOL_dostmt_opt_item = 928, /* dostmt_opt_item */
+ YYSYMBOL_CreateCastStmt = 929, /* CreateCastStmt */
+ YYSYMBOL_cast_context = 930, /* cast_context */
+ YYSYMBOL_DropCastStmt = 931, /* DropCastStmt */
+ YYSYMBOL_opt_if_exists = 932, /* opt_if_exists */
+ YYSYMBOL_CreateTransformStmt = 933, /* CreateTransformStmt */
+ YYSYMBOL_transform_element_list = 934, /* transform_element_list */
+ YYSYMBOL_DropTransformStmt = 935, /* DropTransformStmt */
+ YYSYMBOL_ReindexStmt = 936, /* ReindexStmt */
+ YYSYMBOL_reindex_target_type = 937, /* reindex_target_type */
+ YYSYMBOL_reindex_target_multitable = 938, /* reindex_target_multitable */
+ YYSYMBOL_AlterTblSpcStmt = 939, /* AlterTblSpcStmt */
+ YYSYMBOL_RenameStmt = 940, /* RenameStmt */
+ YYSYMBOL_opt_column = 941, /* opt_column */
+ YYSYMBOL_opt_set_data = 942, /* opt_set_data */
+ YYSYMBOL_AlterObjectDependsStmt = 943, /* AlterObjectDependsStmt */
+ YYSYMBOL_opt_no = 944, /* opt_no */
+ YYSYMBOL_AlterObjectSchemaStmt = 945, /* AlterObjectSchemaStmt */
+ YYSYMBOL_AlterOperatorStmt = 946, /* AlterOperatorStmt */
+ YYSYMBOL_operator_def_list = 947, /* operator_def_list */
+ YYSYMBOL_operator_def_elem = 948, /* operator_def_elem */
+ YYSYMBOL_operator_def_arg = 949, /* operator_def_arg */
+ YYSYMBOL_AlterTypeStmt = 950, /* AlterTypeStmt */
+ YYSYMBOL_AlterOwnerStmt = 951, /* AlterOwnerStmt */
+ YYSYMBOL_CreatePublicationStmt = 952, /* CreatePublicationStmt */
+ YYSYMBOL_opt_publication_for_tables = 953, /* opt_publication_for_tables */
+ YYSYMBOL_publication_for_tables = 954, /* publication_for_tables */
+ YYSYMBOL_AlterPublicationStmt = 955, /* AlterPublicationStmt */
+ YYSYMBOL_CreateSubscriptionStmt = 956, /* CreateSubscriptionStmt */
+ YYSYMBOL_AlterSubscriptionStmt = 957, /* AlterSubscriptionStmt */
+ YYSYMBOL_DropSubscriptionStmt = 958, /* DropSubscriptionStmt */
+ YYSYMBOL_RuleStmt = 959, /* RuleStmt */
+ YYSYMBOL_RuleActionList = 960, /* RuleActionList */
+ YYSYMBOL_RuleActionMulti = 961, /* RuleActionMulti */
+ YYSYMBOL_RuleActionStmt = 962, /* RuleActionStmt */
+ YYSYMBOL_RuleActionStmtOrEmpty = 963, /* RuleActionStmtOrEmpty */
+ YYSYMBOL_event = 964, /* event */
+ YYSYMBOL_opt_instead = 965, /* opt_instead */
+ YYSYMBOL_NotifyStmt = 966, /* NotifyStmt */
+ YYSYMBOL_notify_payload = 967, /* notify_payload */
+ YYSYMBOL_ListenStmt = 968, /* ListenStmt */
+ YYSYMBOL_UnlistenStmt = 969, /* UnlistenStmt */
+ YYSYMBOL_TransactionStmt = 970, /* TransactionStmt */
+ YYSYMBOL_TransactionStmtLegacy = 971, /* TransactionStmtLegacy */
+ YYSYMBOL_opt_transaction = 972, /* opt_transaction */
+ YYSYMBOL_transaction_mode_item = 973, /* transaction_mode_item */
+ YYSYMBOL_transaction_mode_list = 974, /* transaction_mode_list */
+ YYSYMBOL_transaction_mode_list_or_empty = 975, /* transaction_mode_list_or_empty */
+ YYSYMBOL_opt_transaction_chain = 976, /* opt_transaction_chain */
+ YYSYMBOL_ViewStmt = 977, /* ViewStmt */
+ YYSYMBOL_opt_check_option = 978, /* opt_check_option */
+ YYSYMBOL_LoadStmt = 979, /* LoadStmt */
+ YYSYMBOL_CreatedbStmt = 980, /* CreatedbStmt */
+ YYSYMBOL_createdb_opt_list = 981, /* createdb_opt_list */
+ YYSYMBOL_createdb_opt_items = 982, /* createdb_opt_items */
+ YYSYMBOL_createdb_opt_item = 983, /* createdb_opt_item */
+ YYSYMBOL_createdb_opt_name = 984, /* createdb_opt_name */
+ YYSYMBOL_opt_equal = 985, /* opt_equal */
+ YYSYMBOL_AlterDatabaseStmt = 986, /* AlterDatabaseStmt */
+ YYSYMBOL_AlterDatabaseSetStmt = 987, /* AlterDatabaseSetStmt */
+ YYSYMBOL_DropdbStmt = 988, /* DropdbStmt */
+ YYSYMBOL_drop_option_list = 989, /* drop_option_list */
+ YYSYMBOL_drop_option = 990, /* drop_option */
+ YYSYMBOL_AlterCollationStmt = 991, /* AlterCollationStmt */
+ YYSYMBOL_AlterSystemStmt = 992, /* AlterSystemStmt */
+ YYSYMBOL_CreateDomainStmt = 993, /* CreateDomainStmt */
+ YYSYMBOL_AlterDomainStmt = 994, /* AlterDomainStmt */
+ YYSYMBOL_opt_as = 995, /* opt_as */
+ YYSYMBOL_AlterTSDictionaryStmt = 996, /* AlterTSDictionaryStmt */
+ YYSYMBOL_AlterTSConfigurationStmt = 997, /* AlterTSConfigurationStmt */
+ YYSYMBOL_any_with = 998, /* any_with */
+ YYSYMBOL_CreateConversionStmt = 999, /* CreateConversionStmt */
+ YYSYMBOL_ClusterStmt = 1000, /* ClusterStmt */
+ YYSYMBOL_cluster_index_specification = 1001, /* cluster_index_specification */
+ YYSYMBOL_VacuumStmt = 1002, /* VacuumStmt */
+ YYSYMBOL_AnalyzeStmt = 1003, /* AnalyzeStmt */
+ YYSYMBOL_utility_option_list = 1004, /* utility_option_list */
+ YYSYMBOL_analyze_keyword = 1005, /* analyze_keyword */
+ YYSYMBOL_utility_option_elem = 1006, /* utility_option_elem */
+ YYSYMBOL_utility_option_name = 1007, /* utility_option_name */
+ YYSYMBOL_utility_option_arg = 1008, /* utility_option_arg */
+ YYSYMBOL_opt_analyze = 1009, /* opt_analyze */
+ YYSYMBOL_opt_verbose = 1010, /* opt_verbose */
+ YYSYMBOL_opt_full = 1011, /* opt_full */
+ YYSYMBOL_opt_freeze = 1012, /* opt_freeze */
+ YYSYMBOL_opt_name_list = 1013, /* opt_name_list */
+ YYSYMBOL_vacuum_relation = 1014, /* vacuum_relation */
+ YYSYMBOL_vacuum_relation_list = 1015, /* vacuum_relation_list */
+ YYSYMBOL_opt_vacuum_relation_list = 1016, /* opt_vacuum_relation_list */
+ YYSYMBOL_ExplainStmt = 1017, /* ExplainStmt */
+ YYSYMBOL_ExplainableStmt = 1018, /* ExplainableStmt */
+ YYSYMBOL_PrepareStmt = 1019, /* PrepareStmt */
+ YYSYMBOL_prep_type_clause = 1020, /* prep_type_clause */
+ YYSYMBOL_PreparableStmt = 1021, /* PreparableStmt */
+ YYSYMBOL_ExecuteStmt = 1022, /* ExecuteStmt */
+ YYSYMBOL_execute_param_clause = 1023, /* execute_param_clause */
+ YYSYMBOL_InsertStmt = 1024, /* InsertStmt */
+ YYSYMBOL_insert_target = 1025, /* insert_target */
+ YYSYMBOL_insert_rest = 1026, /* insert_rest */
+ YYSYMBOL_override_kind = 1027, /* override_kind */
+ YYSYMBOL_insert_column_list = 1028, /* insert_column_list */
+ YYSYMBOL_insert_column_item = 1029, /* insert_column_item */
+ YYSYMBOL_opt_on_conflict = 1030, /* opt_on_conflict */
+ YYSYMBOL_opt_conf_expr = 1031, /* opt_conf_expr */
+ YYSYMBOL_returning_clause = 1032, /* returning_clause */
+ YYSYMBOL_DeleteStmt = 1033, /* DeleteStmt */
+ YYSYMBOL_using_clause = 1034, /* using_clause */
+ YYSYMBOL_LockStmt = 1035, /* LockStmt */
+ YYSYMBOL_opt_lock = 1036, /* opt_lock */
+ YYSYMBOL_lock_type = 1037, /* lock_type */
+ YYSYMBOL_opt_nowait = 1038, /* opt_nowait */
+ YYSYMBOL_opt_nowait_or_skip = 1039, /* opt_nowait_or_skip */
+ YYSYMBOL_UpdateStmt = 1040, /* UpdateStmt */
+ YYSYMBOL_set_clause_list = 1041, /* set_clause_list */
+ YYSYMBOL_set_clause = 1042, /* set_clause */
+ YYSYMBOL_set_target = 1043, /* set_target */
+ YYSYMBOL_set_target_list = 1044, /* set_target_list */
+ YYSYMBOL_DeclareCursorStmt = 1045, /* DeclareCursorStmt */
+ YYSYMBOL_cursor_name = 1046, /* cursor_name */
+ YYSYMBOL_cursor_options = 1047, /* cursor_options */
+ YYSYMBOL_opt_hold = 1048, /* opt_hold */
+ YYSYMBOL_SelectStmt = 1049, /* SelectStmt */
+ YYSYMBOL_select_with_parens = 1050, /* select_with_parens */
+ YYSYMBOL_select_no_parens = 1051, /* select_no_parens */
+ YYSYMBOL_select_clause = 1052, /* select_clause */
+ YYSYMBOL_simple_select = 1053, /* simple_select */
+ YYSYMBOL_with_clause = 1054, /* with_clause */
+ YYSYMBOL_cte_list = 1055, /* cte_list */
+ YYSYMBOL_common_table_expr = 1056, /* common_table_expr */
+ YYSYMBOL_opt_materialized = 1057, /* opt_materialized */
+ YYSYMBOL_opt_search_clause = 1058, /* opt_search_clause */
+ YYSYMBOL_opt_cycle_clause = 1059, /* opt_cycle_clause */
+ YYSYMBOL_opt_with_clause = 1060, /* opt_with_clause */
+ YYSYMBOL_into_clause = 1061, /* into_clause */
+ YYSYMBOL_OptTempTableName = 1062, /* OptTempTableName */
+ YYSYMBOL_opt_table = 1063, /* opt_table */
+ YYSYMBOL_set_quantifier = 1064, /* set_quantifier */
+ YYSYMBOL_distinct_clause = 1065, /* distinct_clause */
+ YYSYMBOL_opt_all_clause = 1066, /* opt_all_clause */
+ YYSYMBOL_opt_sort_clause = 1067, /* opt_sort_clause */
+ YYSYMBOL_sort_clause = 1068, /* sort_clause */
+ YYSYMBOL_sortby_list = 1069, /* sortby_list */
+ YYSYMBOL_sortby = 1070, /* sortby */
+ YYSYMBOL_select_limit = 1071, /* select_limit */
+ YYSYMBOL_opt_select_limit = 1072, /* opt_select_limit */
+ YYSYMBOL_limit_clause = 1073, /* limit_clause */
+ YYSYMBOL_offset_clause = 1074, /* offset_clause */
+ YYSYMBOL_select_limit_value = 1075, /* select_limit_value */
+ YYSYMBOL_select_offset_value = 1076, /* select_offset_value */
+ YYSYMBOL_select_fetch_first_value = 1077, /* select_fetch_first_value */
+ YYSYMBOL_I_or_F_const = 1078, /* I_or_F_const */
+ YYSYMBOL_row_or_rows = 1079, /* row_or_rows */
+ YYSYMBOL_first_or_next = 1080, /* first_or_next */
+ YYSYMBOL_group_clause = 1081, /* group_clause */
+ YYSYMBOL_group_by_list = 1082, /* group_by_list */
+ YYSYMBOL_group_by_item = 1083, /* group_by_item */
+ YYSYMBOL_empty_grouping_set = 1084, /* empty_grouping_set */
+ YYSYMBOL_rollup_clause = 1085, /* rollup_clause */
+ YYSYMBOL_cube_clause = 1086, /* cube_clause */
+ YYSYMBOL_grouping_sets_clause = 1087, /* grouping_sets_clause */
+ YYSYMBOL_having_clause = 1088, /* having_clause */
+ YYSYMBOL_for_locking_clause = 1089, /* for_locking_clause */
+ YYSYMBOL_opt_for_locking_clause = 1090, /* opt_for_locking_clause */
+ YYSYMBOL_for_locking_items = 1091, /* for_locking_items */
+ YYSYMBOL_for_locking_item = 1092, /* for_locking_item */
+ YYSYMBOL_for_locking_strength = 1093, /* for_locking_strength */
+ YYSYMBOL_locked_rels_list = 1094, /* locked_rels_list */
+ YYSYMBOL_values_clause = 1095, /* values_clause */
+ YYSYMBOL_from_clause = 1096, /* from_clause */
+ YYSYMBOL_from_list = 1097, /* from_list */
+ YYSYMBOL_table_ref = 1098, /* table_ref */
+ YYSYMBOL_joined_table = 1099, /* joined_table */
+ YYSYMBOL_alias_clause = 1100, /* alias_clause */
+ YYSYMBOL_opt_alias_clause = 1101, /* opt_alias_clause */
+ YYSYMBOL_opt_alias_clause_for_join_using = 1102, /* opt_alias_clause_for_join_using */
+ YYSYMBOL_func_alias_clause = 1103, /* func_alias_clause */
+ YYSYMBOL_join_type = 1104, /* join_type */
+ YYSYMBOL_opt_outer = 1105, /* opt_outer */
+ YYSYMBOL_join_qual = 1106, /* join_qual */
+ YYSYMBOL_relation_expr = 1107, /* relation_expr */
+ YYSYMBOL_relation_expr_list = 1108, /* relation_expr_list */
+ YYSYMBOL_relation_expr_opt_alias = 1109, /* relation_expr_opt_alias */
+ YYSYMBOL_tablesample_clause = 1110, /* tablesample_clause */
+ YYSYMBOL_opt_repeatable_clause = 1111, /* opt_repeatable_clause */
+ YYSYMBOL_func_table = 1112, /* func_table */
+ YYSYMBOL_rowsfrom_item = 1113, /* rowsfrom_item */
+ YYSYMBOL_rowsfrom_list = 1114, /* rowsfrom_list */
+ YYSYMBOL_opt_col_def_list = 1115, /* opt_col_def_list */
+ YYSYMBOL_opt_ordinality = 1116, /* opt_ordinality */
+ YYSYMBOL_where_clause = 1117, /* where_clause */
+ YYSYMBOL_where_or_current_clause = 1118, /* where_or_current_clause */
+ YYSYMBOL_OptTableFuncElementList = 1119, /* OptTableFuncElementList */
+ YYSYMBOL_TableFuncElementList = 1120, /* TableFuncElementList */
+ YYSYMBOL_TableFuncElement = 1121, /* TableFuncElement */
+ YYSYMBOL_xmltable = 1122, /* xmltable */
+ YYSYMBOL_xmltable_column_list = 1123, /* xmltable_column_list */
+ YYSYMBOL_xmltable_column_el = 1124, /* xmltable_column_el */
+ YYSYMBOL_xmltable_column_option_list = 1125, /* xmltable_column_option_list */
+ YYSYMBOL_xmltable_column_option_el = 1126, /* xmltable_column_option_el */
+ YYSYMBOL_xml_namespace_list = 1127, /* xml_namespace_list */
+ YYSYMBOL_xml_namespace_el = 1128, /* xml_namespace_el */
+ YYSYMBOL_Typename = 1129, /* Typename */
+ YYSYMBOL_opt_array_bounds = 1130, /* opt_array_bounds */
+ YYSYMBOL_SimpleTypename = 1131, /* SimpleTypename */
+ YYSYMBOL_ConstTypename = 1132, /* ConstTypename */
+ YYSYMBOL_GenericType = 1133, /* GenericType */
+ YYSYMBOL_opt_type_modifiers = 1134, /* opt_type_modifiers */
+ YYSYMBOL_Numeric = 1135, /* Numeric */
+ YYSYMBOL_opt_float = 1136, /* opt_float */
+ YYSYMBOL_Bit = 1137, /* Bit */
+ YYSYMBOL_ConstBit = 1138, /* ConstBit */
+ YYSYMBOL_BitWithLength = 1139, /* BitWithLength */
+ YYSYMBOL_BitWithoutLength = 1140, /* BitWithoutLength */
+ YYSYMBOL_Character = 1141, /* Character */
+ YYSYMBOL_ConstCharacter = 1142, /* ConstCharacter */
+ YYSYMBOL_CharacterWithLength = 1143, /* CharacterWithLength */
+ YYSYMBOL_CharacterWithoutLength = 1144, /* CharacterWithoutLength */
+ YYSYMBOL_character = 1145, /* character */
+ YYSYMBOL_opt_varying = 1146, /* opt_varying */
+ YYSYMBOL_ConstDatetime = 1147, /* ConstDatetime */
+ YYSYMBOL_ConstInterval = 1148, /* ConstInterval */
+ YYSYMBOL_opt_timezone = 1149, /* opt_timezone */
+ YYSYMBOL_opt_interval = 1150, /* opt_interval */
+ YYSYMBOL_interval_second = 1151, /* interval_second */
+ YYSYMBOL_a_expr = 1152, /* a_expr */
+ YYSYMBOL_b_expr = 1153, /* b_expr */
+ YYSYMBOL_c_expr = 1154, /* c_expr */
+ YYSYMBOL_func_application = 1155, /* func_application */
+ YYSYMBOL_func_expr = 1156, /* func_expr */
+ YYSYMBOL_func_expr_windowless = 1157, /* func_expr_windowless */
+ YYSYMBOL_func_expr_common_subexpr = 1158, /* func_expr_common_subexpr */
+ YYSYMBOL_xml_root_version = 1159, /* xml_root_version */
+ YYSYMBOL_opt_xml_root_standalone = 1160, /* opt_xml_root_standalone */
+ YYSYMBOL_xml_attributes = 1161, /* xml_attributes */
+ YYSYMBOL_xml_attribute_list = 1162, /* xml_attribute_list */
+ YYSYMBOL_xml_attribute_el = 1163, /* xml_attribute_el */
+ YYSYMBOL_document_or_content = 1164, /* document_or_content */
+ YYSYMBOL_xml_whitespace_option = 1165, /* xml_whitespace_option */
+ YYSYMBOL_xmlexists_argument = 1166, /* xmlexists_argument */
+ YYSYMBOL_xml_passing_mech = 1167, /* xml_passing_mech */
+ YYSYMBOL_within_group_clause = 1168, /* within_group_clause */
+ YYSYMBOL_filter_clause = 1169, /* filter_clause */
+ YYSYMBOL_window_clause = 1170, /* window_clause */
+ YYSYMBOL_window_definition_list = 1171, /* window_definition_list */
+ YYSYMBOL_window_definition = 1172, /* window_definition */
+ YYSYMBOL_over_clause = 1173, /* over_clause */
+ YYSYMBOL_window_specification = 1174, /* window_specification */
+ YYSYMBOL_opt_existing_window_name = 1175, /* opt_existing_window_name */
+ YYSYMBOL_opt_partition_clause = 1176, /* opt_partition_clause */
+ YYSYMBOL_opt_frame_clause = 1177, /* opt_frame_clause */
+ YYSYMBOL_frame_extent = 1178, /* frame_extent */
+ YYSYMBOL_frame_bound = 1179, /* frame_bound */
+ YYSYMBOL_opt_window_exclusion_clause = 1180, /* opt_window_exclusion_clause */
+ YYSYMBOL_row = 1181, /* row */
+ YYSYMBOL_explicit_row = 1182, /* explicit_row */
+ YYSYMBOL_implicit_row = 1183, /* implicit_row */
+ YYSYMBOL_sub_type = 1184, /* sub_type */
+ YYSYMBOL_all_Op = 1185, /* all_Op */
+ YYSYMBOL_MathOp = 1186, /* MathOp */
+ YYSYMBOL_qual_Op = 1187, /* qual_Op */
+ YYSYMBOL_qual_all_Op = 1188, /* qual_all_Op */
+ YYSYMBOL_subquery_Op = 1189, /* subquery_Op */
+ YYSYMBOL_expr_list = 1190, /* expr_list */
+ YYSYMBOL_func_arg_list = 1191, /* func_arg_list */
+ YYSYMBOL_func_arg_expr = 1192, /* func_arg_expr */
+ YYSYMBOL_func_arg_list_opt = 1193, /* func_arg_list_opt */
+ YYSYMBOL_type_list = 1194, /* type_list */
+ YYSYMBOL_array_expr = 1195, /* array_expr */
+ YYSYMBOL_array_expr_list = 1196, /* array_expr_list */
+ YYSYMBOL_extract_list = 1197, /* extract_list */
+ YYSYMBOL_extract_arg = 1198, /* extract_arg */
+ YYSYMBOL_unicode_normal_form = 1199, /* unicode_normal_form */
+ YYSYMBOL_overlay_list = 1200, /* overlay_list */
+ YYSYMBOL_position_list = 1201, /* position_list */
+ YYSYMBOL_substr_list = 1202, /* substr_list */
+ YYSYMBOL_trim_list = 1203, /* trim_list */
+ YYSYMBOL_in_expr = 1204, /* in_expr */
+ YYSYMBOL_case_expr = 1205, /* case_expr */
+ YYSYMBOL_when_clause_list = 1206, /* when_clause_list */
+ YYSYMBOL_when_clause = 1207, /* when_clause */
+ YYSYMBOL_case_default = 1208, /* case_default */
+ YYSYMBOL_case_arg = 1209, /* case_arg */
+ YYSYMBOL_columnref = 1210, /* columnref */
+ YYSYMBOL_indirection_el = 1211, /* indirection_el */
+ YYSYMBOL_opt_slice_bound = 1212, /* opt_slice_bound */
+ YYSYMBOL_indirection = 1213, /* indirection */
+ YYSYMBOL_opt_indirection = 1214, /* opt_indirection */
+ YYSYMBOL_opt_asymmetric = 1215, /* opt_asymmetric */
+ YYSYMBOL_opt_target_list = 1216, /* opt_target_list */
+ YYSYMBOL_target_list = 1217, /* target_list */
+ YYSYMBOL_target_el = 1218, /* target_el */
+ YYSYMBOL_qualified_name_list = 1219, /* qualified_name_list */
+ YYSYMBOL_qualified_name = 1220, /* qualified_name */
+ YYSYMBOL_name_list = 1221, /* name_list */
+ YYSYMBOL_name = 1222, /* name */
+ YYSYMBOL_attr_name = 1223, /* attr_name */
+ YYSYMBOL_file_name = 1224, /* file_name */
+ YYSYMBOL_func_name = 1225, /* func_name */
+ YYSYMBOL_AexprConst = 1226, /* AexprConst */
+ YYSYMBOL_Iconst = 1227, /* Iconst */
+ YYSYMBOL_SignedIconst = 1228, /* SignedIconst */
+ YYSYMBOL_RoleId = 1229, /* RoleId */
+ YYSYMBOL_RoleSpec = 1230, /* RoleSpec */
+ YYSYMBOL_role_list = 1231, /* role_list */
+ YYSYMBOL_NonReservedWord = 1232, /* NonReservedWord */
+ YYSYMBOL_BareColLabel = 1233, /* BareColLabel */
+ YYSYMBOL_unreserved_keyword = 1234, /* unreserved_keyword */
+ YYSYMBOL_col_name_keyword = 1235, /* col_name_keyword */
+ YYSYMBOL_type_func_name_keyword = 1236, /* type_func_name_keyword */
+ YYSYMBOL_reserved_keyword = 1237, /* reserved_keyword */
+ YYSYMBOL_bare_label_keyword = 1238, /* bare_label_keyword */
+ YYSYMBOL_statements = 1239, /* statements */
+ YYSYMBOL_statement = 1240, /* statement */
+ YYSYMBOL_CreateAsStmt = 1241, /* CreateAsStmt */
+ YYSYMBOL_1242_1 = 1242, /* $@1 */
+ YYSYMBOL_1243_2 = 1243, /* $@2 */
+ YYSYMBOL_at = 1244, /* at */
+ YYSYMBOL_ECPGConnect = 1245, /* ECPGConnect */
+ YYSYMBOL_connection_target = 1246, /* connection_target */
+ YYSYMBOL_opt_database_name = 1247, /* opt_database_name */
+ YYSYMBOL_db_prefix = 1248, /* db_prefix */
+ YYSYMBOL_server = 1249, /* server */
+ YYSYMBOL_opt_server = 1250, /* opt_server */
+ YYSYMBOL_server_name = 1251, /* server_name */
+ YYSYMBOL_opt_port = 1252, /* opt_port */
+ YYSYMBOL_opt_connection_name = 1253, /* opt_connection_name */
+ YYSYMBOL_opt_user = 1254, /* opt_user */
+ YYSYMBOL_ora_user = 1255, /* ora_user */
+ YYSYMBOL_user_name = 1256, /* user_name */
+ YYSYMBOL_char_variable = 1257, /* char_variable */
+ YYSYMBOL_opt_options = 1258, /* opt_options */
+ YYSYMBOL_connect_options = 1259, /* connect_options */
+ YYSYMBOL_opt_opt_value = 1260, /* opt_opt_value */
+ YYSYMBOL_prepared_name = 1261, /* prepared_name */
+ YYSYMBOL_ECPGDeclareStmt = 1262, /* ECPGDeclareStmt */
+ YYSYMBOL_ECPGCursorStmt = 1263, /* ECPGCursorStmt */
+ YYSYMBOL_ECPGExecuteImmediateStmt = 1264, /* ECPGExecuteImmediateStmt */
+ YYSYMBOL_ECPGVarDeclaration = 1265, /* ECPGVarDeclaration */
+ YYSYMBOL_single_vt_declaration = 1266, /* single_vt_declaration */
+ YYSYMBOL_precision = 1267, /* precision */
+ YYSYMBOL_opt_scale = 1268, /* opt_scale */
+ YYSYMBOL_ecpg_interval = 1269, /* ecpg_interval */
+ YYSYMBOL_ECPGDeclaration = 1270, /* ECPGDeclaration */
+ YYSYMBOL_1271_3 = 1271, /* $@3 */
+ YYSYMBOL_sql_startdeclare = 1272, /* sql_startdeclare */
+ YYSYMBOL_sql_enddeclare = 1273, /* sql_enddeclare */
+ YYSYMBOL_var_type_declarations = 1274, /* var_type_declarations */
+ YYSYMBOL_vt_declarations = 1275, /* vt_declarations */
+ YYSYMBOL_variable_declarations = 1276, /* variable_declarations */
+ YYSYMBOL_type_declaration = 1277, /* type_declaration */
+ YYSYMBOL_1278_4 = 1278, /* $@4 */
+ YYSYMBOL_var_declaration = 1279, /* var_declaration */
+ YYSYMBOL_1280_5 = 1280, /* $@5 */
+ YYSYMBOL_1281_6 = 1281, /* $@6 */
+ YYSYMBOL_opt_bit_field = 1282, /* opt_bit_field */
+ YYSYMBOL_storage_declaration = 1283, /* storage_declaration */
+ YYSYMBOL_storage_clause = 1284, /* storage_clause */
+ YYSYMBOL_storage_modifier = 1285, /* storage_modifier */
+ YYSYMBOL_var_type = 1286, /* var_type */
+ YYSYMBOL_enum_type = 1287, /* enum_type */
+ YYSYMBOL_enum_definition = 1288, /* enum_definition */
+ YYSYMBOL_struct_union_type_with_symbol = 1289, /* struct_union_type_with_symbol */
+ YYSYMBOL_1290_7 = 1290, /* $@7 */
+ YYSYMBOL_struct_union_type = 1291, /* struct_union_type */
+ YYSYMBOL_1292_8 = 1292, /* $@8 */
+ YYSYMBOL_s_struct_union_symbol = 1293, /* s_struct_union_symbol */
+ YYSYMBOL_s_struct_union = 1294, /* s_struct_union */
+ YYSYMBOL_simple_type = 1295, /* simple_type */
+ YYSYMBOL_unsigned_type = 1296, /* unsigned_type */
+ YYSYMBOL_signed_type = 1297, /* signed_type */
+ YYSYMBOL_opt_signed = 1298, /* opt_signed */
+ YYSYMBOL_variable_list = 1299, /* variable_list */
+ YYSYMBOL_variable = 1300, /* variable */
+ YYSYMBOL_opt_initializer = 1301, /* opt_initializer */
+ YYSYMBOL_opt_pointer = 1302, /* opt_pointer */
+ YYSYMBOL_ECPGDeclare = 1303, /* ECPGDeclare */
+ YYSYMBOL_ECPGDisconnect = 1304, /* ECPGDisconnect */
+ YYSYMBOL_dis_name = 1305, /* dis_name */
+ YYSYMBOL_connection_object = 1306, /* connection_object */
+ YYSYMBOL_execstring = 1307, /* execstring */
+ YYSYMBOL_ECPGFree = 1308, /* ECPGFree */
+ YYSYMBOL_ECPGOpen = 1309, /* ECPGOpen */
+ YYSYMBOL_opt_ecpg_using = 1310, /* opt_ecpg_using */
+ YYSYMBOL_ecpg_using = 1311, /* ecpg_using */
+ YYSYMBOL_using_descriptor = 1312, /* using_descriptor */
+ YYSYMBOL_into_descriptor = 1313, /* into_descriptor */
+ YYSYMBOL_into_sqlda = 1314, /* into_sqlda */
+ YYSYMBOL_using_list = 1315, /* using_list */
+ YYSYMBOL_UsingValue = 1316, /* UsingValue */
+ YYSYMBOL_UsingConst = 1317, /* UsingConst */
+ YYSYMBOL_ECPGDescribe = 1318, /* ECPGDescribe */
+ YYSYMBOL_opt_output = 1319, /* opt_output */
+ YYSYMBOL_ECPGAllocateDescr = 1320, /* ECPGAllocateDescr */
+ YYSYMBOL_ECPGDeallocateDescr = 1321, /* ECPGDeallocateDescr */
+ YYSYMBOL_ECPGGetDescriptorHeader = 1322, /* ECPGGetDescriptorHeader */
+ YYSYMBOL_ECPGGetDescHeaderItems = 1323, /* ECPGGetDescHeaderItems */
+ YYSYMBOL_ECPGGetDescHeaderItem = 1324, /* ECPGGetDescHeaderItem */
+ YYSYMBOL_ECPGSetDescriptorHeader = 1325, /* ECPGSetDescriptorHeader */
+ YYSYMBOL_ECPGSetDescHeaderItems = 1326, /* ECPGSetDescHeaderItems */
+ YYSYMBOL_ECPGSetDescHeaderItem = 1327, /* ECPGSetDescHeaderItem */
+ YYSYMBOL_IntConstVar = 1328, /* IntConstVar */
+ YYSYMBOL_desc_header_item = 1329, /* desc_header_item */
+ YYSYMBOL_ECPGGetDescriptor = 1330, /* ECPGGetDescriptor */
+ YYSYMBOL_ECPGGetDescItems = 1331, /* ECPGGetDescItems */
+ YYSYMBOL_ECPGGetDescItem = 1332, /* ECPGGetDescItem */
+ YYSYMBOL_ECPGSetDescriptor = 1333, /* ECPGSetDescriptor */
+ YYSYMBOL_ECPGSetDescItems = 1334, /* ECPGSetDescItems */
+ YYSYMBOL_ECPGSetDescItem = 1335, /* ECPGSetDescItem */
+ YYSYMBOL_AllConstVar = 1336, /* AllConstVar */
+ YYSYMBOL_descriptor_item = 1337, /* descriptor_item */
+ YYSYMBOL_ECPGSetAutocommit = 1338, /* ECPGSetAutocommit */
+ YYSYMBOL_on_off = 1339, /* on_off */
+ YYSYMBOL_ECPGSetConnection = 1340, /* ECPGSetConnection */
+ YYSYMBOL_ECPGTypedef = 1341, /* ECPGTypedef */
+ YYSYMBOL_1342_9 = 1342, /* $@9 */
+ YYSYMBOL_opt_reference = 1343, /* opt_reference */
+ YYSYMBOL_ECPGVar = 1344, /* ECPGVar */
+ YYSYMBOL_1345_10 = 1345, /* $@10 */
+ YYSYMBOL_ECPGWhenever = 1346, /* ECPGWhenever */
+ YYSYMBOL_action = 1347, /* action */
+ YYSYMBOL_ECPGKeywords = 1348, /* ECPGKeywords */
+ YYSYMBOL_ECPGKeywords_vanames = 1349, /* ECPGKeywords_vanames */
+ YYSYMBOL_ECPGKeywords_rest = 1350, /* ECPGKeywords_rest */
+ YYSYMBOL_ECPGTypeName = 1351, /* ECPGTypeName */
+ YYSYMBOL_symbol = 1352, /* symbol */
+ YYSYMBOL_ECPGColId = 1353, /* ECPGColId */
+ YYSYMBOL_ColId = 1354, /* ColId */
+ YYSYMBOL_type_function_name = 1355, /* type_function_name */
+ YYSYMBOL_ColLabel = 1356, /* ColLabel */
+ YYSYMBOL_ECPGColLabel = 1357, /* ECPGColLabel */
+ YYSYMBOL_ECPGColLabelCommon = 1358, /* ECPGColLabelCommon */
+ YYSYMBOL_ECPGCKeywords = 1359, /* ECPGCKeywords */
+ YYSYMBOL_all_unreserved_keyword = 1360, /* all_unreserved_keyword */
+ YYSYMBOL_ECPGunreserved_interval = 1361, /* ECPGunreserved_interval */
+ YYSYMBOL_into_list = 1362, /* into_list */
+ YYSYMBOL_ecpgstart = 1363, /* ecpgstart */
+ YYSYMBOL_c_args = 1364, /* c_args */
+ YYSYMBOL_coutputvariable = 1365, /* coutputvariable */
+ YYSYMBOL_civarind = 1366, /* civarind */
+ YYSYMBOL_char_civar = 1367, /* char_civar */
+ YYSYMBOL_civar = 1368, /* civar */
+ YYSYMBOL_indicator = 1369, /* indicator */
+ YYSYMBOL_cvariable = 1370, /* cvariable */
+ YYSYMBOL_ecpg_param = 1371, /* ecpg_param */
+ YYSYMBOL_ecpg_bconst = 1372, /* ecpg_bconst */
+ YYSYMBOL_ecpg_fconst = 1373, /* ecpg_fconst */
+ YYSYMBOL_ecpg_sconst = 1374, /* ecpg_sconst */
+ YYSYMBOL_ecpg_xconst = 1375, /* ecpg_xconst */
+ YYSYMBOL_ecpg_ident = 1376, /* ecpg_ident */
+ YYSYMBOL_quoted_ident_stringvar = 1377, /* quoted_ident_stringvar */
+ YYSYMBOL_c_stuff_item = 1378, /* c_stuff_item */
+ YYSYMBOL_c_stuff = 1379, /* c_stuff */
+ YYSYMBOL_c_list = 1380, /* c_list */
+ YYSYMBOL_c_term = 1381, /* c_term */
+ YYSYMBOL_c_thing = 1382, /* c_thing */
+ YYSYMBOL_c_anything = 1383, /* c_anything */
+ YYSYMBOL_DeallocateStmt = 1384, /* DeallocateStmt */
+ YYSYMBOL_Iresult = 1385, /* Iresult */
+ YYSYMBOL_execute_rest = 1386, /* execute_rest */
+ YYSYMBOL_ecpg_into = 1387, /* ecpg_into */
+ YYSYMBOL_opt_ecpg_into = 1388, /* opt_ecpg_into */
+ YYSYMBOL_ecpg_fetch_into = 1389, /* ecpg_fetch_into */
+ YYSYMBOL_opt_ecpg_fetch_into = 1390 /* opt_ecpg_fetch_into */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+
+
+
+#ifdef short
+# undef short
+#endif
+
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
+#endif
+
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+/* Work around bug in HP-UX 11.23, which defines these macros
+ incorrectly for preprocessor constants. This workaround can likely
+ be removed in 2023, as HPE has promised support for HP-UX 11.23
+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
+#endif
+
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
+#else
+typedef short yytype_uint8;
+#endif
+
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
+#else
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_int16 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+
+#ifndef YY_ATTRIBUTE_PURE
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YY_USE(E) ((void) (E))
+#else
+# define YY_USE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
+
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
+#if !defined yyoverflow
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* !defined yyoverflow */
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yy_state_t yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
+ + YYSIZEOF (YYLTYPE)) \
+ + 2 * YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYPTRDIFF_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYPTRDIFF_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 3
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 148161
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 575
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 816
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 3620
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 6609
+
+/* YYMAXUTOK -- Last valid token kind. */
+#define YYMAXUTOK 810
+
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_int16 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 562, 2, 2,
+ 567, 568, 560, 558, 570, 559, 569, 561, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 572, 571,
+ 555, 557, 556, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 565, 2, 566, 563, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 573, 2, 574, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 564
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_int16 yyrline[] =
+{
+ 0, 1659, 1659, 1662, 1666, 1676, 1678, 1680, 1682, 1684,
+ 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704,
+ 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722, 1724,
+ 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1742, 1744,
+ 1746, 1764, 1766, 1768, 1770, 1772, 1774, 1776, 1778, 1780,
+ 1782, 1784, 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800,
+ 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816, 1818, 1820,
+ 1822, 1824, 1826, 1828, 1830, 1832, 1834, 1836, 1840, 1842,
+ 1844, 1846, 1848, 1850, 1852, 1854, 1856, 1858, 1860, 1862,
+ 1864, 1866, 1868, 1870, 1872, 1896, 1898, 1900, 1902, 1904,
+ 1906, 1908, 1910, 1912, 1914, 1916, 1918, 1920, 1948, 1950,
+ 1952, 1954, 1956, 1958, 1960, 1962, 1964, 1966, 1968, 1970,
+ 1976, 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992, 1998,
+ 2008, 2012, 2016, 2022, 2026, 2038, 2048, 2049, 2063, 2070,
+ 2076, 2087, 2093, 2102, 2109, 2115, 2124, 2131, 2139, 2144,
+ 2152, 2160, 2164, 2169, 2175, 2180, 2186, 2191, 2197, 2201,
+ 2205, 2209, 2214, 2218, 2222, 2226, 2230, 2238, 2242, 2246,
+ 2250, 2254, 2258, 2266, 2274, 2278, 2287, 2289, 2297, 2301,
+ 2305, 2309, 2317, 2321, 2325, 2329, 2333, 2337, 2345, 2353,
+ 2361, 2365, 2373, 2377, 2381, 2386, 2395, 2400, 2406, 2411,
+ 2417, 2421, 2425, 2429, 2433, 2437, 2445, 2449, 2453, 2461,
+ 2465, 2469, 2477, 2481, 2485, 2489, 2497, 2501, 2505, 2509,
+ 2514, 2518, 2522, 2526, 2530, 2534, 2538, 2546, 2550, 2558,
+ 2562, 2570, 2574, 2588, 2592, 2596, 2600, 2608, 2612, 2616,
+ 2620, 2628, 2632, 2636, 2640, 2644, 2648, 2652, 2660, 2664,
+ 2669, 2675, 2679, 2687, 2695, 2699, 2703, 2707, 2715, 2719,
+ 2727, 2731, 2739, 2743, 2751, 2755, 2759, 2763, 2767, 2776,
+ 2784, 2788, 2796, 2800, 2808, 2816, 2820, 2824, 2828, 2832,
+ 2840, 2844, 2848, 2852, 2856, 2860, 2864, 2868, 2872, 2876,
+ 2880, 2884, 2888, 2892, 2896, 2900, 2904, 2908, 2912, 2916,
+ 2920, 2928, 2932, 2940, 2944, 2948, 2956, 2964, 2968, 2972,
+ 2976, 2980, 2984, 2988, 2992, 2996, 3000, 3004, 3008, 3012,
+ 3016, 3020, 3024, 3028, 3032, 3036, 3040, 3044, 3048, 3052,
+ 3056, 3060, 3064, 3068, 3072, 3076, 3080, 3084, 3088, 3092,
+ 3096, 3100, 3104, 3108, 3112, 3116, 3120, 3124, 3128, 3132,
+ 3136, 3140, 3144, 3148, 3152, 3156, 3160, 3164, 3168, 3172,
+ 3176, 3180, 3184, 3188, 3192, 3196, 3204, 3208, 3216, 3220,
+ 3225, 3231, 3236, 3242, 3247, 3253, 3257, 3261, 3265, 3273,
+ 3281, 3286, 3292, 3296, 3304, 3308, 3312, 3316, 3324, 3328,
+ 3336, 3340, 3344, 3348, 3356, 3360, 3364, 3368, 3376, 3384,
+ 3388, 3396, 3404, 3408, 3416, 3420, 3424, 3428, 3436, 3452,
+ 3460, 3468, 3476, 3480, 3488, 3493, 3499, 3503, 3507, 3515,
+ 3519, 3527, 3532, 3538, 3542, 3546, 3550, 3554, 3558, 3562,
+ 3566, 3570, 3574, 3578, 3582, 3586, 3594, 3599, 3605, 3610,
+ 3616, 3621, 3627, 3631, 3639, 3647, 3651, 3655, 3659, 3664,
+ 3670, 3674, 3682, 3690, 3694, 3698, 3702, 3706, 3710, 3718,
+ 3722, 3726, 3730, 3734, 3738, 3742, 3747, 3753, 3758, 3764,
+ 3769, 3775, 3779, 3787, 3791, 3799, 3803, 3807, 3815, 3819,
+ 3827, 3835, 3839, 3847, 3851, 3859, 3864, 3870, 3875, 3881,
+ 3885, 3889, 3893, 3901, 3905, 3909, 3913, 3917, 3921, 3925,
+ 3929, 3933, 3941, 3945, 3953, 3957, 3961, 3965, 3973, 3981,
+ 3985, 3990, 3996, 4000, 4004, 4008, 4012, 4016, 4020, 4024,
+ 4028, 4032, 4040, 4044, 4052, 4056, 4060, 4064, 4068, 4072,
+ 4076, 4084, 4089, 4095, 4100, 4106, 4110, 4118, 4126, 4131,
+ 4137, 4141, 4146, 4151, 4157, 4161, 4169, 4173, 4181, 4186,
+ 4192, 4196, 4200, 4204, 4209, 4215, 4223, 4231, 4235, 4239,
+ 4243, 4247, 4255, 4260, 4266, 4271, 4277, 4285, 4289, 4297,
+ 4301, 4305, 4313, 4318, 4324, 4328, 4333, 4339, 4343, 4347,
+ 4352, 4358, 4363, 4369, 4374, 4380, 4388, 4392, 4400, 4404,
+ 4412, 4416, 4420, 4428, 4432, 4440, 4448, 4452, 4457, 4463,
+ 4467, 4475, 4483, 4488, 4494, 4502, 4506, 4514, 4518, 4526,
+ 4531, 4537, 4542, 4548, 4552, 4560, 4564, 4568, 4572, 4576,
+ 4580, 4584, 4588, 4592, 4596, 4600, 4604, 4608, 4612, 4620,
+ 4625, 4631, 4635, 4639, 4643, 4651, 4655, 4663, 4667, 4675,
+ 4680, 4686, 4690, 4698, 4703, 4709, 4713, 4721, 4726, 4732,
+ 4737, 4743, 4751, 4756, 4762, 4766, 4774, 4778, 4786, 4791,
+ 4797, 4801, 4805, 4810, 4818, 4826, 4831, 4837, 4845, 4849,
+ 4853, 4857, 4861, 4865, 4869, 4873, 4877, 4881, 4885, 4889,
+ 4893, 4901, 4909, 4913, 4917, 4921, 4929, 4933, 4941, 4946,
+ 4952, 4956, 4964, 4969, 4975, 4979, 4987, 4995, 4999, 5007,
+ 5011, 5015, 5019, 5027, 5035, 5043, 5051, 5055, 5063, 5068,
+ 5074, 5078, 5086, 5091, 5097, 5101, 5105, 5113, 5117, 5121,
+ 5125, 5133, 5141, 5145, 5153, 5158, 5164, 5168, 5176, 5180,
+ 5188, 5192, 5200, 5208, 5216, 5224, 5229, 5235, 5240, 5246,
+ 5251, 5257, 5262, 5268, 5273, 5279, 5284, 5290, 5294, 5298,
+ 5302, 5306, 5314, 5322, 5326, 5334, 5338, 5347, 5351, 5355,
+ 5363, 5367, 5375, 5379, 5383, 5387, 5391, 5399, 5404, 5410,
+ 5414, 5422, 5430, 5434, 5442, 5446, 5454, 5462, 5467, 5473,
+ 5478, 5484, 5488, 5496, 5501, 5507, 5511, 5519, 5523, 5528,
+ 5534, 5538, 5542, 5546, 5554, 5559, 5566, 5568, 5576, 5580,
+ 5584, 5588, 5592, 5596, 5604, 5608, 5616, 5620, 5628, 5636,
+ 5640, 5648, 5656, 5660, 5664, 5668, 5676, 5685, 5689, 5693,
+ 5697, 5701, 5705, 5709, 5713, 5717, 5721, 5725, 5729, 5733,
+ 5737, 5741, 5745, 5753, 5761, 5765, 5773, 5777, 5785, 5789,
+ 5793, 5797, 5801, 5805, 5813, 5821, 5825, 5833, 5841, 5846,
+ 5852, 5856, 5864, 5868, 5872, 5876, 5884, 5889, 5895, 5903,
+ 5907, 5915, 5919, 5923, 5927, 5931, 5939, 5944, 5950, 5955,
+ 5961, 5965, 5970, 5976, 5982, 5988, 5996, 6000, 6008, 6012,
+ 6020, 6024, 6032, 6036, 6044, 6048, 6056, 6064, 6072, 6076,
+ 6080, 6084, 6088, 6092, 6096, 6100, 6104, 6108, 6112, 6116,
+ 6124, 6128, 6132, 6136, 6140, 6144, 6148, 6152, 6156, 6160,
+ 6164, 6168, 6172, 6180, 6184, 6188, 6192, 6196, 6204, 6208,
+ 6212, 6216, 6220, 6224, 6228, 6232, 6240, 6244, 6248, 6256,
+ 6260, 6268, 6272, 6280, 6284, 6292, 6296, 6304, 6312, 6316,
+ 6321, 6327, 6331, 6335, 6339, 6343, 6347, 6351, 6355, 6359,
+ 6363, 6367, 6371, 6375, 6379, 6383, 6387, 6391, 6395, 6403,
+ 6407, 6415, 6419, 6423, 6427, 6431, 6435, 6439, 6443, 6447,
+ 6451, 6459, 6464, 6470, 6474, 6482, 6486, 6490, 6494, 6503,
+ 6512, 6521, 6530, 6539, 6548, 6557, 6570, 6584, 6598, 6612,
+ 6626, 6640, 6654, 6673, 6692, 6711, 6725, 6744, 6758, 6777,
+ 6795, 6799, 6807, 6812, 6818, 6826, 6830, 6838, 6842, 6846,
+ 6850, 6854, 6862, 6866, 6874, 6878, 6882, 6886, 6894, 6898,
+ 6902, 6906, 6910, 6914, 6918, 6922, 6926, 6930, 6934, 6938,
+ 6942, 6946, 6950, 6954, 6958, 6962, 6966, 6970, 6978, 6982,
+ 6990, 6994, 7002, 7007, 7013, 7021, 7025, 7033, 7038, 7044,
+ 7049, 7055, 7063, 7068, 7074, 7078, 7082, 7090, 7094, 7098,
+ 7106, 7110, 7114, 7118, 7122, 7126, 7134, 7138, 7146, 7151,
+ 7157, 7162, 7168, 7173, 7179, 7184, 7190, 7194, 7202, 7206,
+ 7214, 7218, 7222, 7230, 7235, 7241, 7245, 7253, 7258, 7264,
+ 7269, 7275, 7279, 7284, 7290, 7294, 7299, 7305, 7309, 7313,
+ 7317, 7325, 7330, 7336, 7340, 7348, 7352, 7360, 7364, 7372,
+ 7376, 7380, 7384, 7392, 7396, 7404, 7408, 7416, 7420, 7424,
+ 7428, 7432, 7440, 7444, 7448, 7452, 7456, 7464, 7472, 7480,
+ 7484, 7488, 7496, 7500, 7504, 7512, 7521, 7525, 7529, 7533,
+ 7541, 7545, 7553, 7561, 7565, 7573, 7578, 7584, 7588, 7596,
+ 7600, 7604, 7608, 7612, 7616, 7620, 7624, 7628, 7632, 7636,
+ 7640, 7644, 7648, 7652, 7656, 7660, 7668, 7672, 7676, 7680,
+ 7684, 7692, 7696, 7704, 7712, 7716, 7721, 7727, 7732, 7738,
+ 7742, 7750, 7754, 7762, 7767, 7773, 7781, 7785, 7793, 7797,
+ 7801, 7809, 7813, 7821, 7826, 7832, 7836, 7840, 7844, 7848,
+ 7852, 7860, 7864, 7872, 7876, 7884, 7888, 7892, 7896, 7904,
+ 7908, 7916, 7920, 7928, 7936, 7944, 7948, 7956, 7960, 7968,
+ 7972, 7976, 7984, 7988, 7993, 7999, 8007, 8012, 8018, 8026,
+ 8030, 8034, 8038, 8046, 8054, 8058, 8062, 8066, 8074, 8078,
+ 8086, 8090, 8094, 8102, 8106, 8114, 8118, 8122, 8126, 8130,
+ 8134, 8138, 8142, 8146, 8150, 8154, 8158, 8162, 8166, 8170,
+ 8174, 8178, 8182, 8186, 8190, 8194, 8198, 8202, 8206, 8210,
+ 8214, 8218, 8222, 8226, 8230, 8234, 8238, 8242, 8246, 8250,
+ 8254, 8258, 8262, 8266, 8270, 8274, 8278, 8282, 8286, 8290,
+ 8294, 8298, 8302, 8306, 8310, 8314, 8318, 8322, 8326, 8330,
+ 8338, 8343, 8349, 8354, 8360, 8364, 8368, 8372, 8376, 8380,
+ 8388, 8393, 8399, 8403, 8407, 8411, 8415, 8419, 8423, 8427,
+ 8431, 8435, 8439, 8443, 8447, 8451, 8455, 8459, 8463, 8467,
+ 8471, 8475, 8479, 8483, 8487, 8491, 8495, 8499, 8503, 8511,
+ 8519, 8523, 8531, 8535, 8543, 8547, 8551, 8555, 8559, 8567,
+ 8575, 8579, 8583, 8587, 8591, 8595, 8599, 8603, 8607, 8611,
+ 8615, 8619, 8623, 8627, 8631, 8635, 8639, 8643, 8647, 8651,
+ 8655, 8659, 8663, 8667, 8675, 8683, 8688, 8694, 8698, 8706,
+ 8710, 8714, 8718, 8726, 8734, 8738, 8742, 8746, 8750, 8754,
+ 8758, 8762, 8770, 8774, 8782, 8790, 8794, 8798, 8806, 8810,
+ 8818, 8822, 8826, 8830, 8834, 8842, 8847, 8853, 8857, 8861,
+ 8865, 8873, 8877, 8882, 8888, 8896, 8901, 8907, 8915, 8919,
+ 8927, 8931, 8935, 8939, 8943, 8947, 8951, 8955, 8959, 8963,
+ 8967, 8971, 8979, 8983, 8991, 8995, 9000, 9006, 9010, 9014,
+ 9018, 9022, 9030, 9034, 9038, 9046, 9051, 9057, 9061, 9066,
+ 9072, 9076, 9080, 9085, 9094, 9098, 9102, 9107, 9113, 9121,
+ 9129, 9134, 9140, 9144, 9152, 9156, 9160, 9168, 9172, 9176,
+ 9180, 9184, 9188, 9192, 9200, 9205, 9211, 9215, 9219, 9227,
+ 9235, 9239, 9243, 9247, 9255, 9259, 9267, 9275, 9283, 9287,
+ 9295, 9303, 9307, 9311, 9315, 9319, 9323, 9327, 9335, 9340,
+ 9346, 9354, 9358, 9362, 9366, 9370, 9374, 9382, 9386, 9394,
+ 9402, 9406, 9410, 9414, 9422, 9427, 9433, 9437, 9445, 9449,
+ 9457, 9461, 9469, 9473, 9481, 9489, 9493, 9501, 9505, 9510,
+ 9516, 9521, 9527, 9532, 9538, 9543, 9549, 9554, 9560, 9565,
+ 9571, 9579, 9583, 9591, 9596, 9602, 9606, 9610, 9614, 9622,
+ 9626, 9630, 9634, 9638, 9642, 9646, 9650, 9654, 9662, 9668,
+ 9678, 9683, 9689, 9693, 9697, 9701, 9709, 9714, 9718, 9726,
+ 9731, 9737, 9745, 9749, 9757, 9761, 9765, 9769, 9773, 9781,
+ 9785, 9793, 9797, 9805, 9813, 9817, 9822, 9828, 9832, 9837,
+ 9843, 9848, 9854, 9862, 9867, 9873, 9881, 9886, 9892, 9896,
+ 9900, 9904, 9908, 9912, 9916, 9920, 9928, 9933, 9939, 9943,
+ 9948, 9954, 9962, 9966, 9974, 9978, 9986, 9994, 9998, 10006,
+ 10057, 10061, 10074, 10076, 10080, 10084, 10088, 10092, 10101, 10107,
+ 10111, 10119, 10123, 10131, 10135, 10143, 10147, 10151, 10155, 10159,
+ 10163, 10167, 10171, 10179, 10183, 10191, 10195, 10199, 10203, 10207,
+ 10211, 10215, 10223, 10227, 10231, 10239, 10243, 10251, 10259, 10263,
+ 10268, 10274, 10278, 10283, 10289, 10293, 10298, 10304, 10309, 10315,
+ 10320, 10322, 10328, 10332, 10336, 10340, 10344, 10348, 10352, 10356,
+ 10360, 10368, 10373, 10379, 10383, 10388, 10394, 10398, 10406, 10411,
+ 10417, 10422, 10428, 10436, 10440, 10448, 10452, 10460, 10464, 10468,
+ 10472, 10480, 10485, 10491, 10495, 10500, 10504, 10508, 10512, 10520,
+ 10524, 10532, 10536, 10544, 10552, 10556, 10560, 10568, 10572, 10580,
+ 10584, 10592, 10596, 10604, 10609, 10615, 10619, 10627, 10631, 10635,
+ 10639, 10643, 10651, 10659, 10667, 10675, 10683, 10688, 10694, 10698,
+ 10706, 10711, 10717, 10721, 10729, 10737, 10741, 10745, 10749, 10757,
+ 10762, 10768, 10772, 10780, 10785, 10791, 10795, 10803, 10807, 10811,
+ 10815, 10819, 10823, 10827, 10834, 10841, 10845, 10853, 10857, 10861,
+ 10865, 10869, 10873, 10881, 10885, 10889, 10893, 10901, 10906, 10912,
+ 10917, 10923, 10927, 10931, 10935, 10940, 10946, 10950, 10954, 10958,
+ 10966, 10971, 10977, 10981, 10989, 10993, 10997, 11001, 11009, 11013,
+ 11021, 11025, 11029, 11037, 11045, 11050, 11056, 11060, 11068, 11076,
+ 11080, 11088, 11093, 11099, 11104, 11110, 11115, 11121, 11125, 11131,
+ 11137, 11142, 11148, 11152, 11160, 11168, 11172, 11180, 11184, 11192,
+ 11196, 11200, 11208, 11212, 11220, 11224, 11228, 11232, 11240, 11244,
+ 11252, 11256, 11264, 11266, 11268, 11272, 11276, 11280, 11288, 11298,
+ 11309, 11318, 11322, 11326, 11330, 11334, 11338, 11342, 11350, 11354,
+ 11358, 11362, 11370, 11374, 11382, 11387, 11393, 11397, 11401, 11405,
+ 11409, 11413, 11417, 11421, 11425, 11429, 11433, 11441, 11446, 11452,
+ 11456, 11464, 11468, 11476, 11484, 11492, 11496, 11504, 11508, 11516,
+ 11524, 11532, 11536, 11540, 11544, 11548, 11552, 11560, 11565, 11571,
+ 11575, 11579, 11583, 11591, 11599, 11603, 11608, 11614, 11618, 11622,
+ 11626, 11630, 11634, 11638, 11642, 11646, 11650, 11654, 11658, 11662,
+ 11667, 11673, 11677, 11685, 11689, 11693, 11697, 11701, 11705, 11709,
+ 11713, 11717, 11721, 11725, 11729, 11733, 11737, 11741, 11745, 11749,
+ 11753, 11757, 11761, 11765, 11769, 11773, 11777, 11781, 11785, 11789,
+ 11793, 11797, 11801, 11805, 11809, 11813, 11817, 11821, 11825, 11829,
+ 11833, 11837, 11841, 11845, 11849, 11853, 11857, 11861, 11865, 11869,
+ 11873, 11877, 11881, 11885, 11889, 11893, 11897, 11901, 11905, 11909,
+ 11913, 11918, 11922, 11926, 11930, 11934, 11938, 11942, 11950, 11954,
+ 11958, 11962, 11966, 11970, 11974, 11978, 11982, 11986, 11990, 11994,
+ 11998, 12002, 12006, 12010, 12014, 12018, 12022, 12026, 12030, 12034,
+ 12042, 12046, 12050, 12054, 12058, 12062, 12066, 12070, 12074, 12078,
+ 12082, 12086, 12090, 12094, 12102, 12106, 12110, 12114, 12118, 12122,
+ 12126, 12134, 12138, 12146, 12150, 12158, 12162, 12166, 12170, 12174,
+ 12178, 12182, 12186, 12190, 12194, 12198, 12202, 12206, 12210, 12214,
+ 12218, 12222, 12226, 12230, 12234, 12238, 12242, 12246, 12250, 12254,
+ 12258, 12262, 12266, 12270, 12274, 12278, 12282, 12286, 12290, 12294,
+ 12298, 12302, 12306, 12310, 12314, 12318, 12322, 12326, 12330, 12334,
+ 12338, 12346, 12350, 12358, 12362, 12366, 12371, 12377, 12385, 12389,
+ 12397, 12401, 12409, 12413, 12421, 12425, 12430, 12436, 12440, 12444,
+ 12448, 12456, 12460, 12468, 12473, 12479, 12484, 12490, 12495, 12501,
+ 12505, 12513, 12521, 12525, 12530, 12536, 12544, 12548, 12555, 12560,
+ 12566, 12570, 12574, 12579, 12585, 12589, 12597, 12601, 12605, 12609,
+ 12613, 12621, 12625, 12629, 12633, 12638, 12644, 12648, 12652, 12660,
+ 12664, 12672, 12680, 12684, 12688, 12696, 12700, 12708, 12712, 12716,
+ 12720, 12724, 12728, 12732, 12736, 12740, 12744, 12748, 12752, 12760,
+ 12764, 12772, 12776, 12784, 12788, 12792, 12796, 12800, 12804, 12812,
+ 12816, 12824, 12828, 12836, 12840, 12844, 12852, 12857, 12863, 12867,
+ 12875, 12879, 12883, 12891, 12895, 12903, 12911, 12915, 12919, 12923,
+ 12927, 12931, 12935, 12939, 12947, 12951, 12955, 12959, 12967, 12971,
+ 12979, 12987, 12991, 12995, 12999, 13003, 13011, 13015, 13019, 13027,
+ 13031, 13039, 13047, 13051, 13059, 13067, 13072, 13078, 13083, 13089,
+ 13093, 13101, 13105, 13109, 13113, 13121, 13126, 13132, 13136, 13145,
+ 13147, 13155, 13160, 13166, 13171, 13177, 13181, 13189, 13193, 13197,
+ 13201, 13209, 13213, 13221, 13225, 13233, 13237, 13245, 13253, 13261,
+ 13269, 13273, 13281, 13285, 13289, 13293, 13297, 13301, 13305, 13309,
+ 13313, 13317, 13321, 13325, 13329, 13333, 13334, 13339, 13345, 13349,
+ 13350, 13354, 13362, 13370, 13374, 13378, 13382, 13390, 13394, 13402,
+ 13406, 13410, 13414, 13422, 13426, 13434, 13438, 13442, 13446, 13450,
+ 13454, 13458, 13462, 13466, 13470, 13474, 13478, 13482, 13486, 13490,
+ 13494, 13498, 13502, 13506, 13510, 13514, 13518, 13522, 13526, 13530,
+ 13534, 13538, 13542, 13546, 13550, 13554, 13558, 13562, 13566, 13570,
+ 13574, 13578, 13582, 13586, 13590, 13594, 13598, 13602, 13606, 13610,
+ 13614, 13618, 13622, 13626, 13630, 13634, 13638, 13642, 13646, 13650,
+ 13654, 13658, 13662, 13666, 13670, 13674, 13678, 13682, 13686, 13690,
+ 13694, 13698, 13702, 13706, 13710, 13714, 13718, 13722, 13726, 13730,
+ 13734, 13738, 13742, 13746, 13750, 13754, 13758, 13762, 13766, 13770,
+ 13774, 13778, 13782, 13786, 13790, 13794, 13798, 13802, 13806, 13810,
+ 13814, 13818, 13822, 13826, 13830, 13834, 13838, 13842, 13846, 13850,
+ 13854, 13858, 13862, 13866, 13870, 13874, 13878, 13882, 13886, 13890,
+ 13894, 13898, 13902, 13906, 13910, 13914, 13918, 13922, 13926, 13930,
+ 13934, 13938, 13942, 13946, 13950, 13954, 13958, 13962, 13966, 13970,
+ 13974, 13978, 13982, 13986, 13990, 13994, 13998, 14002, 14006, 14010,
+ 14014, 14018, 14022, 14026, 14030, 14034, 14038, 14042, 14046, 14050,
+ 14054, 14058, 14062, 14066, 14070, 14074, 14078, 14082, 14086, 14090,
+ 14094, 14098, 14102, 14106, 14110, 14114, 14118, 14122, 14126, 14130,
+ 14134, 14138, 14142, 14146, 14150, 14154, 14158, 14162, 14166, 14170,
+ 14174, 14178, 14182, 14186, 14190, 14194, 14198, 14202, 14206, 14210,
+ 14214, 14218, 14222, 14226, 14230, 14234, 14238, 14242, 14246, 14250,
+ 14254, 14258, 14262, 14266, 14270, 14274, 14278, 14282, 14286, 14290,
+ 14294, 14298, 14302, 14306, 14310, 14314, 14318, 14322, 14326, 14330,
+ 14334, 14338, 14342, 14346, 14350, 14354, 14358, 14362, 14366, 14370,
+ 14374, 14378, 14382, 14386, 14390, 14394, 14398, 14402, 14406, 14410,
+ 14414, 14418, 14422, 14426, 14430, 14434, 14438, 14442, 14446, 14450,
+ 14454, 14458, 14462, 14466, 14470, 14474, 14478, 14482, 14486, 14490,
+ 14494, 14498, 14502, 14506, 14510, 14514, 14518, 14522, 14526, 14530,
+ 14534, 14538, 14542, 14546, 14550, 14554, 14558, 14562, 14566, 14570,
+ 14574, 14578, 14582, 14586, 14590, 14594, 14598, 14602, 14606, 14610,
+ 14614, 14618, 14626, 14630, 14634, 14638, 14642, 14646, 14650, 14654,
+ 14658, 14662, 14666, 14670, 14674, 14678, 14682, 14686, 14690, 14694,
+ 14698, 14702, 14706, 14710, 14714, 14718, 14722, 14726, 14730, 14734,
+ 14738, 14742, 14746, 14750, 14754, 14758, 14762, 14766, 14770, 14774,
+ 14778, 14782, 14786, 14790, 14794, 14798, 14802, 14806, 14810, 14814,
+ 14822, 14826, 14830, 14834, 14838, 14842, 14846, 14850, 14854, 14858,
+ 14862, 14866, 14870, 14874, 14878, 14882, 14886, 14890, 14894, 14898,
+ 14902, 14906, 14910, 14918, 14922, 14926, 14930, 14934, 14938, 14942,
+ 14946, 14950, 14954, 14958, 14962, 14966, 14970, 14974, 14978, 14982,
+ 14986, 14990, 14994, 14998, 15002, 15006, 15010, 15014, 15018, 15022,
+ 15026, 15030, 15034, 15038, 15042, 15046, 15050, 15054, 15058, 15062,
+ 15066, 15070, 15074, 15078, 15082, 15086, 15090, 15094, 15098, 15102,
+ 15106, 15110, 15114, 15118, 15122, 15126, 15130, 15134, 15138, 15142,
+ 15146, 15150, 15154, 15158, 15162, 15166, 15170, 15174, 15178, 15182,
+ 15186, 15190, 15194, 15198, 15202, 15206, 15210, 15214, 15222, 15226,
+ 15230, 15234, 15238, 15242, 15246, 15250, 15254, 15258, 15262, 15266,
+ 15270, 15274, 15278, 15282, 15286, 15290, 15294, 15298, 15302, 15306,
+ 15310, 15314, 15318, 15322, 15326, 15330, 15334, 15338, 15342, 15346,
+ 15350, 15354, 15358, 15362, 15366, 15370, 15374, 15378, 15382, 15386,
+ 15390, 15394, 15398, 15402, 15406, 15410, 15414, 15418, 15422, 15426,
+ 15430, 15434, 15438, 15442, 15446, 15450, 15454, 15458, 15462, 15466,
+ 15470, 15474, 15478, 15482, 15486, 15490, 15494, 15498, 15502, 15506,
+ 15510, 15514, 15518, 15522, 15526, 15530, 15534, 15538, 15542, 15546,
+ 15550, 15554, 15558, 15562, 15566, 15570, 15574, 15578, 15582, 15586,
+ 15590, 15594, 15598, 15602, 15606, 15610, 15614, 15618, 15622, 15626,
+ 15630, 15634, 15638, 15642, 15646, 15650, 15654, 15658, 15662, 15666,
+ 15670, 15674, 15678, 15682, 15686, 15690, 15694, 15698, 15702, 15706,
+ 15710, 15714, 15718, 15722, 15726, 15730, 15734, 15738, 15742, 15746,
+ 15750, 15754, 15758, 15762, 15766, 15770, 15774, 15778, 15782, 15786,
+ 15790, 15794, 15798, 15802, 15806, 15810, 15814, 15818, 15822, 15826,
+ 15830, 15834, 15838, 15842, 15846, 15850, 15854, 15858, 15862, 15866,
+ 15870, 15874, 15878, 15882, 15886, 15890, 15894, 15898, 15902, 15906,
+ 15910, 15914, 15918, 15922, 15926, 15930, 15934, 15938, 15942, 15946,
+ 15950, 15954, 15958, 15962, 15966, 15970, 15974, 15978, 15982, 15986,
+ 15990, 15994, 15998, 16002, 16006, 16010, 16014, 16018, 16022, 16026,
+ 16030, 16034, 16038, 16042, 16046, 16050, 16054, 16058, 16062, 16066,
+ 16070, 16074, 16078, 16082, 16086, 16090, 16094, 16098, 16102, 16106,
+ 16110, 16114, 16118, 16122, 16126, 16130, 16134, 16138, 16142, 16146,
+ 16150, 16154, 16158, 16162, 16166, 16170, 16174, 16178, 16182, 16186,
+ 16190, 16194, 16198, 16202, 16206, 16210, 16214, 16218, 16222, 16226,
+ 16230, 16234, 16238, 16242, 16246, 16250, 16254, 16258, 16262, 16266,
+ 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306,
+ 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346,
+ 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16386,
+ 16390, 16394, 16398, 16402, 16406, 16410, 16414, 16418, 16422, 16426,
+ 16430, 16434, 16438, 16442, 16446, 16450, 16454, 16458, 16462, 16466,
+ 16470, 16474, 16478, 16482, 16486, 16490, 16494, 16498, 16502, 16506,
+ 16510, 16514, 16518, 16522, 16526, 16530, 16534, 16538, 16542, 16546,
+ 16550, 16554, 16558, 16562, 16566, 16570, 16574, 16578, 16582, 16586,
+ 16590, 16594, 16598, 16602, 16606, 16610, 16614, 16618, 16622, 16626,
+ 16630, 16634, 16638, 16642, 16646, 16650, 16654, 16658, 16662, 16666,
+ 16670, 16674, 16678, 16682, 16686, 16690, 16694, 16698, 16702, 16706,
+ 16710, 16714, 16718, 16722, 16726, 16730, 16734, 16738, 16742, 16746,
+ 16750, 16754, 16758, 16762, 16766, 16770, 16774, 16778, 16782, 16786,
+ 16790, 16794, 16798, 16802, 16806, 16810, 16814, 16818, 16822, 16826,
+ 16830, 16834, 16838, 16842, 16846, 16850, 16854, 16858, 16862, 16866,
+ 16870, 16874, 16878, 16882, 16886, 16890, 16900, 16901, 16904, 16910,
+ 16916, 16922, 16923, 16924, 16925, 16926, 16939, 16939, 16946, 16946,
+ 16955, 16970, 16972, 16975, 16977, 16981, 16993, 17009, 17013, 17024,
+ 17025, 17028, 17040, 17049, 17050, 17053, 17054, 17055, 17058, 17059,
+ 17062, 17063, 17066, 17067, 17070, 17072, 17074, 17076, 17080, 17087,
+ 17094, 17110, 17144, 17154, 17157, 17161, 17174, 17175, 17177, 17179,
+ 17183, 17197, 17203, 17240, 17302, 17311, 17313, 17314, 17317, 17319,
+ 17320, 17323, 17324, 17325, 17326, 17327, 17334, 17333, 17343, 17345,
+ 17347, 17348, 17351, 17352, 17353, 17354, 17357, 17358, 17362, 17361,
+ 17378, 17376, 17392, 17391, 17405, 17411, 17412, 17415, 17417, 17418,
+ 17421, 17422, 17423, 17424, 17427, 17428, 17431, 17439, 17456, 17464,
+ 17487, 17601, 17635, 17637, 17639, 17643, 17647, 17646, 17697, 17699,
+ 17698, 17713, 17719, 17726, 17731, 17737, 17738, 17741, 17742, 17743,
+ 17744, 17745, 17746, 17747, 17748, 17749, 17752, 17753, 17754, 17755,
+ 17756, 17757, 17758, 17759, 17760, 17761, 17764, 17765, 17768, 17770,
+ 17779, 17879, 17880, 17887, 17888, 17889, 17895, 17904, 17907, 17908,
+ 17909, 17910, 17913, 17914, 17915, 17918, 17920, 17928, 17929, 17935,
+ 17943, 17944, 17947, 17948, 17951, 17956, 17963, 17968, 17975, 17982,
+ 17982, 17984, 17991, 17992, 17995, 17996, 17997, 17998, 17999, 18000,
+ 18001, 18002, 18003, 18009, 18014, 18024, 18029, 18034, 18041, 18042,
+ 18054, 18065, 18076, 18080, 18081, 18084, 18089, 18093, 18094, 18097,
+ 18103, 18111, 18117, 18124, 18128, 18129, 18132, 18135, 18139, 18140,
+ 18143, 18149, 18158, 18163, 18173, 18183, 18195, 18196, 18197, 18198,
+ 18199, 18200, 18201, 18202, 18203, 18204, 18205, 18206, 18207, 18208,
+ 18209, 18216, 18217, 18220, 18221, 18228, 18229, 18230, 18237, 18236,
+ 18253, 18254, 18261, 18260, 18331, 18337, 18343, 18351, 18357, 18363,
+ 18369, 18375, 18381, 18387, 18393, 18399, 18405, 18416, 18417, 18420,
+ 18421, 18422, 18423, 18424, 18425, 18426, 18427, 18428, 18429, 18430,
+ 18431, 18432, 18433, 18434, 18435, 18436, 18437, 18438, 18439, 18440,
+ 18441, 18444, 18445, 18446, 18447, 18448, 18449, 18453, 18454, 18455,
+ 18456, 18457, 18458, 18459, 18462, 18465, 18466, 18467, 18468, 18469,
+ 18470, 18471, 18472, 18485, 18486, 18487, 18488, 18489, 18490, 18491,
+ 18496, 18497, 18498, 18499, 18500, 18501, 18507, 18508, 18509, 18510,
+ 18511, 18512, 18513, 18514, 18515, 18516, 18517, 18520, 18521, 18522,
+ 18523, 18524, 18527, 18528, 18529, 18530, 18533, 18534, 18535, 18536,
+ 18537, 18538, 18539, 18556, 18557, 18558, 18561, 18562, 18563, 18564,
+ 18565, 18566, 18570, 18570, 18573, 18579, 18580, 18583, 18585, 18590,
+ 18600, 18611, 18618, 18619, 18620, 18623, 18656, 18658, 18660, 18662,
+ 18664, 18666, 18667, 18670, 18672, 18680, 18681, 18682, 18686, 18687,
+ 18691, 18692, 18695, 18696, 18699, 18700, 18701, 18702, 18703, 18706,
+ 18707, 18708, 18709, 18710, 18711, 18712, 18713, 18714, 18715, 18716,
+ 18717, 18718, 18719, 18720, 18721, 18722, 18723, 18724, 18725, 18726,
+ 18727, 18728, 18729, 18730, 18731, 18732, 18733, 18734, 18735, 18736,
+ 18737, 18738, 18739, 18740, 18741, 18742, 18743, 18744, 18745, 18746,
+ 18747, 18748, 18749, 18750, 18751, 18752, 18753, 18754, 18755, 18756,
+ 18757, 18758, 18759, 18760, 18761, 18764, 18765, 18766, 18767, 18770,
+ 18771, 18772, 18773, 18774, 18775, 18776, 18777, 18778, 18779, 18786,
+ 18787, 18788, 18789, 18792, 18793, 18796, 18797, 18800, 18801, 18812,
+ 18813
+};
+#endif
+
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "\"end of file\"", "error", "\"invalid token\"", "SQL_ALLOCATE",
+ "SQL_AUTOCOMMIT", "SQL_BOOL", "SQL_BREAK", "SQL_CARDINALITY",
+ "SQL_CONNECT", "SQL_COUNT", "SQL_DATETIME_INTERVAL_CODE",
+ "SQL_DATETIME_INTERVAL_PRECISION", "SQL_DESCRIBE", "SQL_DESCRIPTOR",
+ "SQL_DISCONNECT", "SQL_FOUND", "SQL_FREE", "SQL_GET", "SQL_GO",
+ "SQL_GOTO", "SQL_IDENTIFIED", "SQL_INDICATOR", "SQL_KEY_MEMBER",
+ "SQL_LENGTH", "SQL_LONG", "SQL_NULLABLE", "SQL_OCTET_LENGTH", "SQL_OPEN",
+ "SQL_OUTPUT", "SQL_REFERENCE", "SQL_RETURNED_LENGTH",
+ "SQL_RETURNED_OCTET_LENGTH", "SQL_SCALE", "SQL_SECTION", "SQL_SHORT",
+ "SQL_SIGNED", "SQL_SQLERROR", "SQL_SQLPRINT", "SQL_SQLWARNING",
+ "SQL_START", "SQL_STOP", "SQL_STRUCT", "SQL_UNSIGNED", "SQL_VAR",
+ "SQL_WHENEVER", "S_ADD", "S_AND", "S_ANYTHING", "S_AUTO", "S_CONST",
+ "S_DEC", "S_DIV", "S_DOTPOINT", "S_EQUAL", "S_EXTERN", "S_INC",
+ "S_LSHIFT", "S_MEMPOINT", "S_MEMBER", "S_MOD", "S_MUL", "S_NEQUAL",
+ "S_OR", "S_REGISTER", "S_RSHIFT", "S_STATIC", "S_SUB", "S_VOLATILE",
+ "S_TYPEDEF", "CSTRING", "CVARIABLE", "CPP_LINE", "IP", "IDENT", "UIDENT",
+ "FCONST", "SCONST", "USCONST", "BCONST", "XCONST", "Op", "ICONST",
+ "PARAM", "TYPECAST", "DOT_DOT", "COLON_EQUALS", "EQUALS_GREATER",
+ "LESS_EQUALS", "GREATER_EQUALS", "NOT_EQUALS", "ABORT_P", "ABSOLUTE_P",
+ "ACCESS", "ACTION", "ADD_P", "ADMIN", "AFTER", "AGGREGATE", "ALL",
+ "ALSO", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY",
+ "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC",
+ "ATOMIC", "AT", "ATTACH", "ATTRIBUTE", "AUTHORIZATION", "BACKWARD",
+ "BEFORE", "BEGIN_P", "BETWEEN", "BIGINT", "BINARY", "BIT", "BOOLEAN_P",
+ "BOTH", "BREADTH", "BY", "CACHE", "CALL", "CALLED", "CASCADE",
+ "CASCADED", "CASE", "CAST", "CATALOG_P", "CHAIN", "CHAR_P", "CHARACTER",
+ "CHARACTERISTICS", "CHECK", "CHECKPOINT", "CLASS", "CLOSE", "CLUSTER",
+ "COALESCE", "COLLATE", "COLLATION", "COLUMN", "COLUMNS", "COMMENT",
+ "COMMENTS", "COMMIT", "COMMITTED", "COMPRESSION", "CONCURRENTLY",
+ "CONFIGURATION", "CONFLICT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS",
+ "CONTENT_P", "CONTINUE_P", "CONVERSION_P", "COPY", "COST", "CREATE",
+ "CROSS", "CSV", "CUBE", "CURRENT_P", "CURRENT_CATALOG", "CURRENT_DATE",
+ "CURRENT_ROLE", "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP",
+ "CURRENT_USER", "CURSOR", "CYCLE", "DATA_P", "DATABASE", "DAY_P",
+ "DEALLOCATE", "DEC", "DECIMAL_P", "DECLARE", "DEFAULT", "DEFAULTS",
+ "DEFERRABLE", "DEFERRED", "DEFINER", "DELETE_P", "DELIMITER",
+ "DELIMITERS", "DEPENDS", "DEPTH", "DESC", "DETACH", "DICTIONARY",
+ "DISABLE_P", "DISCARD", "DISTINCT", "DO", "DOCUMENT_P", "DOMAIN_P",
+ "DOUBLE_P", "DROP", "EACH", "ELSE", "ENABLE_P", "ENCODING", "ENCRYPTED",
+ "END_P", "ENUM_P", "ESCAPE", "EVENT", "EXCEPT", "EXCLUDE", "EXCLUDING",
+ "EXCLUSIVE", "EXECUTE", "EXISTS", "EXPLAIN", "EXPRESSION", "EXTENSION",
+ "EXTERNAL", "EXTRACT", "FALSE_P", "FAMILY", "FETCH", "FILTER",
+ "FINALIZE", "FIRST_P", "FLOAT_P", "FOLLOWING", "FOR", "FORCE", "FOREIGN",
+ "FORWARD", "FREEZE", "FROM", "FULL", "FUNCTION", "FUNCTIONS",
+ "GENERATED", "GLOBAL", "GRANT", "GRANTED", "GREATEST", "GROUP_P",
+ "GROUPING", "GROUPS", "HANDLER", "HAVING", "HEADER_P", "HOLD", "HOUR_P",
+ "IDENTITY_P", "IF_P", "ILIKE", "IMMEDIATE", "IMMUTABLE", "IMPLICIT_P",
+ "IMPORT_P", "IN_P", "INCLUDE", "INCLUDING", "INCREMENT", "INDEX",
+ "INDEXES", "INHERIT", "INHERITS", "INITIALLY", "INLINE_P", "INNER_P",
+ "INOUT", "INPUT_P", "INSENSITIVE", "INSERT", "INSTEAD", "INT_P",
+ "INTEGER", "INTERSECT", "INTERVAL", "INTO", "INVOKER", "IS", "ISNULL",
+ "ISOLATION", "JOIN", "KEY", "LABEL", "LANGUAGE", "LARGE_P", "LAST_P",
+ "LATERAL_P", "LEADING", "LEAKPROOF", "LEAST", "LEFT", "LEVEL", "LIKE",
+ "LIMIT", "LISTEN", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP",
+ "LOCATION", "LOCK_P", "LOCKED", "LOGGED", "MAPPING", "MATCH",
+ "MATERIALIZED", "MAXVALUE", "METHOD", "MINUTE_P", "MINVALUE", "MODE",
+ "MONTH_P", "MOVE", "NAME_P", "NAMES", "NATIONAL", "NATURAL", "NCHAR",
+ "NEW", "NEXT", "NFC", "NFD", "NFKC", "NFKD", "NO", "NONE", "NORMALIZE",
+ "NORMALIZED", "NOT", "NOTHING", "NOTIFY", "NOTNULL", "NOWAIT", "NULL_P",
+ "NULLIF", "NULLS_P", "NUMERIC", "OBJECT_P", "OF", "OFF", "OFFSET",
+ "OIDS", "OLD", "ON", "ONLY", "OPERATOR", "OPTION", "OPTIONS", "OR",
+ "ORDER", "ORDINALITY", "OTHERS", "OUT_P", "OUTER_P", "OVER", "OVERLAPS",
+ "OVERLAY", "OVERRIDING", "OWNED", "OWNER", "PARALLEL", "PARSER",
+ "PARTIAL", "PARTITION", "PASSING", "PASSWORD", "PLACING", "PLANS",
+ "POLICY", "POSITION", "PRECEDING", "PRECISION", "PRESERVE", "PREPARE",
+ "PREPARED", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE",
+ "PROCEDURES", "PROGRAM", "PUBLICATION", "QUOTE", "RANGE", "READ", "REAL",
+ "REASSIGN", "RECHECK", "RECURSIVE", "REF", "REFERENCES", "REFERENCING",
+ "REFRESH", "REINDEX", "RELATIVE_P", "RELEASE", "RENAME", "REPEATABLE",
+ "REPLACE", "REPLICA", "RESET", "RESTART", "RESTRICT", "RETURN",
+ "RETURNING", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP",
+ "ROUTINE", "ROUTINES", "ROW", "ROWS", "RULE", "SAVEPOINT", "SCHEMA",
+ "SCHEMAS", "SCROLL", "SEARCH", "SECOND_P", "SECURITY", "SELECT",
+ "SEQUENCE", "SEQUENCES", "SERIALIZABLE", "SERVER", "SESSION",
+ "SESSION_USER", "SET", "SETS", "SETOF", "SHARE", "SHOW", "SIMILAR",
+ "SIMPLE", "SKIP", "SMALLINT", "SNAPSHOT", "SOME", "SQL_P", "STABLE",
+ "STANDALONE_P", "START", "STATEMENT", "STATISTICS", "STDIN", "STDOUT",
+ "STORAGE", "STORED", "STRICT_P", "STRIP_P", "SUBSCRIPTION", "SUBSTRING",
+ "SUPPORT", "SYMMETRIC", "SYSID", "SYSTEM_P", "TABLE", "TABLES",
+ "TABLESAMPLE", "TABLESPACE", "TEMP", "TEMPLATE", "TEMPORARY", "TEXT_P",
+ "THEN", "TIES", "TIME", "TIMESTAMP", "TO", "TRAILING", "TRANSACTION",
+ "TRANSFORM", "TREAT", "TRIGGER", "TRIM", "TRUE_P", "TRUNCATE", "TRUSTED",
+ "TYPE_P", "TYPES_P", "UESCAPE", "UNBOUNDED", "UNCOMMITTED",
+ "UNENCRYPTED", "UNION", "UNIQUE", "UNKNOWN", "UNLISTEN", "UNLOGGED",
+ "UNTIL", "UPDATE", "USER", "USING", "VACUUM", "VALID", "VALIDATE",
+ "VALIDATOR", "VALUE_P", "VALUES", "VARCHAR", "VARIADIC", "VARYING",
+ "VERBOSE", "VERSION_P", "VIEW", "VIEWS", "VOLATILE", "WHEN", "WHERE",
+ "WHITESPACE_P", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRAPPER",
+ "WRITE", "XML_P", "XMLATTRIBUTES", "XMLCONCAT", "XMLELEMENT",
+ "XMLEXISTS", "XMLFOREST", "XMLNAMESPACES", "XMLPARSE", "XMLPI",
+ "XMLROOT", "XMLSERIALIZE", "XMLTABLE", "YEAR_P", "YES_P", "ZONE",
+ "NOT_LA", "NULLS_LA", "WITH_LA", "MODE_TYPE_NAME", "MODE_PLPGSQL_EXPR",
+ "MODE_PLPGSQL_ASSIGN1", "MODE_PLPGSQL_ASSIGN2", "MODE_PLPGSQL_ASSIGN3",
+ "'<'", "'>'", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS",
+ "'['", "']'", "'('", "')'", "'.'", "','", "';'", "':'", "'{'", "'}'",
+ "$accept", "prog", "toplevel_stmt", "stmt", "CallStmt", "CreateRoleStmt",
+ "opt_with", "OptRoleList", "AlterOptRoleList", "AlterOptRoleElem",
+ "CreateOptRoleElem", "CreateUserStmt", "AlterRoleStmt",
+ "opt_in_database", "AlterRoleSetStmt", "DropRoleStmt", "CreateGroupStmt",
+ "AlterGroupStmt", "add_drop", "CreateSchemaStmt", "OptSchemaName",
+ "OptSchemaEltList", "schema_stmt", "VariableSetStmt", "set_rest",
+ "generic_set", "set_rest_more", "var_name", "var_list", "var_value",
+ "iso_level", "opt_boolean_or_string", "zone_value", "opt_encoding",
+ "NonReservedWord_or_Sconst", "VariableResetStmt", "reset_rest",
+ "generic_reset", "SetResetClause", "FunctionSetResetClause",
+ "VariableShowStmt", "ConstraintsSetStmt", "constraints_set_list",
+ "constraints_set_mode", "CheckPointStmt", "DiscardStmt",
+ "AlterTableStmt", "alter_table_cmds", "partition_cmd",
+ "index_partition_cmd", "alter_table_cmd", "alter_column_default",
+ "opt_drop_behavior", "opt_collate_clause", "alter_using",
+ "replica_identity", "reloptions", "opt_reloptions", "reloption_list",
+ "reloption_elem", "alter_identity_column_option_list",
+ "alter_identity_column_option", "PartitionBoundSpec",
+ "hash_partbound_elem", "hash_partbound", "AlterCompositeTypeStmt",
+ "alter_type_cmds", "alter_type_cmd", "ClosePortalStmt", "CopyStmt",
+ "copy_from", "opt_program", "copy_file_name", "copy_options",
+ "copy_opt_list", "copy_opt_item", "opt_binary", "copy_delimiter",
+ "opt_using", "copy_generic_opt_list", "copy_generic_opt_elem",
+ "copy_generic_opt_arg", "copy_generic_opt_arg_list",
+ "copy_generic_opt_arg_list_item", "CreateStmt", "OptTemp",
+ "OptTableElementList", "OptTypedTableElementList", "TableElementList",
+ "TypedTableElementList", "TableElement", "TypedTableElement",
+ "columnDef", "columnOptions", "column_compression",
+ "opt_column_compression", "ColQualList", "ColConstraint",
+ "ColConstraintElem", "generated_when", "ConstraintAttr",
+ "TableLikeClause", "TableLikeOptionList", "TableLikeOption",
+ "TableConstraint", "ConstraintElem", "opt_no_inherit", "opt_column_list",
+ "columnList", "columnElem", "opt_c_include", "key_match",
+ "ExclusionConstraintList", "ExclusionConstraintElem", "OptWhereClause",
+ "key_actions", "key_update", "key_delete", "key_action", "OptInherit",
+ "OptPartitionSpec", "PartitionSpec", "part_params", "part_elem",
+ "table_access_method_clause", "OptWith", "OnCommitOption",
+ "OptTableSpace", "OptConsTableSpace", "ExistingIndex", "CreateStatsStmt",
+ "stats_params", "stats_param", "AlterStatsStmt", "create_as_target",
+ "opt_with_data", "CreateMatViewStmt", "create_mv_target", "OptNoLog",
+ "RefreshMatViewStmt", "CreateSeqStmt", "AlterSeqStmt", "OptSeqOptList",
+ "OptParenthesizedSeqOptList", "SeqOptList", "SeqOptElem", "opt_by",
+ "NumericOnly", "NumericOnly_list", "CreatePLangStmt", "opt_trusted",
+ "handler_name", "opt_inline_handler", "validator_clause",
+ "opt_validator", "opt_procedural", "CreateTableSpaceStmt",
+ "OptTableSpaceOwner", "DropTableSpaceStmt", "CreateExtensionStmt",
+ "create_extension_opt_list", "create_extension_opt_item",
+ "AlterExtensionStmt", "alter_extension_opt_list",
+ "alter_extension_opt_item", "AlterExtensionContentsStmt",
+ "CreateFdwStmt", "fdw_option", "fdw_options", "opt_fdw_options",
+ "AlterFdwStmt", "create_generic_options", "generic_option_list",
+ "alter_generic_options", "alter_generic_option_list",
+ "alter_generic_option_elem", "generic_option_elem",
+ "generic_option_name", "generic_option_arg", "CreateForeignServerStmt",
+ "opt_type", "foreign_server_version", "opt_foreign_server_version",
+ "AlterForeignServerStmt", "CreateForeignTableStmt",
+ "ImportForeignSchemaStmt", "import_qualification_type",
+ "import_qualification", "CreateUserMappingStmt", "auth_ident",
+ "DropUserMappingStmt", "AlterUserMappingStmt", "CreatePolicyStmt",
+ "AlterPolicyStmt", "RowSecurityOptionalExpr",
+ "RowSecurityOptionalWithCheck", "RowSecurityDefaultToRole",
+ "RowSecurityOptionalToRole", "RowSecurityDefaultPermissive",
+ "RowSecurityDefaultForCmd", "row_security_cmd", "CreateAmStmt",
+ "am_type", "CreateTrigStmt", "TriggerActionTime", "TriggerEvents",
+ "TriggerOneEvent", "TriggerReferencing", "TriggerTransitions",
+ "TriggerTransition", "TransitionOldOrNew", "TransitionRowOrTable",
+ "TransitionRelName", "TriggerForSpec", "TriggerForOptEach",
+ "TriggerForType", "TriggerWhen", "FUNCTION_or_PROCEDURE",
+ "TriggerFuncArgs", "TriggerFuncArg", "OptConstrFromTable",
+ "ConstraintAttributeSpec", "ConstraintAttributeElem",
+ "CreateEventTrigStmt", "event_trigger_when_list",
+ "event_trigger_when_item", "event_trigger_value_list",
+ "AlterEventTrigStmt", "enable_trigger", "CreateAssertionStmt",
+ "DefineStmt", "definition", "def_list", "def_elem", "def_arg",
+ "old_aggr_definition", "old_aggr_list", "old_aggr_elem",
+ "opt_enum_val_list", "enum_val_list", "AlterEnumStmt",
+ "opt_if_not_exists", "CreateOpClassStmt", "opclass_item_list",
+ "opclass_item", "opt_default", "opt_opfamily", "opclass_purpose",
+ "opt_recheck", "CreateOpFamilyStmt", "AlterOpFamilyStmt",
+ "opclass_drop_list", "opclass_drop", "DropOpClassStmt",
+ "DropOpFamilyStmt", "DropOwnedStmt", "ReassignOwnedStmt", "DropStmt",
+ "object_type_any_name", "object_type_name", "drop_type_name",
+ "object_type_name_on_any_name", "any_name_list", "any_name", "attrs",
+ "type_name_list", "TruncateStmt", "opt_restart_seqs", "CommentStmt",
+ "comment_text", "SecLabelStmt", "opt_provider", "security_label",
+ "FetchStmt", "fetch_args", "from_in", "opt_from_in", "GrantStmt",
+ "RevokeStmt", "privileges", "privilege_list", "privilege",
+ "privilege_target", "grantee_list", "grantee", "opt_grant_grant_option",
+ "GrantRoleStmt", "RevokeRoleStmt", "opt_grant_admin_option",
+ "opt_granted_by", "AlterDefaultPrivilegesStmt", "DefACLOptionList",
+ "DefACLOption", "DefACLAction", "defacl_privilege_target", "IndexStmt",
+ "opt_unique", "opt_concurrently", "opt_index_name",
+ "access_method_clause", "index_params", "index_elem_options",
+ "index_elem", "opt_include", "index_including_params", "opt_collate",
+ "opt_class", "opt_asc_desc", "opt_nulls_order", "CreateFunctionStmt",
+ "opt_or_replace", "func_args", "func_args_list",
+ "function_with_argtypes_list", "function_with_argtypes",
+ "func_args_with_defaults", "func_args_with_defaults_list", "func_arg",
+ "arg_class", "param_name", "func_return", "func_type",
+ "func_arg_with_default", "aggr_arg", "aggr_args", "aggr_args_list",
+ "aggregate_with_argtypes", "aggregate_with_argtypes_list",
+ "opt_createfunc_opt_list", "createfunc_opt_list", "common_func_opt_item",
+ "createfunc_opt_item", "func_as", "ReturnStmt", "opt_routine_body",
+ "routine_body_stmt_list", "routine_body_stmt", "transform_type_list",
+ "opt_definition", "table_func_column", "table_func_column_list",
+ "AlterFunctionStmt", "alterfunc_opt_list", "opt_restrict",
+ "RemoveFuncStmt", "RemoveAggrStmt", "RemoveOperStmt", "oper_argtypes",
+ "any_operator", "operator_with_argtypes_list", "operator_with_argtypes",
+ "DoStmt", "dostmt_opt_list", "dostmt_opt_item", "CreateCastStmt",
+ "cast_context", "DropCastStmt", "opt_if_exists", "CreateTransformStmt",
+ "transform_element_list", "DropTransformStmt", "ReindexStmt",
+ "reindex_target_type", "reindex_target_multitable", "AlterTblSpcStmt",
+ "RenameStmt", "opt_column", "opt_set_data", "AlterObjectDependsStmt",
+ "opt_no", "AlterObjectSchemaStmt", "AlterOperatorStmt",
+ "operator_def_list", "operator_def_elem", "operator_def_arg",
+ "AlterTypeStmt", "AlterOwnerStmt", "CreatePublicationStmt",
+ "opt_publication_for_tables", "publication_for_tables",
+ "AlterPublicationStmt", "CreateSubscriptionStmt",
+ "AlterSubscriptionStmt", "DropSubscriptionStmt", "RuleStmt",
+ "RuleActionList", "RuleActionMulti", "RuleActionStmt",
+ "RuleActionStmtOrEmpty", "event", "opt_instead", "NotifyStmt",
+ "notify_payload", "ListenStmt", "UnlistenStmt", "TransactionStmt",
+ "TransactionStmtLegacy", "opt_transaction", "transaction_mode_item",
+ "transaction_mode_list", "transaction_mode_list_or_empty",
+ "opt_transaction_chain", "ViewStmt", "opt_check_option", "LoadStmt",
+ "CreatedbStmt", "createdb_opt_list", "createdb_opt_items",
+ "createdb_opt_item", "createdb_opt_name", "opt_equal",
+ "AlterDatabaseStmt", "AlterDatabaseSetStmt", "DropdbStmt",
+ "drop_option_list", "drop_option", "AlterCollationStmt",
+ "AlterSystemStmt", "CreateDomainStmt", "AlterDomainStmt", "opt_as",
+ "AlterTSDictionaryStmt", "AlterTSConfigurationStmt", "any_with",
+ "CreateConversionStmt", "ClusterStmt", "cluster_index_specification",
+ "VacuumStmt", "AnalyzeStmt", "utility_option_list", "analyze_keyword",
+ "utility_option_elem", "utility_option_name", "utility_option_arg",
+ "opt_analyze", "opt_verbose", "opt_full", "opt_freeze", "opt_name_list",
+ "vacuum_relation", "vacuum_relation_list", "opt_vacuum_relation_list",
+ "ExplainStmt", "ExplainableStmt", "PrepareStmt", "prep_type_clause",
+ "PreparableStmt", "ExecuteStmt", "execute_param_clause", "InsertStmt",
+ "insert_target", "insert_rest", "override_kind", "insert_column_list",
+ "insert_column_item", "opt_on_conflict", "opt_conf_expr",
+ "returning_clause", "DeleteStmt", "using_clause", "LockStmt", "opt_lock",
+ "lock_type", "opt_nowait", "opt_nowait_or_skip", "UpdateStmt",
+ "set_clause_list", "set_clause", "set_target", "set_target_list",
+ "DeclareCursorStmt", "cursor_name", "cursor_options", "opt_hold",
+ "SelectStmt", "select_with_parens", "select_no_parens", "select_clause",
+ "simple_select", "with_clause", "cte_list", "common_table_expr",
+ "opt_materialized", "opt_search_clause", "opt_cycle_clause",
+ "opt_with_clause", "into_clause", "OptTempTableName", "opt_table",
+ "set_quantifier", "distinct_clause", "opt_all_clause", "opt_sort_clause",
+ "sort_clause", "sortby_list", "sortby", "select_limit",
+ "opt_select_limit", "limit_clause", "offset_clause",
+ "select_limit_value", "select_offset_value", "select_fetch_first_value",
+ "I_or_F_const", "row_or_rows", "first_or_next", "group_clause",
+ "group_by_list", "group_by_item", "empty_grouping_set", "rollup_clause",
+ "cube_clause", "grouping_sets_clause", "having_clause",
+ "for_locking_clause", "opt_for_locking_clause", "for_locking_items",
+ "for_locking_item", "for_locking_strength", "locked_rels_list",
+ "values_clause", "from_clause", "from_list", "table_ref", "joined_table",
+ "alias_clause", "opt_alias_clause", "opt_alias_clause_for_join_using",
+ "func_alias_clause", "join_type", "opt_outer", "join_qual",
+ "relation_expr", "relation_expr_list", "relation_expr_opt_alias",
+ "tablesample_clause", "opt_repeatable_clause", "func_table",
+ "rowsfrom_item", "rowsfrom_list", "opt_col_def_list", "opt_ordinality",
+ "where_clause", "where_or_current_clause", "OptTableFuncElementList",
+ "TableFuncElementList", "TableFuncElement", "xmltable",
+ "xmltable_column_list", "xmltable_column_el",
+ "xmltable_column_option_list", "xmltable_column_option_el",
+ "xml_namespace_list", "xml_namespace_el", "Typename", "opt_array_bounds",
+ "SimpleTypename", "ConstTypename", "GenericType", "opt_type_modifiers",
+ "Numeric", "opt_float", "Bit", "ConstBit", "BitWithLength",
+ "BitWithoutLength", "Character", "ConstCharacter", "CharacterWithLength",
+ "CharacterWithoutLength", "character", "opt_varying", "ConstDatetime",
+ "ConstInterval", "opt_timezone", "opt_interval", "interval_second",
+ "a_expr", "b_expr", "c_expr", "func_application", "func_expr",
+ "func_expr_windowless", "func_expr_common_subexpr", "xml_root_version",
+ "opt_xml_root_standalone", "xml_attributes", "xml_attribute_list",
+ "xml_attribute_el", "document_or_content", "xml_whitespace_option",
+ "xmlexists_argument", "xml_passing_mech", "within_group_clause",
+ "filter_clause", "window_clause", "window_definition_list",
+ "window_definition", "over_clause", "window_specification",
+ "opt_existing_window_name", "opt_partition_clause", "opt_frame_clause",
+ "frame_extent", "frame_bound", "opt_window_exclusion_clause", "row",
+ "explicit_row", "implicit_row", "sub_type", "all_Op", "MathOp",
+ "qual_Op", "qual_all_Op", "subquery_Op", "expr_list", "func_arg_list",
+ "func_arg_expr", "func_arg_list_opt", "type_list", "array_expr",
+ "array_expr_list", "extract_list", "extract_arg", "unicode_normal_form",
+ "overlay_list", "position_list", "substr_list", "trim_list", "in_expr",
+ "case_expr", "when_clause_list", "when_clause", "case_default",
+ "case_arg", "columnref", "indirection_el", "opt_slice_bound",
+ "indirection", "opt_indirection", "opt_asymmetric", "opt_target_list",
+ "target_list", "target_el", "qualified_name_list", "qualified_name",
+ "name_list", "name", "attr_name", "file_name", "func_name", "AexprConst",
+ "Iconst", "SignedIconst", "RoleId", "RoleSpec", "role_list",
+ "NonReservedWord", "BareColLabel", "unreserved_keyword",
+ "col_name_keyword", "type_func_name_keyword", "reserved_keyword",
+ "bare_label_keyword", "statements", "statement", "CreateAsStmt", "$@1",
+ "$@2", "at", "ECPGConnect", "connection_target", "opt_database_name",
+ "db_prefix", "server", "opt_server", "server_name", "opt_port",
+ "opt_connection_name", "opt_user", "ora_user", "user_name",
+ "char_variable", "opt_options", "connect_options", "opt_opt_value",
+ "prepared_name", "ECPGDeclareStmt", "ECPGCursorStmt",
+ "ECPGExecuteImmediateStmt", "ECPGVarDeclaration",
+ "single_vt_declaration", "precision", "opt_scale", "ecpg_interval",
+ "ECPGDeclaration", "$@3", "sql_startdeclare", "sql_enddeclare",
+ "var_type_declarations", "vt_declarations", "variable_declarations",
+ "type_declaration", "$@4", "var_declaration", "$@5", "$@6",
+ "opt_bit_field", "storage_declaration", "storage_clause",
+ "storage_modifier", "var_type", "enum_type", "enum_definition",
+ "struct_union_type_with_symbol", "$@7", "struct_union_type", "$@8",
+ "s_struct_union_symbol", "s_struct_union", "simple_type",
+ "unsigned_type", "signed_type", "opt_signed", "variable_list",
+ "variable", "opt_initializer", "opt_pointer", "ECPGDeclare",
+ "ECPGDisconnect", "dis_name", "connection_object", "execstring",
+ "ECPGFree", "ECPGOpen", "opt_ecpg_using", "ecpg_using",
+ "using_descriptor", "into_descriptor", "into_sqlda", "using_list",
+ "UsingValue", "UsingConst", "ECPGDescribe", "opt_output",
+ "ECPGAllocateDescr", "ECPGDeallocateDescr", "ECPGGetDescriptorHeader",
+ "ECPGGetDescHeaderItems", "ECPGGetDescHeaderItem",
+ "ECPGSetDescriptorHeader", "ECPGSetDescHeaderItems",
+ "ECPGSetDescHeaderItem", "IntConstVar", "desc_header_item",
+ "ECPGGetDescriptor", "ECPGGetDescItems", "ECPGGetDescItem",
+ "ECPGSetDescriptor", "ECPGSetDescItems", "ECPGSetDescItem",
+ "AllConstVar", "descriptor_item", "ECPGSetAutocommit", "on_off",
+ "ECPGSetConnection", "ECPGTypedef", "$@9", "opt_reference", "ECPGVar",
+ "$@10", "ECPGWhenever", "action", "ECPGKeywords", "ECPGKeywords_vanames",
+ "ECPGKeywords_rest", "ECPGTypeName", "symbol", "ECPGColId", "ColId",
+ "type_function_name", "ColLabel", "ECPGColLabel", "ECPGColLabelCommon",
+ "ECPGCKeywords", "all_unreserved_keyword", "ECPGunreserved_interval",
+ "into_list", "ecpgstart", "c_args", "coutputvariable", "civarind",
+ "char_civar", "civar", "indicator", "cvariable", "ecpg_param",
+ "ecpg_bconst", "ecpg_fconst", "ecpg_sconst", "ecpg_xconst", "ecpg_ident",
+ "quoted_ident_stringvar", "c_stuff_item", "c_stuff", "c_list", "c_term",
+ "c_thing", "c_anything", "DeallocateStmt", "Iresult", "execute_rest",
+ "ecpg_into", "opt_ecpg_into", "ecpg_fetch_into", "opt_ecpg_fetch_into", YY_NULLPTR
+};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
+#endif
+
+#ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_int16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ 755, 756, 757, 758, 759, 760, 761, 762, 763, 764,
+ 765, 766, 767, 768, 769, 770, 771, 772, 773, 774,
+ 775, 776, 777, 778, 779, 780, 781, 782, 783, 784,
+ 785, 786, 787, 788, 789, 790, 791, 792, 793, 794,
+ 795, 796, 797, 798, 799, 800, 801, 802, 803, 804,
+ 805, 806, 807, 808, 809, 60, 62, 61, 43, 45,
+ 42, 47, 37, 94, 810, 91, 93, 40, 41, 46,
+ 44, 59, 58, 123, 125
+};
+#endif
+
+#define YYPACT_NINF (-5912)
+
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
+
+#define YYTABLE_NINF (-3465)
+
+#define yytable_value_is_error(Yyn) \
+ ((Yyn) == YYTABLE_NINF)
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const int yypact[] =
+{
+ -5912, 1049, 14899, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, 38848, -5912, -5912, -5912, -5912, -5912,135029,
+ 1146, -5912, -5912,140487, -5912, -5912, -5912, 1054, 91749, -5912,
+ 95536, 1177, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ 99864, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ 77664, 1327, -5912, 586, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, 1274, 19807, -5912, -5912, 96077, -5912, 694, -5912, -5912,
+ -5912, -5912, -5912, 79832, -5912, -5912, 96618, 1527, -5912, -5912,
+ 890, 1638, -5912, 176, 19557, -5912, -5912, 97159, 92831, -5912,
+ -5912,100405, 630, 954, 11061, 1274, 38304,100946, -5912, 1153,
+ -5912, 73860, -5912, -5912, -5912, 92290, -5912, -5912, -5912, 1019,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ 108520, 1519, 1306, 74402, -5912, -5912, -5912, -5912, -5912,108520,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,101487,
+ -5912, 1500, 1590, 517,109061,109602, 90126, -5912, 1656, -5912,
+ 108520, 1725, 445, 76580, -5912,110143, -5912, -5912, 1602, -5912,
+ 102028, -5912, -5912, -5912, -5912, -5912, 1306, -5912, 77664, 72774,
+ 345, 1622, -5912, -5912,110684, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912,108520, 2108, 1645, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, 1532, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, 802, -5912, 948, 1110, 1598, 843, 1706,
+ -5912, -5912, -5912, 21088, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912,136643, 2387, -5912, -5912, -5912, 1659, -5912, 1792,
+ -5912, -5912, -5912, 1456, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, 756, -5912, -5912, -5912, -5912, 2358,135567, 99864, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 93372, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 252, -5912,
+ -5912, -5912, -5912, -5912, 99864, 99864, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, 99864, 1785, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, 1032, 2137, -5912, -5912, 77664, 2448, 2448,
+ 2509,136643, -5912, -5912, 2398, 79832,108520,108520,108520, 2076,
+ 108520, 2079,108520, 534, 79832,143815,102569, 2209, 2063, 67781,
+ 111225, -5912, 79832,108520,141440, 79832,108520,108520,111766,108520,
+ 112307,108520, 1472, 97700,108520, 2160,108520,108520,141915,112848,
+ 2314, -5912, 2591, 1583, -5912, 2068, -5912, 226, -5912, 2135,
+ -5912, 256, 267, 303, -5912, -5912, -5912,146190,108520, 10218,
+ 1519, 2398, -5912, 2108,108520, 2330,108520, 2091,113389,108520,
+ -5912,108520, 2176,113930, 844, 2248,143815, 2286, 68339, 2263,
+ 108520,108520,143815,114471,115012,115553,108520,108520, -5912, -5912,
+ 2250,108520, -5912, 2383,144290, 1408, 2391, 2575, 2424, 967,
+ -5912, -5912, 2651, 2186, -5912, -5912, 2704, 99864, -5912, 98241,
+ -5912, -5912, -5912, 2632, -5912, 2344, 2349, 2364, -5912, -5912,
+ -5912, -5912, -5912,147140, 954, -5912, -5912, 2519, 80374, 2582,
+ -5912, -5912,116094, 85252, 2339, -5912, 866, 80916,144765, 2689,
+ 2345, 68897, 2744, -5912, 81458, -5912,145240, 82000, -5912, -5912,
+ -5912, -5912, -5912,116635, -5912,117176, 2453, 2582, -5912, 85794,
+ 145715, -5912, 2595,117717,118258,118799, 2398, 14804, -5912, 2328,
+ 496, 2385, 1414, 99864, 99864, 1270,137596, -5912, -5912, 2389,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 408, 1823,
+ 74944, 800, 75486, -5912, -5912, 1008, 1255, 1334, 408, 2840,
+ 2840, 185, 99864, -5912, -5912, 1823, -5912, 149, 742, 2404,
+ 2404, 2404, 2563, 57, -5912, 2404, 2565, -5912, -5912, -5912,
+ -5912,102028, 74944, 75486, -5912, 2436, 1519, 164, 2884, 2497,
+ -5912, -5912, -5912, -5912, -5912,146190, 2877, 2877,108520, -5912,
+ -5912, -5912, 2923, 2501, 2772, -5912, 2521, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, 2740, 2748, 2726, 167,
+ 1519, 294, -5912, 2864, -5912, 2762, 46684, 46684, 1427, 99864,
+ 1519, 76028,103110,130701, 233,147140, 1519,119340, 2577, 1549,
+ 2781, -5912, -5912, -5912, 711, -5912, 3012, 2593, 2852, 414,
+ 1583, 64485, -5912, 2583, 2135,102028, 24112, -5912, -5912, -5912,
+ -5912,146190, 2912, 51188,108520, 2597, -5912, 2599, 2597, 2608,
+ 2609, 1598, -5912,146190,108520, 1626, 1626, 3053, 1626, 1611,
+ 1849, -5912, 2069, -5912, 2940, 2902,102028, 2627, 1274, 2630,
+ -5912, -5912, -5912, 2638, -5912, 2670, 2705, -5912, 1077, 2950,
+ -5912, -5912, -5912, -5912, 2799, 2809, 2816, 2819, 2688, 2824,
+ 378, -5912, -5912, -5912, -5912, 3099, -5912, -5912, -5912, -5912,
+ -5912, -5912, 3188, 3190,140965,140965, 878, 894, 240, 269,
+ -5912, -5912, -5912, 3043, -5912, -5912, 3045, 2853,108520, -5912,
+ -5912,108520, -5912,119881, -5912, -5912, 2448, 2638, 335, -5912,
+ 1813, 2782, 2041, 2771, 1863, 1337, -5912, 601,108520, 271,
+ 2823,103651, 4265, 2790, 2791, 2135, 2956, 418, 3110, 3162,
+ 6806, 378,104192, -5912, -5912, -5912, -5912,108520,108520, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 2849, 1634,
+ -5912, -5912, 2817, 3167, 3040, 7585, 1357, 3153, 3018, 1595,
+ 8460, 3066, 186, 3205, 14931, 1618, 3206, 2044, 2051,120422,
+ 131242, 3164, 3208, 5257, 1789, 938, 3078, 1425, 3153, 3196,
+ 3026, 1595, 3212, 4487,108520, 2865, -5912, 3136, 3250, 129,
+ -5912, 246, -5912, 39947, 51188, 71688, -5912, 2135, 2150, -5912,
+ -5912,139530, -5912, 2934, 3088, 885, 79832, 2878,108520,108520,
+ -5912, 86336, 79832, -5912, 3096, 69455, 79832, -5912, 79832, -5912,
+ -5912, 3209, 86336,108520,108520, -5912,108520, -5912, -5912, 2880,
+ -5912, -5912, -5912, -5912, 2404,108520, 3308, 86336, 3111, 187,
+ 1759, 3344,108520, 3114, 1759, 2924,120963, -5912, -5912, 1759,
+ -5912, -5912,108520,108520, 2889, 1891, 3103, 3221, 1759, 3120,
+ 3343, 3348, 3127, 2974, 3130, 2599, 3311, 3104, 947, 201,
+ 2067, 1759, 2953,121504,122045,108520, 2957,108520, 2877, 79832,
+ 2989, 79832, 79832,108520, 3244,108520, -5912, 3093,104733, -5912,
+ 2913, 2651, -5912, -5912, -5912, -5912, -5912, 1708, -5912, -5912,
+ -5912, -5912, -5912, -5912, 3266, -5912, 205, 3267, 2925, 3268,
+ 1786, -5912, 2977, -5912, 2977, 2977, 2928, 2928, 3115, 2929,
+ 3275, -5912, -5912, -5912, 1374, 2977, 2928, -5912, 87420, -5912,
+ 1701, 2010, -5912, 268, -5912, 3394, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, 2935, -5912, 1247, -5912, 2253, -5912,
+ -5912, -5912, -5912, 2971, -5912, 3280, 291, -5912, 3283, -5912,
+ 2937,122586, -5912,123127,123668, 3285, 344, -5912,143815, 3289,
+ 291, 3290, 2937, 3291, 291, 3293, 879, 3294, -5912, 1370,
+ 3282, 3297, 268, 3300, 2213, 2937, -5912, 3304, 392, -5912,
+ 3306, 398, -5912, 3309, 3177, -5912, 10828, 14804, -5912, 16292,
+ 2132, -5912, -5912, -5912, -5912, -5912, -5912, 51188, 941, 3062,
+ -5912, -5912, 2212, 1270, 1823, -5912, 99864, 1823, 99864, 185,
+ 1823, 99864, 1823, 99864, 185, 1823, 99864, 99864, 99864, 1823,
+ -5912, -5912, 327, 311, -5912, -5912, -5912, -5912, -5912, 99864,
+ 2968,108520,108520, -5912, -5912, -5912, 93913,143815, 94454, -5912,
+ 108520, -5912, 154, 99864, -5912, 99864, -5912, 1519, -5912, -5912,
+ 496, 86336, 3429,143815, 2877, 2258, -5912,108520,108520, -5912,
+ -5912, -5912, 3235,108520, 3302, 3303, 93913,143815, -5912,124209,
+ -5912,147140, 3187, 2975, -5912, -5912, -5912, -5912, 2273, 3467,
+ 231, 3468, 51188, 2978, 231, 231, 2980, 3312, -5912, -5912,
+ -5912, 305, 2981, 2983, -5912, 244, 244, -5912, 2984, 2985,
+ -5912, 254, 2986, 2988, 3480, 275, 2990, 2991, 2992, 1374,
+ 231, 2993, 51188, -5912, 2995, 244, 2996, 2997, 2998, 3490,
+ 3000, -5912, 3492, 3002, 287, 302, 3003, 3006, -5912, 2984,
+ -5912, 298, 3009, 3010, 3021, 3022, 3024, 3025, 3031, 3032,
+ 51188, 51188, 51188, -5912, 43869, 2135, 1519, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 306,138077, -5912, 3063, -5912,
+ -5912, 3227, -5912, -5912, 51188, -5912, -5912, 142, -5912, 316,
+ -5912, -5912, 2135, -5912, -5912, 532, -5912, -5912, -5912, -5912,
+ -5912, 3316, 3034, 2378, 2378, 276, -5912, 96077, 96077, -5912,
+ -5912, 358, 3035, -5912, 2367, -5912, -5912, -5912, -5912, -5912,
+ -5912,146665, 3499, -5912, 364, 1519, 246, 2133, 3436,138572,
+ 139051, 3324, 3324, 3314, -5912, -5912,108520, -5912, -5912, 2135,
+ 183, 3325, 2281, -5912, 2389, 19273, 2282, 2597,108520,108520,
+ 3507, -5912, -5912, 2288, -5912, 3047, -5912, 2599, -5912, -5912,
+ 1598, 1598, 51188, 1598, 293, 1828, 47247, 51751, 3381, 3269,
+ 1629, 1579, 3382, -5912, 3273, 1611, 1849,102028,108520,124750,
+ 3181, 51188, -5912, 2638, 3064, 2142, -5912, 88503,136105,136105,
+ 3345, -5912, -5912, 962, 1475, 3192, 3307, 2840, 827, 1933,
+ 1933, -5912, -5912, 3056, -5912, 3443, 96077, 3125,140965, -5912,
+ -5912,108520, -5912, -5912,105274, -5912, -5912, -5912, 499, 3065,
+ -5912, 3075,108520, 3620, 1933, 1933, -5912, -5912, 3077, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912,136643,108520, -5912,
+ 3067, 3082, 3074, 3083, -5912, 24112, -5912, 3511, 3168, 3170,
+ 3226, 72231, -5912, 3173, 3139, 3175, 3230, 77664, 3091, 3179,
+ 3180, 3236, 3360, -5912, -5912, 3183, 3184,131783, -5912, -5912,
+ 943, -5912, -5912, -5912, 943, -5912, 3112, -5912, 1516, 1092,
+ 1465, 3185, 438, 1069, 3510, -5912, 1410, -5912, -5912, 3242,
+ -5912, 7183,108520, 3449, 7507, 3319, 378, 3240, -5912, -5912,
+ -5912, 3376, 3193,108520, 3195, 3335, 378, 341,132324, -5912,
+ -5912,108520, -5912, -5912, -5912, -5912, 6353, 3485, 42767, -5912,
+ 2037, 3199, 3182, 3213,108520, 89044, 2066, 3317, 3329, 2127,
+ 2130, 647, 3270,108520, 1809, 3347,108520, 3126, 3211, 3215,
+ 3440, 3135, 1362, 3544, 3137, -5912, -5912, -5912, 3509, 3336,
+ 3442, 3486, 7832, 3203, 3207, 83626, -5912, 3229, 94, 70013,
+ 108520,108520, 3232, 3233,132865, 6353, 3517, 3246, 3248, 3237,
+ 3238, 54, 3540, 2035, 3241, -5912, -5912, -5912, 2035, 3243,
+ 3245,133406, 6353, 3527,108520, 3247, 3249,108520, 87420, 378,
+ -5912, 3599, 378, 378, 2179, 3601, 3251, 416, 3401, 1284,
+ 1759, 3137, 2827, -5912, 3252, 3253, 958, -5912, 3373,108520,
+ 3254, 3255, 1824, 3340, 1519, -5912, 3346, -5912, 3259, 3350,
+ 3262, 99, -5912, -5912, 1402, 3272,102028, 3374, 3375, 1809,
+ 388, 1729, 3137, -5912, 3264, 3278, 3135, 3135,108520,108520,
+ 108520,108520,108520, 250, 3635, 3639, 3279, 251, 1325, 3194,
+ -5912, 2035,142390, 3286, -5912, 2035,108520, 262, 1984, 3137,
+ 1836, -5912, 2065, -5912, -5912, -5912, 1583, -5912, 51188, 51188,
+ 51188, 3197, -5912, 2746, 19273, 104, -5912, 323, 15585, 3191,
+ -5912, -5912, -5912, -5912,108520,146190, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912,108520, -5912,108520, 3478, 86336, 3484, 3421,
+ 3488, 3489, 378,108520,108520, 3491, 3493, 3494, 86336, 3498,
+ 3500, 3502, 3424, 3310, 213, 3287, 3220, 3685, 3572,108520,
+ 77664, -5912, 943, -5912, 86336, 3444, 3574, -5912,108520, 3460,
+ 116, -5912, 3612, 3295, -5912, -5912, 115,108520, 314, 3277,
+ -5912, -5912, 3581,143815, 1336, 3582, 1519, 3288, 3585, 3455,
+ 1519,143815, 3503,108520,108520,108520,108520, 285, -5912,142390,
+ 3471, -5912,108520, 3473, 2827, 3475, 3709, 1000, 2404,125291,
+ 3583,125832, 3256,108520, 3257, 3257, 3711, 86336, 384, 3525,
+ -5912, -5912, 3258, 2840, -5912, 2913, -5912, -5912, 2337, -5912,
+ 3390, -5912, 79832, -5912, -5912, 79832, -5912, -5912, 86336,108520,
+ 3261, -5912, 3263, -5912, -5912, 51188, -5912, -5912, -5912, 2840,
+ -5912, 86336, 2977, 2977, -5912, -5912, 3716, 3351, 3352, 2840,
+ -5912, 2840, -5912, 86336, -5912, 3260, 3274, 2840, 3354, -5912,
+ 3355, 2840, -5912, 2301, -5912, -5912, 79832, 79832, -5912,143815,
+ 143815, 3603, 392, 3606, 3327, 3608, 3328, 70013, 70013, -5912,
+ 400, 79832, -5912,143815, 79832, -5912,108520, -5912,108520, -5912,
+ -5912, -5912, -5912, 86336, 86336, -5912,143815,142390, 3617,108520,
+ 108520, -5912,108520,108520, -5912,108520,108520, -5912, 15495, 2190,
+ -5912, 14804, -5912, 2316, 3324, -5912, 1785,126373, 1893, 1270,
+ -5912, 99864, -5912, 99864, 185, -5912, -5912, 99864, -5912, 99864,
+ 185, -5912, 99864, -5912, -5912, -5912, 99864,108520, 3828, 3276,
+ -5912, 532, -5912,108520, 2326, -5912, -5912, 2334, 1926,108520,
+ 108520, 973, 79832,108520, 3504, 79832, 79832,108520,108520,108520,
+ 108520,108520, 3359, 3035, 1570, -5912, 1543, 658,102028, 3505,
+ -5912, -5912, -5912, -5912, -5912, 2350, 2108, 643,108520, 927,
+ -5912, -5912, -5912, -5912, 94454, 92290, 3611, 368,108520, -5912,
+ -5912, 7275, 51188, 46121, -5912, -5912, 19273, 3332, 51188, 51188,
+ 3298, 2840, 2840, -5912, 951, 51188, 51188, 51188, 2840, 2840,
+ 51188, 3670, 51188, 70013, 51188, 55129, 41075, 51188, 51188, 44432,
+ -5912, 51188, 3526, 56255, 51188, 2133, 3531, 51188, 2133, 3670,
+ 3773, 3773, 1622, 1746, 7858, 3292, 2135, -5912, 2840, 821,
+ 353, 86336, 51188, 51188, 51188, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 51188,
+ -5912, 77664, -5912, -5912, -5912, -5912, -5912, -5912, 3379, -5912,
+ -5912, -5912, -5912, -5912, -5912, 5705, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,108520,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, 44995, -5912, -5912, -5912, -5912, 3299, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, 2402, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, 45558, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ 3301, -5912, -5912, 51188, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 3378, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, 956, 51188, 51188, 51188,
+ 51188, 51188, 51188, 51188, 51188, 51188, -5912, 51188, 356, -5912,
+ -5912, -5912, 3613, 3625, 85, 642, 94995, 46684, 3627, -5912,
+ 39947, -5912, 227, 99864, -5912, -5912, 2135, 3627, -5912, -5912,
+ -5912, -5912, -5912, 499, 3313, -5912, 3315, -5912, -5912, -5912,
+ -5912, -5912,108520, 3499, -5912, -5912, 3385, -5912, -5912, -5912,
+ -5912, 326, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ 3318, -5912, -5912, -5912, -5912, 3318, -5912, -5912, 3324, 3305,
+ 3615, 3618, 879,136643,108520, 2752, 51188, 3379, 283,108520,
+ 51188, 3299, 2402, 51188, 3301, 51188, 3378, -5912, 51188, -5912,
+ 2354, 2230,108520,108520, -5912, 3587, -5912, 3320, -5912, 15679,
+ 3587, -5912, -5912, 55692, 3433, 3588, 3524, -5912, -5912, -5912,
+ 3321, 19273, 51188, 51188, -5912, 2484, 19273, 2507, -5912, -5912,
+ -5912, -5912, -5912, -5912, 1411, -5912,108520, 726, 3381, 1579,
+ 3377, 1485, 3774,108520, -5912, 65028, 2360, 2289, -5912, 2638,
+ -5912, -5912, 37470, -5912, 39402, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, 3326, -5912, -5912, -5912, -5912, -5912,
+ 378, 3330, 3854, -5912,140965, -5912, -5912, -5912, 3828, -5912,
+ 2704, -5912, 2704, 3880, -5912, 99864, -5912, -5912, -5912, -5912,
+ 371, -5912, -5912, 14804, 14804, -5912, -5912,143815,108520,108520,
+ 3529, -5912, 3765, -5912, 87420, -5912, 3331, -5912, 86878, 82542,
+ -5912, -5912, 952, -5912, 1141,143815, -5912,108520,108520, -5912,
+ 77664,143815,108520,108520, -5912,143815,108520,108520, -5912, -5912,
+ -5912, -5912, -5912,140009, 1506, 92290, 3466, 90667, -5912, -5912,
+ 3334,108520, 3389, 3605, 3610, 44, -5912, -5912,126914, -5912,
+ 3559,143815,108520,108520, 51188, 3561,108520,108520, -5912, 324,
+ 3423, 3426, -5912,108520, 3427, 79832, 3349, 86336, 79832, 70571,
+ 79832, 79832, 3674, 86336,108520,108520, 861,102028, 266, 1986,
+ 3137, 3570, -5912, 921, -5912,143815, -5912,108520, 3565, -5912,
+ -5912, -5912,105815, 3798, 3469, -5912, -5912, -5912,133947, -5912,
+ -5912, 3567, -5912, 2361, -5912,143815,143815,108520, 8028,127455,
+ 984, 3584, -5912, -5912, 86336, -5912,108520,106356,108520,108520,
+ 3622,108520, 98782,127996,128537, 1719, 1761, 3623,108520, 99323,
+ 3624, -5912, 3497,108520, -5912, -5912, 78206,143815,108520, 1137,
+ 77664, -5912, -5912,108520, -5912, 893, -5912,108520, 5028, 3573,
+ 3445, 3456,108520, 346, 1994, 3137, 3733,108520,108520, 3362,
+ 2371,143815,108520, 77664, -5912, 3580, 1474,143815,108520,105815,
+ -5912, 3589,102028,102028,143815,108520,102028, -5912,108520,130701,
+ -5912,143815, 357, -5912,143815,108520,105815, -5912, 3590, 3530,
+ 143815,108520, 17708, -5912, -5912, -5912, 378, -5912, -5912, -5912,
+ -5912, -5912,108520,108520, 378,108520,108520, 378, 1778, -5912,
+ 143815,108520, -5912, -5912, -5912, 3506,143815,108520,108520, 408,
+ 108520, -5912,108520,143815, 3277,108520,108520, -5912,108520, 5805,
+ 108520,108520,108520,108520,108520,108520,143815,108520, -5912, -5912,
+ 1577, 1597, 1762, 1985, 1593,108520, 3675,108520,129078,143815,
+ 108520,108520, 1519,108520, 77664, 1774, -5912, -5912, 3508, -5912,
+ 143815, 357, -5912, 8582,108520,108520,108520, 3458, 3459, 264,
+ 3550, -5912, -5912, -5912, 734, 734, 3591, -5912, 51188, 51188,
+ 47810, 3392, -5912, -5912, 51188, 2934, -5912, -5912, -5912, 1020,
+ 3850, 1020,129619, 1020, 1020, 3673, 3461, 3462, 1020, 1020,
+ 1020, 3668, 1020, 1020, 1020,108520, 3571, -5912, -5912, 3571,
+ 204, 51188, 86336,108520, -5912, 2375, -5912, 3408, -5912, -5912,
+ 77664,108520, 292, 786, 3743, 3626, 89585, 3102, 3730,108520,
+ 3457,108520, 3867, 3518,102028, 2889, -5912, 3102,108520, -5912,
+ 1699, 92290, -5912, -5912, -5912, -5912, -5912, -5912, -5912,108520,
+ -5912, -5912, 3738,108520, 59005, 3586, -5912, 1519, 2889, 2889,
+ 2889, 2889, 3411, 2889,108520, 3541, 3759, 3102, 3416, 3766,
+ -5912, 2827, 3769, 3771,108520, 3645, 89585, 3495, 3470, 3656,
+ 3890, 2404, 1519, 3659, 3646, -5912, 72231, -5912, 2889, 3903,
+ 43318, 6315, 6498, 3647, 3710, -5912, -5912, 3660, 830,108520,
+ 104733, -5912, 3447, 3753, 3754, 3776, -5912, 205, -5912, 3907,
+ 1853, 3778, 51188, 2376, 3450, 268, -5912, -5912, 3452, 3274,
+ 3476, 3477, 3451, 3453, -5912, 2840, 63392, 3464, 1322, 3702,
+ 3465, -5912, 291, -5912, 2937, -5912,108520, -5912,108520,108520,
+ 108520,108520, 344, -5912, -5912, 291, 2937, 291, 879, -5912,
+ 3731, 268, 2937, 3596, 3790, 392, -5912, 398, -5912, 3676,
+ 879, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 3690, 2404,
+ 2337, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, 99864, 2704, -5912, 2380, -5912,108520, -5912, 3770, 3772,
+ 3775, 3777, 3779, 3472, 3479, 3516,108520, 3481, 3472, 378,
+ 3481, 3481, 3472, 3035, 3035, 3472, 3479,142865, 3942, 3799,
+ -5912, 3564, 3487, 3810, 877, -5912, 910, 113, 3734, -5912,
+ -5912, -5912, -5912, 86336, -5912,143815, 3532, 2877, 2877, 168,
+ 3705, 3496,142865, 3928, 879, -5912, 79832,108520, 86336, 79832,
+ 3712, 79832, 79832, 86336,108520,108520, 2381, -5912, 2200, -5912,
+ 2215, 51188, 458, -5912, 16656, 2390, 51188, 3501, 3512, -5912,
+ -5912, -5912, -5912, -5912, -5912, 3513, 3819, -5912, -5912, 2419,
+ 2423, 2434, 3514, 3515, 5824, 6591, 3519, 16905, 3522, 3520,
+ 3521, 3528, 55129, 55129, 43869, 1127, -5912, 55129, 3535, 3696,
+ 2435, 15833, 3536, 3539, 17081, 48373, 51188, 48373, 48373, 17182,
+ 3523, 3545, 2445, 77664, 3689, 17211, 2449, -5912, 51188, 77664,
+ 6968, 51188, -5912, 51188, 3546, -5912, -5912, 3081, 3081, 3081,
+ 3670, -5912, 3533, -5912, 55129, 55129, -5912, 2506, 43869, -5912,
+ -5912, 3823, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 2581,
+ -5912, -5912, -5912, 3729, 4373, 70013, 3597, 51188, 289, 51188,
+ 3299, 51188, 3595, 3081, 3081, 3081, 431, 431, 313, 313,
+ 313, 2187, 642, -5912, -5912, -5912, 3548, 3551, 3552, 3706,
+ 3553, 51188, -5912, 2394, 2413,108520, 8607, 10275, 10757, -5912,
+ -5912, -5912, 58455, 3547, 104, -5912, -5912, -5912, 3547, 551,
+ 3880, 499, -5912, 1583, 2840, 821,139530, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912,108520, 19273, -5912, -5912, 3756,
+ 3554, -5912, -5912, 51188, -5912, -5912, 2320, 3537, 716, 141,
+ 1933, 1933, 2484, 1079, -5912, -5912, 3568, -5912, 51188, -5912,
+ 2573, 2596, -5912, -5912, -5912, -5912, 3035, -5912, 3762, -5912,
+ -5912, -5912, 58455, 3563, 3609, 1229, 62842, 3740, -5912,108520,
+ -5912,108520, 265, -5912, 3543, -5912, -5912, -5912, -5912, 2026,
+ -5912, -5912, -5912, -5912, -5912, -5912, 3555, -5912, 3538, -5912,
+ 3566, -5912, -5912, -5912, -5912, 255, 3556, 3542, 3557, 2005,
+ -5912, -5912, -5912, -5912, 82542, 2253, -5912, 86878, -5912, 86878,
+ -5912, 2253, 3956, -5912, 82542, 2056, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,143815,
+ 143815, 3744,108520, 3782, 3780, 51188, 325,108520, 3560, 3562,
+ 1011, 3827,108520, -5912, 3905, 879, -5912, -5912, 3648, -5912,
+ 19273, -5912, -5912, -5912, -5912, -5912,143815,108520, -5912,147140,
+ -5912, -5912, 86336, -5912, -5912,108520,108520, -5912, -5912, -5912,
+ 86336, -5912, -5912, -5912,108520, 933, 3649, 3650,108520, -5912,
+ 816, 3373, 9235,108520,108520,108520, 3857, -5912, -5912, -5912,
+ -5912, 3792, -5912, 3914, -5912, 82542, -5912, 2937, 1582, 3658,
+ 3137, 3803, -5912, 3920, 3990, -5912, 3708, 1339, -5912, -5912,
+ 3714, -5912, -5912, -5912, -5912, 3938, 879, 3939, 879,108520,
+ 108520,108520,108520, 3732, -5912, -5912, -5912, -5912, 3735, 3861,
+ -5912, 77664, 77664, 77664, 2461, -5912, -5912, 1519, -5912, -5912,
+ -5912, -5912, -5912, -5912, 3895, -5912, 2464, -5912, 1923, -5912,
+ -5912, -5912, -5912, -5912, 3941,143815,108520, 9492,108520,108520,
+ 108520, 3814, 2105, 1510, 86336, -5912, 84168, -5912, -5912, 2471,
+ -5912, 3616,108520, 3687,143815, 3665, -5912, -5912, -5912, 3949,
+ 3607, 3607, -5912, -5912, 3607, -5912, -5912, 3872, 3802, -5912,
+ 1087, 3804,143815, 3677, -5912, -5912, -5912, -5912, -5912, 3953,
+ 3699, -5912, -5912, 3701, 1997, 3137, 2827, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, 3728, -5912, -5912, -5912,
+ -5912, 1777, 1777, -5912, -5912, -5912, 1777, 1606, 441, 2017,
+ 3137, -5912, 1912, 1653, 3704, -5912, 3707, -5912, -5912, -5912,
+ 3874, 3875, 3877, 3718, 3719, 3763, 3720, 3721, 3764, -5912,
+ 3724, 3768, 3725, 3784, 3726, 3998, 879, 86336, 3876, 1519,
+ 3794, 3988, 879, -5912, 3736, -5912, 3737, -5912, 2475, 4098,
+ -5912,108520, -5912, 457, 2119, 3137, -5912, 3739, -5912,143815,
+ 108520, -5912, -5912, -5912, 51188, 3653, 3666, 3669, 19273, 19273,
+ 51188, -5912, -5912, 19273, 3672, -5912, -5912, -5912, -5912, 86336,
+ -5912,108520, 3936, -5912, -5912, 1020,108520,108520, -5912, -5912,
+ -5912,108520, -5912, -5912, -5912, 3951, -5912, 281, 281, -5912,
+ -5912, 3986, 8188, 3678, 286, -5912, 77664, 66664, 2275, 495,
+ 1759, -5912,147140,108520,147140, -5912, 786, 3883,108520,108520,
+ 108520, 3679, 3680, -5912, -5912, -5912, -5912,143815, 242,143815,
+ 2840, -5912, -5912, 3749, -5912,108520, 2404, 2632, 4006, -5912,
+ 3607, -5912, 4127, 3348, 1336, 2329, 362, 2974, 4064, 2599,
+ 51188, 308, -5912, -5912, -5912, -5912, 2135,108520, 3470, -5912,
+ -5912, -5912, -5912, 1519, -5912, 3681, 3686, -5912,108520, 4011,
+ 108520,108520,108520, 99864, 2108, 3688,108520, 3691, 86336,108520,
+ 2444, 3135, 4150, 4035, 2108, 3495, 3781, 4040,102028, 2482,
+ -5912, 3715, -5912, 830, -5912, 2486, 234, -5912, 1519,147140,
+ 83084, 4029, -5912, 561, 6498, -5912, -5912, 561, 1124,108520,
+ -5912, -5912, -5912, -5912, 3922, 1185, -5912, 4015, -5912,108520,
+ -5912, -5912, 62292, -5912, 86336, 3717, -5912, 2487, -5912, 2491,
+ -5912, -5912, -5912, 2840, -5912, -5912, 1841, 1841, 3713, -5912,
+ 63942, -5912, 3722, -5912, 2403, -5912, -5912, -5912, 392, 3767,
+ 879, 3783, 879, -5912, -5912, -5912, -5912,108520, -5912,108520,
+ 142390, -5912, -5912,108520, -5912, 4052, 4039, -5912, -5912, -5912,
+ -5912, 3848, 3849, 3852, 3853, 3858,108520, 3472, -5912, 3723,
+ 143815, 1899, -5912, -5912, 3926, -5912, -5912,102028, 3847, -5912,
+ -5912, -5912, -5912, 4067, 4073, -5912, -5912, -5912, 1010, -5912,
+ 108520,108520,143815, 93913, 389,143815, -5912, 4007, 4010, 4012,
+ 4013, 378, 4014, 4018, 4020, 4021, 4022, -5912, -5912, -5912,
+ 3748, 17312, 51188, -5912, 4085, 86336, -5912, 8525, -5912, -5912,
+ -5912, 51188, -5912, -5912, -5912, -5912, -5912, -5912, 2417, 51188,
+ -5912, 51188, -5912, -5912, 41639, 4232, 4232, 3746, 86336, 55129,
+ 55129, 55129, 55129, 1573, 2996, 55129, 55129, 55129, 55129, 55129,
+ 55129, 55129, 55129, 55129, 55129, 530, -5912, 3952, 51188, 51188,
+ 48936, -5912, -5912, 86336, 3751, 3523, 3752, 3755, 51188, -5912,
+ -5912, 2505, 56805, 3757, 77664, -5912, 51188, 16574, 2511, 3806,
+ 17447, 2135, 8718, 1519, 51188, 1380, 1680, 51188, 2530, 51188,
+ 4075, -5912, -5912, -5912, -5912, -5912, -5912, 3983, -5912, 51188,
+ 3761, 4857, 55129, 55129, 4954, -5912, 5329, 51188, 43869, -5912,
+ 3591, 3807, 65571, -5912, 42203, 3786, 1306, 1306, 1306, 1306,
+ -5912,108520,108520,108520, 59555, 4089, 3760, 57905,106897, 3787,
+ 2699, -5912,106897,107438,106897, 3788, 2135, 51188, 4081, 3785,
+ 4081, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, 3789, -5912, 3793, -5912,
+ -5912, 246, 3795, -5912, -5912, 255, -5912, -5912, 2108, -5912,
+ 3791, -5912, 3537, 307, -5912, -5912, -5912, 1205, -5912, 3855,
+ -5912, -5912, -5912, 3787, 49499, 3917, -5912, -5912, -5912, 3824,
+ 2534, -5912, -5912, 4181, 3917, -5912, -5912, 2545, 65028, 3563,
+ 51188, 2135, 2840, 3797, -5912, 2704, 551, -5912, -5912, -5912,
+ -5912, -5912, 2552, 2123, -5912, -5912, 82542, -5912, 3856, 2937,
+ 2937, 1585, 3472, 4104, 1585, 9113, -5912, -5912, 60105,108520,
+ 108520, -5912,108520, 2560, 318,108520, -5912,108520, -5912, -5912,
+ -5912, 4236, 3844, 3845, 4068, -5912, 2771, -5912, -5912,143815,
+ 108520, -5912, -5912, -5912, 461, 2159, 3137, -5912, 3878, -5912,
+ -5912, 4086,108520, -5912, 4237, 3892,108520, 4144,108520,107979,
+ -5912, 3883, 318, 3910, 4125, 1878, 3135, 2167, 2588, -5912,
+ 1548, -5912, -5912, 3879, -5912,108520, -5912,108520, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 3940, -5912, -5912, -5912, -5912,
+ 78206, -5912, -5912,108520, -5912, 77664, 66664, 77664,108520, -5912,
+ 1617, 467, 2333, 3137, -5912, 3893, -5912, 4147, 3894, 3896,
+ 3954, 1309, 277, 3897, 3899, 3957, 3817, 3821, 3825, -5912,
+ 77664, 67223, 3979,108520, 2937, 3830, 3865,108520, 408, 1519,
+ -5912, -5912, 1519, 2937, 1519,108520,108520,108520,108520, 408,
+ -5912, -5912, -5912, 4264, 3924,108520,108520,108520,108520, -5912,
+ 3886, -5912, -5912, -5912,108520,108520, 4163, 1048, 2323,143815,
+ 108520,108520,143815,108520,108520,108520,108520,108520,108520,108520,
+ 4047, -5912, 4255, 4180, 2466, 4223, 3912,108520, -5912,108520,
+ 1519, -5912, 3373,108520,108520,108520,108520, -5912, -5912, -5912,
+ -5912, -5912, 3591, -5912, 3839, 4120, 1020, -5912, 4121, 4122,
+ 4123, 1020, -5912, -5912, 1759, -5912, 456,108520, -5912, 2548,
+ 108520, -5912, -5912, -5912, 3791, 1933, 1933, -5912, -5912, -5912,
+ -5912, -5912, -5912, 3846,108520,108520, 55129, -5912, 2047, 1311,
+ 1382, -5912, 4124,108520, 3277, -5912, -5912, -5912, 260,108520,
+ -5912, -5912, -5912, -5912, 3851, -5912, 912, 3688, -5912, 4139,
+ 89585, 2937,143815,143815, 2937, -5912, 86336, 3862, 3470, -5912,
+ 295, 3931,143815, 1336,130160, 3288, 3885, 4063, 9239, 58455,
+ 59005, 1777, -5912, 3870, 3860, -5912, -5912,108520, 3883,142390,
+ 2564, 2827, 4314, 1150, 2385, 3532, 91208, 4050, 3688, 4139,
+ -5912, 3135, 4083, 4071, -5912, 2108,108520, 3532, 3470, 1519,
+ 108520, 3389, -5912, 2632, 66664, 2157, -5912, 82542, 51188, 51188,
+ -5912, 3869, -5912, 3873, 6498, -5912, 3948, 3881, 4329, 51188,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 3960, 3887,
+ 108520,108520, 830,108520, 4364, -5912, -5912, 3884, 3778, -5912,
+ 3778, -5912, 3889, -5912, -5912, -5912, 2083,136643, 63942, 63942,
+ 63942, 63942, 63942, -5912, -5912,108520, -5912,108520, -5912, 879,
+ -5912, 4023, 879,108520, 2108,108520,108520,108520,108520,108520,
+ 3472, 378, -5912, 4209,142865, 3799, -5912, 2567,108520, -5912,
+ -5912, -5912, 4279, -5912, -5912, 368, 4221, 879, -5912, 1094,
+ 1094, 1094, 1094, 4179, 1094, 1094, 1094, 1094, 1094, -5912,
+ 51188, 19273, -5912, 3900, -5912, 19273, 3901, 9364, 17934, -5912,
+ 2584, 51188, -5912, 974, 974, 974, 2421, 4228, -5912, 2690,
+ 974, 974, 974, 437, 437, 223, 223, 223, 4232, 530,
+ 18468, 18550, 18633, 3904, -5912, -5912, -5912, 3523, -5912, 52314,
+ 1106, 4343, 56255, -5912, -5912, -5912, 3950, 3955, 3908, -5912,
+ 51188, 52877, 3911, 87420, 4107, -5912, 1403, 51188, 51188, 1434,
+ -5912, 7537, 51188, -5912, 1434, 372, 51188, 1973, 2256, 51188,
+ 51188, 5735, 9788, 3909, 51188,134488, -5912, -5912, -5912, 2617,
+ 51188,108520,108520,108520,108520, -5912, -5912, -5912,106897,107438,
+ 106897, 3913, 57355, 61748, 2699, 3915,108520, -5912, -5912, 3918,
+ 58455, 4184, 4118, -5912, 58455, 4118, 1859, 4118, 4193, 4016,
+ 66114, -5912, -5912, 3919, -5912, 4129, -5912, 2037, 19273, 4360,
+ 4238, 1519, 4238, 551, 338, 1519, -5912, 3927, 70013, -5912,
+ -5912, -5912, -5912, 4017, -5912, 4149, 19273, 46684, -5912, 2108,
+ 2806,108520, 2135, 119, -5912, 3943,108520, -5912, 3917, 19273,
+ -5912, 14804, -5912, -5912, -5912, -5912, 4003, 2623, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 4019, 92290, 4257, -5912, 51188,
+ 2637, -5912, 3975, 4356, 257, 2640, 2641, 318, -5912, 4239,
+ -5912, 1808, 4235, 425, -5912, 879, -5912, 86336,108520,108520,
+ 108520, 3091, -5912, -5912,108520,108520,108520,108520, -5912, -5912,
+ 143815,108520, -5912,108520, -5912, -5912, -5912, -5912, 408, 2047,
+ 4244, 4251, 4168, -5912, 378, -5912, 2047, 4171, 408,108520,
+ -5912, -5912, -5912, 2410, -5912, 86336, 879, 879, -5912, -5912,
+ -5912, -5912, -5912, 3961, -5912, 4391, 4048,108520,108520,108520,
+ 108520,108520,143815,108520,108520, 2840, 2840, 86336, 3959, -5912,
+ 2840, 2840, 3962, -5912,143815,108520,108520, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 4038, -5912,
+ 51188, 4382, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912,143815,108520, 4041, -5912, 4042, -5912, 915,
+ -5912, -5912,108520,108520,108520,108520, 4303, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 4301,108520,
+ -5912, -5912, 1519, 1519, 86336, 879, 879, -5912, -5912, -5912,
+ 4051, -5912, -5912, 3963, 4242, 1020, -5912, 1020, 1020, 1020,
+ -5912, 3966, -5912, 1759, 4340, -5912, 318, 1839, 4292, -5912,
+ 51188, -5912, 940, 2421, -5912, 4349, 4431, -5912, -5912, -5912,
+ -5912, 3277, 2404, 4032, -5912, -5912, 79832, 422, -5912, 4274,
+ 292, 77664, 4194, 89585, 1912, 1858, 3980, 4103, -5912, 2937,
+ 2937, 4043,108520, 4442, -5912, -5912, -5912, -5912, -5912, -5912,
+ 143815, 3665, -5912, 4214, 1268, 4315,108520, 59005, -5912, 3787,
+ -5912, -5912, -5912, 1519, -5912, -5912, 4116, 3470, -5912, 4334,
+ 108520, 4212, 89585, 3532, -5912, 2644, -5912, -5912, -5912, 4036,
+ 4438, 3495, -5912, 1912, 4050, -5912, -5912, 4420, 4101, 4053,
+ 4471, -5912, 4101, 4341, 4230, 4026, -5912, 3715, -5912,108520,
+ -5912, 19273, 19273, 1519, 87962, 561, 86336, 4348, -5912, 19273,
+ 108520, 221, 4028, 4185, -5912, 4324,108520, -5912, 879, 2645,
+ -5912, -5912, -5912, 4033, 2243, 2243, -5912, -5912, -5912, 879,
+ 879, -5912,108520, -5912, 3472, 3472, 3472, 3472, 3472, -5912,
+ 4233, -5912, -5912, -5912, 4319, -5912, 879,142865, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 1094, -5912, -5912, -5912, -5912,
+ -5912, 19273, -5912, -5912, -5912, 51188, -5912, 9850, 55129, 4366,
+ -5912, 51188, 51188, 51188, -5912, 4044, 2649, 2652, -5912, -5912,
+ 1106, -5912, 4343, -5912, -5912, -5912, 10166, 4094, 19273, 4155,
+ 4045, 4054, 1434, 1434, 7537, 1434, 51188, 51188, 1434, 1434,
+ 51188, -5912, -5912, 11556, 4246, -5912, -5912, 11702, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 78748, 4049, 3689,106897, 4058,
+ 108520, 2699, 58455, -5912, -5912, 2152, -5912, 58455, 4335, -5912,
+ 58455, 79832, -5912,108520, 4060,108520, -5912, 1626, 51188, 4105,
+ -5912, 4105, -5912, 1933, -5912, -5912, -5912, -5912, -5912, 4196,
+ 4061, -5912, 99864, 443, -5912, 1229, -5912, -5912, 4473, 60105,
+ 4427, 51188, -5912, -5912, -5912, -5912, -5912,142865, 4283,142865,
+ 318, 12196, 4239, 60105, 71129,108520, -5912,108520, -5912, 4240,
+ 4239, 4074, 3277, -5912, -5912, -5912, -5912, -5912, -5912, 4076,
+ -5912, -5912, -5912, -5912, 4160, -5912, -5912, 71, 3505, -5912,
+ 2275, -5912, 4541, 4426, 4428, -5912, -5912, -5912, -5912, -5912,
+ -5912, 4255, -5912, -5912, 66664,143815,108520, -5912, 4167, -5912,
+ -5912, -5912, -5912, -5912, -5912, 61205, 70013, -5912, 1309, 4087,
+ 4088, 277, -5912, -5912, -5912,108520, 12533, 4090, 719, 3505,
+ 108520,108520, 4092, 4095, 4096, 1892, 88, 2048, 3472, 4415,
+ 108520, -5912, -5912, -5912, 4255, -5912, -5912,108520, -5912, 1020,
+ -5912, -5912, -5912, -5912, 77664, -5912, 2325, 3966, 1519, 79832,
+ 4549, 4549, 12852, 4317, -5912, -5912, 417, 4032, 4350, 4394,
+ -5912, 4099,108520, 260, 4100, 2655, -5912,108520, 4102, 4229,
+ 1673, 1673,108520,108520,108520, 2656, 2108, 2937, 3865, 1336,
+ 4446, 89585, 4491, 3883, 365, -5912,108520, 4567, 99864, 2108,
+ 3688,108520, 4110, 941, -5912, 91208, 4321, 2275,108520, 2444,
+ 4050, 3495, 1483,108520, -5912, 1571, -5912, 2108, -5912,108520,
+ 102028, 60105, 4439, -5912, 86878, -5912, 2659, -5912, -5912, -5912,
+ 4187, 28413, 3547, 4231, 4234, 4117, 2043, 4449,108520, 765,
+ -5912, 4132, -5912, -5912, -5912, -5912, -5912, -5912, -5912,108520,
+ -5912, 389, -5912, 18711, -5912, 3023, 55129, 19273, 19273, 19273,
+ 51188, -5912, 51188, -5912, -5912, -5912, -5912, 901, -5912, -5912,
+ 1434, 1434, 1434, -5912, 4562, 3591, -5912, -5912, 2663, 4585,
+ 54566, 4543, -5912,108520, 2667, -5912, 51188, 4130, -5912, -5912,
+ 58455, 2152, 4133, 2668,108520, 2674, 86336, 53440, 19273,108520,
+ -5912, -5912, -5912, -5912, 1838, 4514, -5912, -5912, -5912, 4189,
+ 108520, 2679, -5912, 1404, 19273, 1899, 1585, 403, 4356, 3277,
+ -5912, 4135, -5912, -5912, 3135, 1642,108520, 3277,108520, 4032,
+ -5912,108520, 4222, -5912, 4444, -5912, -5912, 4201, -5912, 1045,
+ 3505,108520, 86336, -5912, 179, 4475, -5912, 86336, 86336, -5912,
+ -5912, -5912, 51188, 4241, -5912, -5912, -5912, 51188, 51188,147615,
+ -5912, -5912,108520,108520,108520,108520,108520, -5912, 879, -5912,
+ -5912, 2682, -5912,137118, -5912, -5912, 3344, 1519, 3344, 215,
+ -5912, -5912, 3344, 3344, -5912, 3547, -5912, 4549, 391, -5912,
+ -5912, 4378, 4151, 51188, -5912, 1209, 4362, 4243, 4152, -5912,
+ 79832, 4645, -5912, 77664, 3688, 4139,108520, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 2683,
+ 3883, 4492, 3470, 4053, -5912,108520, 4200, -5912, 58455, 3883,
+ 2108, 2385, 3532, 4050, 3688, 4139, -5912, -5912, -5912, 4156,
+ 4071, 3495, 2444, 4298, -5912, 4300, -5912, 4590, 4376, 4594,
+ 3532, -5912, 3389, 2694,108520, -5912, -5912, 6498, 87962, 86336,
+ -5912, -5912, -5912, 4165, 4533, 4215, 4216, -5912, -5912, -5912,
+ 2043, -5912, 801, 4531, 4224, -5912, 4245,108520, -5912, -5912,
+ 498, 4663, 3883, 879, 51188, 3023, 2700, 2719, 4248, -5912,
+ 51188, 1330, 3788, 78748, 4177, -5912, 55129, 2723, -5912, 1338,
+ 108520, 2728, -5912, 19273,108520, -5912, -5912, 51188, -5912, 2735,
+ -5912, 4178, 617, 4182, 40511, 4183, -5912, -5912, -5912, -5912,
+ -5912, 19273, 4188, -5912, 4641, 4517, 4520,108520, -5912, 2108,
+ -5912, 3547, 60105, -5912, 4320, -5912, 4515, -5912, -5912, 4032,
+ 70013, 1642, 3537, 2404, 4032, 2738, -5912, -5912,108520, 4151,
+ 51188, -5912, 4287, -5912, -5912, 2742, 1660, 4365, 4365, 2753,
+ 2754, 13409,108520, 2760, 2761, -5912, 2769, 2840, 3479, 2048,
+ 3479, -5912, 3472, -5912, -5912, 77664, -5912,143340, -5912, -5912,
+ -5912, 1519, -5912, 1519, 4419,108520, 73317, 1519, 1519, -5912,
+ -5912, -5912, -5912, 4493, -5912, 2827, -5912, 13449, -5912, -5912,
+ -5912, 491, -5912, 4413, 4414,108520, -5912, 4202, -5912, 2773,
+ -5912, 1912, 4331, 3883, -5912, -5912,108520, 4665, 4666, -5912,
+ 1290,108520, 3787, -5912, 4053, 3532, -5912, 3495, 1912, 4050,
+ 2275, 60655, 4101, 2444, 4071, -5912, -5912, 4418, -5912, 4421,
+ -5912, 4210, 4509, -5912, 1873, 561, -5912, -5912, -5912, 382,
+ 4536, 4538, -5912, -5912, -5912, 3344, -5912, 138, 4217, 4561,
+ -5912, -5912, -5912, -5912, -5912,108520, -5912, -5912, 19273, -5912,
+ -5912, -5912, 3523, 50062, 50062, 50062, 4219, -5912, -5912,108520,
+ 2421, 4227, 54566, 77664, 2776, -5912, 84710, -5912, 2784, 2797,
+ -5912, 51188, 4218, 51188, -5912, 53440,108520, 4225, 4671, 4673,
+ 1122, -5912, -5912, -5912, 65028,142865, 4268, 4226, 3537, -5912,
+ 4350, -5912, -5912, 318, 3505, -5912, 19273,108520, 79832, 4674,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, 3505, 4310, -5912,
+ -5912,147615, -5912,108520, -5912, -5912, 2801, -5912, -5912, -5912,
+ 108520, 4028, -5912, 4028, -5912, -5912, -5912, 926, 4344, 300,
+ 300, 4610, -5912, 4302, -5912, -5912, 4249, -5912, 4729, 4370,
+ 108520, -5912, -5912, 1309, 2108, 89585, 3883, -5912, 941, 2444,
+ 4050, 3495, 51188, 2802, -5912, 4356, 257, -5912, 4071, 4101,
+ -5912, -5912, 60105, 4254, 3470, 4601, -5912, -5912, -5912, 2768,
+ 79832, 79832,108520, -5912, -5912, -5912, 51188, 260, -5912, 54003,
+ 4386, 817, 16324, 4593, -5912, 4593, 4593, -5912, 2812, 56255,
+ -5912, -5912, -5912,108520, 4457, 1063, 4716, 4416, 2813, 53440,
+ 2825, -5912, -5912, -5912,108520,108520,108520, 970, 403, 4260,
+ -5912, -5912, -5912, 4362, 318, -5912, 3505, -5912,108520, -5912,
+ 4261, -5912, -5912, -5912,143340, 4028, -5912, -5912, -5912, 4731,
+ -5912, 1428, -5912, -5912, -5912, -5912,108520, 3883, 3959, 4053,
+ -5912, -5912, 4071, 3495, 2444, 13526, -5912, 60655,108520,108520,
+ 4101, -5912, 2835, 60105, 4101, 4404, -5912, 2276, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, 4267, 4269, -5912, -5912, 13988,
+ 79832, 4726, -5912, -5912, -5912, -5912, -5912, 1397, -5912, -5912,
+ -5912, -5912, 3689, -5912, -5912, 55129, 4490, -5912, 1063, -5912,
+ 55129,108520, -5912, 4273, -5912, -5912, 2836, -5912, 1218, 1332,
+ 1950, -5912, -5912, 51188, 318, -5912, -5912, -5912, 51188, -5912,
+ -5912, -5912, -5912, 3883, -5912, -5912, 4101, 2444, 4071, 4356,
+ -5912, -5912, -5912, -5912, -5912, 4509, -5912, 2839, 3547, 4224,
+ 2032, -5912, -5912, 2226, 2609, 4352, 4589, -5912, 4277, 50625,
+ 4423, -5912, 4479, -5912, 4699, 2421, -5912, -5912, 2421, -5912,
+ 51188, -5912,108520,108520, 79290,108520, 14062, 318, 2842, -5912,
+ -5912, 4071, 4101,108520, 3470, -5912, 60105, -5912, 4628, -5912,
+ 2276, 4398, 4399, 77122, -5912, -5912, -5912,108520, 14199, -5912,
+ -5912, 329, 4670, -5912, -5912, -5912, 4101, -5912, -5912, 4101,
+ -5912, 260, -5912, 4328, 4333, 2843, -5912, -5912, -5912, -5912,
+ -5912, 2847, -5912, 51188, 79290, -5912, 3547, 79832, 4619, 4620,
+ -5912, 77122, -5912, 734, 4358, -5912, 4299, 79832, 79832, -5912,
+ 4304,108520, 77122, -5912, -5912, 1519, -5912, 2857, -5912
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_int16 yydefact[] =
+{
+ 3146, 0, 2, 1, 3573, 3577, 3581, 3582, 3504, 3583,
+ 3584, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557,
+ 3558, 3559, 3560, 3562, 3561, 3563, 3564, 3565, 3566, 3567,
+ 3568, 3569, 3570, 3572, 3571, 3522, 3153, 3521, 3518, 3519,
+ 2267, 3586, 3574, 3587, 3575, 3576, 3578, 3579, 3548, 3580,
+ 3588, 3589, 3590, 3585, 3593, 3544, 3545, 3543, 3546, 3547,
+ 3591, 3592, 3535, 3536, 3537, 3538, 3594, 3154, 3155, 3540,
+ 3147, 3151, 3216, 3287, 3541, 3542, 3539, 3152, 3534, 3287,
+ 0, 3409, 3410, 0, 3411, 3412, 3413, 3339, 3301, 3414,
+ 0, 0, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422,
+ 0, 3423, 3424, 3425, 3426, 3286, 3427, 3428, 3429, 3430,
+ 3263, 3269, 3392, 0, 3243, 3244, 3240, 3242, 3241, 3245,
+ 3228, 1436, 650, 1523, 1522, 0, 2630, 1436, 2582, 2583,
+ 2631, 2584, 2585, 0, 2586, 274, 0, 1533, 2587, 2632,
+ 0, 1436, 2633, 437, 1102, 2634, 2635, 3170, 0, 2588,
+ 2589, 0, 0, 0, 650, 1436, 0, 0, 2590, 1668,
+ 2591, 0, 2592, 2636, 2637, 0, 2593, 2594, 2638, 0,
+ 2639, 2595, 2596, 2597, 2640, 2641, 2642, 2598, 2643, 2644,
+ 0, 0, 1682, 0, 2599, 2645, 2600, 2601, 2602, 0,
+ 2646, 2603, 2604, 2605, 2647, 2648, 2606, 2607, 2608, 0,
+ 2609, 0, 0, 0, 0, 0, 0, 2649, 1436, 2610,
+ 0, 0, 1689, 0, 2611, 0, 2650, 2612, 0, 2613,
+ 0, 2651, 2614, 2615, 2616, 2617, 1682, 3388, 3264, 0,
+ 1535, 0, 2618, 2652, 0, 2619, 2620, 2621, 2622, 2623,
+ 2624, 2625, 2626, 2627, 2628, 2629, 0, 0, 0, 3,
+ 38, 73, 74, 31, 30, 91, 56, 17, 64, 125,
+ 124, 126, 43, 39, 81, 26, 28, 40, 44, 66,
+ 68, 33, 57, 103, 65, 24, 63, 69, 89, 51,
+ 12, 13, 52, 14, 53, 15, 54, 99, 75, 92,
+ 36, 62, 23, 45, 71, 72, 5, 47, 79, 11,
+ 58, 59, 61, 84, 85, 86, 108, 87, 120, 42,
+ 117, 96, 97, 114, 98, 115, 9, 100, 55, 16,
+ 111, 110, 112, 82, 48, 83, 70, 90, 109, 27,
+ 113, 18, 19, 21, 22, 20, 60, 29, 67, 32,
+ 88, 116, 106, 102, 121, 119, 4, 127, 104, 76,
+ 7, 8, 93, 6, 25, 50, 10, 35, 34, 49,
+ 41, 123, 37, 1533, 95, 107, 94, 101, 80, 105,
+ 122, 78, 118, 1644, 1631, 1691, 1643, 1667, 0, 1647,
+ 3483, 3484, 46, 1668, 129, 130, 131, 136, 3150, 3205,
+ 3206, 3207, 3287, 3238, 3239, 3232, 3248, 3258, 3247, 3251,
+ 3259, 3246, 3265, 0, 133, 135, 137, 140, 134, 128,
+ 132, 139, 144, 138, 143, 141, 142, 145, 146, 147,
+ 3485, 1920, 3482, 77, 3223, 3222, 0, 3287, 0, 3515,
+ 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294,
+ 2295, 2296, 2297, 2298, 2300, 2299, 2301, 2302, 2303, 2304,
+ 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314,
+ 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324,
+ 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334,
+ 2335, 2274, 2275, 2336, 2337, 2338, 2339, 2340, 2341, 2342,
+ 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352,
+ 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362,
+ 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372,
+ 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382,
+ 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392,
+ 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402,
+ 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412,
+ 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422,
+ 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432,
+ 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442,
+ 2443, 2444, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452,
+ 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462,
+ 2463, 2464, 2465, 2466, 2469, 2467, 2468, 2470, 2471, 2472,
+ 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482,
+ 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492,
+ 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502,
+ 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512,
+ 2513, 2514, 2515, 2516, 2276, 2517, 2518, 2519, 2520, 2521,
+ 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531,
+ 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541,
+ 2542, 2543, 2544, 2545, 2546, 3170, 2547, 2548, 2549, 2550,
+ 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560,
+ 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570,
+ 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580,
+ 2581, 3188, 2272, 2273, 2280, 2281, 2282, 3163, 3184, 3190,
+ 3511, 3189, 2279, 3338, 0, 0, 3431, 3432, 3433, 3434,
+ 3435, 3436, 3486, 3487, 3488, 3489, 3490, 3492, 3491, 3300,
+ 3458, 3495, 3299, 3496, 3303, 3497, 3498, 3499, 3500, 3459,
+ 3501, 3302, 3493, 3455, 3304, 3297, 3298, 3456, 3407, 3408,
+ 2247, 3457, 3454, 3494, 3191, 3453, 3308, 3307, 1620, 3510,
+ 1621, 0, 3310, 3437, 3438, 3439, 3440, 3442, 3441, 3443,
+ 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662,
+ 2663, 2664, 3468, 2665, 2666, 2667, 3481, 2668, 2669, 3469,
+ 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679,
+ 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689,
+ 2690, 2691, 2692, 2693, 3470, 3471, 2694, 2695, 2696, 2697,
+ 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707,
+ 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717,
+ 3472, 2718, 2719, 3473, 2720, 2721, 2722, 3474, 2723, 2724,
+ 2725, 2726, 2727, 3478, 3479, 3480, 3467, 3261, 3444, 3466,
+ 3477, 3475, 3476, 3271, 3267, 3275, 3270, 0, 0, 0,
+ 0, 3287, 1435, 1434, 1449, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 649, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3160, 0, 1446, 149, 0, 3462, 3456, 3465, 0,
+ 2250, 3457, 3454, 3453, 409, 408, 1532, 0, 1512, 650,
+ 0, 1449, 436, 1668, 0, 0, 0, 0, 0, 0,
+ 866, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 197, 0, 0, 0, 0, 460, 459,
+ 0, 0, 1068, 465, 0, 0, 0, 0, 0, 640,
+ 3169, 3164, 3174, 0, 3167, 3168, 3453, 0, 3597, 2467,
+ 3200, 3201, 3595, 2528, 1622, 1620, 3510, 0, 275, 278,
+ 279, 276, 277, 0, 1214, 1215, 1217, 0, 0, 1227,
+ 906, 907, 0, 0, 0, 920, 0, 0, 0, 904,
+ 0, 0, 0, 926, 0, 923, 0, 0, 927, 924,
+ 901, 925, 908, 0, 900, 0, 0, 1227, 928, 0,
+ 0, 902, 0, 0, 0, 0, 1449, 0, 3253, 3254,
+ 2391, 1570, 466, 0, 0, 1668, 0, 1555, 1556, 1533,
+ 1545, 1557, 1550, 1552, 1551, 1553, 1549, 1554, 2286, 1003,
+ 2303, 1003, 2379, 1000, 1001, 1003, 1003, 1003, 2487, 0,
+ 0, 975, 0, 986, 2268, 1003, 2269, 3511, 1008, 534,
+ 534, 534, 0, 1007, 1012, 534, 0, 1417, 1458, 2249,
+ 1681, 0, 2303, 2379, 976, 1416, 2547, 1561, 0, 0,
+ 1242, 1238, 1240, 1241, 1239, 0, 1071, 1071, 2506, 1426,
+ 259, 3451, 2516, 2614, 2547, 3452, 258, 253, 254, 3446,
+ 3447, 3449, 227, 3450, 3448, 3445, 2290, 0, 0, 1007,
+ 0, 1449, 1424, 972, 1688, 1686, 0, 2234, 0, 0,
+ 2313, 0, 2328, 2417, 250, 2499, 2507, 2516, 2614, 2547,
+ 2579, 206, 216, 211, 0, 268, 2516, 2614, 2547, 0,
+ 1446, 0, 1648, 1794, 2243, 0, 0, 3262, 1419, 1418,
+ 1534, 0, 1537, 0, 2482, 1652, 1655, 1539, 1653, 1644,
+ 0, 0, 3149, 0, 1544, 1685, 1685, 0, 1685, 0,
+ 1636, 1644, 1639, 1643, 0, 0, 0, 0, 1436, 0,
+ 3230, 3258, 3237, 3293, 3234, 0, 0, 3283, 3279, 3276,
+ 3284, 3285, 3278, 3266, 1909, 1910, 1911, 1908, 1921, 1907,
+ 0, 3211, 1912, 3250, 3217, 0, 3225, 3224, 3523, 3524,
+ 3340, 3162, 3181, 0, 0, 0, 0, 0, 0, 0,
+ 3309, 3311, 3313, 3273, 3272, 3268, 0, 0, 0, 3398,
+ 3399, 0, 3397, 0, 3394, 3396, 0, 3293, 0, 1420,
+ 0, 0, 0, 931, 0, 1461, 1053, 0, 0, 0,
+ 0, 0, 1311, 0, 1110, 1111, 0, 2272, 0, 2390,
+ 1311, 0, 0, 2145, 2156, 2157, 2158, 2317, 2373, 2153,
+ 2154, 2155, 2147, 2148, 2149, 2150, 2151, 2152, 0, 0,
+ 1209, 2146, 0, 2390, 0, 1311, 0, 176, 0, 153,
+ 1311, 0, 0, 2390, 0, 0, 2390, 0, 0, 0,
+ 0, 0, 2390, 0, 0, 0, 0, 0, 176, 2422,
+ 0, 153, 2390, 0, 0, 0, 1440, 0, 0, 0,
+ 1442, 1445, 1432, 0, 2226, 0, 2227, 2251, 0, 1526,
+ 1520, 1529, 1525, 1515, 0, 2243, 0, 0, 0, 0,
+ 914, 0, 0, 904, 0, 0, 0, 915, 0, 916,
+ 917, 0, 0, 0, 0, 913, 0, 1430, 1422, 0,
+ 1563, 1565, 1564, 1562, 534, 0, 0, 0, 2390, 0,
+ 153, 1499, 0, 2390, 153, 0, 0, 464, 463, 153,
+ 462, 461, 2317, 2373, 0, 1101, 0, 1376, 153, 2390,
+ 0, 199, 2390, 709, 2390, 1539, 0, 653, 0, 821,
+ 2422, 153, 0, 0, 0, 0, 0, 0, 1071, 0,
+ 0, 0, 0, 0, 0, 0, 639, 650, 0, 3173,
+ 3179, 0, 3171, 3341, 3598, 3596, 3296, 0, 3202, 1218,
+ 251, 252, 1216, 918, 2390, 1143, 370, 0, 0, 2390,
+ 153, 1869, 1898, 1876, 1898, 1898, 1865, 1865, 2356, 1878,
+ 2390, 1866, 1867, 1903, 0, 1898, 1865, 1870, 0, 1868,
+ 1906, 1906, 1893, 370, 935, 1850, 1851, 1852, 1853, 1879,
+ 1880, 1854, 1885, 1886, 1890, 1855, 1920, 3463, 1865, 3464,
+ 3461, 3460, 919, 0, 905, 2390, 370, 1107, 2390, 2277,
+ 186, 0, 903, 2317, 2373, 2390, 370, 1211, 0, 2390,
+ 370, 2390, 182, 2390, 370, 2390, 370, 2390, 654, 0,
+ 0, 2390, 370, 2390, 2422, 184, 922, 2390, 370, 929,
+ 2390, 370, 2245, 2390, 0, 1433, 0, 0, 3528, 3532,
+ 0, 3530, 3525, 3252, 3306, 3305, 3204, 0, 3609, 0,
+ 1622, 1547, 0, 1668, 1003, 1002, 0, 1003, 0, 3619,
+ 1003, 0, 1003, 0, 3619, 1003, 0, 0, 0, 1003,
+ 2270, 2271, 0, 0, 3618, 3614, 3617, 977, 987, 0,
+ 1009, 0, 0, 1016, 1015, 1014, 0, 0, 0, 1017,
+ 0, 1798, 1597, 0, 984, 0, 982, 0, 1414, 1429,
+ 0, 0, 0, 0, 1071, 0, 1070, 0, 0, 1425,
+ 257, 255, 0, 0, 0, 0, 0, 0, 1431, 0,
+ 1423, 0, 0, 0, 3517, 3520, 2159, 3516, 0, 2583,
+ 2584, 2585, 2218, 0, 3458, 2586, 2587, 2632, 2049, 2036,
+ 2045, 2050, 2037, 2039, 2046, 2588, 2589, 1987, 2590, 2591,
+ 2263, 2592, 2593, 2594, 2596, 2597, 2598, 2041, 2043, 2599,
+ 2600, 2602, 0, 2264, 2603, 2604, 2449, 2606, 2607, 2609,
+ 2610, 2047, 2612, 2613, 2614, 2615, 2616, 2617, 2262, 0,
+ 2048, 2618, 2620, 2621, 2622, 2623, 2625, 2626, 2627, 2628,
+ 0, 0, 0, 2240, 0, 2016, 0, 1858, 1859, 1881,
+ 1882, 1860, 1887, 1888, 1861, 0, 2239, 1923, 2104, 2015,
+ 2032, 0, 2021, 2022, 0, 2014, 2010, 1671, 2235, 0,
+ 2011, 2252, 2219, 2266, 2265, 3511, 2229, 2255, 2253, 2254,
+ 2256, 1671, 2233, 0, 0, 0, 219, 0, 0, 3387,
+ 270, 0, 271, 2241, 2516, 207, 249, 221, 248, 222,
+ 220, 0, 2315, 208, 0, 0, 209, 0, 0, 0,
+ 0, 0, 0, 0, 264, 1421, 0, 1796, 1795, 2244,
+ 940, 0, 0, 1536, 1533, 2169, 0, 1654, 0, 0,
+ 0, 1634, 1633, 0, 1541, 1543, 1518, 1539, 1683, 1684,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1741, 1699,
+ 1700, 1702, 1738, 1742, 1750, 0, 1640, 0, 0, 1800,
+ 0, 0, 3148, 3293, 3294, 0, 3288, 0, 3287, 3287,
+ 3281, 3280, 3277, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3208, 634, 3210, 631, 0, 0, 3183, 0, 3187,
+ 3185, 0, 3333, 3336, 0, 3334, 3335, 3337, 0, 3342,
+ 3343, 0, 0, 0, 0, 0, 3324, 3312, 3319, 3321,
+ 3323, 3322, 3331, 3327, 3330, 3332, 3274, 3287, 0, 3400,
+ 3406, 3403, 2330, 0, 3395, 0, 1447, 0, 0, 0,
+ 0, 0, 1142, 0, 0, 0, 0, 0, 932, 0,
+ 0, 0, 0, 1469, 1470, 1471, 0, 0, 1472, 1473,
+ 1461, 261, 1479, 1477, 1460, 1462, 1475, 1467, 0, 0,
+ 0, 0, 0, 0, 0, 1491, 0, 190, 191, 0,
+ 666, 650, 0, 2390, 0, 0, 0, 0, 1152, 1159,
+ 1310, 0, 0, 0, 0, 0, 0, 0, 0, 1153,
+ 1151, 0, 1154, 263, 1164, 1191, 1194, 0, 0, 1109,
+ 1112, 0, 0, 0, 0, 0, 1301, 0, 0, 0,
+ 1301, 0, 0, 0, 1310, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 286, 288, 301, 365, 0, 0,
+ 0, 2390, 1311, 0, 0, 0, 1213, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1194, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 151, 152, 157, 0, 0,
+ 0, 0, 1194, 0, 0, 0, 0, 0, 0, 0,
+ 617, 630, 0, 0, 0, 0, 0, 627, 0, 0,
+ 153, 291, 607, 613, 0, 0, 0, 716, 715, 0,
+ 0, 0, 0, 0, 0, 1391, 0, 1390, 0, 0,
+ 0, 0, 1489, 1488, 0, 0, 0, 0, 0, 0,
+ 1301, 0, 280, 282, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 401,
+ 402, 0, 0, 0, 157, 0, 0, 1301, 0, 293,
+ 0, 3218, 0, 1441, 1438, 1439, 0, 1444, 0, 0,
+ 0, 0, 2024, 0, 2173, 1691, 2171, 1127, 2225, 0,
+ 2222, 2221, 2248, 2228, 0, 0, 238, 239, 237, 1527,
+ 240, 1528, 1524, 0, 1510, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2317, 2373, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 829, 1461, 1498, 0, 0, 0, 659, 0, 2390,
+ 0, 155, 867, 0, 819, 465, 0, 0, 0, 1184,
+ 1375, 155, 0, 0, 193, 0, 0, 713, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 820, 0,
+ 0, 155, 0, 2390, 610, 2390, 0, 534, 534, 0,
+ 0, 1073, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3177, 3172, 3175, 0, 3165, 3179, 1626, 1625, 1628, 1627,
+ 0, 1624, 0, 368, 369, 0, 1201, 1226, 0, 0,
+ 0, 1897, 1884, 1892, 1891, 0, 1874, 1873, 1872, 0,
+ 1871, 0, 1898, 1898, 1896, 1875, 1850, 0, 0, 0,
+ 1902, 0, 1900, 0, 896, 1846, 1842, 0, 1909, 1908,
+ 1907, 0, 1856, 1865, 1862, 921, 0, 0, 1195, 0,
+ 0, 2390, 370, 2390, 0, 2390, 0, 0, 0, 1203,
+ 370, 0, 1197, 0, 0, 1199, 0, 1392, 0, 912,
+ 910, 909, 911, 0, 0, 894, 0, 0, 0, 0,
+ 0, 889, 0, 0, 891, 0, 0, 3526, 0, 0,
+ 3529, 0, 3255, 0, 3615, 1566, 3612, 0, 0, 1668,
+ 1546, 0, 995, 0, 3619, 3620, 980, 0, 990, 0,
+ 3619, 978, 0, 991, 988, 989, 0, 0, 0, 3613,
+ 3502, 3508, 994, 0, 0, 535, 537, 0, 0, 2339,
+ 2355, 0, 2380, 2410, 2411, 2473, 2502, 2507, 2512, 0,
+ 2541, 2552, 0, 1018, 1048, 1013, 725, 0, 0, 1607,
+ 985, 983, 1415, 1559, 2178, 0, 1668, 0, 0, 0,
+ 1234, 1235, 256, 228, 0, 0, 0, 1050, 2506, 1428,
+ 971, 650, 0, 0, 2019, 2020, 2217, 0, 0, 0,
+ 0, 0, 0, 2018, 0, 0, 0, 0, 0, 0,
+ 0, 1945, 0, 0, 2177, 0, 0, 2177, 0, 0,
+ 1980, 0, 0, 0, 0, 0, 0, 0, 0, 1946,
+ 1927, 1928, 3459, 2016, 2169, 0, 2017, 2259, 0, 1920,
+ 2159, 0, 2156, 2157, 2158, 2728, 2729, 2730, 2731, 2732,
+ 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742,
+ 2743, 0, 2744, 2745, 2746, 2747, 2748, 2750, 2749, 2751,
+ 2752, 2753, 2754, 2755, 2756, 2232, 2758, 2759, 2760, 2761,
+ 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771,
+ 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781,
+ 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791,
+ 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801,
+ 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811,
+ 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821,
+ 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831,
+ 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841,
+ 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851,
+ 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861,
+ 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871,
+ 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881,
+ 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891,
+ 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901,
+ 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 1960, 2910,
+ 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920,
+ 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930,
+ 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940,
+ 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950,
+ 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 1962, 2959,
+ 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969,
+ 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979,
+ 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989,
+ 2990, 2991, 2992, 2995, 2993, 2994, 2996, 2997, 2998, 2999,
+ 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009,
+ 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019,
+ 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029,
+ 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039,
+ 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049,
+ 3050, 3052, 3051, 3053, 3054, 3055, 3056, 3057, 3058, 3059,
+ 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069,
+ 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079,
+ 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089,
+ 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099,
+ 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109,
+ 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119,
+ 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129,
+ 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139,
+ 3140, 3141, 3142, 3143, 3144, 3145, 0, 2153, 2154, 2155,
+ 2147, 2148, 2149, 2150, 2151, 2152, 2163, 0, 0, 2238,
+ 2284, 2283, 0, 2106, 0, 1942, 0, 0, 1754, 1670,
+ 0, 2257, 2220, 0, 3509, 3512, 2012, 1754, 3384, 3383,
+ 3382, 3381, 3352, 0, 3346, 3347, 0, 3385, 3386, 272,
+ 273, 269, 0, 0, 224, 223, 0, 246, 247, 218,
+ 245, 0, 241, 242, 226, 2093, 2092, 225, 217, 214,
+ 212, 229, 231, 232, 215, 213, 267, 265, 0, 0,
+ 0, 0, 370, 3287, 1544, 1531, 0, 0, 2232, 0,
+ 2167, 0, 0, 2165, 0, 0, 0, 1751, 0, 1656,
+ 0, 1660, 1544, 0, 1540, 1651, 1650, 1692, 1693, 1093,
+ 1649, 1721, 1722, 0, 0, 0, 0, 1747, 1745, 1712,
+ 1703, 1711, 0, 0, 1709, 0, 1713, 1923, 1740, 1638,
+ 1697, 1698, 1701, 1637, 0, 1743, 0, 1610, 1741, 1702,
+ 1594, 0, 1572, 0, 1801, 0, 0, 0, 3295, 3293,
+ 3233, 1850, 3287, 3226, 3287, 3282, 3214, 1914, 1915, 1916,
+ 1917, 1918, 1919, 3215, 0, 3212, 1913, 3213, 632, 633,
+ 0, 0, 0, 3180, 0, 3161, 3186, 3318, 2524, 3350,
+ 0, 3351, 0, 0, 3315, 0, 3325, 3328, 3326, 3329,
+ 0, 1850, 3401, 3505, 3505, 1850, 1448, 0, 0, 0,
+ 1122, 1124, 0, 1123, 0, 1126, 0, 1135, 0, 0,
+ 1121, 1140, 0, 1129, 1127, 0, 1487, 0, 0, 933,
+ 0, 0, 0, 0, 1468, 0, 0, 2541, 260, 1471,
+ 1476, 1463, 1474, 0, 0, 0, 0, 0, 1052, 1051,
+ 0, 0, 1075, 0, 0, 0, 1494, 523, 0, 367,
+ 0, 0, 0, 0, 0, 0, 0, 0, 815, 812,
+ 0, 0, 811, 0, 664, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 689, 0, 1301, 0,
+ 299, 0, 1161, 0, 1160, 0, 1165, 0, 0, 1162,
+ 1157, 1158, 2507, 2516, 2547, 262, 1163, 1193, 0, 1192,
+ 1188, 0, 1104, 0, 1105, 0, 0, 0, 0, 0,
+ 2365, 2390, 307, 330, 0, 1300, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 352, 0, 0, 355, 354, 0, 0, 0, 0,
+ 0, 359, 338, 0, 339, 0, 358, 0, 0, 0,
+ 0, 0, 0, 1301, 0, 295, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1210, 0, 742, 0, 0, 2507,
+ 1189, 0, 0, 0, 0, 0, 0, 1379, 0, 0,
+ 179, 0, 174, 178, 0, 0, 2507, 1190, 0, 0,
+ 0, 0, 0, 615, 616, 629, 0, 620, 621, 618,
+ 622, 623, 0, 0, 0, 0, 0, 0, 0, 614,
+ 0, 0, 711, 710, 714, 0, 0, 0, 0, 0,
+ 0, 1385, 0, 0, 1184, 0, 0, 1384, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1244, 1243,
+ 0, 0, 0, 0, 1311, 0, 857, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 181, 729, 0, 728,
+ 0, 175, 180, 0, 0, 0, 0, 0, 0, 0,
+ 0, 236, 1437, 1443, 1691, 1691, 1691, 2030, 0, 0,
+ 0, 0, 1690, 2223, 2226, 1515, 1521, 1514, 1513, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 415, 412, 413, 415,
+ 0, 0, 0, 0, 831, 0, 834, 837, 1459, 488,
+ 0, 0, 656, 689, 0, 0, 468, 188, 0, 0,
+ 0, 0, 744, 0, 0, 0, 1374, 150, 197, 199,
+ 466, 0, 198, 200, 202, 203, 204, 201, 205, 0,
+ 708, 712, 0, 0, 0, 0, 652, 0, 0, 0,
+ 0, 0, 0, 0, 1821, 0, 0, 173, 0, 0,
+ 605, 609, 0, 3156, 0, 0, 468, 573, 381, 2390,
+ 0, 534, 0, 2390, 0, 1072, 0, 818, 0, 0,
+ 0, 1146, 1146, 0, 0, 758, 757, 0, 0, 0,
+ 0, 3178, 0, 0, 0, 0, 1623, 370, 1144, 0,
+ 153, 0, 0, 0, 0, 370, 1895, 1894, 1847, 1843,
+ 0, 0, 0, 0, 936, 0, 0, 0, 0, 0,
+ 0, 1863, 370, 1108, 187, 2278, 0, 898, 0, 0,
+ 0, 0, 370, 1212, 886, 370, 183, 370, 370, 655,
+ 0, 370, 185, 0, 0, 370, 930, 370, 2246, 0,
+ 370, 3527, 3533, 3531, 1569, 3616, 3610, 3611, 2390, 534,
+ 1628, 1548, 992, 999, 981, 998, 997, 979, 996, 993,
+ 3317, 0, 0, 3507, 0, 1010, 0, 533, 0, 0,
+ 0, 0, 0, 1026, 1027, 0, 0, 1023, 1028, 0,
+ 1024, 1025, 1030, 1020, 1019, 1031, 1032, 0, 0, 1050,
+ 723, 0, 0, 0, 0, 1604, 0, 1602, 0, 1799,
+ 1606, 1595, 1560, 0, 1558, 0, 598, 1071, 1071, 0,
+ 0, 1007, 0, 0, 370, 1427, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2182, 0, 2183,
+ 0, 0, 2216, 2212, 0, 0, 0, 0, 0, 2189,
+ 2190, 2191, 2188, 2192, 2187, 0, 0, 2193, 2186, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2173, 2176, 0,
+ 0, 2610, 0, 0, 0, 0, 1988, 0, 0, 2140,
+ 0, 2173, 0, 0, 0, 0, 0, 0, 0, 2169,
+ 2208, 0, 0, 0, 0, 2091, 0, 2088, 0, 0,
+ 0, 0, 2229, 0, 0, 2260, 1924, 1938, 1939, 1940,
+ 1943, 2237, 0, 2231, 0, 0, 1925, 1951, 0, 2209,
+ 1976, 0, 1981, 1966, 2194, 2195, 2196, 2197, 1983, 0,
+ 1959, 1964, 1968, 0, 1947, 0, 1944, 0, 2232, 2168,
+ 0, 2166, 0, 1935, 1936, 1937, 1929, 1930, 1931, 1932,
+ 1933, 1934, 1941, 2144, 2142, 2143, 0, 0, 0, 2114,
+ 0, 0, 1963, 2383, 2417, 0, 1682, 1682, 1682, 1669,
+ 1680, 2236, 0, 1816, 1691, 3514, 3513, 2230, 1816, 0,
+ 0, 0, 2242, 0, 0, 1920, 0, 266, 1797, 938,
+ 939, 937, 1850, 1517, 1530, 1544, 2170, 1538, 1658, 0,
+ 0, 1519, 1542, 0, 1091, 1092, 0, 1096, 2610, 2504,
+ 0, 0, 0, 0, 1714, 1748, 0, 1739, 0, 1715,
+ 2252, 2253, 1716, 1719, 1720, 1710, 1749, 1608, 0, 1744,
+ 1642, 1641, 0, 1819, 0, 0, 0, 1586, 1574, 0,
+ 1802, 0, 1754, 1612, 0, 2229, 1752, 3231, 3289, 3236,
+ 3257, 3227, 3260, 1922, 3209, 3249, 0, 3182, 3353, 3354,
+ 0, 3344, 3345, 3314, 3320, 3391, 0, 3506, 0, 0,
+ 1350, 1245, 1312, 1125, 0, 1865, 1136, 0, 1120, 0,
+ 1119, 1865, 0, 1137, 0, 1865, 1351, 1246, 1313, 934,
+ 1352, 1247, 1314, 1353, 1248, 1478, 1466, 1465, 1464, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 796, 2390, 370, 1492, 1354, 0, 1249,
+ 366, 1493, 1315, 1497, 814, 813, 0, 0, 1316, 0,
+ 665, 670, 0, 672, 673, 2317, 2373, 674, 677, 678,
+ 0, 680, 669, 668, 0, 0, 0, 0, 0, 686,
+ 688, 0, 0, 0, 0, 0, 0, 1155, 1156, 1355,
+ 1252, 0, 1317, 0, 1103, 0, 1253, 189, 0, 0,
+ 287, 2390, 309, 0, 486, 796, 0, 1303, 306, 336,
+ 0, 351, 346, 347, 345, 2390, 370, 2390, 370, 0,
+ 0, 0, 0, 0, 348, 343, 344, 340, 0, 0,
+ 353, 2289, 2357, 2517, 0, 697, 699, 0, 704, 356,
+ 1273, 377, 376, 375, 0, 360, 0, 382, 385, 357,
+ 337, 335, 332, 302, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1205, 0, 1358, 1318, 0,
+ 1340, 0, 0, 0, 0, 736, 1361, 1259, 1321, 0,
+ 1380, 1382, 1372, 1260, 1381, 177, 1290, 0, 0, 162,
+ 0, 0, 0, 0, 156, 166, 1362, 1261, 1322, 0,
+ 0, 1363, 1262, 0, 0, 292, 608, 619, 624, 1267,
+ 628, 625, 1330, 626, 1370, 1263, 0, 1366, 1293, 1325,
+ 593, 1184, 1184, 1373, 1386, 1264, 1184, 0, 1301, 0,
+ 281, 283, 0, 1071, 0, 1265, 0, 1323, 1365, 1292,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1500,
+ 0, 0, 0, 0, 0, 0, 370, 0, 0, 0,
+ 1303, 2390, 370, 1364, 0, 1298, 0, 1338, 0, 0,
+ 403, 0, 1291, 1301, 0, 294, 1269, 0, 1332, 0,
+ 0, 234, 233, 235, 0, 0, 0, 0, 2174, 2175,
+ 0, 2172, 2025, 2225, 0, 1511, 960, 946, 959, 0,
+ 942, 2355, 0, 945, 947, 0, 0, 0, 948, 952,
+ 953, 0, 944, 941, 943, 0, 414, 0, 0, 753,
+ 754, 0, 0, 0, 0, 833, 0, 0, 1490, 0,
+ 153, 663, 0, 0, 0, 658, 688, 693, 0, 0,
+ 0, 0, 467, 471, 475, 476, 477, 0, 0, 0,
+ 0, 167, 154, 0, 875, 0, 534, 0, 746, 1378,
+ 1377, 1183, 0, 199, 192, 0, 0, 709, 0, 1539,
+ 0, 0, 588, 2033, 591, 2034, 590, 0, 381, 828,
+ 826, 825, 827, 849, 824, 0, 1820, 1822, 0, 0,
+ 0, 0, 0, 0, 0, 470, 0, 0, 537, 0,
+ 576, 0, 0, 0, 0, 573, 0, 0, 0, 0,
+ 845, 3460, 817, 0, 1114, 0, 1132, 1115, 0, 0,
+ 0, 0, 1169, 1176, 1145, 1170, 1147, 1176, 0, 0,
+ 759, 763, 762, 766, 764, 0, 760, 637, 3176, 3170,
+ 1629, 1630, 0, 1202, 0, 0, 1486, 0, 1484, 0,
+ 1864, 1877, 897, 0, 1905, 1904, 1906, 1906, 0, 1848,
+ 0, 3599, 3607, 3606, 0, 1889, 1857, 1196, 370, 0,
+ 370, 0, 370, 1204, 1198, 1200, 1393, 0, 895, 0,
+ 0, 888, 890, 0, 892, 0, 0, 3316, 3503, 1011,
+ 536, 0, 0, 0, 0, 0, 0, 1022, 635, 1029,
+ 0, 1043, 1038, 1040, 0, 1044, 722, 0, 0, 1605,
+ 1598, 1600, 1599, 0, 0, 1596, 2179, 887, 0, 604,
+ 0, 0, 0, 0, 1050, 0, 1045, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1687, 2180, 2181,
+ 0, 0, 0, 2213, 0, 0, 2066, 0, 2038, 2040,
+ 2052, 0, 2067, 2023, 2068, 2042, 2044, 2053, 0, 0,
+ 2160, 0, 2056, 2055, 0, 1990, 1991, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2005, 2057, 2139, 0, 0,
+ 0, 2059, 2058, 0, 0, 2207, 0, 0, 0, 2064,
+ 2069, 0, 0, 0, 0, 2075, 0, 2096, 0, 0,
+ 0, 2013, 2170, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1982, 1967, 1985, 1961, 1965, 1969, 0, 1984, 0,
+ 0, 1955, 0, 0, 1953, 1977, 1949, 0, 0, 1978,
+ 0, 0, 0, 2031, 0, 0, 1682, 1682, 1682, 1682,
+ 1679, 0, 0, 0, 0, 2504, 2629, 0, 1778, 1753,
+ 1755, 1765, 1778, 1785, 1778, 1814, 2243, 0, 1724, 0,
+ 1724, 3366, 3368, 3369, 3370, 3371, 3372, 3374, 3375, 3377,
+ 3378, 3379, 3367, 3373, 3376, 3380, 3357, 3358, 0, 3348,
+ 3349, 210, 0, 243, 230, 3391, 1516, 1659, 1668, 1694,
+ 0, 2161, 1096, 0, 1696, 1717, 1718, 0, 1707, 0,
+ 1746, 1704, 1609, 1593, 0, 1591, 1578, 1580, 1579, 0,
+ 0, 1581, 2229, 0, 1591, 1573, 1617, 0, 0, 1819,
+ 0, 1616, 0, 3291, 3219, 0, 0, 3390, 3393, 3405,
+ 3402, 3229, 0, 1865, 1117, 1118, 0, 1141, 0, 1055,
+ 1056, 0, 1054, 0, 0, 0, 522, 1074, 0, 0,
+ 0, 796, 0, 0, 526, 0, 1495, 0, 1371, 1289,
+ 667, 0, 0, 0, 0, 682, 641, 683, 685, 0,
+ 0, 684, 687, 690, 1301, 0, 300, 1275, 0, 1336,
+ 1149, 0, 0, 1106, 0, 0, 0, 0, 0, 0,
+ 485, 693, 331, 0, 0, 0, 0, 153, 0, 311,
+ 323, 388, 329, 0, 362, 0, 334, 0, 327, 349,
+ 341, 350, 342, 361, 363, 0, 701, 702, 700, 696,
+ 0, 703, 705, 0, 379, 0, 0, 0, 0, 1357,
+ 0, 1301, 0, 296, 1271, 0, 1334, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1339,
+ 0, 0, 0, 0, 741, 0, 738, 0, 0, 0,
+ 159, 158, 0, 165, 0, 0, 0, 0, 0, 0,
+ 1387, 1388, 1389, 0, 0, 0, 0, 0, 0, 397,
+ 0, 303, 305, 304, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 404, 372, 0, 852, 0, 0, 0, 406, 0,
+ 0, 1349, 0, 0, 0, 0, 0, 1356, 1254, 2028,
+ 2029, 2026, 1691, 2224, 0, 0, 0, 957, 0, 0,
+ 0, 0, 417, 418, 153, 416, 439, 0, 796, 0,
+ 0, 830, 835, 843, 2449, 2147, 2148, 841, 836, 838,
+ 840, 839, 842, 0, 0, 0, 0, 504, 0, 0,
+ 0, 494, 0, 0, 1184, 487, 490, 491, 0, 0,
+ 659, 662, 660, 661, 0, 681, 0, 470, 511, 563,
+ 0, 169, 0, 0, 170, 168, 0, 0, 381, 743,
+ 0, 740, 0, 195, 0, 713, 0, 0, 0, 0,
+ 0, 1184, 651, 0, 848, 850, 822, 0, 693, 0,
+ 0, 610, 0, 534, 1570, 598, 0, 565, 470, 563,
+ 572, 0, 0, 580, 380, 0, 0, 598, 381, 0,
+ 0, 1075, 844, 0, 0, 0, 1113, 0, 0, 0,
+ 1166, 1171, 1167, 0, 1146, 1128, 0, 1168, 0, 0,
+ 1174, 1099, 1148, 1100, 1409, 1410, 1407, 1408, 0, 0,
+ 0, 0, 0, 0, 3193, 1619, 3203, 0, 0, 1482,
+ 0, 1883, 0, 1901, 1899, 1844, 0, 3287, 0, 0,
+ 0, 0, 0, 1849, 899, 0, 882, 0, 884, 370,
+ 730, 0, 370, 0, 0, 0, 0, 0, 0, 0,
+ 1021, 0, 1041, 0, 0, 1050, 1047, 0, 0, 1603,
+ 1601, 596, 0, 1236, 1237, 1050, 0, 370, 1049, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2184,
+ 0, 2215, 2211, 0, 2035, 2185, 0, 0, 0, 2140,
+ 0, 0, 1989, 2001, 2002, 2003, 2200, 0, 2008, 0,
+ 1998, 1999, 2000, 1992, 1993, 1994, 1995, 1996, 1997, 2004,
+ 2204, 2203, 0, 0, 2061, 2062, 2063, 2206, 2070, 0,
+ 2307, 2097, 0, 2074, 2090, 2089, 0, 0, 0, 2077,
+ 0, 0, 2086, 0, 2141, 2261, 1926, 0, 0, 1952,
+ 2210, 1970, 0, 1986, 1948, 2160, 0, 0, 0, 0,
+ 0, 1957, 0, 0, 0, 2117, 2112, 2113, 2137, 0,
+ 0, 0, 0, 0, 0, 1673, 1672, 1678, 1778, 1785,
+ 1778, 0, 0, 1644, 0, 1765, 0, 1777, 1763, 1776,
+ 0, 0, 1791, 1789, 0, 1791, 0, 1791, 0, 1757,
+ 0, 1781, 1759, 1776, 1761, 0, 1806, 2244, 1815, 0,
+ 1737, 2025, 1737, 0, 0, 0, 3389, 0, 0, 1695,
+ 1094, 1095, 1705, 0, 1708, 0, 1817, 0, 1592, 0,
+ 0, 0, 1583, 1589, 1571, 0, 0, 1613, 1591, 1614,
+ 3235, 0, 3290, 3355, 3356, 1138, 0, 0, 1130, 1061,
+ 1062, 1065, 1063, 1060, 1064, 0, 0, 0, 796, 0,
+ 0, 544, 0, 1088, 1088, 0, 0, 528, 585, 539,
+ 799, 0, 0, 0, 797, 370, 1250, 0, 0, 0,
+ 0, 642, 1369, 1251, 0, 0, 0, 0, 1150, 1304,
+ 0, 0, 1274, 0, 308, 484, 483, 488, 0, 0,
+ 314, 324, 0, 319, 0, 1302, 0, 0, 0, 0,
+ 318, 321, 392, 0, 389, 0, 370, 370, 364, 698,
+ 378, 383, 384, 387, 1309, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 876, 859,
+ 0, 0, 877, 878, 0, 0, 0, 1207, 1208, 1206,
+ 1341, 1342, 1347, 1344, 1343, 1346, 1345, 1348, 0, 1257,
+ 0, 0, 734, 1305, 163, 160, 161, 164, 1306, 1287,
+ 1268, 1331, 594, 0, 0, 0, 1266, 0, 1324, 0,
+ 1283, 1277, 0, 0, 0, 0, 0, 1368, 1297, 1329,
+ 1367, 1295, 1327, 1294, 1326, 1296, 1328, 1288, 0, 0,
+ 1824, 856, 0, 0, 0, 370, 370, 855, 732, 1270,
+ 0, 1333, 1279, 0, 0, 0, 949, 0, 0, 0,
+ 951, 422, 440, 153, 0, 752, 816, 0, 0, 832,
+ 0, 492, 0, 498, 502, 0, 0, 506, 507, 505,
+ 493, 1184, 534, 584, 785, 786, 0, 0, 806, 0,
+ 657, 0, 0, 468, 0, 508, 0, 0, 472, 172,
+ 171, 0, 0, 0, 747, 751, 749, 748, 750, 745,
+ 0, 736, 199, 2390, 0, 0, 0, 0, 592, 586,
+ 589, 1383, 823, 0, 1823, 726, 0, 381, 606, 3158,
+ 0, 0, 468, 598, 3157, 0, 473, 478, 479, 488,
+ 0, 573, 564, 0, 565, 574, 575, 0, 582, 1457,
+ 0, 599, 582, 0, 0, 0, 846, 0, 847, 0,
+ 1116, 1133, 1134, 0, 0, 1176, 0, 0, 1178, 1173,
+ 0, 0, 765, 768, 761, 644, 0, 3166, 370, 0,
+ 1485, 1845, 3600, 0, 3601, 3602, 3603, 3604, 3605, 370,
+ 370, 1233, 0, 893, 1035, 1036, 1037, 1034, 1033, 636,
+ 0, 1039, 1004, 724, 0, 597, 370, 0, 1005, 974,
+ 966, 973, 962, 965, 967, 0, 969, 970, 964, 961,
+ 963, 2214, 2051, 2054, 2065, 0, 2139, 2170, 0, 0,
+ 2009, 0, 0, 0, 2060, 2619, 0, 0, 2101, 2102,
+ 0, 2098, 2099, 2094, 2095, 2076, 0, 2438, 2081, 0,
+ 0, 0, 1974, 1972, 1971, 1956, 0, 0, 1954, 1950,
+ 0, 1979, 2103, 0, 2119, 2116, 2136, 2170, 1677, 1676,
+ 1675, 1674, 1764, 1760, 1762, 0, 2624, 0, 1767, 1774,
+ 0, 1756, 0, 1790, 1786, 0, 1787, 0, 0, 1788,
+ 0, 0, 1758, 0, 1774, 0, 1813, 1685, 0, 2108,
+ 2258, 2108, 3359, 0, 3362, 3360, 3361, 3365, 244, 1663,
+ 0, 1706, 0, 3615, 1575, 0, 1576, 1582, 0, 0,
+ 0, 0, 1618, 1611, 3292, 1131, 1139, 0, 0, 0,
+ 524, 0, 539, 0, 0, 0, 1081, 1090, 1080, 0,
+ 539, 0, 1184, 801, 800, 803, 798, 802, 1496, 0,
+ 675, 676, 679, 1276, 0, 1337, 1285, 0, 1607, 310,
+ 480, 317, 0, 0, 0, 312, 391, 393, 313, 316,
+ 320, 372, 333, 326, 0, 0, 0, 1272, 0, 1335,
+ 1281, 1308, 1359, 1255, 1319, 0, 0, 865, 0, 0,
+ 0, 0, 1360, 1256, 1320, 0, 0, 0, 0, 1607,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1505, 0,
+ 0, 371, 854, 853, 372, 405, 1299, 0, 2027, 0,
+ 950, 955, 956, 954, 0, 411, 419, 422, 0, 0,
+ 1224, 1224, 0, 0, 489, 503, 0, 584, 543, 0,
+ 495, 0, 0, 0, 0, 0, 694, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 739, 738, 194,
+ 0, 468, 0, 693, 0, 851, 0, 0, 0, 0,
+ 470, 0, 0, 3609, 469, 0, 0, 481, 0, 576,
+ 565, 573, 0, 0, 595, 0, 1450, 0, 601, 0,
+ 0, 0, 795, 1172, 0, 1186, 0, 1127, 1097, 1181,
+ 0, 1668, 1816, 0, 0, 0, 0, 778, 0, 648,
+ 3192, 3196, 1225, 1483, 3608, 883, 885, 731, 1042, 0,
+ 1046, 1050, 968, 2199, 2141, 2006, 0, 2202, 2201, 2205,
+ 0, 2071, 0, 2072, 2100, 2078, 2082, 0, 2079, 2080,
+ 1975, 1973, 1958, 2105, 0, 1691, 2138, 1809, 0, 1812,
+ 0, 0, 1766, 0, 0, 1768, 0, 0, 1770, 1772,
+ 0, 0, 0, 0, 0, 0, 2247, 0, 1736, 0,
+ 1646, 1645, 3364, 3363, 0, 1666, 2162, 1818, 1590, 0,
+ 0, 0, 1076, 0, 1615, 1043, 0, 370, 1088, 1184,
+ 545, 2449, 546, 1087, 1089, 1093, 0, 1184, 0, 584,
+ 671, 0, 0, 289, 0, 315, 325, 374, 386, 0,
+ 1607, 0, 0, 863, 872, 872, 860, 0, 0, 879,
+ 1258, 735, 0, 0, 284, 1284, 1278, 0, 0, 0,
+ 1507, 1508, 0, 0, 0, 0, 0, 1307, 370, 1280,
+ 958, 0, 442, 449, 423, 427, 1499, 0, 1499, 0,
+ 424, 428, 1499, 1499, 421, 1816, 438, 1224, 0, 1221,
+ 1220, 532, 612, 0, 496, 0, 554, 0, 0, 807,
+ 0, 0, 692, 0, 470, 563, 0, 521, 512, 513,
+ 514, 515, 517, 516, 518, 519, 520, 510, 509, 0,
+ 693, 869, 381, 1457, 733, 0, 0, 706, 0, 693,
+ 0, 1570, 598, 565, 470, 563, 1567, 474, 488, 0,
+ 580, 573, 576, 0, 577, 0, 581, 0, 0, 0,
+ 598, 1509, 1075, 0, 0, 796, 1185, 1146, 0, 0,
+ 1175, 1179, 1180, 0, 0, 0, 0, 1228, 772, 773,
+ 767, 769, 0, 780, 784, 643, 0, 0, 647, 638,
+ 0, 3194, 693, 370, 0, 2007, 0, 0, 2084, 2083,
+ 0, 2123, 1814, 0, 0, 1808, 0, 0, 1838, 0,
+ 0, 0, 1775, 1793, 0, 1771, 1769, 0, 1782, 0,
+ 1784, 2335, 2594, 2501, 0, 1723, 1725, 1728, 1730, 1729,
+ 1731, 1727, 2107, 2109, 0, 0, 0, 0, 1657, 0,
+ 1588, 1816, 0, 1585, 0, 1057, 0, 1058, 1082, 584,
+ 0, 1093, 1096, 534, 584, 0, 796, 1286, 0, 612,
+ 0, 328, 0, 297, 1282, 0, 0, 874, 874, 0,
+ 0, 0, 0, 0, 0, 399, 0, 0, 1501, 0,
+ 1502, 1503, 1506, 407, 420, 0, 447, 0, 445, 444,
+ 446, 0, 435, 0, 0, 0, 0, 0, 0, 410,
+ 1219, 1223, 1222, 0, 497, 0, 499, 0, 540, 541,
+ 542, 0, 501, 550, 551, 0, 804, 0, 809, 0,
+ 695, 0, 0, 693, 562, 717, 0, 0, 0, 1451,
+ 0, 0, 587, 727, 1457, 598, 3159, 573, 0, 565,
+ 482, 0, 582, 576, 580, 578, 579, 0, 1454, 0,
+ 600, 0, 1084, 794, 0, 1176, 1187, 1182, 1177, 1413,
+ 0, 0, 770, 775, 774, 1499, 779, 0, 0, 0,
+ 646, 645, 3197, 3199, 3198, 0, 721, 1006, 2198, 2087,
+ 2073, 2085, 2118, 0, 0, 0, 0, 1807, 1810, 0,
+ 1841, 0, 0, 0, 0, 1827, 0, 1773, 0, 0,
+ 1783, 0, 0, 0, 1732, 0, 0, 0, 0, 0,
+ 0, 1577, 1587, 1077, 0, 0, 549, 0, 1096, 1078,
+ 543, 796, 538, 525, 1607, 322, 373, 0, 0, 0,
+ 870, 873, 861, 862, 881, 880, 737, 1607, 0, 395,
+ 394, 0, 398, 0, 443, 452, 0, 450, 425, 430,
+ 0, 434, 432, 431, 426, 429, 531, 0, 0, 0,
+ 0, 0, 552, 0, 553, 583, 0, 808, 0, 0,
+ 0, 719, 868, 0, 0, 468, 693, 1452, 3609, 576,
+ 565, 573, 0, 0, 567, 1088, 1088, 455, 580, 582,
+ 1455, 1456, 0, 0, 381, 0, 1098, 1412, 1411, 1668,
+ 0, 0, 0, 781, 782, 777, 0, 0, 3195, 2582,
+ 0, 2555, 0, 2135, 2124, 2135, 2135, 2115, 0, 0,
+ 1839, 1840, 1825, 0, 0, 1829, 1780, 1805, 0, 0,
+ 0, 1726, 2110, 2111, 0, 0, 0, 1816, 370, 0,
+ 796, 547, 1079, 554, 527, 290, 1607, 864, 0, 285,
+ 0, 400, 1504, 448, 0, 433, 611, 500, 559, 0,
+ 558, 0, 556, 555, 805, 810, 0, 693, 858, 1457,
+ 707, 1568, 580, 573, 576, 0, 566, 0, 1090, 1090,
+ 582, 453, 0, 0, 582, 0, 1395, 1668, 1394, 1396,
+ 1404, 1401, 1403, 1402, 1400, 1231, 1232, 771, 776, 0,
+ 0, 0, 2128, 2127, 2126, 2130, 2129, 0, 2122, 2120,
+ 2121, 1811, 0, 1828, 1831, 0, 0, 1837, 1830, 1832,
+ 0, 0, 1792, 0, 1803, 1734, 0, 1733, 0, 0,
+ 0, 1584, 1059, 0, 529, 796, 298, 871, 0, 451,
+ 557, 561, 560, 693, 718, 1453, 582, 576, 580, 1088,
+ 568, 1089, 570, 569, 457, 1084, 1085, 0, 1816, 784,
+ 0, 1405, 1399, 1644, 1631, 0, 0, 783, 0, 0,
+ 0, 2132, 0, 2133, 0, 1835, 1836, 1833, 1834, 1779,
+ 0, 1735, 0, 0, 0, 0, 0, 530, 0, 720,
+ 456, 580, 582, 1090, 381, 1083, 0, 1066, 0, 1397,
+ 1668, 0, 0, 789, 2125, 2131, 2134, 0, 0, 1662,
+ 1661, 0, 0, 1665, 548, 396, 582, 454, 571, 582,
+ 1086, 0, 1398, 0, 0, 0, 787, 790, 793, 791,
+ 792, 0, 1804, 0, 0, 458, 1816, 0, 0, 0,
+ 755, 0, 1826, 1691, 0, 1067, 0, 0, 0, 788,
+ 0, 0, 789, 1229, 1230, 0, 1664, 0, 756
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -5912, -5912, 4484, -922, -5912, -5912, -1263, 385, 2749, -2753,
+ -5912, -5912, -5912, 1271, -5912, -5912, -5912, -5912, 3569, -5912,
+ 1432, -3283, -5912, -5912, -8, 3534, -1782, -3, 3079, 1078,
+ -5912, -1347, -5912, -5912, -954, -70, -5912, 3558, 177, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -1238, 1551, -5912,
+ 1630, 895, -877, -3372, -5912, -5912, -1944, -4139, -5912, 162,
+ -5912, 191, -5142, -1408, -5912, -5912, -5912, 1530, -5912, -5912,
+ -5912, 1477, 690, -828, -5912, -5912, -5912, -5912, -5912, -5912,
+ -1243, -5912, -5912, -1511, -67, -950, -3351, -4661, -5912, -5912,
+ 24, -865, -1922, -5912, 214, -5912, -4972, -5912, -461, -2569,
+ -5912, -5912, -5912, -838, -1883, 988, -5912, -1050, -1440, 1319,
+ -3152, -1364, -5912, -715, -5912, -1482, -1255, -1251, -1397, -4694,
+ -5210, -5912, -5912, -1513, -4149, -5496, -5695, -5206, -4962, 995,
+ -5912, -489, 29, -5912, -4011, -4704, -66, 5, -5912, -60,
+ -58, -5912, 22, -1183, -1312, -2022, -5912, -1195, -5912, -5912,
+ -5912, -3824, -5912, -5912, -5912, 56, -5912, -5912, -5912, -5912,
+ 67, -5912, -5912, -5912, -5912, -5912, -5912, -3529, 1505, 1507,
+ -5912, -4504, -5912, -1277, -5912, 228, -3870, 929, -5912, -5912,
+ 692, 3598, 61, -5912, -5912, -5912, -5912, -5912, -5912, -2112,
+ -5912, -5912, -5912, -5912, -459, -800, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -56, -5912, 656, 0, -5912, -5912, -1080,
+ -5912, -5912, -5912, -5912, -5912, -5912, -1556, -5498, -1648, -1636,
+ -5912, -3872, -5912, -5912, -5912, -775, -5912, -5912, -5912, -5912,
+ -5912, -1331, -5912, 750, -4482, -5912, -5912, 35, -5912, -5912,
+ -5912, -5912, -5912, -1363, -719, 2759, -5912, -942, -1156, -5912,
+ -5912, -5912, -717, -5912, -5912, -5912, -5912, -5912, -776, -1657,
+ 4811, 4024, -1496, 9866, -1235, -872, -5912, -5912, -5912, -3154,
+ -5912, -5912, -4656, -5912, 4789, 70, -720, -54, -5912, -169,
+ -33, 3356, -1570, -3544, -20, -900, -5912, -5912, -5912, -3489,
+ -5912, -5912, -5912, -5912, -4444, -52, -5912, -1055, -5912, -4721,
+ -5503, -4923, -4479, -1528, -5912, -4588, -5911, -5398, -4430, -5912,
+ 1540, -5912, -5912, -850, -887, 2737, -5912, -1891, 1876, -1867,
+ -5912, -3001, 59, 1093, 2747, -3624, -795, 2729, -3391, -5912,
+ -1045, 684, -5912, -799, -4159, -5912, -5912, -5912, -3198, -1025,
+ -5912, -5912, 1314, 523, -5912, -5912, -5912, -5912, -949, 2678,
+ -876, -5912, -5912, 3972, -5912, -4613, -5912, 3944, -5912, -5912,
+ -5912, -5912, 2579, 2580, -5912, -5912, -1886, 862, -5912, -1175,
+ -5912, -5912, 1649, 279, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, -5912, -5912, -5912, -1344, -1544, -5912,
+ -5912, -5197, -5912, -5912, -5912, -5912, -5912, 2001, -1295, -1090,
+ 3841, 805, -50, -5600, -5912, -5912, -1484, -5912, 3085, -5912,
+ -5912, -5912, -5912, -5912, 74, 73, -5912, -5912, -5912, -5912,
+ -4514, -5912, -5912, -5229, -5912, -5912, 1650, -5912, -5912, 953,
+ -69, 2881, -5912, -5912, -5912, -187, -5912, -5912, -1362, 2036,
+ -5912, -2746, -5912, -884, -5912, -5912, -2292, -49, -4693, -64,
+ -5912, -5912, -567, -5912, -120, -5912, -5912, -4336, -62, -5912,
+ -5912, -5912, -5912, -5361, -5912, -61, -1222, 436, -3666, -5912,
+ -47, -5, 3474, 1478, -68, 1105, -245, -193, -179, -65,
+ -27, 3231, -5912, -5912, -5912, -5912, 3281, -5912, -182, -1154,
+ -5912, -5912, -1197, -335, -5912, 1232, -938, 2008, 3210, 3216,
+ -5912, 1226, 2045, -2780, -2774, -5912, 506, -1319, -1196, -5912,
+ -5912, -5912, -5912, -81, -936, 2024, -5912, 3223, -5912, -5912,
+ -5912, -2711, -3713, -4342, 529, -4339, -4248, -5912, -42, -48,
+ -1969, -782, -189, -1121, 3224, -5912, -5912, 536, -981, -5912,
+ -5912, -978, -3679, 468, -5912, -5308, -3181, 542, -1478, -1293,
+ -5912, -1387, -5912, -1160, 5525, -2106, -1461, -5912, -5912, -1419,
+ 16114, -5912, -5912, -5912, 19946, 20540, -5912, -5912, 23434, 24282,
+ -5912, -1231, 29187, 14776, -1439, -1403, -1696, 30888, -2075, 2518,
+ 7, -5912, -3067, -3300, -5912, -5912, -5912, -737, 598, 330,
+ -5912, -5337, -4760, -5912, -5912, -506, -5912, -1170, -5912, -1169,
+ -5912, -5912, -5912, -3149, -5865, -3272, 2165, -5912, -5912, -5912,
+ -808, -5912, 31834, -3593, -5912, -1056, -1372, -2002, 2633, -3211,
+ -2296, -5912, -5912, -5912, -3474, -5912, -5912, -5912, -907, 1343,
+ -5912, -5912, 1442, -5912, -5912, -5912, -1326, 1711, -1123, -3483,
+ 1350, -5912, -1126, 2173, -1133, 10288, -1001, 28982, -1734, -5912,
+ 7293, -4373, 4463, -141, -766, 6034, -955, -943, -5912, 8443,
+ 7981, 6914, -4018, -5912, -5912, -5912, -45, -5912, -5912, -5912,
+ -5912, 4407, 785, -5912, 3634, -5912, 1607, 2854, -5912, -5912,
+ 2038, -967, -55, -5912, -1115, -5912, -99, -5912, -5912, -5912,
+ -5912, 328, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912,
+ -5912, 3265, -5912, -5912, -1641, -5912, -5912, -5912, -5912, -5912,
+ 4720, -346, -5912, 4046, -344, -5912, -5912, -5912, -5912, -5912,
+ -5912, -5912, -5912, -5912, 3284, 2070, -5912, 3829, -5912, -5912,
+ -5912, 28, 3549, -5912, -5912, -5912, -637, -898, 3863, 3866,
+ 2027, -5912, -5912, -5912, -5912, -5912, -5912, -5912, -5912, 2039,
+ -5912, -5912, 1324, -2813, 2042, -5912, -5912, 505, -5912, -5912,
+ -14, -5912, 516, -5912, 3364, -5912, -5912, -5912, 559, -5912,
+ -5912, -5912, -513, 21612, -57, 98, 64, 1857, -5912, 17226,
+ 10851, -100, 3296, -43, 12000, 25354, -6, -5912, 4714, 2050,
+ 1559, -1142, -5912, 464, 2764, 30755, -5912, -1130, 55, -2,
+ -1127, 2113, -707, -1320, 3576, -778, -2272, -5912, 5144, -5912,
+ -4052, -5483, -1171, -456, 4055, -1325
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ 0, 1, 248, 249, 250, 251, 2047, 3427, 3282, 4231,
+ 4232, 252, 253, 2043, 254, 255, 256, 257, 1961, 258,
+ 1440, 2214, 3442, 259, 3128, 1182, 1183, 1184, 2970, 2971,
+ 3372, 2972, 2959, 1787, 2160, 1983, 1147, 1148, 1942, 1984,
+ 261, 262, 1781, 2951, 263, 264, 265, 2014, 2103, 2015,
+ 2016, 1955, 2266, 5330, 6111, 4025, 3246, 4282, 4026, 4027,
+ 4690, 4691, 4771, 6125, 6126, 266, 2119, 2120, 267, 268,
+ 3409, 4197, 4824, 5715, 5716, 5944, 964, 5353, 5354, 5931,
+ 5932, 6139, 6296, 6297, 3443, 995, 4277, 4907, 4222, 5425,
+ 4223, 5426, 4224, 5427, 4680, 4681, 4208, 4855, 4856, 5366,
+ 4857, 4225, 5385, 5977, 4226, 3147, 6154, 3477, 2387, 2385,
+ 5632, 5956, 5190, 5191, 6390, 6162, 6163, 6164, 6412, 5387,
+ 5431, 5432, 6333, 6334, 4280, 4913, 5438, 5774, 5730, 3923,
+ 270, 4251, 4252, 271, 2236, 4399, 1077, 3480, 996, 1078,
+ 3444, 275, 3470, 6156, 3471, 2073, 3296, 4837, 4379, 276,
+ 1467, 4655, 5799, 6038, 6039, 1062, 277, 2222, 278, 279,
+ 3422, 4215, 280, 3164, 3940, 281, 282, 3959, 3960, 3961,
+ 283, 4865, 5735, 2017, 4014, 4015, 4016, 4017, 4711, 284,
+ 2217, 3451, 3452, 285, 286, 287, 3612, 3613, 288, 3358,
+ 289, 290, 291, 292, 4746, 5292, 5401, 4055, 4238, 4881,
+ 5399, 293, 4201, 3445, 3498, 4315, 4316, 5797, 6030, 6031,
+ 6032, 6215, 6447, 6034, 6217, 6355, 6219, 5376, 6575, 6576,
+ 6015, 4644, 5204, 295, 5377, 5378, 6169, 296, 3162, 297,
+ 298, 2191, 3415, 3416, 4838, 3487, 4289, 4290, 4893, 4894,
+ 299, 4139, 300, 5268, 5269, 997, 6177, 6117, 6282, 301,
+ 302, 5272, 5273, 303, 304, 305, 306, 307, 1063, 1404,
+ 1405, 1065, 1568, 1569, 3895, 1513, 308, 2982, 309, 4177,
+ 310, 1662, 5500, 311, 1101, 1595, 1596, 3446, 313, 1112,
+ 3631, 1114, 2402, 4381, 4382, 4995, 314, 315, 3609, 3634,
+ 316, 1948, 3138, 3139, 5185, 3447, 998, 1647, 3484, 3918,
+ 5871, 5626, 5872, 6344, 6507, 5627, 5885, 3817, 4584, 318,
+ 999, 1989, 3203, 1536, 1537, 3491, 4295, 3107, 3108, 2143,
+ 4934, 3110, 4297, 3111, 1922, 3112, 1485, 1486, 4303, 4304,
+ 4305, 4306, 4930, 4940, 4941, 5791, 6023, 4937, 3436, 5785,
+ 5786, 319, 1986, 3200, 320, 321, 322, 2026, 1328, 1546,
+ 1547, 323, 1024, 1025, 324, 5949, 325, 1488, 326, 5795,
+ 327, 328, 1136, 1137, 329, 330, 3217, 4693, 331, 1987,
+ 332, 333, 4049, 4050, 5284, 334, 335, 336, 2209, 2210,
+ 337, 338, 339, 340, 341, 6438, 6510, 6511, 6512, 4948,
+ 6349, 342, 1638, 343, 344, 345, 346, 943, 1370, 1371,
+ 1372, 1289, 3448, 5776, 348, 349, 1943, 1944, 1945, 1946,
+ 3133, 350, 351, 352, 4327, 4328, 353, 354, 355, 356,
+ 2194, 357, 358, 5922, 359, 360, 2164, 361, 362, 1378,
+ 1379, 1380, 1381, 2162, 3805, 958, 1202, 1814, 1820, 1824,
+ 1825, 1826, 364, 1080, 365, 1642, 1409, 1081, 1588, 1082,
+ 3041, 3847, 4599, 4600, 4601, 4604, 5610, 5158, 1083, 3843,
+ 369, 2409, 3618, 3621, 3839, 1084, 3852, 3853, 3854, 4607,
+ 1085, 1103, 1477, 3505, 1086, 1735, 374, 375, 376, 1211,
+ 1205, 1206, 3810, 5865, 6088, 378, 2928, 3779, 1121, 1830,
+ 1166, 1167, 1219, 3382, 3007, 3008, 3032, 3033, 1839, 1840,
+ 3020, 3024, 3025, 3829, 3823, 3013, 5140, 6075, 6076, 6077,
+ 6078, 6079, 6080, 5589, 3028, 3029, 1842, 1843, 1844, 3037,
+ 379, 3783, 4539, 4540, 4541, 5117, 5118, 6472, 5132, 5128,
+ 5574, 5848, 4542, 1632, 1850, 5582, 6474, 4543, 5837, 5838,
+ 6055, 5136, 4548, 4595, 4265, 4266, 4267, 4544, 6244, 6245,
+ 6468, 6469, 6057, 6058, 3113, 2296, 1515, 1736, 1516, 2304,
+ 1737, 2280, 1518, 1738, 1739, 1740, 1521, 1741, 1742, 1743,
+ 1524, 2272, 1744, 1745, 2290, 1251, 1252, 1815, 6059, 1747,
+ 1748, 1749, 4545, 1750, 5072, 5540, 5526, 3706, 3707, 2967,
+ 5068, 4483, 5062, 2923, 3769, 5860, 6082, 6083, 4523, 5096,
+ 5554, 5835, 6236, 6363, 6364, 6458, 1751, 1752, 1753, 3766,
+ 2916, 1331, 1754, 4840, 2918, 3700, 3678, 2146, 3679, 2415,
+ 2435, 3650, 3665, 3666, 3743, 3680, 3688, 3693, 3701, 3730,
+ 1755, 3652, 3653, 4424, 2437, 1756, 1376, 2149, 1377, 2936,
+ 3725, 1771, 1757, 1758, 2403, 1193, 5844, 788, 2151, 1118,
+ 1759, 1760, 1761, 1872, 731, 1539, 1540, 733, 2919, 772,
+ 773, 946, 884, 2920, 2, 70, 1087, 4274, 5759, 383,
+ 384, 1001, 1002, 1003, 1469, 1470, 2251, 2254, 1877, 3075,
+ 737, 738, 789, 5467, 5800, 6041, 1071, 385, 386, 387,
+ 388, 389, 1873, 3071, 1253, 71, 79, 72, 1254, 426,
+ 427, 3052, 390, 901, 391, 1853, 1233, 4613, 392, 393,
+ 394, 395, 396, 1068, 397, 1235, 398, 1236, 399, 400,
+ 401, 402, 1243, 403, 1855, 1856, 5172, 1857, 404, 405,
+ 775, 776, 1586, 406, 407, 1270, 2354, 1272, 1615, 1883,
+ 1897, 1898, 1899, 408, 745, 409, 410, 411, 1889, 1890,
+ 412, 2944, 2945, 3080, 2946, 413, 3868, 3869, 414, 4566,
+ 4567, 5595, 4568, 415, 2940, 416, 417, 1196, 4618, 418,
+ 897, 419, 1284, 777, 778, 779, 948, 887, 1152, 780,
+ 950, 4018, 889, 890, 781, 782, 783, 2379, 73, 3876,
+ 2380, 1763, 790, 1764, 2934, 1765, 1766, 1767, 1768, 1769,
+ 1770, 785, 1260, 1578, 1579, 3877, 1581, 77, 1582, 423,
+ 4344, 2355, 1616, 3566, 2365, 2366
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 75, 2145, 1210, 260, 363, 372, 269, 272, 377, 367,
+ 888, 368, 370, 273, 1382, 274, 420, 294, 1804, 312,
+ 1105, 317, 420, 347, 366, 1845, 371, 1302, 382, 1434,
+ 421, 1192, 2072, 774, 2159, 1335, 421, 1158, 1340, 1782,
+ 1220, 1772, 1105, 1329, 1195, 2312, 1230, 2286, 1231, 1012,
+ 3309, 2153, 1017, 420, 3109, 1871, 888, 74, 1928, 1623,
+ 1624, 1625, 1831, 1571, 1833, 1629, 3146, 3241, 2077, 1479,
+ 774, 1809, 2292, 3212, 1810, 4221, 2137, 2276, 2277, 3563,
+ 1480, 741, 1648, 2219, 1268, 787, 2426, 2285, 4404, 1796,
+ 1079, 1552, 1004, 1011, 377, 792, 1016, 3204, 2124, 420,
+ 1127, 4307, 1011, 2204, 892, 1565, 2071, 3888, 3890, 4550,
+ 1290, 1330, 3213, 4682, 3224, 2102, 2019, 3465, 2228, 4892,
+ 4385, 3109, 1589, 2302, 3624, 2129, 4104, 1900, 888, 4593,
+ 3789, 955, 1113, 1382, 4661, 2018, 4918, 3649, 3376, 1902,
+ 944, 4706, 1905, 4708, 1011, 1005, 1014, 1816, 4943, 1306,
+ 892, 1026, 5149, 941, 4255, 1271, 4244, 2192, 1338, 5192,
+ 2036, 2197, 3338, 3339, 4136, 2053, 2201, 3059, 3061, 3062,
+ 1330, 420, 1360, 1159, 886, 2211, 1214, 5227, 940, 1119,
+ 3519, 2384, 1990, 1403, 1222, 4606, 2161, 1562, 2231, 4841,
+ 5187, 1591, 1382, 3119, 1550, 5114, 3195, 1554, 1223, 1154,
+ 5445, 5424, 1146, 1614, 5131, 1181, 5384, 1154, 885, 1154,
+ 1429, 5423, 1189, 5441, 3334, 5434, 1438, 3053, 3053, 1208,
+ 886, 1789, 892, 4582, 5771, 3553, 3788, 2270, 1451, 4491,
+ 5841, 1102, 1480, 1330, 5252, 5960, 5778, 4180, 3803, 4183,
+ 4184, 3365, 5739, 3832, 4188, 4189, 4190, 5433, 4192, 4193,
+ 4194, 3835, 3195, 1102, 885, 5650, 3811, 1985, 1382, 2350,
+ 4622, 4902, 1809, 2273, 2274, 4507, 2276, 2277, 5164, 3195,
+ 1382, 5628, 1263, 6000, 2284, 5853, 2292, 5855, 6013, 2371,
+ 5996, 1838, 1892, 1841, 4617, 2942, 2285, 5893, 4966, 1580,
+ 1985, 5770, 886, 2303, 5129, 1985, 5134, 1879, 1880, 962,
+ 1473, 5531, -3463, -2251, 3175, 6192, 4448, -1898, 2227, 39,
+ 429, -3463, -3463, 260, 363, 372, 269, 272, 377, 367,
+ -1865, 368, 370, 273, 1892, 274, 885, 294, 5914, 312,
+ -1878, 317, -3464, 347, 366, 420, 371, 2263, 382, 429,
+ 2377, -3464, -3464, -3461, 38, 39, 2980, 1664, 1665, 421,
+ 40, -1903, -3461, -3461, 5502, 5503, 5504, 39, 5506, 5507,
+ 5508, 5509, 5510, -1906, 2184, 1957, 3345, 3350, 1882, 1885,
+ 420, 1601, 4611, 1259, -1893, 1606, 1607, 1608, -1906, -3460,
+ 3685, -2635, 39, 6179, 421, 1619, 1285, 4254, -3460, -3460,
+ -2635, -2635, 39, 5394, 5415, 3723, 2481, 429, 1288, -2250,
+ 2263, 3723, 39, 2241, 5625, 39, 1640, 425, 429, 1657,
+ 4402, 3215, 3433, 38, 39, 3215, 6116, 2356, 4161, 40,
+ 2407, 1786, 4928, 2263, 4211, 3934, 35, 2987, 2926, 2189,
+ 37, 4662, 6408, 35, 429, -3191, 1366, 37, 1480, 38,
+ 39, 429, 5448, 2273, 2274, 40, 38, 39, 429, 1664,
+ 1665, -2145, 40, 38, 3763, 3407, 3130, 5767, -2145, 40,
+ 2989, 3764, 1775, 5793, 1217, 3004, 3140, 5924, 5925, 2284,
+ -2164, 1612, 1916, 5608, 4199, -2431, 2263, -2164, 429, 1958,
+ 3495, 6347, 4255, 2153, 2134, 2206, -153, 6102, 5395, 40,
+ 3425, -153, 3326, 4872, 6451, 3215, -1720, -153, 5923, 6339,
+ 3462, 2137, 6151, 3496, 5374, 2171, 6194, 3782, 5200, 2176,
+ 3770, 2177, 1957, 5892, 2481, 3430, 4067, 6502, 6503, 2175,
+ 4448, 5270, 1460, 3262, 2263, 3276, 5732, 3011, 4830, 4074,
+ 2263, 2353, 2263, 3190, 4212, 2263, 1367, 3215, 4393, 6113,
+ 1627, 5150, 4255, 1164, 3142, 2987, 6069, 739, 3332, 2949,
+ 4889, 3921, 2957, 2933, 6144, 1287, 2055, 1231, 4551, 6145,
+ 6001, 4552, 4553, 6353, 3143, 1584, 429, 35, 429, 429,
+ 4068, 37, 4554, 4555, 4556, 5396, 4557, 4558, 2989, 40,
+ 40, 4559, 4560, 4561, 6327, 1368, 2929, 1330, 1200, 2418,
+ 3215, 2166, 5201, 2320, 2056, 6354, 2981, 3293, 3152, 2960,
+ 2929, 4765, 429, 5151, 2973, 2973, 3215, 5988, 4074, 6146,
+ 3215, 3922, 2476, 4448, 5920, 5636, 3215, 3633, 4394, 2264,
+ 2950, 2190, 898, 3012, 899, 1106, 1958, 1628, 3191, 4069,
+ 2976, 2977, 6568, 5271, 3431, 6409, 2294, 5921, 3633, 2932,
+ 1004, 2310, 1369, 6430, 5733, 1266, 1267, 1106, 1165, 1503,
+ 5375, -441, 3771, 5202, 6554, 6152, -3191, 5203, 2343, 2308,
+ 2135, 3263, 4873, 6348, 2153, 3497, 2190, -1720, 4422, 2319,
+ 1917, 2958, 2404, 2322, 3380, 4200, 5952, 2325, 2475, 2327,
+ 3463, 4938, 2264, 3426, 6309, 2335, 5609, 4662, 2417, 1011,
+ 1011, 2341, 1613, 1005, 2344, 1949, 3408, 6338, 4841, 1130,
+ 1612, 1614, 2427, 6268, 5794, 2264, 1614, 2430, 3418, 2360,
+ 3277, 3144, 2927, 1959, 6410, 1300, -2431, 4858, 1480, 5763,
+ -3191, 4213, 1893, 5286, 2408, 2481, 3180, 6496, 1018, 1612,
+ 5397, 1641, 4562, 4070, 3351, 3935, 1259, 1628, 1628, 5393,
+ 4822, 4823, 6411, 963, 1353, 3364, 2025, 2271, 3225, 3963,
+ 3614, 3724, 1888, 2408, 2190, 1257, 2987, 4512, 2264, 1264,
+ 3327, 4162, 3346, 3352, 1893, 5954, 3374, 3375, 2190, 5197,
+ 5131, 3182, 5824, 1914, 3645, 2265, 1960, 1659, 5571, 5442,
+ 2378, 3189, 5575, 6187, 3255, 3434, 4463, 1131, 2943, 2989,
+ -2431, 4929, 1374, -3463, -2251, 3046, 1375, 1276, -1898, 2349,
+ 5398, 3314, -2431, 6542, 3304, -2145, 2264, 3307, 3765, 1950,
+ 4214, 2275, 2264, 1265, 2264, 2287, 2136, 2264, 3000, 6495,
+ 3526, 2279, 1374, -3464, -2164, 3145, 1375, 1894, 1895, 4038,
+ 2287, 1210, 5613, 6422, -3461, 4608, 2288, 2955, 2293, 6432,
+ 420, 3373, -1903, 3555, 420, 6421, 6566, 3256, 1480, 5812,
+ 1465, 2288, 3464, 2190, 2289, 4071, 1480, 1480, 421, 6450,
+ 5562, 2307, 5564, 4072, 3294, -1893, 4073, 3297, 3298, 2291,
+ -3460, 3333, -2635, 2478, 2361, 4563, 2915, 2363, 4890, 3615,
+ 2367, 942, 2369, 2930, 3531, 2372, 4624, 1846, 4625, 2376,
+ -2250, 892, 1593, 3794, 3594, 1413, 6583, 5593, 377, 1410,
+ 6293, 1411, 1412, 4760, 4761, 3606, 4841, 3038, 4762, 3039,
+ 1475, 3076, 1201, 6395, 2318, 5007, 5474, 5475, 5476, 5477,
+ 5478, 3153, 1869, 1870, 4766, 900, 6399, 6106, 6498, 1894,
+ 1895, 6368, 1631, 4564, 5637, 4890, 1869, 1870, 2310, 1244,
+ 4803, 3199, 2045, 3584, 5214, 3859, 1132, 1594, 3381, 1600,
+ 5257, 1605, 1259, 1798, 1011, 6098, 5356, 1609, 1407, 4994,
+ 4883, 886, 2340, 5352, 5026, 2046, 1099, 1100, 2343, -1632,
+ 2310, 1951, 4902, 4994, -153, -153, 4939, 3395, 4570, 6331,
+ 3651, 1600, 1605, 1653, 5953, 3875, 6337, 1133, 1134, 3879,
+ 3199, 2912, 2913, 2914, 2915, 885, 6310, 4460, 4461, 4462,
+ 4463, 6541, 5177, 5355, 2298, 1301, 1631, 3199, 1019, 1952,
+ 377, 2263, 35, 2927, 1245, 1585, 37, 4859, 1222, 1011,
+ 35, 1481, 1026, 4311, 37, 1425, 6190, 39, 2350, 6319,
+ 39, 4817, 1223, 2058, 39, 6486, 1224, 1849, 4030, 3574,
+ 3954, 3832, 1093, 1953, 4565, 3577, 6330, 1533, 4587, 3,
+ -1632, 3516, 3517, 6453, 1666, 2059, 1273, 4448, 3226, 4576,
+ 6252, -3465, -3465, -3465, 1459, 75, 1094, 1020, 1590, 3837,
+ 3954, -1719, 3227, 6587, 3228, 1246, 3715, 3748, 1247, 1245,
+ 3264, 4843, 743, 3616, 1135, 1599, -2376, 1604, 4458, 4459,
+ 4460, 4461, 4462, 4463, 1217, 2108, 39, 1618, 4389, 5993,
+ 6036, 1860, 1932, 3617, 2223, 1021, 2060, 1022, 5950, 1130,
+ 4312, 1954, 1964, 3967, 1259, 3954, 774, 1634, 1636, 5162,
+ 6423, 3955, 74, 1225, 1639, 6524, 3625, 1460, 4846, 5465,
+ 1620, 4391, 35, 6431, 3659, 3229, 37, 6266, 2109, 420,
+ 1246, 4609, 6271, 2299, 5192, 3056, 3065, 2224, 5285, 3066,
+ 2153, 3955, 6440, 1811, 3595, 1933, -1632, 5692, 1658, 428,
+ 1598, 5913, 1603, 39, 1881, 1785, 1215, 1154, 1776, 1793,
+ 39, 1154, 1788, 1481, 1790, 3838, 5409, 1817, 373, 902,
+ 1884, 5693, 5898, 3565, 2446, 3174, 4848, 4657, 3478, 1248,
+ 791, 5001, 1633, 1635, 1799, 2061, 3955, 1131, 6454, 1779,
+ 2910, 2911, 2912, 2913, 2914, 2915, 4839, 1666, 3968, 3660,
+ 4448, 1461, 1382, 2310, 4449, 4450, 4451, 3749, -1632, 3513,
+ 3057, 1330, 3750, 903, 6504, 1941, 6213, 1612, 6508, 5842,
+ 5845, 3956, 1216, 3140, 4255, 5849, 6048, 4255, 5851, -2247,
+ 6440, 3887, -1719, 2062, 959, 4031, 2063, -1865, 1023, 5987,
+ 1093, 6465, 3141, 1934, 1248, 123, 124, 3154, 1116, 3751,
+ 3067, 3308, 741, 741, 373, 3603, 3604, 1904, 1800, 3957,
+ 3661, 6172, 6214, 3662, 1094, 2152, 6037, -1635, 5757, 5723,
+ 1653, 3058, 5769, 4444, 4851, 5313, 5382, 3982, 6186, 2310,
+ 6540, 6201, 3964, 2264, -2412, 2065, 5788, 3958, 6185, 4935,
+ 1249, 6189, 3312, 6171, 4164, 1874, 6200, -2376, 1217, 1621,
+ 2110, 3142, 3892, 3129, 1274, 1426, 5620, 4944, 420, 2225,
+ 1072, 4313, 4390, 1250, 1903, 4021, 4852, 3958, -1632, -1865,
+ 4454, 3143, 744, 6188, 6150, 4314, 6567, 1534, 4255, 2067,
+ 1073, 3557, 4853, 1154, 1154, 5002, 1146, 2094, 1226, 3474,
+ 2476, 893, 1209, 6440, 3534, 4392, 1132, 1462, -1635, 1861,
+ 6585, 894, 2068, 6586, 4176, 2300, 1874, 4039, 3546, 892,
+ -1632, -2376, 3958, -1632, 3475, 1074, 3646, 3648, 4171, 1481,
+ 4022, 3552, 2070, 3655, 3663, 1613, 3899, -691, 3593, 3669,
+ 3670, 3671, 3598, 4452, 1463, 1248, 3602, 1133, 1134, 3605,
+ 3690, 1613, 6466, 3752, 4945, 3702, 35, 6467, 3155, 3515,
+ 37, 3861, 3596, 3861, 2111, 4453, 3195, 1938, 1666, 1939,
+ 3533, 4448, 6141, 2226, 6143, 4449, 4450, 4451, 6147, 6148,
+ 2298, 4750, 6096, 4684, 4588, 3537, 1874, 1072, 5499, 886,
+ 4854, 5694, 3543, 3544, 4658, 6243, 6049, 1218, 1269, 3309,
+ 1374, 2037, 6158, 1464, 1375, 1465, 3532, 1073, 5314, 1466,
+ 1666, 1237, 3551, 4448, -1635, 895, 1614, 4449, 4450, 4451,
+ 3508, 3545, 1614, 885, 3547, 3571, 6175, 4023, 3144, 5383,
+ 1238, 6328, 1221, 4454, 5077, 6183, 2481, 6112, 373, 1210,
+ 1239, 3917, 1074, 4547, 6406, 3664, 1932, 1093, 3156, 5420,
+ 5612, -1865, 5367, 3440, 3676, 1245, 5492, 5528, 6065, 1330,
+ 1330, 5736, 2282, 2283, 2480, -2412, 5496, 2481, 3921, 2113,
+ 3893, 1094, 3894, 2249, 5421, 2114, -1635, 2329, 377, -3465,
+ -3465, -3465, 4458, 4459, 4460, 4461, 4462, 4463, 6226, 4951,
+ 4608, -2433, 3597, 5455, 4952, 3600, 3601, 4685, 2987, 1933,
+ 2989, -1075, 1106, 5265, 1106, -3465, 1106, 202, 3784, 4946,
+ 5152, 3091, 1106, 1231, 6386, 2038, 1246, 3476, 6520, 2299,
+ 2330, 5193, 5369, 5368, 75, 75, 1093, 75, 4640, -2412,
+ 3057, 2989, 6159, 6233, 3441, 1585, 1106, 1106, 212, 4255,
+ 4255, 2362, 3145, 2364, 1240, 39, 2368, 3242, 2370, 4296,
+ 1094, 2373, 2374, 2375, 4731, 4589, 2153, 4445, 4446, 896,
+ 3787, 3158, 4465, 6263, 2382, 2310, 6491, 3474, 5529, 3109,
+ -2470, 3159, 6002, 3109, 220, 3148, 4453, 2985, 2410, 4947,
+ 2411, 74, 74, 2115, 74, 2412, -1635, 3005, 3006, 5420,
+ 3010, 3058, 3475, 2286, 4024, 1330, 4841, 1934, 6521, 4495,
+ 4496, 1223, 1223, 3149, 1223, 3644, 5373, 6160, 1849, 1481,
+ 6532, 975, 5346, 1241, 5421, 5266, 231, 5350, 4453, 6321,
+ 1075, 4120, 6269, 3844, 202, 3242, 6003, 4121, -1635, 234,
+ 1248, -1635, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462,
+ 4463, 6004, 3586, 5411, 4454, -3465, 4575, 2007, -1865, 4597,
+ -3465, 6352, 246, 3014, 6007, 212, -1865, 1935, 2275, -1865,
+ 1927, -1865, 6008, 3306, 1106, 4839, 5414, 5422, 4732, 3567,
+ 1076, 977, 774, 774, 1828, 6234, 5370, 2039, 739, 739,
+ -603, 5153, 6522, 1901, 2477, 4598, 4454, -3465, 1242, 1366,
+ 5283, 220, 2331, 2479, 6093, 1936, 3015, 6428, 6429, 205,
+ 3814, 4686, 4687, 3134, 3353, 1248, 6235, 2931, 3243, 902,
+ 1666, 3610, -2433, 4448, 3135, 2040, 1408, 4449, 4450, 4451,
+ 5267, 5967, 6492, 1366, 6533, 1106, 5037, 1120, 5038, 1937,
+ 3160, 4688, 3136, 231, 5078, 4122, 3907, 3244, 3586, 1481,
+ 2994, 2300, 2962, 2964, 3060, 2116, 234, 1481, 1481, 2041,
+ 420, 420, 420, 903, 3150, 2947, 2948, 3797, 1452, 1646,
+ 1834, 1938, 3245, 1939, 2301, 421, 421, 2256, 3161, 246,
+ 4255, 774, 6420, 4254, 4255, 5968, -2433, 2152, 5969, 1829,
+ 5179, 2257, 3059, 2117, 5970, 5751, 3243, 247, 6392, 1367,
+ 3815, -2470, 1834, 6178, 1453, 1106, 2332, 3611, 1835, 1874,
+ 420, 3240, 6193, 3845, 1874, 1874, 3017, 6325, 420, -1102,
+ 1834, 2042, 5971, 1940, 421, 3244, 6005, 2118, 4149, 1128,
+ 420, 1575, 3095, 1367, 2114, 3864, 741, 6523, 6009, 1454,
+ 4733, -3465, 4053, 1836, 1349, 1799, 4772, 2258, 1368, 988,
+ 3245, 989, 3354, 4455, 4456, 4457, 4458, 4459, 4460, 4461,
+ 4462, 4463, 3586, 3836, 3073, -2470, 1129, 3329, 1248, 6094,
+ 1773, 6543, 5039, 6494, 1350, 1836, 3018, 993, 4734, 5972,
+ 212, 892, 1368, 4839, 3068, 3069, 3909, 1455, 1970, 3240,
+ 1837, 1154, 5973, 1836, 3137, 4455, 4456, 4457, 4458, 4459,
+ 4460, 4461, 4462, 4463, 5974, 1369, 975, 4123, 1900, 3087,
+ 3089, 4674, 4735, 5811, 6506, 885, 220, 4054, 3299, 1800,
+ 1902, 4687, 1837, 1905, -1644, 6085, 1660, 4126, 4453, -1069,
+ 3980, 1653, 1154, 1941, 6035, 4763, 2007, -1644, 1941, 1369,
+ 4086, -3465, 2115, -1644, 1774, 4124, 5255, 2259, 2074, 6539,
+ 5243, 886, 2910, 2911, 2912, 2913, 2914, 2915, 231, 5633,
+ 1795, 4134, 2256, -2272, 2027, 4127, 977, -176, 38, 5180,
+ 4129, 234, 3910, 1069, 40, 5181, 2257, 3109, 1163, 4125,
+ 6279, 1874, 5182, 960, 4675, 885, 2075, 3109, 1154, 1592,
+ -1644, 1874, 5738, 212, 246, 6086, 4454, -176, 6329, 4128,
+ 4348, 1160, 3242, 2260, 956, 1154, 6346, 3232, 4764, 956,
+ -1644, 1941, 3846, 1666, 4085, 1941, 4448, 5183, 979, 5256,
+ 4449, 4450, 4451, 5200, 3309, 1093, 3149, 6570, 373, 220,
+ 5634, 5762, 3570, 5875, 3313, 5877, 2028, 5546, 5740, 5184,
+ -1690, 3233, 3321, 5719, 4673, 1197, -1690, 1190, 1645, 1094,
+ 3417, 4110, 6280, 6170, 957, 3300, 3608, -1644, 3301, 1213,
+ 4769, 4087, 5122, 5230, 4241, 3801, -1644, 4255, 3109, 4090,
+ 6345, 231, 4093, 6024, 1874, 76, 5720, 1874, 1874, 5749,
+ 3014, 2045, 904, 902, 5019, 4155, 5741, 4259, 4260, 4261,
+ 4262, 5975, 4264, 420, 5976, 5123, 2076, 5231, 975, 2261,
+ 2310, 902, 961, 6204, 2046, 2083, 3999, 5201, 5364, 4770,
+ 5577, 4060, 4061, -1690, 1812, 4064, 1066, 4292, 3335, 2104,
+ 5125, 6562, 4171, 3015, 2190, 247, 1823, 903, 4812, 4135,
+ 4130, 3588, 2259, 5727, 988, 5365, 989, 4165, 4166, 4167,
+ 373, 1209, 6424, 1918, 892, 903, 422, -1102, 4001, 1203,
+ 1480, 5710, 422, 5711, 5712, 5713, 742, 2105, 977, 992,
+ -1690, 2106, 2205, 3243, 4131, 6434, 3367, 4000, 5202, 1161,
+ 2084, 6594, 5203, 6221, 3450, 3215, 1212, 5232, 3455, 3619,
+ 3280, 1919, 4767, 422, 3016, 3283, 3216, 1874, 2260, 2287,
+ 1234, 2107, 3244, 1929, 6273, 4455, 4456, 4457, 4458, 4459,
+ 4460, 4461, 4462, 4463, 3368, -1644, 953, 4325, 4981, 4002,
+ 2288, 3977, 2085, 3318, 886, 1920, 3630, 3245, 1106, 2086,
+ 1006, 4453, 2087, 1106, 1106, 4255, 6149, 4804, 2289, 422,
+ 2481, 1930, 4255, 3017, 6497, 6182, 1227, 4255, 5127, 3215,
+ 4255, 3944, 3319, 3948, 3949, 2045, 5147, 1215, 885, 5897,
+ 3223, -466, 1269, 3947, 377, 2965, 3240, 3242, 3356, 3242,
+ -1691, 2987, 3362, 3435, 2229, 1931, -1691, 3242, 2046, 4255,
+ 3242, 1374, 2045, 4240, 1821, 1375, 1221, 3589, 1155, 4101,
+ 5121, 4102, 6043, 4255, 2261, 4106, 1155, 2230, 1155, 4454,
+ 3242, 5594, 5928, 3018, 2989, 2046, 1666, 4914, 2966, 4448,
+ 4254, 422, 739, 4449, 4450, 4451, 75, 2343, 1413, 75,
+ 3590, 377, 1410, 1216, 1411, 1412, 3572, -1480, 3573, 3299,
+ 5547, 1330, 3575, 3591, 3576, -3256, 988, 3578, 989, 2287,
+ 3941, 3579, 6028, -1691, 5033, 5034, 5035, 5036, 3873, 2045,
+ 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049,
+ 2288, 3629, 4573, 4132, 2205, 5122, 6029, 8, 3592, 6394,
+ 1313, 3721, 2046, 74, 4378, 6569, 74, 1314, 1315, 1316,
+ -466, 1923, 6262, 3366, 2080, 3965, 4843, 3232, 5920, 1275,
+ -1691, 2088, 4844, 4040, -1481, 4993, 4758, 4133, 5123, 1217,
+ 1106, 4285, 3242, 6534, 5889, 4845, 115, 5087, 5088, 3976,
+ 1106, 5921, 3667, 5124, 420, 1924, 4768, 205, 5934, 1925,
+ 2337, 3233, 2081, 5125, 119, 2089, 4329, 6535, 3243, 2090,
+ 3243, 3369, 2343, 4846, 1296, 4847, 1277, 1278, 3243, 4994,
+ 5879, 3243, 3242, 2338, 3370, 4728, 3531, 3279, 5887, 5126,
+ 4716, 4255, 4643, 1926, 1791, 1279, 2082, 3244, 1280, 3244,
+ 4245, 3243, 4717, 2091, 5935, 892, 3300, 3244, 5839, 3301,
+ 3244, 1666, 1288, 3371, 4448, 422, 5846, 2953, 4449, 4450,
+ 4451, 5449, 3245, 4729, 3245, 4066, 4952, 2058, 6484, 5936,
+ 3244, 4848, 3245, 1106, 1286, 3245, 1106, 1106, 4455, 4456,
+ 4457, 4458, 4459, 4460, 4461, 4462, 4463, 5937, 2287, 2059,
+ 422, 5938, 5193, 212, 4453, 3245, 3808, 4730, 4805, 4849,
+ 4255, 3240, 3220, 3240, 3221, 5930, 5193, 1311, 3270, 2288,
+ 5315, 3240, 5332, 5939, 3240, 886, 5940, 1298, 1218, 3809,
+ 3526, 5127, 4400, 4401, 5920, 3287, 4621, 2291, 1281, 220,
+ -390, 5941, 1312, 5316, 3240, 5333, 2480, 4549, 5216, 2481,
+ 2060, 3526, 1355, 3243, 4152, 4377, 3437, 5921, 4612, 885,
+ 6549, 2973, 1374, 6550, -2251, 3731, 1375, 3732, 1364, -390,
+ 2048, 1282, 4454, 6537, 4850, 3222, 3467, 189, 4628, 4851,
+ 2987, 231, 3244, 2275, 1365, 3120, 6205, -3465, 4447, 2121,
+ 4323, 3733, 2125, 3243, 234, 1373, 1106, 3802, 4332, 1231,
+ 4475, 4968, 4969, 4970, 4971, 4972, 3242, 3245, 1415, 2035,
+ 4623, 5472, 1283, 2989, 2052, 4347, 5236, 246, 1417, 5847,
+ 5652, 4852, 3244, 4839, 1422, 4353, 5242, 5657, 4354, 5942,
+ 4355, 4356, 4498, 1435, 4358, 247, 4580, 4853, 4361, 2061,
+ 4362, 6099, 1448, 4364, 4663, 5176, 3240, 3245, 4255, 6104,
+ 2275, 6115, 3120, 2045, 1458, 2058, 6119, 6120, 373, -602,
+ 1374, 35, 2351, 4571, 1375, 37, 2352, 1456, 6481, 4453,
+ 4692, 212, 3049, 3050, 5193, 4525, 2046, 2059, 2154, 5943,
+ 2155, 6388, 4497, 1427, 4666, 1428, 3240, 2062, 2938, 1452,
+ 2063, 1468, 2939, 3734, 3735, 3736, 3737, -390, -390, 1457,
+ 3738, 3739, 5233, 4679, 5240, 3308, 3740, 220, 3734, 3735,
+ 3736, 3737, 4410, 4255, 4412, 4413, 5224, 4406, 1471, 3109,
+ 2351, 1430, 5259, 1431, 3562, 1453, 4418, -3465, 2060, 5235,
+ 2998, 5363, -3465, 2434, 429, 4854, 3154, 4454, 5215, 2065,
+ 2359, 4419, 2155, 6016, 4500, 4420, 4501, 5416, 4474, 231,
+ 4476, 4477, 4255, 2443, 1821, 3708, 4510, -1632, 3711, 4723,
+ 4884, -3200, 234, 4970, 4971, 4972, -3201, 3243, 1006, -3465,
+ 4502, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463,
+ 2275, 1478, 1927, 2067, 2460, 246, 2419, 1532, 2155, 6547,
+ 4900, 3378, 3379, 5006, 5236, 5258, 3244, 1483, 2433, 2473,
+ 247, 4407, 1487, 247, -1406, 1541, 2068, -1406, 1455, 2984,
+ 2997, 2155, 2998, 1480, 123, 124, 3002, 2061, 2155, 3049,
+ 3857, 3245, 2994, 3503, 1542, 3504, 2070, 5121, 2275, 4526,
+ 3120, 4527, 1548, 4831, 4367, 1319, 1320, 1321, 1322, 1323,
+ 1324, 1325, 1326, 1327, 3564, 1559, 2998, 4887, 4528, 1566,
+ 4529, 4255, 3741, 5519, 3585, 5520, 3586, 4963, 4964, 5614,
+ 3240, 1067, 3587, 3742, 3586, 2062, 956, 6595, 2063, 3833,
+ 3834, 4632, 3734, 3735, 3736, 3737, 3804, 1626, 3622, 4503,
+ 3623, 40, 3807, 3308, 2343, 4504, 420, 5237, 3856, 3974,
+ 2998, 3975, -1714, -1714, 2058, 1221, 1221, 1330, 1221, 4045,
+ 421, 4046, 5122, 4205, 4330, 4206, 2998, 4860, 4369, 4417,
+ 3586, 2998, 1587, -3465, 4629, 4630, 2059, 2065, 4426, 3795,
+ 2998, 4968, 4969, 4970, 4971, 4972, 3911, 5435, 3914, 4973,
+ 4911, 1622, 4912, 3848, 5762, 5123, 4455, 4456, 4457, 4458,
+ 4459, 4460, 4461, 4462, 4463, 4650, 5839, 4432, 3962, 2998,
+ 5124, 4433, 3908, 2998, 1630, 420, 1480, 420, -1717, -1717,
+ 5125, 2067, 4434, 4467, 2998, 2998, 1637, 2060, 4581, 421,
+ 422, 421, 1643, 4480, 422, 2998, 1644, 4485, 953, 4486,
+ 2152, -1718, -1718, 5428, 2068, 5193, 5126, 953, 742, 4709,
+ 1259, 4710, 4714, 1646, 4715, 953, 4296, 742, 953, 4739,
+ 1650, 4740, 4255, 4801, 2070, 4740, 5238, 1651, 4646, 5239,
+ 4922, 742, 4923, -3465, 4926, 4959, 4927, 4960, 4773, 4961,
+ 3109, 2998, 1652, 420, 2910, 2911, 2912, 2913, 2914, 2915,
+ 742, 4505, 741, 5058, 5357, 5059, 5358, 3831, 3831, 5069,
+ 1656, 5070, 4506, 1631, 1631, 6365, 6366, 1631, 1904, 742,
+ 1653, 75, 75, 6459, 6460, 742, 2061, 1654, 5080, 4744,
+ 2998, 1661, 5160, 1666, 5161, 1655, 4448, 742, 6436, 189,
+ 4449, 4450, 4451, 5165, 892, 5166, 1663, 4753, 5127, 4696,
+ 5175, 4698, 3894, 1794, 6335, 1874, 1476, 4255, 5199, 1801,
+ 3586, 1481, 5417, 4255, 3586, 5493, 742, 2408, 1797, 1802,
+ 4028, 953, 1803, 1808, 2062, 1903, 1531, 2063, 74, 74,
+ 953, 742, 5516, 1813, 2998, 3240, 5576, 953, 5579, 742,
+ 953, 2480, 3308, 4051, 2481, 3787, 1819, 1818, -3465, -3465,
+ -3465, 35, 1531, 742, 5605, 37, 1821, 1822, 4100, 420,
+ 76, 1832, 1847, 420, 886, 5556, 4878, 2998, 1848, 742,
+ 1790, 5616, 1154, 3894, 1851, 2987, 2065, 4227, 1854, 5195,
+ 5196, 1852, 2988, 212, 3531, 5622, 420, 5623, 5629, 5630,
+ 3586, 3586, 5764, 5803, 5765, 4960, 5013, 5821, 885, 5822,
+ 5823, 5242, 2998, 5962, 5982, 5963, 3586, 6017, 2989, 6018,
+ 892, 6052, 1862, 6053, 892, 6062, 6068, 2343, 4897, 220,
+ 2067, 212, 6070, 1858, 4897, 1631, 4255, 6091, 742, 6092,
+ 6134, 6174, 6135, 2952, 4051, 1867, 4891, 892, 4861, 4791,
+ 4863, 4067, 6202, 2068, 6092, 4798, 4997, 1790, 6229, 1480,
+ 4486, 1480, 4871, 1154, 4874, 5193, 2137, 220, 1859, 953,
+ 953, 231, 1863, 2070, 1790, 3787, 1155, 6230, 742, 2998,
+ 1155, 6241, 1864, 6242, 234, 1876, 6247, 420, 2343, 1865,
+ 886, 5649, 1866, 6250, 886, 4897, 6272, 1868, 3586, 422,
+ 6278, -3465, 3623, 1875, 742, 4068, 953, 246, 1878, 231,
+ 4209, 6284, 6285, 3623, 3623, 1906, 742, 886, 6288, 6289,
+ 2998, 2998, 234, 1907, 885, 6437, 1908, 6290, 885, 6291,
+ 1927, 6317, 2990, 6318, 6372, 4932, 6373, 2991, 892, 1921,
+ 4146, 1874, 6376, 1962, 2343, 246, 1480, 1988, -3462, 1874,
+ 6335, 885, 1874, 420, 1991, 6377, 5193, 2998, 4228, 6403,
+ 6426, 6404, 6427, 247, 4069, 4990, 1993, 742, 742, 4454,
+ 6461, 6475, 4897, 2998, 2993, 1994, 2029, 4178, 5030, 4178,
+ 2030, 4178, 4178, 6477, 2031, 2998, 4178, 4178, 4178, 4581,
+ 4178, 4178, 4178, 6505, 6531, 6092, 6255, 6545, 1947, 6546,
+ 6565, 6590, 2998, 6591, 892, 6592, 2025, 6373, 886, 2042,
+ 2054, 5211, 5057, 5137, 5234, 6608, 2044, 6591, 2057, 2079,
+ 2095, 2096, 2112, 2122, 2123, 2126, 2131, 2994, 2132, 1210,
+ 2133, 2163, 2165, 5815, 2172, 2167, 2178, 5005, 2183, 2186,
+ 2188, 2193, 885, 2196, 2198, 4258, 2190, 2207, 2208, 2212,
+ 2213, 4253, 1155, 1155, 373, -196, 2215, 2216, 5099, 2218,
+ 2220, 4974, 2232, 4976, 2221, 4978, 2239, 2243, 4070, 5193,
+ 4286, 2247, 921, 1210, 886, 2253, 953, 953, 422, 2262,
+ 2267, 2269, 2268, 2271, 742, 2275, 2279, 2278, 2281, 953,
+ 2295, 2305, 2297, 2306, 1531, 953, 2309, 2310, 2317, 953,
+ 5462, 953, 2321, 2323, 2324, 1531, 2326, 2328, 885, 2333,
+ 2334, 373, 4229, 2336, 4343, 5338, 1259, 2339, 2996, 2342,
+ 1531, 2346, 2345, 2357, 1106, 2383, 2416, 2422, 739, 2424,
+ 2425, 2431, 2432, -1869, -1876, 2438, 5282, 2439, 2441, 2440,
+ 2442, 247, 2444, 2445, 1901, 2446, -1867, 2447, 2448, 2449,
+ 2450, 5351, 2452, 2453, 2454, 2455, -1870, 2456, -1868, 2457,
+ 2458, 4230, 953, 2459, 953, 953, 2461, 2462, 4455, 4456,
+ 4457, 4458, 4459, 4460, 4461, 4462, 4463, 5784, 2463, 2464,
+ 2922, 2465, 2466, 2924, 4531, 4532, 4533, 1106, 2467, 2468,
+ 4071, 1210, 2926, 4481, 2927, 2952, 2956, 2968, 4072, 4488,
+ 1612, 4073, 5541, 2983, 3001, 5343, 2978, 3003, 1835, 3034,
+ 1837, 1531, 3036, 3045, 3048, 1248, 3070, 3055, 2906, 3063,
+ 3072, 3074, 3083, 3085, 3093, 3082, -3465, -3465, -3465, 2910,
+ 2911, 2912, 2913, 2914, 2915, -3404, 420, 3090, 3096, -3409,
+ 3094, 3097, 420, 3098, 1874, 3099, 3115, 3116, 3117, 3118,
+ 3120, 742, 3121, 3122, 3124, 3123, 3125, 3126, 3151, 3132,
+ 3157, 3163, 3177, 3181, 3183, 3184, 3185, 2480, 3187, 3188,
+ 2481, 3201, 3205, 3219, 2482, 2483, 2484, 3207, 3206, 76,
+ 76, 3218, 76, 3236, 3237, 3230, 3234, 892, 3238, 3239,
+ 953, 2986, 3240, 892, 3247, 3249, 3250, 3248, 3251, 3252,
+ 3257, 2987, 3261, 3271, 3258, 3267, 3268, 3272, 2988, 3273,
+ 3274, 3275, 3278, 3288, 3281, 3305, 3284, 3295, 3285, 3302,
+ 3290, 2007, 3291, 3320, 3303, 3310, 3311, 3316, 3317, 3322,
+ 742, 6045, 3323, 3324, 2989, 3325, 3328, 3336, 3330, 3331,
+ 2480, 3347, 3729, 2481, 1531, 3348, 742, 2482, 2483, 2484,
+ 1106, 3337, 3349, 3384, 3355, 3377, 3389, 886, 1106, 3360,
+ 742, 1106, 3391, 886, 742, 3392, 3393, 3394, 3405, 3398,
+ 3410, 3399, 3400, 1106, 2987, 953, 3402, 3411, 3403, 4253,
+ 3404, 2988, 3412, 3406, 1481, 3413, 5489, 3421, 3420, 3424,
+ 970, 885, 3429, 3435, 3438, 3449, 2076, 885, 3453, 3454,
+ 3466, 2153, 3469, 3457, 3472, 953, 3473, 2989, 3493, 3499,
+ 3482, 3506, 3518, 3486, 3490, 3525, 3536, 3500, 3511, 3538,
+ 3512, 3540, 3520, 3521, 3539, 3541, 3787, 3528, 3529, 3526,
+ 3554, 3581, 3607, 953, 953, 953, 3582, 953, 3620, 4253,
+ 3703, 1874, 3599, 3632, 3651, 3709, 2481, 3768, 2990, 2921,
+ 3722, 3747, 3713, 2991, 3767, 3656, 3728, 953, 3745, 3782,
+ 3793, 1216, 3791, 3798, 3799, 4586, 4586, 3800, 3825, 3827,
+ 3826, 3849, 5428, 3790, 3842, 2992, 2668, 3866, 3796, 2942,
+ 3813, 3828, 3883, 3884, 3863, 3912, 3917, 3919, 3865, 3886,
+ 2993, 3915, 3920, 3926, 742, 3931, 3936, 2963, 4581, 3937,
+ 3939, 3950, 742, 742, 3966, 1791, 3942, 5389, 5390, 3971,
+ 1795, 3973, 4009, 3983, 3990, 4003, 4008, 4034, 4035, 4041,
+ 4036, 2990, 4044, 4581, 4052, 4138, 2991, 1481, 4080, 2718,
+ 6101, 4159, 4160, 4059, 4079, 953, 4163, 4151, 4096, 953,
+ 953, 1217, 5745, 2994, 420, 420, 420, 4179, 2992, 2668,
+ 4172, 4185, 4191, 4196, 953, 4207, 4218, 4233, 4186, 4187,
+ 422, 422, 422, 2993, 4237, 4219, 4235, 4248, 4263, 4257,
+ 4268, 6240, 4269, 4270, 5484, 5485, 5486, 5487, 5488, 4271,
+ 4239, 742, 4272, 4273, 4276, 4283, 4281, 4284, 4287, 4293,
+ 4288, 4308, 4279, 5527, 4309, 892, 892, 892, 4319, 4310,
+ 4320, 4321, 2718, 4322, 4324, 4712, 4326, 4333, 4331, 4336,
+ 422, 4337, 4334, 4335, 3066, 4357, 2994, 4360, 422, 4365,
+ 4363, 5603, 4345, 4346, 1531, 4359, 4371, 4384, 4372, 5656,
+ 422, 4373, 2343, 4374, 2996, 4375, 4376, 4386, 3633, 2340,
+ 1155, 2307, 4388, 1947, 4387, 4395, 4405, 1947, 4398, 4403,
+ 4411, 4431, -2137, 1106, 4482, 4499, 1628, 4508, 4751, 4428,
+ 4547, 4522, 4577, 4590, 4592, 886, 886, 886, 4517, 4494,
+ 4429, 4430, 4435, 4436, 4626, 4583, 4594, 4440, 4442, 4443,
+ 5717, 1155, 4164, 2998, 4603, 4444, 3729, 4642, 4631, 4921,
+ 4610, 1531, 5481, 4466, 4471, 5483, 3417, 4472, 4615, 885,
+ 885, 885, 2351, 4479, 4493, 4518, 4581, 2996, 4520, 4521,
+ 4524, 4578, 4596, 4616, 4619, 4620, 4614, 4638, 4645, 4639,
+ 5498, 4647, 4659, 4660, 4634, 4670, 4671, 4794, 1531, 4633,
+ 4672, 4676, 4677, 4678, 2906, 4679, 373, 1155, 4694, 420,
+ 4683, 5784, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914,
+ 2915, 4695, 4697, 4705, 1155, 4713, 4703, 4718, 4727, 4704,
+ 4743, 1531, 4745, 4741, 4904, 4747, 4748, 2408, 4749, 4755,
+ 4752, 4754, 4756, 4178, 4757, 5093, 4759, 4774, 4776, 4777,
+ 4775, 4778, 4781, 4784, 4790, 4825, 4825, 4786, 1631, 5600,
+ 892, 4779, 4780, 4782, 4783, 4842, 4905, 4785, 4787, 4789,
+ 1481, 4797, 1481, 4788, 3345, 4793, 4917, 2906, 1011, 4799,
+ 4800, 4809, 4806, 4956, 4816, 2907, 2908, 2909, 2910, 2911,
+ 2912, 2913, 2914, 2915, 4810, 742, 4795, 4811, 4813, 4821,
+ 4827, 4864, 4876, 4880, 4882, 4886, 4829, 4869, 4899, 4896,
+ 4870, 953, 953, 953, 4955, 4906, 4897, 4915, 4916, 4909,
+ 1106, 4895, 1874, 4920, 4919, 5647, 4936, 1011, 742, 4953,
+ 886, 4950, 4924, 1210, 4975, 4983, 4984, 4985, 4986, 4965,
+ 1531, 4987, 4988, 4996, 4958, 3309, 4998, 4989, 4999, 4967,
+ 4977, 1531, 1210, 4991, 5000, 5009, 4931, 1481, 5010, 5022,
+ 5011, 5012, 5014, 422, 885, 1947, 5015, 1531, 5016, 5017,
+ 5018, 5695, 5696, 2433, 5698, 4448, 5031, 5082, -2136, 5054,
+ 5055, 5083, 5728, 5056, 5071, 5063, 742, 5112, 5638, 5085,
+ 5094, 5111, 5139, 5157, 742, 5154, 5159, 5135, 4343, 5163,
+ 1330, 5186, 742, 5207, 5101, 5102, 5103, 5104, 5688, 5178,
+ 5144, 5208, 5209, 5141, 5171, 3027, 5100, 5120, 5148, 5143,
+ 1531, 5217, 5210, 5145, 5218, 5220, 5221, 5223, 5228, 5662,
+ 5663, 5229, 5245, 5261, 5248, 953, 5260, 5262, 953, 5263,
+ 5274, 1531, 5275, 5264, 5064, 5277, 5276, 5288, 953, 5278,
+ 6525, 5291, 5303, 5279, 1531, 6528, 1965, 5290, 5304, 5309,
+ 5312, 5328, 5329, 5331, 5235, 5334, 1531, 5344, 5345, 5347,
+ 5348, 5349, 5386, 5360, 5400, 5406, 5371, 5407, 5381, 953,
+ 953, 5419, 742, 742, 5430, 5437, 6128, 420, 6130, 5392,
+ 5413, 1966, 3565, 5857, 953, 5436, 742, 953, 5412, 5453,
+ 5454, 5456, 5458, 5460, 5466, 5747, 1531, 1531, 6105, 742,
+ 742, 5457, 5468, 2480, 5461, 5471, 2481, 5490, 5705, 5706,
+ 5495, 76, 5482, 5497, 76, 69, 1874, 5505, 5512, 5513,
+ 5518, 5530, 5524, -2138, 5533, 5572, 5535, 5552, 892, 5534,
+ 5565, 5539, 5573, 5568, 5580, 5570, 5585, 2987, 5587, 5581,
+ 5586, 5075, 1967, 5588, -3465, 5599, 5615, 5601, 5602, 5619,
+ 5611, 5624, 5617, 5625, 5653, 953, 5631, 5635, 953, 953,
+ 1413, 5654, 5655, 377, 1410, 5658, 1411, 1412, 5664, 5665,
+ 2989, 5685, 5666, 5687, 5690, 5691, 5699, 5700, 1968, 5678,
+ 5709, 5708, 5681, 5714, 5707, 5718, 5721, 5725, 5726, 5729,
+ 5734, 4253, 5743, 5737, 4253, 953, 953, 5742, 886, 5746,
+ 5744, 953, 953, 5750, 5752, 5756, 5758, 3668, 953, 953,
+ 953, 5761, 5766, 953, 1969, 953, 5768, 953, 953, 953,
+ 953, 953, 953, 5772, 953, 5773, 953, 953, 5777, 5775,
+ 953, 1995, 885, 5779, 5780, 5790, 6138, 1996, 5796, 4509,
+ 5808, 5802, 2356, 5781, 1531, 953, 953, 953, 3586, 5798,
+ 1970, 5804, 5805, 5806, 1971, 5809, 5826, 5294, 5816, 5979,
+ 5827, 5820, 953, 5828, 422, 4028, 5840, 5253, 5302, 5810,
+ 5834, 5473, 5829, 1231, 1104, 5843, 5850, 5854, 5864, 5866,
+ 5859, 5873, 1998, 5870, -3465, 1972, 1973, 5876, 6051, -3465,
+ 4051, 5888, 5886, 5891, 5890, 4253, 1104, 6260, 5894, 5895,
+ 5901, 5896, 5926, 420, 5907, 5908, 5948, 5912, 420, 5917,
+ 420, 5370, 5918, 5919, 5957, 5955, 5958, 5961, 5966, 5985,
+ 5965, 1106, 5986, 1974, 5990, 5882, -3465, 205, 5995, 5998,
+ 6019, 6014, 1975, 420, 6025, 6027, 6033, 6026, 1999, 6040,
+ 6050, 1976, 6054, 6060, 6087, 2000, 6108, 6064, 2001, 1977,
+ 6067, 6089, 6100, 6109, 892, 6301, 6303, 1978, 6110, 892,
+ 5899, 892, 6116, 6153, 4842, 6122, 6161, 6165, 6155, 1979,
+ 6166, 6168, 6176, 6191, 6195, 2002, 6196, 5904, 1980, 2994,
+ 6181, 6197, 1981, 6198, 892, 6199, 6208, 6209, 6140, 5287,
+ 6216, 6210, 6211, 6225, 6239, 6251, 6218, 5295, 6257, 6253,
+ 5296, 6258, 5297, 6255, 6259, 953, 6220, 6265, 6256, 2003,
+ 6231, 6277, 6264, 6300, 6281, 6306, 6047, 6311, 6313, 6316,
+ 6320, 1874, 6323, 6324, 886, 6340, 6343, 6342, 6341, 886,
+ 6350, 886, 6351, 6357, 6356, 6379, 1982, 6367, 5903, 2473,
+ 6295, 6389, 5095, 6400, 6391, 953, 1874, 6369, 5337, 6384,
+ 5905, 6385, 6398, 6309, 886, 6415, 6407, 6310, 885, 6416,
+ 6435, 6452, 6457, 885, 4178, 885, 1330, 6414, 6464, 4178,
+ -3465, 6433, 2099, 6471, 6490, 6473, 2005, 6483, 6488, 6509,
+ 6519, 6552, 5947, 2473, 6526, 6551, 2006, 6515, 885, 6516,
+ 6530, 6556, 6061, 6307, 6553, 2007, 953, 5439, 6555, 6557,
+ 6571, 6573, 6574, 6061, 6588, 3729, 4581, 2008, 6584, 6589,
+ 6405, 6123, 6124, 6597, 6598, 6601, 6602, 1229, 1330, 6021,
+ 4242, 4519, 6605, 3361, 4574, 1106, 1992, 5251, 4033, 2975,
+ 4111, 5244, 4689, 6401, 2093, 4150, 4198, 4538, 4826, 5945,
+ 3068, 3069, 6294, 6489, 5388, 2127, 4253, 4253, 2010, 2011,
+ 5997, 5724, 5241, 5978, 4636, 4370, 6393, 2092, 5880, 6314,
+ 420, 6485, 6312, 6413, 6500, 4641, 4955, 5443, 5754, 5410,
+ -3465, 5440, 4842, 5418, 421, 6132, 6275, 5380, 4216, 2128,
+ 4217, 2910, 2911, 2912, 2913, 2914, 2915, 2480, 5249, 4885,
+ 2481, 4707, 5748, 2078, 6478, 6479, 5405, 4538, 5984, 4925,
+ 6212, 1209, 5464, 6548, 6607, 6599, 4832, 5959, 5446, 5906,
+ 6418, 3428, 6283, 6118, 5909, 1064, 4343, 4343, 4343, 4343,
+ 4343, 2987, 1124, 3686, 5491, 6095, 6127, 6544, -3465, 1874,
+ 4246, 3704, 3492, 1406, 2405, 3889, 5450, 4627, 4942, 3488,
+ 1480, 3507, 6022, 6206, 6232, 3542, 1482, 2013, 3627, 3628,
+ 6097, 1560, 4796, 4148, 2989, 6439, 6572, 5501, 5501, 5501,
+ 5501, 6249, 5501, 5501, 5501, 5501, 5501, 5618, 2475, 5280,
+ 953, 953, 953, 953, 953, 953, 953, 953, 953, 3131,
+ 953, 1805, 5469, 5470, 2480, 4175, 3386, 2481, 5869, 3812,
+ 953, 5607, 6387, 953, 5167, 4579, 1874, 3841, 4366, 2999,
+ 3031, 6133, 2937, 6270, 4591, 3030, 5142, 6295, 3822, 6381,
+ 6476, 5591, 3840, 6248, 2358, 3035, 5115, 5563, 2987, 6066,
+ 5109, 3040, 6238, 5086, 6237, -3465, 5110, 5168, 5578, 6581,
+ 6463, 6527, 6370, 6046, 5065, 5861, 6382, 5651, 6383, 3772,
+ 3692, 5604, 5606, 4515, 4423, 4174, 422, 5659, 4513, 953,
+ 3781, 2989, 1262, 953, 4954, 2255, 953, 4318, 953, 3502,
+ 6358, 953, 3867, 1232, 4569, 1583, 1915, 3874, -3465, 3858,
+ 5173, 3871, 1995, -3465, 3054, 3872, 953, 4253, 1996, 5592,
+ 1886, 4253, 5174, 1887, 5146, 953, 953, 3047, 2941, 5590,
+ 1255, 4368, 5597, 5598, 3878, 3583, 78, 5868, 0, 0,
+ 0, 6267, 2348, 3051, 0, 0, 1617, 2356, 0, 0,
+ -3465, 0, 0, 0, 0, 422, 6227, 422, 0, 75,
+ 5089, 0, 0, 1998, 0, 0, 0, 0, 0, 0,
+ 1106, 0, 0, 0, 0, 0, 0, 742, 0, 2413,
+ 0, 0, 0, 0, 1480, 6378, 0, 6380, 0, 5596,
+ 0, 0, 0, 0, 0, 1106, 76, 76, 0, 0,
+ 742, 6593, 1106, 2994, 0, -3465, 0, 1531, 0, 0,
+ -3465, 1531, 1531, 1106, 0, 0, 74, 0, 742, 1999,
+ 0, 0, 0, 422, 742, 0, 2000, 0, 742, 2001,
+ 0, 0, 0, 0, 0, 0, 742, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -3465, 0, 0,
+ 0, 0, 0, 0, 742, 0, 2002, 953, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 953, 0,
+ 1531, 953, 0, 953, 953, 0, 1531, 0, 0, 1874,
+ 0, 0, 1330, 0, 0, 0, 0, 0, 742, 0,
+ 2003, 0, 0, 0, -3465, 0, 0, 0, 0, 0,
+ 2994, 1155, 0, 0, 0, 0, 0, 0, 742, 742,
+ 0, 0, 0, 0, 420, 0, 0, 1531, 0, 0,
+ 5702, 5703, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4178, 0, 4178, 4178, 4178, 6127, 422,
+ 742, 1995, 0, 422, 0, 0, 0, 1996, 0, 0,
+ 0, 0, 0, 2099, 0, 0, 0, 2005, 0, 0,
+ 0, 0, 2097, 0, 742, 892, 422, 2006, 0, 373,
+ 742, 0, 0, 0, 0, 0, 2007, 742, 1106, 373,
+ 0, 6397, 1155, 0, 742, 4075, 6600, 742, 2008, 0,
+ 0, -3465, 1998, 742, -3465, 0, 0, 0, 0, 2480,
+ 0, 5755, 2481, 0, 4253, 2910, 2911, 2912, 2913, 2914,
+ 2915, 0, 0, 742, 0, 0, 0, 373, 0, 742,
+ 0, 0, 6538, 0, 0, 0, 742, 0, 0, 2010,
+ 2011, 0, 0, 2987, 0, 886, 0, 0, 0, 742,
+ -3465, 5783, 0, 0, 0, 1106, 2098, 0, 1999, 0,
+ 0, 1480, 742, 6445, 6446, 2000, 0, 422, 2001, 0,
+ 2012, 0, 0, 742, 4075, 0, 2989, 0, 0, 885,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 953, 953, 953, 0, 2002, 0, 953, 0, 0,
+ 0, -3465, 0, 5501, 0, 0, 0, 0, 0, 0,
+ 0, 6482, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0,
+ 0, 0, 0, 0, 953, 1531, 0, 0, 0, 2003,
+ 69, 3824, 0, 422, 0, 0, 0, 0, 2013, 0,
+ 4075, 0, 0, 0, 0, 5090, 0, 0, 0, 0,
+ 4075, 1104, 0, 1104, 0, 1104, 0, 0, 0, 0,
+ 0, 1104, 1610, 1611, 0, 0, 0, 953, 0, 0,
+ 0, 0, 4253, 0, 0, 0, 0, 0, 0, 4253,
+ 4075, 0, 0, 0, 4253, 1104, 1104, 4253, 0, 0,
+ -3465, 6012, 2099, 0, 0, -3465, 2005, 5867, 0, 4291,
+ 0, 0, 0, 1531, 0, 0, 2006, 0, 0, 0,
+ 0, 0, 0, 0, 5933, 2007, 4253, 0, 0, 0,
+ 0, 0, 0, 2473, 0, 953, 0, 2008, 0, 0,
+ 4253, 0, -3465, 0, 0, 0, 0, 0, 0, 5108,
+ 0, 0, 5113, 0, 0, 0, 0, 0, 5863, 0,
+ 0, 0, 0, 0, 0, 0, 0, 420, 0, 5991,
+ 0, 0, 4842, 0, 0, 2100, 0, 0, 2010, 2011,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5983, 0,
+ 0, 0, 0, 373, 0, 2994, 0, 0, 0, 0,
+ 0, 5992, 1106, 0, 0, 0, 0, 0, 1106, 2101,
+ 0, 0, 1106, 1011, 0, 0, 0, 4178, 892, 6010,
+ 6603, 6604, 0, 1104, 0, 0, 5946, 0, 0, 1874,
+ 742, 260, 363, 372, 269, 272, 377, 367, 0, 368,
+ 370, 273, 1896, 274, 0, 294, 1531, 312, 742, 317,
+ 0, 347, 366, 0, 371, 742, 382, 0, 0, 953,
+ 0, 1531, 953, 0, 953, 953, 1531, 0, 0, 0,
+ 0, 0, 0, 0, 953, 0, 0, 2013, 0, 953,
+ 0, 0, 0, 0, 1104, 0, -3465, 0, 886, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4253, 0,
+ 0, 0, 0, 0, 0, 953, 953, 953, 0, 0,
+ 953, 0, 0, 0, 0, 0, 0, 0, 953, 953,
+ 953, 953, 885, 0, 0, 2480, 422, 3723, 2481, 0,
+ 0, 953, 422, 0, 953, 0, 953, 0, 0, 1210,
+ 0, 0, 0, 0, 0, 0, 0, 953, 953, 0,
+ 0, 953, 0, 0, 1104, 0, 0, 0, 0, 2987,
+ 0, 0, 0, 0, 0, 0, -3465, 4253, 0, 0,
+ 953, 0, 953, 0, 953, 0, 0, 0, 0, 0,
+ 0, 0, -2757, 0, 0, 0, -3465, 0, 0, 0,
+ 0, 0, 2989, 0, 953, 0, 0, 2910, 2911, 2912,
+ 2913, 2914, 2915, 0, 0, 953, 0, 0, 0, 1995,
+ 0, 0, 0, 0, 2480, 1996, 420, 2481, 0, 742,
+ 0, 2482, 2483, 2484, 0, 0, 0, 0, 0, 0,
+ 2097, 0, 6184, -2757, 0, 0, 953, 0, 2986, 0,
+ 0, 1481, 0, 0, 0, 6142, -2757, 0, 2987, 0,
+ 0, 953, -2757, 0, 0, 2988, 0, -2757, 0, 0,
+ 1998, 5550, 0, -2757, 0, 953, -2757, 892, 0, 0,
+ -2757, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2989, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1874, -2757,
+ 0, -2757, 0, 0, 4538, 4253, -3465, 1531, 0, 0,
+ 1531, -3465, 1531, 0, 2098, 0, 1999, 1531, 0, -2757,
+ 0, 0, 0, 2000, 0, 0, 2001, 0, 0, 0,
+ 373, 6261, 742, 742, 0, 0, 0, 886, 953, 0,
+ 0, 0, 0, 0, 0, 5933, 0, 0, -3465, 69,
+ 69, 0, 69, 2002, 0, 0, 0, 0, 0, 742,
+ 0, 0, 742, 0, 0, 1531, -2757, 0, 0, -2757,
+ 4253, 885, 0, 1531, 0, -2757, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2003, 420, 0,
+ 0, 0, 0, 0, 0, 2990, 0, 0, 1531, 373,
+ 2991, 2994, 0, 0, 0, 0, 0, 0, 0, 4253,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2992, 2668, 0, 0, 0, 732, 0, 0,
+ 0, -2757, 0, 0, 422, 422, 422, 2993, 1106, 892,
+ 0, 0, 0, 0, 0, 1481, 0, 0, 0, 6298,
+ 2099, 6299, 0, 6371, 2005, 6304, 6305, 0, 742, 0,
+ 0, 0, 0, 0, 2006, 0, 0, 1531, 0, 1531,
+ 0, 0, 0, 2007, 0, 0, 2718, 742, 0, 0,
+ 0, 0, 0, 3724, 0, 2008, 0, 0, 0, 0,
+ 2994, 0, -3465, 2995, 0, 742, 420, 0, 0, 0,
+ 0, 0, 6514, 0, 0, 0, 0, 0, 4253, 886,
+ 3686, 3686, 0, 0, -2757, 3686, 0, 0, 0, 0,
+ 0, 0, 0, 4108, 0, 0, 2010, 2011, 0, 0,
+ 0, 0, 0, 0, 0, 4538, 0, 0, -2757, 4538,
+ -2757, -2757, 0, 885, 0, 0, 0, 892, 0, 0,
+ 0, 0, 3686, 3686, 0, 0, 0, 4109, 0, 0,
+ 1531, 0, 0, 0, 0, 0, 6419, 1104, 0, 0,
+ 0, 0, 1104, 1104, 373, 373, 0, 0, 0, 0,
+ 0, 2996, 742, -2757, 0, -2757, -2757, 953, 0, 0,
+ 0, 6444, -3465, 953, 377, 6441, 0, 6442, 6443, 0,
+ 0, 0, 1531, 2910, 2911, 2912, 2913, 2914, 2915, 0,
+ 0, 0, 0, 0, 0, 0, 0, 886, 0, 0,
+ 0, 0, 0, 0, 0, 2013, 0, 0, 0, 422,
+ 1531, 0, 0, 0, 0, 742, 0, 742, 0, 0,
+ 3064, 0, 1610, 1611, 0, 0, 0, 0, 0, 0,
+ 742, 885, 742, 0, 0, 0, 0, 0, 0, 4253,
+ 4879, 3079, 0, 0, 0, 0, 0, 3086, 3088, 0,
+ 0, 0, 0, 953, 0, 0, 0, 0, 0, 6444,
+ 0, 2906, 377, 6441, 0, 6442, 6443, 0, 0, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0,
+ 0, 1531, 4437, 0, 4438, 0, 0, 1106, 0, 0,
+ 0, 0, 1481, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 742, 1531, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4298, 0, 0, 0, 0, 0, 0, 1104,
+ 0, 0, 0, 0, 4253, 0, 0, 1531, 0, 1104,
+ 4253, 0, 0, 0, 0, 0, 1965, 0, 0, 0,
+ 0, 0, 0, 6578, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 742, 0, 0, 0, 0, 0, 0,
+ 0, 1966, 6444, 0, 1965, 377, 6441, 0, 6442, 6443,
+ 0, 6578, 0, 742, 0, 0, 420, 0, 0, 0,
+ 0, 0, 6578, 0, 6223, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 742, 0, 0, 742, 1966,
+ 0, 0, 1104, 0, 0, 1104, 1104, 0, 0, 0,
+ 0, 0, 0, 0, 420, 953, 0, 0, 1531, 0,
+ 0, 0, 1967, 0, 953, 420, 0, 892, 0, 0,
+ 0, 6580, 953, 4253, 953, 0, 0, 953, 1514, 2931,
+ 0, 1531, 953, 953, 953, 953, 0, 0, 953, 953,
+ 953, 953, 953, 953, 953, 953, 953, 953, 1968, 0,
+ 1967, 953, 953, 953, 1514, 892, 1531, 0, 0, 6580,
+ 0, 953, 0, 0, 0, 953, 892, 422, 0, 953,
+ 6580, 0, 0, 5590, 0, 4298, 0, 953, 6579, 4299,
+ 953, 0, 953, 0, 1969, 0, 1968, 886, 0, 0,
+ 0, 0, 953, 0, 0, 953, 953, 0, 0, 1965,
+ 953, 953, 0, 0, 0, 1104, 0, 953, 0, 0,
+ 0, 0, 0, 0, 0, 0, 6579, 953, 0, 0,
+ 953, 885, 1969, 0, 1971, 886, 0, 6579, 0, 0,
+ 953, 0, 0, 0, 1966, 0, 886, 0, 0, 0,
+ 0, 2480, 0, 0, 2481, 0, 0, 4538, 2482, 2483,
+ 2484, 0, 4538, 0, 0, 4538, 1973, 0, 0, 885,
+ 0, 0, 1971, 0, 0, 2986, 0, 0, 0, 0,
+ 885, 0, 0, 0, 0, 2987, 0, 953, 0, 0,
+ 0, 0, 2988, 0, 0, 0, 3501, 0, 0, 0,
+ 0, 0, 0, 953, 1973, 1967, 0, 205, 0, 0,
+ 0, 0, 4300, 0, 0, 0, 0, 0, 2989, 1531,
+ 0, 1976, 3514, 0, 0, 0, 0, 0, 0, 1977,
+ 0, 953, 3522, 0, 3523, 0, 0, 3198, 0, 0,
+ 3527, 1968, 0, 0, 3530, 205, 0, 3197, 0, 1979,
+ 1975, 0, 742, 0, 0, 0, 0, 0, 1980, 1976,
+ 0, 0, 1981, 0, 0, 0, 0, 1977, 0, 0,
+ 0, 0, 4299, 0, 0, 3198, 0, 1969, 0, 0,
+ 0, 4301, 0, 0, 0, 0, 0, 1979, 0, 0,
+ 0, 69, 0, 0, 69, 0, 1980, 0, 0, 0,
+ 1981, 0, 0, 422, 0, 0, 0, 0, 422, 1531,
+ 422, 0, 0, 0, 0, 0, 1982, 1971, 0, 0,
+ 4302, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 373, 2990, 422, 1531, 0, 0, 2991, 0, 0,
+ 0, 0, 0, 0, 373, 0, 0, 0, 0, 1973,
+ 0, 0, 0, 0, 1982, 0, 0, 0, 0, 2992,
+ 2668, 0, 373, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 742, 0, 2993, 742, 373, 0, 0, 0,
+ 1995, 0, 0, 0, 3657, 3658, 1996, 0, 0, 0,
+ 205, 3672, 3673, 0, 0, 1975, 2170, 0, 0, 0,
+ 0, 1997, 0, 0, 1976, 0, 0, 2179, 0, 0,
+ 0, 0, 1977, 2718, 0, 0, 0, 0, 0, 0,
+ 3198, 3714, 2187, 0, 0, 0, 0, 2994, 0, 1307,
+ 2995, 1998, 1979, 0, 0, 4538, 0, 0, 1339, 953,
+ 0, 1980, 0, 0, 0, 1981, 0, 3686, 3686, 3686,
+ 3686, 0, 1361, 3686, 3686, 3686, 3686, 3686, 3686, 3686,
+ 3686, 3686, 3686, 0, 4301, 742, 742, 381, 0, 1531,
+ 0, 0, 0, 381, 0, 742, 0, 736, 0, 0,
+ 5061, 0, 953, 953, 0, 0, 0, 1999, 0, 0,
+ 732, 0, 742, 0, 2000, 0, 732, 2001, 0, 1982,
+ 0, 0, 0, 4302, 381, 0, 0, 0, 732, 0,
+ 3686, 3686, 0, 0, 0, 0, 5447, 1531, 2996, 0,
+ 1531, 953, 953, 0, 2002, 0, 0, 0, 2480, 0,
+ 0, 2481, 953, 0, 0, 2482, 2483, 2484, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 381, 0, 2986, 0, 0, 0, 0, 0, 2003, 0,
+ 422, 0, 2987, 0, 0, 0, 0, 0, 0, 2988,
+ 0, 0, 0, 4538, 0, 373, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 742, 0, 0,
+ 0, 0, 0, 0, 0, 2989, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 953, 0, 0, 0, 0, 2906, 0,
+ 0, 2004, 381, 0, 953, 2005, 2907, 2908, 2909, 2910,
+ 2911, 2912, 2913, 2914, 2915, 2006, 0, 0, 0, 0,
+ 0, 4439, 0, 0, 2007, 0, 2414, 0, 0, 0,
+ 0, 0, 953, 0, 0, 953, 2008, 0, 0, 2473,
+ 0, 0, 0, 953, 953, 0, 1531, 0, 0, 0,
+ 953, 953, 0, 0, 373, 953, 0, 0, 0, 953,
+ 0, 0, 953, 953, 0, 0, 0, 953, 0, 0,
+ 0, 0, 0, 953, 2009, 0, 0, 2010, 2011, 0,
+ 0, 0, 0, 0, 0, 953, 0, 0, 0, 2990,
+ 0, 0, 0, 953, 2991, 0, 0, 953, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2012, 0,
+ 0, 0, 0, 0, 0, 0, 2992, 2668, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 953, 2993, 0, 0, 0, 1027, 0, 0, 0, 0,
+ 3165, 0, 0, 0, 76, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 732, 732,
+ 0, 0, 953, 0, 0, 0, 381, 0, 0, 0,
+ 2718, 0, 0, 0, 0, 0, 2013, 0, 3166, 0,
+ 1531, 0, 0, 0, 2994, 0, 0, 2995, 0, 0,
+ 0, 1030, 0, 742, 0, 0, 0, 0, 0, 0,
+ 0, 381, 0, 0, 0, 0, 0, 1031, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 0, 0, 3686, 1390, 0, 1027, 0, 0,
+ 0, 0, 3636, 0, 0, 742, 0, 0, 0, 0,
+ 1531, 0, 0, 0, 0, 0, 0, 742, 0, 3167,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1034, 0, 0, 953, 0, 0, 3079, 0, 0, 1035,
+ 0, 0, 0, 0, 0, 2996, 742, 0, 0, 0,
+ 0, 0, 1036, 1030, 3637, 0, 945, 3168, 0, 373,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1031,
+ 0, 0, 0, 0, 0, 0, 0, 1531, 0, 0,
+ 0, 0, 0, 1393, 373, 0, 0, 1390, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 953, 0, 0, 0, 0, 0, 0,
+ 0, 3638, 0, 0, 0, 3830, 3830, 0, 0, 953,
+ 0, 0, 1034, 0, 422, 0, 0, 0, 0, 1040,
+ 0, 1035, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 742, 1036, 2906, 0, 0, 0, 3639,
+ 953, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 0, 1104, 0, 0, 0, 0, 4489, 3169,
+ 0, 0, 6513, 0, 0, 1393, 0, 0, 0, 0,
+ 3260, 0, 0, 1896, 0, 0, 69, 69, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1531, 0, 1531,
+ 3640, 0, 921, 3170, 0, 0, 1045, 0, 0, 0,
+ 5532, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1040, 0, 0, 0, 0, 1104, 0, 0, 0,
+ 0, 1995, 0, 1397, 0, 0, 3171, 1996, 0, 0,
+ 742, 0, 1049, 0, 0, 0, 0, 2480, 0, 1050,
+ 2481, 0, 1051, 0, 2482, 2483, 2484, 0, 953, 0,
+ 5567, 953, 0, 0, 953, 953, 953, 0, 0, 0,
+ 0, 1052, 0, 0, 0, 0, 0, 0, 1399, 0,
+ 0, 2987, 1998, 0, 1054, 373, 0, 1400, 2988, 953,
+ 953, 1056, 0, 953, 921, 3641, 0, 0, 1045, 3172,
+ 0, 0, 0, 0, 0, 0, 3173, 0, 953, 0,
+ 3986, 0, 0, 0, 2989, 953, 0, 0, 0, 0,
+ 953, 0, 3390, 953, 953, 1397, 0, 0, 3642, 0,
+ 0, 953, 1061, 3401, 1049, 0, 0, 0, 1999, 0,
+ 0, 1050, 0, 0, 1051, 2000, 1965, 0, 2001, 3419,
+ 0, 0, 953, 0, 953, 0, 0, 0, 0, 0,
+ 742, 0, 742, 1052, 0, 0, 953, 0, 0, 0,
+ 1399, 0, 0, 0, 0, 2002, 1054, 0, 0, 1400,
+ 0, 1966, 0, 1056, 0, 0, 0, 0, 0, 1104,
+ 0, 0, 0, 0, 0, 0, 0, 1104, 3643, 0,
+ 1104, 0, 3494, 0, 0, 0, 0, 1531, 742, 2003,
+ 0, 0, 1104, 0, 0, 0, 0, 0, 953, 0,
+ 0, 0, 0, 3509, 1061, 0, 0, 0, 2990, 0,
+ 0, 0, 0, 2991, 0, 0, 1514, 0, 0, 0,
+ 0, 381, 1967, 0, 0, 381, 0, 0, 3524, 0,
+ 0, 0, 0, 0, 0, -3465, -3465, 422, 1304, 736,
+ 0, 0, 953, 0, 0, 0, 1304, 0, 736, 1304,
+ 2993, 0, 2099, 0, 0, 0, 2005, 0, 1968, 0,
+ 0, 0, 736, 0, 0, 0, 2006, 0, 3550, 1514,
+ 0, 0, 0, 0, 0, 2007, 0, 0, 0, 0,
+ 0, 736, 0, 0, 0, 0, 0, 2008, 0, -3465,
+ 0, 0, 0, 0, 1969, 0, 0, 0, 0, 0,
+ 736, 0, 0, 2994, 953, 0, 736, 1531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 736, 0,
+ 0, 0, 732, 0, 0, 3178, 0, 0, 2010, 2011,
+ 1970, 0, 0, 0, 1971, 0, 1995, 0, 0, 953,
+ 0, 0, 1996, 953, 0, 953, 0, 736, 2480, 0,
+ 0, 2481, 0, 0, 0, 2482, 2483, 2484, 0, 3179,
+ 0, 1304, 736, 953, 0, 2032, 1973, 0, 1304, 953,
+ 736, 1304, 2986, 953, 0, 0, 0, 0, 0, 1531,
+ 953, 0, 2987, 0, 736, 0, 0, 1998, 0, 2988,
+ 0, 0, 0, 0, 2996, 0, 0, 0, 4338, 4341,
+ 736, 0, 0, 2033, 0, 0, 0, 205, 0, 0,
+ 0, 0, 1975, 0, 0, 2989, 3716, 0, 0, 0,
+ 0, 1976, 0, 0, 0, 1531, 0, 2013, 0, 1977,
+ 1531, 1531, 0, 0, 0, 953, 0, 2034, 0, 0,
+ 953, 953, 742, 1999, 0, 0, 3686, 0, 0, 1979,
+ 2000, 0, 0, 2001, 0, 0, 742, 0, 1980, 736,
+ 0, 0, 1981, 0, 380, 0, 0, 0, 0, 0,
+ 380, 0, 1104, 0, 735, 0, 953, 0, 0, 0,
+ 2002, 0, 0, 953, 0, 0, 422, 0, 0, 0,
+ 0, 0, 0, 0, 2906, 0, 0, 0, 0, 736,
+ 0, 380, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914,
+ 2915, 953, 0, 0, 2003, 0, 1982, 0, 0, 0,
+ 381, 0, 0, 0, 0, 736, 0, 0, 0, 2990,
+ 0, 0, 1995, 0, 2991, 0, 0, 736, 1996, 0,
+ 0, 1531, 1531, 0, 0, 0, 0, 380, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2992, 2668, 0, 0,
+ 0, 0, 0, 6224, 0, 0, 3359, 953, 0, 0,
+ 0, 2993, 0, 953, 0, 0, 953, 2004, 0, 953,
+ 0, 2005, 0, 1998, 0, 0, 0, 0, 736, 736,
+ 953, 2006, 0, 0, 0, 0, 1150, 953, 0, 0,
+ 2007, 0, 0, 0, 1150, 0, 1150, 0, 1291, 0,
+ 2718, 0, 2008, 0, 0, 953, 0, 1303, 0, 380,
+ 0, 0, 0, 0, 2994, 1303, 0, 2995, 1303, 0,
+ 0, 0, 0, 953, 0, 0, 0, 0, 0, 1999,
+ 0, 0, 0, 0, 0, 0, 2000, 0, 0, 2001,
+ 3253, 0, 0, 2010, 2011, 0, 0, 3439, 422, 0,
+ 742, 0, 0, 0, 3079, 3456, 0, 4572, 0, 1104,
+ 0, 0, 0, 3359, 0, 0, 2002, 0, 2480, 0,
+ 0, 2481, 0, 0, 3254, 2482, 2483, 2484, 0, 0,
+ 0, 0, 0, 4585, 4585, 0, 0, 0, 0, 381,
+ 0, 0, 2986, 0, 0, 736, 0, 0, 0, 0,
+ 2003, 0, 2987, 0, 953, 2996, 1304, 0, 0, 2988,
+ 1304, 0, 1304, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1291, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1303, 0, 0, 0, 3686, 2989, 0, 1303, 0, 0,
+ 1303, 0, 2013, 0, 3535, 0, 953, 953, 953, 0,
+ 0, 0, 0, 0, 0, 953, 422, 0, 3686, 1531,
+ 0, 0, 0, 2099, 953, 0, 953, 2005, 953, 0,
+ 0, 3359, 0, 380, 0, 0, 0, 2006, 742, 0,
+ 0, 0, 0, 0, 0, 0, 2007, 0, 0, 0,
+ 0, 953, 0, 0, 0, 0, 0, 0, 2008, 0,
+ 0, 0, 0, 0, 742, 2906, 0, 0, 380, 0,
+ 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 0, 0, 0, 0, 3712, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3979, 0, 0, 2010,
+ 2011, 0, 0, 0, 0, 953, 0, 0, 0, 2990,
+ 0, 0, 0, 0, 2991, 953, 0, 0, 0, 0,
+ 0, 0, 736, 953, 953, 0, 0, 0, 0, 953,
+ 2012, 0, 953, 0, 0, 0, 2992, 2668, 0, 0,
+ 0, 0, 953, 0, 0, 0, 0, 0, 6470, 0,
+ 0, 2993, 953, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 742, 0, 0,
+ 0, 0, 0, 0, 0, 0, 734, 0, 0, 0,
+ 2718, 0, 0, 0, 0, 0, 0, 0, 2013, 0,
+ 953, 736, 0, 0, 2994, 0, 953, 2995, 0, 0,
+ 0, 0, 0, 883, 0, 0, 0, 736, 0, 0,
+ 0, 0, 0, 953, 0, 0, 0, 0, 0, 0,
+ 0, 736, 0, 0, 3686, 736, 0, 0, 953, 0,
+ 0, 6470, 0, 953, 0, 0, 0, 0, 0, 0,
+ 0, 1965, 0, 0, 0, 0, 953, 0, 0, 883,
+ 0, 953, 0, 0, 0, 2480, 0, 0, 2481, 0,
+ 0, 0, 2482, 2483, 2484, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1966, 0, 0, 2986,
+ 0, 0, 953, 0, 0, 2996, 0, 0, 0, 2987,
+ 0, 0, 0, 953, 0, 0, 2988, 953, 1149, 0,
+ 0, 0, 0, 0, 0, 0, 1149, 0, 1149, 953,
+ 0, 0, 0, 0, 0, 0, 422, 0, 0, 0,
+ 1104, 883, 2989, 0, 0, 0, 1995, 0, 0, 1291,
+ 0, 0, 1996, 0, 0, 1303, 0, 1967, 0, 1303,
+ 0, 1303, 3943, 4875, 0, 0, 953, 953, 3951, 0,
+ 953, 0, 0, 0, 422, 736, 0, 0, 0, 0,
+ 953, 953, 0, 736, 736, 422, 0, 0, 0, 0,
+ 0, 0, 0, 1968, 0, 0, 0, 1998, 0, 0,
+ 0, 0, 0, 0, 0, 2906, 0, 0, 0, 3984,
+ 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 2242, 0, 2244, 2245, 4828, 0, 0, 1969,
+ 3686, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 381, 381, 381, -2542, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1999, 0, 0, 2990, 0, 0, 0,
+ 2000, 2991, 736, 2001, 0, 1970, 4962, 0, 2480, 1971,
+ 0, 2481, 0, 4341, 0, 2482, 2483, 2484, 0, 0,
+ 0, 0, 0, 2992, 2668, 0, 0, 0, 0, 0,
+ 2002, 381, 2986, 0, 0, -2542, 0, 0, 2993, 381,
+ 2049, 1973, 2987, 0, 0, 0, 0, 0, -2542, 2988,
+ 0, 381, 0, 0, -2542, 0, 0, 0, 0, -2542,
+ 0, 0, 0, 0, 2003, -2542, 0, 0, -2542, 0,
+ 0, 0, -2542, 0, 0, 2989, 0, 2718, 2050, 0,
+ 0, 0, 205, 0, 1104, 0, 0, 1975, 380, 0,
+ 0, 2994, 380, 0, 2995, 0, 1976, 6462, 0, 0,
+ 0, -2542, 0, 0, 1977, 0, 735, 0, 0, 0,
+ 0, 0, 2051, 0, 0, 735, 0, 0, 0, 0,
+ 0, -2542, 0, 0, 1979, 0, 0, 2099, 0, 735,
+ 0, 2005, 0, 1980, 0, 0, 0, 1981, 0, 0,
+ 0, 2006, 0, 0, 0, 0, 0, 4203, 735, 0,
+ 2007, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2008, 0, 0, 0, 0, 735, -2542, 0,
+ 0, -2542, 0, 735, 0, 0, 0, -2542, 0, 0,
+ 0, 0, 2996, 0, 0, 735, 0, 0, 0, 2990,
+ 0, 1982, 0, 3686, 2991, 0, 0, 0, 3686, 0,
+ 4153, 0, 0, 2010, 2011, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 735, 0, 2992, 2668, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 735,
+ 0, 2993, 0, -2542, 4154, 0, 0, 735, 0, 0,
+ 0, 0, 0, 0, 0, 0, 736, 0, 0, 0,
+ 0, 735, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 735, 0, 0,
+ 2718, 0, 0, 0, 0, 0, 0, 0, 0, 736,
+ 0, 0, 2906, 0, 2994, 5170, 0, 2995, 1120, 0,
+ 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0,
+ 0, 0, 2013, 5024, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 381, 0, -2542, 0, 732, 0,
+ 0, 0, 0, 0, 0, 0, 735, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 736, 0, 0,
+ -2542, 3880, -2542, -2542, 0, 736, 0, 0, 0, 0,
+ 0, 0, 0, 736, 0, 0, 0, 0, 4396, 3896,
+ 0, 0, 0, 0, 1150, 3900, 735, 0, 1150, 3903,
+ 0, 0, 0, 4409, 0, 2996, 0, 0, 4414, 0,
+ 0, 0, -2542, 0, 0, -2542, -2542, 380, -2542, 1104,
+ 0, 0, 735, 0, 0, 3927, 0, 0, 0, 0,
+ 0, 0, 0, 2480, 735, 0, 2481, 0, 0, 0,
+ 2482, 2483, 2484, 0, 1104, 0, 0, 0, 0, 0,
+ 0, 1104, 0, 0, 0, 0, 0, 2986, 0, 3969,
+ 1304, 1304, 1104, 736, 736, 0, 0, 2987, 0, 0,
+ 0, 0, 0, 0, 2988, 1304, 0, 736, 1304, 732,
+ 0, 0, 0, 0, 0, 735, 735, 0, 0, 0,
+ 736, 736, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2989, 0, 0, 0, 0, 2906, 0, 0, 0, 0,
+ 0, 4019, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 0, 0, 0, 0, 5074, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4047, 0, 0, 1610, 1611,
+ 0, 4056, 0, 0, 0, 0, 1304, 0, 4062, 1304,
+ 1304, 0, 0, 0, 0, 732, 0, 0, 4076, 2480,
+ 0, 0, 2481, 0, 4081, 0, 2482, 2483, 2484, 1995,
+ 1150, 1150, 0, 0, 0, 1996, 0, 0, 0, 0,
+ 883, 0, 0, 2986, 4094, 0, 0, 0, 0, 0,
+ 4097, 0, 0, 2987, 0, 0, 380, 4103, 734, 0,
+ 2988, 0, 735, 0, 0, 0, 0, 734, 0, 0,
+ 4118, 0, 0, 0, 2990, 0, 0, 0, 0, 2991,
+ 1998, 734, 0, 4143, 0, 0, 2989, 1104, 0, 0,
+ 0, 0, 0, 0, 732, 0, 0, 0, 0, 0,
+ 734, 2992, 2668, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 381, 2993, 0, 0, 734,
+ 0, 0, 0, 0, 0, 734, 0, 0, 0, 0,
+ 0, 4341, 4341, 4341, 4341, 4341, 1999, 734, 0, 0,
+ 0, 0, 0, 2000, 2480, 0, 2001, 2481, 0, 0,
+ 0, 2482, 2483, 2484, 1104, 2718, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 734, 4651, 2986, 2994,
+ 0, 0, 2995, 2002, 0, 4654, 0, 0, 2987, 0,
+ 0, 734, 0, 0, 0, 2988, 0, 0, 0, 734,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2990, 0, 0, 734, 0, 2991, 0, 2003, 0, 0,
+ 0, 2989, 0, 0, 0, 0, 0, 0, 0, 734,
+ 0, 0, 0, 0, 0, 0, 0, 2992, 2668, 735,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2993, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1291, 0, 0, 1291, 0,
+ 2996, 0, 0, 0, 0, 0, 0, 0, 0, 4736,
+ 2099, 4738, 0, 0, 2005, 0, 0, 0, 734, 0,
+ 0, 2718, 0, 0, 2006, 0, 1995, 0, 0, 0,
+ 0, 0, 1996, 2007, 0, 2994, 0, 0, 2995, 1303,
+ 1303, 0, 0, 0, 0, 2008, 0, 3079, 735, 0,
+ 0, 0, 0, 0, 1303, 0, 1149, 1303, 734, 0,
+ 1149, 0, 0, 0, 735, 2990, 0, 0, 0, 0,
+ 2991, 0, 0, 0, 69, 0, 0, 1998, 735, 0,
+ 0, 4383, 735, 4664, 734, 0, 2010, 2011, 0, 0,
+ 0, 0, 2992, 2668, 0, 0, 734, 0, 0, 4397,
+ 2906, 0, 4792, 0, 0, 0, 4383, 2993, 2907, 2908,
+ 2909, 2910, 2911, 2912, 2913, 2914, 2915, 4665, 0, 0,
+ 0, 5188, 0, 0, 0, 1303, 2996, 0, 1303, 1303,
+ 0, 1104, 0, 1999, 0, 0, 0, 1104, 0, 0,
+ 2000, 1104, 0, 2001, 4814, 0, 2718, 734, 734, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2994, 0, 0, 2995, 0, 0, 0, 0, 5675, 5676,
+ 2002, 0, 0, 5679, 5680, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2013, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2003, 0, 0, 0, 0, 0,
+ 0, 0, 735, 0, 0, 0, 0, 0, 0, 0,
+ 735, 735, 0, 0, 0, 0, 2906, 0, 0, 0,
+ 0, 0, 1149, 1149, 2907, 2908, 2909, 2910, 2911, 2912,
+ 2913, 2914, 2915, 3984, 0, 0, 0, 5408, 0, 0,
+ 0, 2996, 0, 0, 0, 0, 0, 0, 883, 0,
+ 0, 0, 0, 0, 734, 0, 0, 2099, 0, 0,
+ 0, 2005, 0, 0, 0, 0, 0, 0, 380, 380,
+ 380, 2006, 0, 0, 0, 0, 0, 0, 0, 4957,
+ 2007, 0, 0, 0, 0, 0, 0, 0, 0, 735,
+ 0, 0, 2008, 0, 0, 0, 0, 0, 2480, 0,
+ 0, 2481, 0, 0, 0, 2482, 2483, 2484, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 380, 0,
+ 0, 0, 2986, 0, 0, 0, 380, 381, 0, 0,
+ 4721, 0, 2987, 2010, 2011, 0, 0, 0, 380, 2988,
+ 0, 2906, 0, 0, 0, 0, 0, 0, 1150, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0,
+ 2480, 0, 5514, 2481, 4722, 2989, 0, 2482, 2483, 2484,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5023, 0, 0, 0, 2986, 0, 0, 0, 0, 1150,
+ 0, 0, 0, 0, 2987, 0, 381, 0, 381, 0,
+ 4648, 2988, 0, 5032, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 736, 0,
+ 0, 734, 0, 0, 0, 0, 0, 2989, 5053, 0,
+ 0, 0, 2013, 0, 0, 0, 0, 0, 0, 0,
+ 0, 736, 0, 0, 0, 1150, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 736,
+ 0, 0, 1150, 0, 381, 736, 0, 0, 0, 736,
+ 0, 0, 0, 0, 0, 0, 0, 736, 0, 2990,
+ 0, 0, 0, 0, 2991, 0, 5862, 0, 0, 0,
+ 0, 0, 0, 0, 0, 736, 0, 0, 0, 4719,
+ 734, 0, 0, 0, 0, 0, 2992, 2668, 0, 0,
+ 0, 0, 1304, 0, 1304, 1304, 734, 0, 0, 0,
+ 0, 2993, 0, 0, 0, 0, 0, 0, 0, 736,
+ 734, 0, 0, 735, 734, 0, 0, 0, 0, 0,
+ 0, 2990, 0, 0, 0, 0, 2991, 0, 0, 736,
+ 736, 0, 0, 0, 0, 0, 0, 1104, 0, 0,
+ 2718, 0, 0, 0, 0, 0, 735, 0, 2992, 2668,
+ 0, 0, 0, 0, 2994, 0, 0, 2995, 0, 0,
+ 381, 736, 0, 2993, 381, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 380, 0, 0, 0, 736, 0, 381, 0, 0,
+ 0, 736, 0, 0, 0, 0, 0, 0, 736, 0,
+ 0, 0, 2718, 4807, 735, 736, 0, 0, 736, 0,
+ 0, 0, 735, 0, 736, 0, 2994, 0, 0, 2995,
+ 735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 736, 0, 0, 0, 0, 0,
+ 736, 0, 0, 0, 734, 2996, 0, 736, 0, 0,
+ 0, 0, 734, 734, 0, 0, 2480, 0, 0, 2481,
+ 736, 0, 0, 2482, 2483, 2484, 0, 0, 0, 0,
+ 0, 0, 0, 736, 0, 0, 0, 0, 381, 0,
+ 2986, 0, 0, 0, 736, 0, 0, 0, 0, 0,
+ 2987, 0, 0, 0, 0, 0, 0, 2988, 0, 0,
+ 735, 735, 0, 0, 0, 0, 0, 2996, 0, 0,
+ 883, 0, 0, 0, 735, 0, 0, 0, 0, 0,
+ 1027, 0, 0, 2989, 0, 1386, 0, 735, 735, 0,
+ 0, 734, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 381, 2906, 0, 0, 0, 0,
+ 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 0, 1387, 0, 0, 5551, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1030, 1388, 0, 0,
+ 883, 0, 0, 0, 0, 0, 0, 0, 1389, 0,
+ 1149, 0, 1031, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3359, 0, 1104, 2906, 0, 0,
+ 1390, 5391, 0, 0, 0, 2907, 2908, 2909, 2910, 2911,
+ 2912, 2913, 2914, 2915, 4992, 0, 0, 0, 5814, 0,
+ 0, 1149, 0, 0, 1391, 0, 0, 2990, 0, 0,
+ 0, 0, 2991, 0, 0, 1034, 0, 0, 0, 5008,
+ 0, 0, -2544, 0, 1035, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2992, 2668, 0, 1036, 1291, 0,
+ 0, 1303, 1392, 1303, 1303, 0, 0, 0, 0, 2993,
+ 0, 0, 0, 0, 0, 0, 0, 1149, 0, 0,
+ 0, 0, 380, 0, 0, 0, 0, 0, 1393, 0,
+ 0, 0, 0, -2544, 1149, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6222, 0, 0, -2544, 0, 2718, 0,
+ 0, 0, -2544, 1394, 0, 0, 0, -2544, 0, 0,
+ 0, 736, 2994, -2544, 0, 2995, -2544, 0, 0, 0,
+ -2544, 0, 0, 0, 1040, 0, 0, 0, 0, 736,
+ 0, 0, 0, 0, 0, 0, 736, 0, 0, 0,
+ 0, 0, 0, 1304, 0, 1304, 1304, 0, 0, -2544,
+ 0, 0, 0, 0, 0, 734, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1395, 0, 0, 0, 0, -2544,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6292, 0, 0, 0, 0, 0, 0, 1043, 734, 0,
+ 0, 0, 0, 0, 0, 0, 0, 921, 1396, 0,
+ 0, 1045, 0, 2996, 0, 0, 0, 381, 0, 0,
+ 0, 0, 0, 381, 0, 0, -2544, 0, 0, -2544,
+ 0, 0, 0, 883, 0, -2544, 0, 0, 1397, 0,
+ 0, 1398, 0, 0, 0, 1048, 0, 1049, 0, 0,
+ 0, 0, 0, 0, 1050, 0, 734, 1051, 0, 0,
+ 0, 0, 0, 0, 734, 0, 0, 0, 0, 0,
+ 0, 0, 734, 0, 0, 0, 1052, 0, 0, 0,
+ 0, 0, 0, 1399, 0, 0, 0, 0, 0, 1054,
+ 0, -2544, 1400, 5212, 0, 0, 1056, 0, 0, 0,
+ 0, 0, 0, 0, 1401, 0, 1058, 0, 0, 0,
+ 736, 1402, 0, 2906, 0, 0, 0, 0, 0, 0,
+ 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ 0, 0, 5639, 0, 5825, 0, 0, 1061, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1120, 945, 0, 0,
+ 0, 0, 734, 734, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 734, 0, 0, 0,
+ 5661, 0, 1292, 1294, -2544, 0, 1297, 0, 0, 734,
+ 734, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5677, 0, 0, 0, 1347, 0, -2544, 0,
+ -2544, -2544, 0, 1357, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5317, 0, 0, 5320, 0, 0, 0,
+ 0, 0, 0, 736, 736, 0, 0, 0, 0, 0,
+ 0, 0, 1416, 4, 1419, 0, 0, 1421, 0, 0,
+ -2544, 0, 0, -2544, -2544, 0, -2544, 0, 0, 0,
+ 736, 1445, 5, 736, 0, 0, 0, 1449, 0, 5704,
+ 0, 0, 6, 7, 0, 0, 0, 0, 0, 9,
+ 10, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 0, 0,
+ 0, 37, 0, 38, 39, 0, 0, 0, 0, 40,
+ 0, 0, 0, 0, 0, 0, 5402, 0, 0, 0,
+ 0, 0, 0, 0, -2560, 381, 381, 381, 0, 1291,
+ 0, 0, 1303, 3359, 1303, 1303, 0, 0, 0, 0,
+ 0, 0, 0, 0, 883, 0, 0, 0, 0, 736,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 380, 0, 41, 0, 736, 0,
+ 0, 0, 0, 0, 0, -2560, 0, 0, 0, 0,
+ 0, 5789, 0, 0, 0, 0, 736, 0, -2560, 0,
+ 0, 0, 0, 0, -2560, 0, 0, 0, 0, -2560,
+ 0, 0, 0, 0, 0, -2560, 0, 0, -2560, 0,
+ 0, 0, -2560, 0, 0, 0, 6577, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4383, 0,
+ 0, 0, 0, 380, 0, 380, 0, 0, 0, 0,
+ 0, -2560, 0, 42, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6577, 735, 0, 0, 0, 0,
+ 0, -2560, 0, 43, 0, 6577, 0, 0, 0, 0,
+ 0, 0, 0, 736, 0, 945, 0, 0, 735, 0,
+ 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 735, 0, 0, 0,
+ 0, 380, 735, 0, 0, 0, 735, 0, -2560, 0,
+ 45, -2560, 0, 0, 735, 0, 0, -2560, 0, 0,
+ 381, 0, 0, 0, 0, 0, 736, 0, 736, 0,
+ 0, 0, 735, 0, 0, 945, 0, 0, 0, 0,
+ 0, 736, 0, 736, 0, 0, 0, 46, 0, 0,
+ 47, 0, 0, 1027, 0, 0, 0, 0, 1028, 0,
+ 0, 0, 0, 0, 0, 0, 735, 0, 0, 0,
+ 0, 0, 48, -2560, 0, 0, 0, 0, 0, 1150,
+ 0, 0, 0, 2023, 2024, 0, 735, 735, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1029, 0, 0, 0,
+ 0, 0, 0, 0, 1310, 0, 0, 0, 0, 1030,
+ 0, 0, 0, 736, 0, 0, 1344, 380, 735, 0,
+ 0, 380, 0, 0, 0, 1031, 0, 1363, 1120, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 735, 1032, 380, 0, 1383, 0, 735, 0,
+ 0, 0, 1414, 0, 2168, 735, -2560, 0, 0, 0,
+ 1150, 49, 735, 0, 0, 735, 0, 1033, 0, 2180,
+ 0, 735, 0, 0, 736, 0, 0, 0, 1034, 0,
+ -2560, 0, -2560, -2560, 0, 0, 0, 1035, 0, 0,
+ 0, 735, 0, 0, 736, 0, 5672, 735, 2202, 2203,
+ 1036, 0, 0, 0, 735, 1037, 0, 0, 5682, 0,
+ 0, 50, 1038, 0, 0, 0, 736, 735, 0, 736,
+ 0, 0, -2560, 2240, 0, -2560, -2560, 51, -2560, 0,
+ 735, 1039, 0, 0, 0, 380, 0, 0, 0, 0,
+ 0, 735, 52, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 53, 0, 0, 0, 0, 1040, 0, 0,
+ 0, 4792, 0, 0, 0, 54, 55, 56, 57, 58,
+ 59, 0, 0, 60, 61, 1576, 2347, 0, 381, 0,
+ 66, 380, 0, 0, 0, 0, 0, 0, 0, 2314,
+ 2316, 0, 0, 0, 0, 0, 0, 1041, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2414, 0, 0,
+ 1042, 0, 2414, 2414, 0, 0, 0, 0, 0, 0,
+ 1043, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 921, 1044, 0, 0, 1045, 0, 0, 0, 0, 0,
+ 1783, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1807,
+ 0, 1046, 0, 0, 1047, 0, 0, 0, 1048, 0,
+ 1049, 0, 0, 0, 0, 0, 0, 1050, 0, 0,
+ 1051, 0, 1827, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 734, 0, 1052,
+ 0, 0, 0, 0, 0, 0, 1053, 0, 0, 0,
+ 0, 4383, 1054, 0, 0, 1055, 0, 0, 0, 1056,
+ 734, 0, 0, 0, 6207, 0, 0, 1057, 0, 1058,
+ 0, 0, 0, 0, 1059, 0, 0, 0, 734, 0,
+ 0, 0, 0, 883, 734, 0, 0, 1060, 734, 0,
+ 0, 0, 0, 736, 0, 0, 734, 0, 0, 0,
+ 1061, 0, 0, 0, 0, 0, 0, 0, 735, 0,
+ 0, 0, 0, 0, 734, 0, 0, 0, 0, 0,
+ 2022, 0, 0, 0, 0, 0, 735, 0, 0, 0,
+ 0, 0, 0, 735, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 381, 0, 0, 0, 734, 381,
+ 0, 381, 0, 0, 0, 0, 2480, 0, 0, 2481,
+ 0, 1149, 0, 2482, 2483, 2484, 0, 0, 734, 734,
+ 0, 4383, 0, 4383, 381, 0, 0, 0, 0, 0,
+ 2986, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2987, 0, 0, 0, 0, 0, 0, 2988, 0, 883,
+ 734, 0, 0, 883, 380, 0, 0, 0, 0, 0,
+ 380, 0, 0, 736, 0, 0, 736, 0, 0, 0,
+ 0, 0, 0, 2989, 734, 0, 883, 0, 0, 0,
+ 734, 0, 0, 0, 2200, 0, 0, 734, 0, 0,
+ 0, 0, 1149, 0, 734, 0, 0, 734, 0, 0,
+ 0, 0, 0, 734, 0, 0, 0, 0, 0, 0,
+ 0, 2234, 2237, 2238, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 734, 0, 0, 0, 0, 0, 734,
+ 0, 0, 0, 0, 0, 0, 734, 0, 0, 0,
+ 0, 6375, 0, 0, 0, 0, 0, 735, 0, 734,
+ 0, 0, 2480, 0, 0, 2481, 736, 736, 0, 2482,
+ 2483, 2484, 734, 0, 0, 0, 736, 883, 0, 0,
+ 0, 0, 0, 734, 0, 0, 2986, 0, 0, 0,
+ 0, 0, 0, 736, 0, 0, 2987, 2990, 0, 0,
+ 0, 0, 2991, 2988, 0, 0, 0, 945, 0, 0,
+ 945, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2992, 2668, 0, 3196, 0, 2989,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2993,
+ 0, 0, 0, 883, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3235, 0, 0, 0, 0, 0, 0, 0,
+ 0, 381, 0, 0, 1528, 0, 0, 0, 0, 0,
+ 735, 735, 0, 0, 0, 0, 0, 0, 2718, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 736, 0,
+ 1528, 0, 2994, 0, 1783, 2995, 0, 735, 0, 0,
+ 735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 945, 0, 0, 0, 2420, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1783, 3315, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2990, 0, 0, 0, 0, 2991, 0,
+ 0, 0, 0, 0, 3340, 3341, 3342, 3343, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2992, 2668, 380, 380, 380, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2996, 0, 2993, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 735, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 735, 0, 0, 0, 3396,
+ 3397, 0, 0, 0, 2718, 0, 0, 0, 0, 0,
+ 734, 0, 0, 735, 0, 3414, 0, 0, 2994, 0,
+ 0, 2995, 0, 0, 0, 0, 0, 0, 734, 0,
+ 0, 0, 0, 0, 0, 734, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3458,
+ 3459, 3460, 3461, 0, 2979, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2906, 0, 0, 0, 0, 0, 0,
+ 891, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ 0, 0, 0, 0, 5833, 0, 0, 0, 0, 0,
+ 0, 0, 0, 951, 736, 0, 3042, 0, 0, 0,
+ 735, 0, 0, 0, 0, 0, 883, 0, 0, 2996,
+ 0, 0, 883, 0, 0, 0, 891, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 736, 0, 0, 0,
+ 0, 0, 945, 945, 0, 0, 0, 380, 736, 0,
+ 0, 0, 0, 735, 0, 735, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1153, 3556, 0, 735, 0,
+ 735, 0, 3560, 1153, 0, 1153, 0, 736, 0, 0,
+ 0, 0, 0, 0, 2147, 0, 0, 0, 891, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 734,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 0, 2906,
+ 0, 0, 0, 1528, 0, 0, 0, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 1528, 0,
+ 5836, 0, 0, 0, 0, 0, 2480, 0, 0, 2481,
+ 735, 0, 3208, 2482, 2483, 2484, 0, 0, 0, 0,
+ 0, 3231, 0, 0, 0, 381, 0, 0, 0, 4383,
+ 2986, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2987, 0, 0, 0, 736, 0, 0, 2988, 0, 3266,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 735, 3289, 2989, 0, 3292, 0, 0, 0, 0,
+ 0, 0, 734, 734, 0, 0, 0, 0, 0, 1528,
+ 0, 735, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 734,
+ 0, 0, 734, 735, 0, 0, 735, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3344, 0, 0, 0, 0, 3726, 0, 0, 0, 0,
+ 0, 736, 0, 945, 3363, 0, 0, 945, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3385, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3388, 883, 883, 883, 2990, 0, 0,
+ 0, 0, 2991, 0, 0, 380, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 734, 0,
+ 0, 0, 0, 0, 2992, 2668, 0, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 3432, 0, 734, 0, 2993,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 734, 0, 0, 0, 0,
+ 3468, 0, 0, 0, 0, 0, 0, 3481, 0, 0,
+ 0, 736, 0, 736, 0, 0, 0, 0, 2718, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2994, 0, 0, 2995, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 736,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1304,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 734, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2480, 0, 0, 2481, 0, 0, 0,
+ 2482, 2483, 2484, 0, 0, 0, 0, 0, 381, 0,
+ 0, 0, 0, 1304, 0, 0, 0, 2986, 0, 0,
+ 735, 0, 0, 2996, 0, 3569, 0, 2987, 0, 883,
+ 0, 0, 0, 0, 2988, 734, 0, 734, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5731,
+ 734, 0, 734, 0, 0, 0, 0, 0, 0, 0,
+ 2989, 0, 0, 0, 0, 0, 1783, 1783, 0, 0,
+ 0, 380, 0, 0, 0, 0, 380, 0, 380, 0,
+ 945, 0, 0, 0, 0, 0, 3626, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 380, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 734, 2906, 0, 0, 0, 0, 0, 0,
+ 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ 735, 0, 0, 735, 5878, 0, 0, 0, 0, 0,
+ 0, 0, 3114, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2990, 0, 0, 0, 0, 2991,
+ 0, 0, 0, 734, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2992, 2668, 734, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 736, 0, 0, 2993, 0, 0, 3114,
+ 0, 0, 0, 0, 0, 734, 0, 736, 734, 0,
+ 0, 0, 0, 735, 735, 3726, 0, 0, 945, 0,
+ 0, 0, 0, 735, 0, 945, 0, 0, 0, 0,
+ 945, 0, 0, 945, 5852, 2718, 1528, 381, 0, 0,
+ 735, 0, 0, 0, 0, 0, 0, 0, 0, 2994,
+ 0, 0, 2995, 0, 0, 0, 0, 891, 0, 0,
+ 0, 0, 945, 0, 0, 951, 0, 0, 0, 1528,
+ 0, 0, 0, 0, 951, 0, 945, 0, 0, 0,
+ 0, 0, 951, 0, 0, 951, 0, 883, 0, 0,
+ 0, 0, 2480, 0, 0, 2481, 0, 0, 0, 2482,
+ 2483, 2484, 0, 0, 0, 0, 0, 0, 380, 0,
+ 0, 0, 0, 0, 0, 0, 2986, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2987, 0, 1303, 0,
+ 0, 0, 0, 2988, 0, 735, 0, 0, 0, 0,
+ 2996, 0, 0, 0, 0, 0, 0, 0, 0, 2147,
+ 2147, 2147, 0, 0, 0, 0, 0, 0, 0, 2989,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1303, 0, 0, 0, 0, 0, 1528, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 951, 1528,
+ 0, 0, 0, 1529, 0, 0, 0, 951, 0, 0,
+ 3952, 0, 0, 0, 951, 1528, 0, 951, 0, 381,
+ 0, 736, 0, 0, 0, 0, 0, 0, 0, 1529,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 945, 0, 0, 0, 0, 0,
+ 2906, 0, 0, 0, 0, 0, 0, 0, 2907, 2908,
+ 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 1528, 0,
+ 0, 5911, 734, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2990, 0, 0, 0, 0, 2991, 1528,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0,
+ 2992, 2668, 0, 945, 1528, 0, 0, 0, 0, 0,
+ 0, 0, 0, 883, 0, 2993, 0, 381, 883, 0,
+ 883, 0, 0, 0, 0, 0, 951, 951, 4088, 0,
+ 0, 4091, 0, 1153, 0, 0, 0, 1153, 0, 736,
+ 0, 0, 0, 883, 1528, 1528, 0, 0, 0, 0,
+ 0, 0, 1304, 0, 2718, 0, 0, 0, 0, 0,
+ 0, 735, 0, 951, 0, 736, 0, 0, 2994, 0,
+ 0, 2995, 0, 0, 3780, 0, 0, 0, 0, 0,
+ 0, 0, 734, 0, 0, 734, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3792, 0, 0, 735, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6167, 0, 735, 0, 0, 4182, 0,
+ 0, 0, 0, 0, 1304, 1304, 0, 0, 0, 0,
+ 0, 4195, 1827, 0, 0, 0, 0, 0, 0, 4204,
+ 0, 945, 0, 0, 735, 0, 0, 0, 0, 0,
+ 1827, 1827, 0, 0, 0, 0, 0, 0, 0, 2996,
+ 0, 0, 0, 0, 0, 2147, 0, 0, 2147, 0,
+ 0, 0, 0, 0, 0, 734, 734, 0, 736, 4249,
+ 0, 0, 0, 0, 1783, 734, 0, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0,
+ 4275, 0, 734, 0, 0, 0, 945, 0, 0, 1153,
+ 1153, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 380, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 951, 951, 891, 0, 0, 0, 0,
+ 0, 735, 0, 0, 0, 945, 951, 0, 0, 0,
+ 0, 1529, 951, 0, 0, 0, 951, 0, 951, 2906,
+ 0, 0, 1529, 0, 4349, 0, 4351, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, 0, 1529, 0, 0,
+ 5951, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 734, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 951,
+ 0, 951, 951, 0, 0, 0, 0, 381, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 735, 0,
+ 0, 0, 0, 0, 945, 0, 0, 0, 0, 2480,
+ 0, 0, 2481, 0, 0, 0, 2482, 2483, 2484, 0,
+ 0, 0, 0, 4408, 0, 381, 3988, 0, 1529, 0,
+ 4415, 1304, 1304, 2986, 0, 0, 381, 0, 0, 0,
+ 0, 4010, 0, 2987, 0, 0, 0, 0, 0, 2480,
+ 2988, 0, 2481, 0, 0, 0, 2482, 2483, 2484, 0,
+ 4037, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2986, 0, 0, 2989, 0, 0, 0,
+ 0, 0, 0, 2987, 0, 0, 0, 0, 0, 0,
+ 2988, 1303, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 951, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2989, 0, 735, 0,
+ 735, 0, 0, 0, 0, 0, 2480, 0, 0, 2481,
+ 0, 0, 0, 2482, 2483, 2484, 0, 0, 4112, 4113,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2986, 0, 0, 0, 0, 945, 0, 0, 0, 0,
+ 2987, 1529, 0, 1303, 1303, 0, 735, 2988, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 734, 0, 0, 0, 0, 0, 0,
+ 2990, 0, 951, 2989, 0, 2991, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 380, 0, 2992, 2668, 0,
+ 0, 0, 951, 0, 0, 734, 0, 0, 0, 0,
+ 2990, 0, 2993, 0, 0, 2991, 0, 734, 0, 4236,
+ 945, 0, 0, 0, 0, 0, 945, 0, 0, 0,
+ 951, 951, 951, 0, 951, 0, 0, 2992, 2668, 0,
+ 0, 0, 0, 6518, 0, 0, 734, 0, 0, 0,
+ 0, 2718, 2993, 0, 951, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2994, 0, 0, 2995, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2147, 0, 0, 0, 0, 0, 2990, 0, 0,
+ 0, 2718, 2991, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2994, 0, 0, 2995, 0,
+ 0, 4652, 4653, 0, 2992, 2668, 0, 0, 0, 0,
+ 0, 0, 0, 0, 883, 0, 0, 6561, 0, 2993,
+ 0, 0, 951, 0, 0, 0, 951, 951, 0, 945,
+ 0, 0, 0, 734, 0, 0, 0, 0, 0, 0,
+ 0, 951, 0, 0, 0, 0, 2996, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2718, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6561, 0, 0,
+ 6596, 0, 2994, 0, 0, 2995, 0, 0, 0, 0,
+ 1303, 1303, 0, 0, 0, 0, 2996, 0, 0, 0,
+ 735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 735, 0, 0, 0, 0, 0,
+ 0, 1529, 0, 0, 0, 0, 0, 891, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1153, 0, 0,
+ 734, 0, 0, 0, 380, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3885, 2906, 0, 0, 3114,
+ 3891, 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912,
+ 2913, 2914, 2915, 2996, 0, 0, 0, 6286, 1153, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1529, 0,
+ 0, 0, 0, 0, 0, 0, 2906, 0, 0, 0,
+ 0, 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912,
+ 2913, 2914, 2915, 0, 0, 0, 0, 6308, 1528, 0,
+ 0, 0, 0, 0, 1528, 1529, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1153, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4815, 0, 0,
+ 0, 1153, 0, 0, 0, 0, 0, 0, 1529, 0,
+ 734, 0, 734, 4530, 0, 1528, 0, 0, 2480, 0,
+ 0, 2481, 0, 2906, 0, 2482, 2483, 2484, 0, 0,
+ 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ 0, 0, 2986, 1827, 6499, 0, 0, 0, 0, 0,
+ 0, 0, 2987, 0, 0, 0, 0, 0, 734, 2988,
+ 0, 0, 0, 0, 0, 0, 380, 0, 735, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2989, 0, 0, 951, 951,
+ 951, 0, 2480, 0, 0, 2481, 0, 0, 0, 2482,
+ 2483, 2484, 0, 0, 0, 0, 0, 883, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2986, 1529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2987, 0, 1529, 0,
+ 0, 0, 0, 2988, 0, 0, 0, 0, 0, 0,
+ 891, 0, 0, 0, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2989,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 380, 0, 0, 0, 0, 4982,
+ 0, 2147, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 735, 1529, 0, 2990,
+ 0, 0, 0, 0, 2991, 0, 0, 0, 0, 0,
+ 0, 0, 951, 1528, 0, 951, 0, 0, 1529, 0,
+ 0, 0, 735, 0, 0, 951, 2992, 2668, 0, 2480,
+ 0, 1529, 2481, 0, 0, 0, 2482, 2483, 2484, 0,
+ 0, 2993, 0, 1529, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2986, 0, 0, 951, 951, 0, 0,
+ 0, 0, 0, 2987, 0, 0, 0, 0, 0, 0,
+ 2988, 951, 0, 2990, 951, 0, 0, 0, 2991, 0,
+ 2718, 0, 0, 1529, 1529, 0, 0, 3114, 0, 0,
+ 4742, 3114, 0, 0, 2994, 0, 2989, 2995, 0, 0,
+ 2992, 2668, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 734, 0, 0, 2993, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 734, 0, 0, 0,
+ 0, 0, 0, 0, 0, 735, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 951, 951, 0, 0, 0,
+ 0, 0, 0, 0, 2718, 0, 883, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2994, 0,
+ 0, 2995, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 951, 0, 2996, 0, 0, 951, 951,
+ 0, 0, 0, 0, 0, 951, 951, 951, 0, 0,
+ 951, 0, 951, 0, 951, 951, 951, 951, 951, 951,
+ 2990, 951, 0, 951, 951, 2991, 0, 951, 0, 0,
+ 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0,
+ 0, 1529, 951, 951, 951, 0, 0, 2992, 2668, 1528,
+ 0, 0, 0, 0, 1528, 0, 0, 0, 0, 951,
+ 0, 891, 2993, 0, 0, 0, 4866, 4867, 4868, 2996,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4877, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 380, 2906, 0, 0, 0, 0,
+ 0, 2718, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 0, 0, 0, 2994, 6517, 0, 2995, 4901,
+ 4903, 0, 0, 0, 4908, 0, 0, 0, 0, 0,
+ 0, 0, 380, 0, 0, 0, 0, 0, 883, 0,
+ 734, 0, 0, 380, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2906,
+ 0, 0, 0, 0, 0, 0, 0, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0,
+ 6564, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 2996, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 883, 0, 5003, 0,
+ 0, 1783, 0, 0, 0, 0, 5359, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 734, 0,
+ 5361, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 951, 734, 3114, 0, 0, 3891, 0,
+ 3891, 0, 0, 0, 0, 3114, 2906, 0, 0, 0,
+ 0, 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912,
+ 2913, 2914, 2915, 0, 0, 0, 0, 6582, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5105,
+ 5106, 5107, 0, 0, 0, 0, 3114, 0, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6, 7,
+ 0, 0, 0, 0, 0, 9, 10, 734, 0, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 0, 0, 37, 0, 38,
+ 39, 0, 0, 0, 0, 40, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 0, 1528, 0, 0,
+ 0, 0, 0, 0, 4, 0, 0, 951, 951, 951,
+ 951, 951, 951, 951, 951, 951, 0, 951, 0, 0,
+ 0, 0, 0, 5, 0, 0, 0, 951, 0, 0,
+ 951, 0, 0, 6, 7, 0, 0, 0, 8, 0,
+ 9, 10, 41, 0, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 0,
+ 36, 0, 37, 0, 38, 39, 0, 0, 0, 0,
+ 40, 0, 0, 0, 0, 0, 951, 0, 1528, 0,
+ 951, 0, 0, 951, 0, 951, 883, 0, 951, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 951, 0, 2147, 0, 0, 0, 42,
+ 0, 2147, 951, 951, 0, 1995, 0, 0, 0, 0,
+ 1528, 1996, 0, 0, 883, 0, 0, 41, 2058, 43,
+ 0, 0, 0, 0, 0, 883, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3891, 0,
+ 2059, 0, 44, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1998, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 0, 0, 0, 1529, 1529,
+ 0, 2060, 0, 0, 42, 0, 0, 0, 0, 0,
+ 891, 0, 0, 46, 0, 0, 47, 0, 0, 1528,
+ 0, 0, 1999, 0, 43, 0, 0, 0, 0, 2000,
+ 0, 5372, 2001, 0, 0, 0, 0, 0, 48, 0,
+ 0, 3891, 0, 0, 951, 0, 0, 44, 0, 0,
+ 0, 0, 0, 0, 0, 951, 0, 1529, 951, 2002,
+ 951, 951, 5404, 1529, 0, 1528, 0, 0, 0, 0,
+ 5697, 45, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5701, 0, 0, 1153, 0,
+ 2061, 0, 0, 2003, 3481, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 0, 0, 0, 46, 0,
+ 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 891, 49, 0, 5463,
+ 891, 0, 0, 48, 0, 0, 0, 0, 2062, 0,
+ 0, 2063, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 891, 0, 0, 2064, 0, 0, 0,
+ 2005, 3569, 0, 0, 0, 0, 1528, 0, 0, 1153,
+ 2006, 0, 0, 0, 0, 0, 5760, 50, 0, 2007,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1528,
+ 2065, 2008, 0, 51, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0,
+ 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 0, 0, 0, 0, 2066,
+ 0, 0, 2010, 2011, 2067, 0, 0, 0, 53, 0,
+ 0, 0, 0, 0, 891, 0, 0, 0, 0, 0,
+ 0, 54, 55, 56, 57, 58, 59, 2068, 0, 60,
+ 61, 1576, 0, 2069, 0, 0, 66, 1577, 951, 951,
+ 951, 0, 50, 0, 951, 0, 0, 2070, 0, 5558,
+ 5559, 5560, 5561, 0, 0, 0, 0, 0, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 951, 1529, 52, 0, 0, 0, 0, 0, 0,
+ 891, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2013, 0, 53, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 951, 0, 54, 55, 56, 57,
+ 58, 59, 0, 0, 60, 61, 62, 63, 0, 64,
+ 65, 66, 67, 68, 0, 0, 0, 3114, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1529, 0, 0, 0,
+ 1529, 5883, 0, 5884, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 0, 0, 0, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
+ 7, 0, 0, 0, 0, 0, 9, 10, 0, 0,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 0, 0, 3891, 37, 0,
+ 38, 39, 0, 0, 0, 0, 40, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3891, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1529, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 41, 0, 0, 951, 0, 1529, 951,
+ 0, 951, 951, 1529, 0, 6011, 0, 0, 0, 0,
+ 0, 951, 0, 0, 0, 0, 951, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2480, 0, 0, 2481, 0,
+ 0, 0, 2482, 2483, 2484, 0, 0, 0, 0, 0,
+ 0, 0, 951, 951, 951, 0, 0, 951, 0, 2986,
+ 0, 0, 0, 0, 0, 951, 951, 951, 951, 2987,
+ 0, 0, 0, 891, 0, 0, 2988, 0, 951, 891,
+ 42, 951, 0, 951, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 951, 951, 0, 1528, 951, 0,
+ 43, 0, 2989, 0, 0, 0, 0, 5782, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 951, 5792, 951,
+ 0, 951, 0, 44, 0, 0, 0, 0, 0, 2480,
+ 0, 0, 2481, 0, 0, 0, 2482, 2483, 2484, 0,
+ 0, 951, 0, 0, 0, 3891, 0, 45, 3114, 0,
+ 0, 0, 951, 2986, 0, 0, 0, 3814, 0, 6129,
+ 0, 6131, 0, 2987, 0, 0, 0, 0, 0, 0,
+ 2988, 0, 0, 0, 0, 0, 0, 0, 0, 1526,
+ 0, 0, 0, 951, 46, 0, 0, 47, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2989, 0, 951, 0,
+ 0, 0, 0, 0, 0, 1526, 0, 0, 0, 48,
+ 0, 0, 951, 0, 0, 0, 2990, 0, 0, 0,
+ 0, 2991, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2992, 2668, 0, 0, 3815, 0, 0,
+ 0, 0, 0, 0, 1529, 0, 0, 1529, 2993, 1529,
+ 0, 0, 0, 0, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2480, 0, 951, 2481, 0, 0, 0,
+ 2482, 2483, 2484, 0, 1528, 0, 0, 2718, 49, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2986, 0, 0,
+ 2990, 2994, 1529, 0, 2995, 2991, 0, 2987, 0, 0,
+ 1529, 0, 0, 0, 2988, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2992, 2668, 0,
+ 0, 0, 0, 0, 0, 1529, 0, 0, 50, 0,
+ 2989, 0, 2993, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 51, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 0, 891, 891, 891, 0, 0, 0, 0, 0, 0,
+ 0, 2718, 0, 0, 0, 5964, 0, 0, 0, 0,
+ 1783, 0, 2996, 0, 0, 2994, 0, 0, 2995, 53,
+ 0, 0, 6322, 0, 1529, 0, 1529, 0, 0, 5994,
+ 0, 0, 54, 55, 56, 57, 58, 59, 1528, 0,
+ 60, 61, 1576, 3561, 0, 0, 0, 66, 0, 0,
+ 4468, 0, 0, 0, 0, 4469, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2990, 0, 1528, 0, 0, 2991,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1528, 0,
+ 0, 2992, 2668, 0, 0, 0, 2996, 0, 0, 0,
+ 0, 0, 2906, 0, 0, 0, 2993, 1529, 0, 0,
+ 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0,
+ 0, 3383, 0, 0, 0, 0, 0, 0, 0, 6402,
+ 0, 0, 0, 0, 951, 0, 0, 1526, 0, 0,
+ 951, 0, 0, 0, 6103, 2718, 0, 0, 1526, 1529,
+ 0, 0, 0, 0, 0, 1528, 3816, 0, 0, 2994,
+ 0, 0, 2995, 1526, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 891, 1529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2906, 0, 0, 0,
+ 0, 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912,
+ 2913, 2914, 2915, 0, 0, 0, 0, 0, 0, 0,
+ 951, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6487, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6180, 0, 0, 0, 0, 1529, 0,
+ 4470, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6501, 6501, 0, 4, 0, 0,
+ 1529, 0, 6203, 0, 0, 5787, 0, 1528, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 0, 6, 7, 0, 0,
+ 0, 0, 0, 9, 10, 0, 0, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 0, 0, 0, 37, 0, 38, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 2906, 0, 0, 0, 0, 0, 0, 0, 2907, 2908,
+ 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 0,
+ 0, 0, 0, 0, 2480, 0, 0, 2481, 0, 6501,
+ 0, 2482, 2483, 2484, 0, 0, 0, 1526, 0, 0,
+ 0, 0, 951, 0, 0, 1529, 0, 0, 2986, 0,
+ 41, 951, 0, 0, 0, 0, 0, 0, 2987, 951,
+ 0, 951, 0, 0, 951, 2988, 0, 0, 1529, 951,
+ 951, 951, 951, 0, 0, 951, 951, 951, 951, 951,
+ 951, 951, 951, 951, 951, 0, 0, 0, 951, 951,
+ 951, 2989, 0, 1529, 0, 0, 0, 0, 951, 0,
+ 0, 0, 951, 0, 891, 0, 951, 0, 0, 0,
+ 0, 0, 0, 0, 951, 0, 0, 951, 0, 951,
+ 0, 0, 0, 0, 0, 0, 0, 42, 0, 951,
+ 0, 0, 951, 951, 0, 3891, 0, 951, 951, 0,
+ 0, 0, 0, 0, 951, 0, 0, 43, 0, 0,
+ 0, 0, 0, 0, 951, 0, 0, 951, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 951, 0, 0,
+ 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6455, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2961, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2990, 0, 0, 0, 0,
+ 2991, 0, 0, 0, 951, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 951, 46, 2992, 2668, 47, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1529, 2993, 0, 0,
+ 0, 0, 0, 0, 0, 3891, 48, 0, 951, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2480, 0, 0, 2481, 0, 0,
+ 0, 2482, 2483, 2484, 0, 0, 2718, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2986, 0,
+ 2994, 0, 0, 2995, 0, 0, 0, 0, 2987, 0,
+ 0, 0, 0, 0, 0, 2988, 0, 1526, 0, 0,
+ 0, 0, 0, 0, 0, 6456, 0, 1528, 0, 0,
+ 891, 0, 0, 0, 0, 891, 1529, 891, 0, 0,
+ 0, 2989, 0, 0, 0, 49, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2480, 0, 0, 2481,
+ 891, 1529, 0, 2482, 2483, 2484, 0, 0, 0, 0,
+ 0, 0, 0, 1528, 0, 0, 0, 0, 1528, 1528,
+ 2986, 0, 0, 4425, 1526, 0, 0, 0, 0, 0,
+ 2987, 2996, 0, 0, 0, 50, 0, 2988, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1526, 0, 2989, 0, 0, 52, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1526, 2990, 53, 0, 0, 0,
+ 2991, 0, 0, 0, 0, 0, 951, 0, 0, 54,
+ 55, 56, 57, 58, 59, 0, 0, 60, 61, 1576,
+ 0, 0, 2992, 2668, 66, 0, 0, 0, 0, 5787,
+ 1528, 2906, 0, 0, 0, 0, 1529, 2993, 0, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 951,
+ 951, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2718, 2990, 0, 0,
+ 0, 0, 2991, 0, 1529, 0, 0, 1529, 951, 951,
+ 2994, 0, 0, 2995, 0, 0, 0, 0, 0, 951,
+ 0, 0, 0, 1526, 2992, 2668, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 5066, 0, 2993,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2480, 0, 0, 2481, 0,
+ 0, 0, 2482, 2483, 2484, 0, 0, 0, 2718, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2986,
+ 0, 0, 2994, 0, 0, 2995, 0, 0, 0, 2987,
+ 951, 2996, 0, 1526, 0, 0, 2988, 0, 0, 0,
+ 0, 951, 0, 0, 0, 0, 0, 0, 5067, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 2989, 0, 0, 0, 0, 1526, 0, 951,
+ 0, 0, 951, 0, 0, 0, 0, 0, 0, 1526,
+ 951, 951, 0, 1529, 0, 0, 0, 951, 951, 0,
+ 0, 0, 951, 0, 0, 0, 951, 0, 0, 951,
+ 951, 0, 0, 0, 951, 0, 0, 1528, 0, 0,
+ 951, 0, 0, 2996, 0, 0, 0, 0, 0, 1526,
+ 1526, 0, 951, 0, 0, 0, 0, 0, 0, 0,
+ 951, 2906, 0, 0, 951, 0, 0, 0, 0, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1517, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 951, 0, 0,
+ 0, 2480, 0, 0, 2481, 0, 2990, 0, 2482, 2483,
+ 2484, 2991, 0, 1517, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2986, 0, 0, 4473, 951,
+ 0, 0, 0, 2992, 2668, 2987, 0, 0, 0, 0,
+ 0, 0, 2988, 2906, 0, 0, 0, 1529, 2993, 0,
+ 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2989, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1529, 0, 2718, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1526, 0, 0,
+ 0, 2994, 2480, 0, 2995, 2481, 0, 1529, 0, 2482,
+ 2483, 2484, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4441, 0, 0, 0, 2986, 0, 0, 0,
+ 951, 2480, 0, 0, 2481, 0, 2987, 0, 2482, 2483,
+ 2484, 0, 0, 2988, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2986, 0, 0, 4484, 0,
+ 0, 0, 0, 0, 0, 2987, 0, 0, 0, 2989,
+ 0, 0, 2988, 0, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 2990, 0, 0, 0, 0, 2991, 0, 0,
+ 0, 0, 2996, 0, 0, 0, 0, 0, 2989, 949,
+ 951, 0, 0, 0, 0, 0, 0, 0, 0, 2992,
+ 2668, 0, 0, 0, 0, 0, 951, 0, 0, 0,
+ 0, 891, 0, 0, 2993, 0, 0, 0, 0, 0,
+ 0, 1115, 2480, 0, 0, 2481, 0, 0, 0, 2482,
+ 2483, 2484, 0, 0, 0, 0, 1117, 951, 0, 0,
+ 0, 0, 0, 0, 0, 1125, 2986, 0, 0, 0,
+ 0, 0, 0, 2718, 4478, 0, 2987, 0, 0, 0,
+ 1139, 0, 1115, 2988, 2147, 0, 1162, 2994, 0, 0,
+ 2995, 0, 0, 2990, 0, 0, 1194, 0, 2991, 0,
+ 0, 0, 2906, 0, 1529, 1199, 1529, 0, 0, 2989,
+ 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0,
+ 2992, 2668, 2990, 0, 0, 0, 0, 2991, 0, 0,
+ 0, 0, 0, 0, 0, 2993, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2992,
+ 2668, 0, 0, 0, 0, 1517, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2993, 951, 1517, 0, 951, 0,
+ 0, 951, 951, 951, 2718, 0, 0, 2480, 2996, 0,
+ 2481, 1517, 0, 0, 2482, 2483, 2484, 0, 2994, 0,
+ 0, 2995, 0, 0, 0, 0, 951, 951, 0, 0,
+ 951, 2986, 0, 2718, 5073, 0, 0, 0, 0, 0,
+ 0, 2987, 0, 0, 0, 951, 0, 2994, 2988, 0,
+ 2995, 0, 951, 2990, 0, 0, 0, 951, 2991, 0,
+ 951, 951, 0, 0, 0, 0, 0, 0, 951, 0,
+ 0, 0, 0, 0, 2989, 0, 0, 0, 0, 0,
+ 2992, 2668, 0, 0, 0, 0, 0, 0, 0, 951,
+ 0, 951, 0, 0, 0, 2993, 0, 0, 0, 0,
+ 0, 0, 1517, 951, 0, 0, 0, 0, 2906, 2996,
+ 0, 0, 0, 0, 0, 0, 2907, 2908, 2909, 2910,
+ 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2718, 0, 0, 0, 2996, 0,
+ 0, 0, 0, 0, 1529, 0, 0, 0, 2994, 0,
+ 0, 2995, 0, 0, 0, 951, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2990, 0,
+ 0, 0, 0, 2991, 891, 0, 0, 0, 0, 951,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2906,
+ 0, 0, 0, 0, 0, 2992, 2668, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0,
+ 2993, 0, 0, 0, 0, 1517, 0, 0, 2906, 2996,
+ 0, 0, 0, 0, 0, 0, 2907, 2908, 2909, 2910,
+ 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0, 0,
+ 0, 951, 0, 0, 1529, 0, 0, 0, 0, 2718,
+ 0, 5020, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1995, 2994, 0, 0, 2995, 0, 1996, 0,
+ 0, 0, 0, 0, 0, 2058, 951, 0, 0, 0,
+ 951, 0, 951, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2059, 0, 0,
+ 951, 0, 0, 0, 0, 0, 951, 0, 0, 0,
+ 951, 0, 0, 1998, 0, 0, 1529, 951, 0, 2906,
+ 0, 0, 0, 0, 0, 0, 0, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 1526, 1526, 0, 0, 2060, 0,
+ 0, 0, 0, 0, 2996, 0, 0, 0, 0, 0,
+ 0, 0, 1529, 0, 0, 0, 0, 1529, 1529, 1999,
+ 0, 0, 951, 0, 0, 0, 2000, 951, 951, 2001,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1526, 0, 0, 2002, 0, 0, 1526,
+ 0, 0, 0, 951, 0, 0, 0, 0, 0, 0,
+ 951, 0, 0, 891, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2061, 0, 0,
+ 2003, 0, 0, 0, 0, 0, 0, 0, 951, 0,
+ 1526, 0, 0, 0, 2906, 0, 0, 0, 0, 0,
+ 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914,
+ 2915, 0, 0, 0, 2480, 0, 0, 2481, 1529, 1529,
+ 0, 2482, 2483, 2484, 0, 2062, 0, 0, 2063, 0,
+ 0, 0, 0, 0, 0, 1517, 0, 0, 2986, 0,
+ 0, 0, 0, 2064, 951, 0, 0, 2005, 2987, 0,
+ 951, 0, 0, 951, 0, 2988, 951, 2006, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2007, 951, 0, 0,
+ 0, 0, 0, 0, 951, 0, 0, 2065, 2008, 0,
+ 0, 2989, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1517, 0, 0, 0, 0, 0, 0, 0,
+ 951, 0, 0, 0, 0, 0, 4083, 0, 0, 2010,
+ 2011, 2067, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 949, 1293, 1293, 0, 891, 1293, 0, 0, 1517,
+ 1305, 0, 1194, 0, 2068, 1332, 0, 0, 1305, 0,
+ 4084, 1305, 0, 0, 1194, 0, 1293, 0, 0, 1194,
+ 0, 0, 0, 1293, 2070, 1194, 0, 0, 0, 0,
+ 0, 0, 1517, 0, 0, 0, 5515, 0, 0, 0,
+ 0, 0, 0, 0, 1385, 0, 0, 0, 1526, 0,
+ 1194, 951, 1293, 0, 1293, 2990, 0, 1293, 0, 0,
+ 2991, 0, 0, 0, 1332, 0, 0, 0, 0, 1441,
+ 0, 1293, 0, 0, 0, 0, 0, 1293, 2013, 0,
+ 0, 0, 2992, 2668, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 951, 951, 951, 0, 2993, 0, 0,
+ 0, 0, 951, 891, 0, 0, 1529, 0, 0, 0,
+ 0, 951, 0, 951, 949, 951, 0, 0, 0, 0,
+ 0, 0, 1526, 1305, 0, 0, 1526, 1332, 0, 0,
+ 1305, 0, 0, 1305, 0, 0, 2718, 0, 951, 0,
+ 0, 1517, 0, 0, 0, 0, 0, 0, 0, 1293,
+ 2994, 0, 1517, 2995, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1517, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 951, 0, 0, 0, 0, 1194, 0, 0,
+ 951, 951, 0, 0, 0, 0, 951, 0, 0, 951,
+ 0, 1517, 0, 0, 1649, 0, 0, 0, 0, 951,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 951,
+ 0, 2996, 1517, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1762, 1762, 0, 1517, 0, 0, 1194, 1526,
+ 0, 0, 0, 0, 0, 0, 0, 1517, 0, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 1194, 0, 1526,
+ 0, 1194, 0, 0, 0, 0, 0, 951, 0, 1762,
+ 0, 0, 0, 951, 0, 0, 0, 0, 0, 0,
+ 1194, 0, 0, 0, 0, 0, 0, 1517, 1517, 0,
+ 951, 0, 1194, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 951, 0, 0, 0, 0,
+ 951, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2906, 0, 951, 0, 0, 0, 0, 951, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 951,
+ 0, 0, 0, 0, 0, 0, 0, 1194, 0, 0,
+ 951, 0, 0, 0, 951, 0, 0, 0, 1194, 0,
+ 0, 0, 0, 1293, 1293, 0, 951, 0, 2480, 0,
+ 0, 2481, 0, 891, 0, 2482, 2483, 2484, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2986, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2987, 951, 951, 0, 0, 951, 0, 2988,
+ 0, 891, 0, 0, 0, 1517, 0, 951, 951, 1762,
+ 1762, 0, 891, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 949, 0, 1293, 2989, 0, 0, 1305, 0,
+ 0, 1332, 1305, 0, 1305, 0, 0, 0, 0, 1293,
+ 2480, 0, 0, 2481, 0, 0, 0, 2482, 2483, 2484,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 0, 2986, 0, 0, 0, 1293, 1293,
+ 1526, 0, 0, 1526, 2987, 1526, 0, 0, 0, 0,
+ 1526, 2988, 0, 0, 0, 0, 0, 0, 0, 1194,
+ 1194, 1194, 0, 1293, 0, 949, 0, 949, 949, 0,
+ 0, 0, 0, 0, 2252, 0, 0, 2989, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5521, 0, 0, 2480, 0, 0, 2481, 0, 1526, 0,
+ 2482, 2483, 2484, 0, 0, 0, 1526, 0, 0, 2990,
+ 0, 0, 0, 0, 2991, 0, 0, 2986, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2987, 0, 0,
+ 0, 1526, 0, 0, 2988, 0, 2992, 2668, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1293, 0, 1293,
+ 1293, 2993, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2989, 0, 0, 0, 0, 0, 0, 5522, 0, 0,
+ 0, 2480, 0, 0, 2481, 0, 0, 0, 2482, 2483,
+ 2484, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2718, 2990, 0, 1762, 0, 2986, 2991, 0, 0, 0,
+ 1526, 0, 1526, 0, 2994, 2987, 0, 2995, 0, 0,
+ 0, 0, 2988, 0, 0, 0, 0, 0, 2992, 2668,
+ 0, 0, 0, 0, 0, 0, 0, 2386, 2386, 5523,
+ 0, 0, 1194, 2993, 1115, 0, 0, 0, 2989, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1194, 0, 0, 0, 0, 0, 2423,
+ 0, 0, 1194, 0, 0, 2429, 0, 0, 0, 0,
+ 0, 0, 2718, 0, 2990, 0, 0, 0, 1762, 2991,
+ 0, 0, 0, 0, 0, 0, 2994, 0, 0, 2995,
+ 0, 0, 0, 1526, 0, 2996, 0, 0, 0, 0,
+ 0, 2992, 2668, 0, 0, 0, 0, 0, 1762, 0,
+ 0, 0, 0, 0, 0, 0, 2993, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6044, 0,
+ 0, 0, 0, 0, 0, 1526, 1762, 1762, 1762, 0,
+ 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2990, 0, 0, 2718, 0, 2991, 0, 0,
+ 1762, 0, 0, 1526, 0, 0, 0, 0, 0, 2994,
+ 0, 0, 2995, 0, 0, 0, 0, 2996, 0, 2992,
+ 2668, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2993, 2906, 0, 0, 0, 0,
+ 0, 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, 1194, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2718, 1526, 0, 0, 0, 1762, 0,
+ 0, 0, 1762, 1762, 0, 0, 0, 2994, 0, 0,
+ 2995, 0, 0, 1194, 1194, 3044, 1526, 1762, 0, 0,
+ 2996, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2906, 0, 0,
+ 1526, 0, 0, 0, 0, 2907, 2908, 2909, 2910, 2911,
+ 2912, 2913, 2914, 2915, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2996, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2906, 0, 0, 0, 0, 0, 0, 0, 2907, 2908,
+ 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 3186,
+ 0, 1526, 0, 0, 0, 0, 0, 1293, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1517, 0,
+ 1194, 3214, 1517, 1517, 1526, 0, 0, 0, 0, 1194,
+ 0, 0, 1293, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1526,
+ 0, 0, 0, 0, 0, 1332, 0, 1194, 2906, 0,
+ 0, 0, 0, 0, 0, 0, 2907, 2908, 2909, 2910,
+ 2911, 2912, 2913, 2914, 2915, 0, 0, 0, 0, 0,
+ 1194, 1517, 0, 1194, 0, 0, 0, 1517, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1293, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 0, 0, 0, 0, 0, 1517, 0,
+ 0, 0, 0, 0, 1293, 1293, 1293, 1293, 1194, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 2480, 0, 0, 2481, 0, 0, 0,
+ 2482, 2483, 2484, 0, 1762, 1762, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2986, 0, 0,
+ 1194, 0, 0, 0, 0, 0, 0, 2987, 0, 0,
+ 0, 1194, 0, 0, 2988, 0, 0, 0, 0, 1293,
+ 1293, 0, 1526, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1293, 0, 0, 0, 0,
+ 2989, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1194, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1293,
+ 1293, 1293, 1293, 0, 0, 0, 0, 0, 1194, 0,
+ 0, 0, 0, 0, 0, 1194, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 949, 0,
+ 0, 949, 1526, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1762, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1526, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1517, 0, 0, 0,
+ 0, 0, 1305, 1305, 2990, 0, 0, 0, 0, 2991,
+ 0, 0, 0, 1332, 1332, 0, 0, 1305, 0, 0,
+ 1305, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2992, 2668, 0, 0, 1293, 1293, 0, 0, 0,
+ 0, 0, 1293, 0, 0, 0, 2993, 0, 0, 0,
+ 0, 0, 0, 1194, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1517, 0, 0, 0, 1517, 0, 0, 0, 0, 2386,
+ 0, 0, 0, 0, 0, 2718, 1293, 0, 1305, 0,
+ 0, 1305, 1305, 0, 1194, 1194, 0, 1293, 0, 2994,
+ 0, 0, 2995, 0, 1194, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1194, 0, 0, 0, 0, 965,
+ 1115, 1115, 1526, 0, 3635, 0, 0, 0, 1762, 1762,
+ 0, 0, 0, 0, 1762, 1762, 0, 966, 0, 0,
+ 0, 1762, 1762, 1762, 0, 0, 1762, 0, 1762, 1332,
+ 1762, 1762, 1762, 1762, 1762, 1762, 0, 1762, 0, 1762,
+ 1762, 0, 967, 1762, 0, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 1526, 0, 968, 0, 0, 1762, 1762,
+ 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2996, -867, 0, 0, 0, 1762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1517, 0, 969,
+ 0, 0, 0, 0, 0, 970, 0, 0, 0, 0,
+ 0, 0, 1517, 0, 0, 0, 0, 1517, 0, 0,
+ 0, 0, 0, 971, 0, 1293, 0, 0, 0, 0,
+ 0, 0, 0, 0, 972, 0, 0, 0, 0, 0,
+ 0, 0, 0, 973, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 974, 0, 0, 0,
+ 0, 0, 0, 0, 975, 0, 0, 0, 976, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2906, 0, 0, 0, 0, 0, 0, -1069, 2907, 2908,
+ 2909, 2910, 2911, 2912, 2913, 2914, 2915, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1526,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 977, 0, 0, 0, 1762, 0,
+ 0, 0, 0, -603, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 905, 0, 0, 0, 1762, 0,
+ 0, 0, 0, 978, 0, 0, 979, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 980, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 981, 0, 0, 0, 0, 906, 0, -466, 0, 1762,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 907, 0, 0, 0, 0, 0, 982, 0, 0,
+ 0, 0, 0, 1526, 0, 0, 983, 0, 0, 908,
+ 0, 0, 0, -466, 0, 909, 984, 0, 1517, 0,
+ 0, 1517, 0, 1517, 0, 0, 0, 0, 1517, 0,
+ 0, 0, 0, 910, 0, 985, 0, 0, 0, 0,
+ 0, 1526, 986, 0, 911, 0, 0, 0, -466, 0,
+ 0, 987, 988, 912, 989, 990, 0, 0, 0, 0,
+ 0, 0, 0, 1526, 0, 0, 913, 0, 0, 0,
+ 991, 914, 0, 0, 0, 0, 1517, 992, 915, 0,
+ 993, 0, 0, 994, 1517, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -466, 916, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1517,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 917, 0, 0, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 918, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1762, 1762, 1762, 1762, 1762, 1762, 1762,
+ 1762, 1762, 0, 1762, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 1762, 0, 0, 1762, 0, 1517, 0,
+ 1517, 0, 0, 919, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1194, 0,
+ 0, 0, 0, 0, 0, 0, 920, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 921, 922, 0, 0,
+ 923, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1194, 0, 1762, 0, 0, 1293, 1762, 0, 0, 1762,
+ 0, 1762, 0, 0, 1762, 0, 0, 924, 1194, 1194,
+ 925, 0, 1526, 0, 926, 0, 927, 0, 0, 1762,
+ 0, 0, 0, 928, 0, 0, 929, 0, 1762, 1762,
+ 0, 1517, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 0, 0, 930, 0, 0, 0, 3850,
+ 0, 3855, 931, 0, 0, 0, 0, 932, 933, 0,
+ 0, 934, 0, 0, 0, 935, 0, 0, 0, 0,
+ 0, 0, 0, 1517, 0, 936, 0, 0, 0, 0,
+ 937, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 938, 0, 0, 0, 0, 0, 0,
+ 0, 1517, 0, 0, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1115, 0, 1115, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 949, 1517, 0, 1305, 1332, 1305, 1305, 0, 0,
+ 1293, 0, 0, 1194, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1517, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3214, 0, 0, 1517, 0,
+ 1526, 0, 0, 3987, 1194, 0, 0, 0, 0, 0,
+ 3998, 0, 0, 0, 0, 0, 0, 0, 0, 1194,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1194, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1194, 1194,
+ 0, 0, 1194, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1293, 0,
+ 0, 1293, 0, 0, 0, 0, 0, 0, 0, 1517,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1194, 1194, 0, 0,
+ 1526, 0, 1517, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4137, 0, 4140, 4142, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1517, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1762, 1762, 1762, 0, 0, 0,
+ 1762, 0, 0, 0, 0, 0, 0, 0, 1293, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1293, 1526, 0, 0, 0, 0, 1762, 0, 1293,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3214, 0, 0, 0, 0, 1194, 0, 0,
+ 1194, 0, 0, 0, 4243, 0, 0, 1115, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1526, 1293,
+ 4256, 0, 0, 1526, 1526, 0, 0, 0, 0, 0,
+ 4137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1293, 0, 4278, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2252, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1762, 0,
+ 1517, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4342, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1293, 0, 1293, 0, 1293, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1526, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2386, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1517, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1517, 0, 0, 0, 0,
+ 0, 0, 949, 1293, 0, 1305, 0, 1305, 1305, 0,
+ 1293, 0, 0, 0, 0, 0, 0, 1762, 0, 0,
+ 0, 0, 1762, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1762, 1762,
+ 1762, 0, 0, 1762, 0, 0, 0, 0, 0, 0,
+ 0, 1762, 1762, 1762, 1762, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1762, 0, 0, 1762, 0, 1762,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1762, 1762, 0, 0, 1762, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1332, 0, 1762, 0, 1762, 0, 1762, 0, 1519,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1517, 0, 0, 0, 0, 0, 0, 1762, 0, 0,
+ 0, 1194, 0, 0, 0, 1519, 0, 0, 4546, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1526, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1194, 0, 0, 0, 0, 0, 0, 1517, 1762,
+ 0, 1517, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1762, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4546, 0,
+ 0, 0, 4602, 0, 0, 4605, 0, 3855, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 80, 0, 0, 0, 0, 83, 0, 0, 0,
+ 87, 0, 88, 0, 90, 91, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 100, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 112, 113, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1762, 0, 0, 0, 0, 0, 0, 2386, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1293, 1293, 0, 0, 0, 0, 0, 121, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1517, 122, 0,
+ 123, 124, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1228, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 133, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 135, 0, 136, 137, 0, 0, 0, 0, 0, 140,
+ 0, 141, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 143, 0, 144, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 147, 0, 148, 0, 0, 151, 0, 0, 1194, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 152, 0, 153, 0, 0, 0, 154, 0, 0, 0,
+ 0, 0, 155, 0, 0, 0, 0, 0, 0, 0,
+ 157, 0, 159, 0, 0, 0, 0, 0, 0, 161,
+ 0, 1517, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 165, 1519, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0,
+ 0, 0, 0, 169, 0, 0, 0, 0, 0, 1517,
+ 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1517, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1762, 0, 0, 180, 181, 0, 1762, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 1293, 0, 0,
+ 0, 183, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 189,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1194, 1194, 1194, 0, 1517, 0,
+ 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0,
+ 0, 1194, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 199, 0, 0, 0, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 201, 0, 0, 0,
+ 0, 0, 202, 203, 0, 204, 2386, 1194, 1194, 0,
+ 205, 0, 1194, 0, 0, 0, 206, 0, 0, 208,
+ 0, 0, 0, 0, 1194, 0, 210, 0, 0, 0,
+ 0, 0, 211, 212, 0, 0, 0, 0, 0, 0,
+ 213, 0, 0, 0, 215, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 218, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 220,
+ 0, 0, 0, 0, 0, 0, 4342, 0, 0, 0,
+ 1517, 0, 0, 1520, 0, 0, 0, 0, 0, 226,
+ 0, 227, 0, 0, 0, 0, 0, 1519, 0, 1293,
+ 229, 0, 0, 0, 0, 0, 230, 0, 0, 1520,
+ 0, 231, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1194, 234, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1194, 0, 0, 1194,
+ 0, 0, 0, 0, 0, 0, 0, 246, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1762, 0,
+ 0, 0, 0, 0, 0, 247, 0, 1762, 0, -148,
+ 0, 0, 0, 0, 0, 1762, 0, 1762, 0, 0,
+ 1762, 0, 0, 0, 0, 1762, 1762, 1762, 1762, 0,
+ 0, 1762, 1762, 1762, 1762, 1762, 1762, 1762, 1762, 1762,
+ 1762, 0, 0, 0, 1762, 1762, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 1762, 0, 0, 0, 1762, 0,
+ 0, 0, 1762, 0, 0, 0, 0, 0, 0, 0,
+ 1762, 0, 0, 1762, 0, 1762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1762, 0, 0, 1762, 1762,
+ 0, 0, 0, 1762, 1762, 947, 0, 0, 5097, 0,
+ 1762, 0, 0, 0, 0, 0, 0, 1194, 1194, 1194,
+ 949, 0, 0, 4546, 5119, 0, 0, 0, 5119, 5133,
+ 5119, 0, 0, 1762, 0, 0, 0, 0, 1517, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1151, 0, 0,
+ 1762, 0, 0, 0, 0, 1151, 0, 1151, 0, 0,
+ 0, 0, 0, 0, 3855, 0, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5194, 2386, 2386, 1519, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1517, 0,
+ 0, 0, 0, 0, 3214, 5226, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5247, 0, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 1519, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1517, 1519, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1517, 0, 0, 0,
+ 0, 1517, 1517, 5335, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 1293, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1293, 0, 1762, 0, 0, 0, 0, 0, 0, 1194,
+ 0, 0, 0, 0, 0, 5379, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3214, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1194, 0, 0, 1519, 0, 4546, 4256, 0, 0, 0,
+ 0, 0, 0, 4137, 1519, 0, 0, 0, 0, 0,
+ 0, 0, 5429, 1517, 0, 0, 0, 0, 0, 0,
+ 1519, 0, 1194, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1762, 1762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2386, 1194, 0, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1519, 4342, 4342, 4342, 4342, 4342, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194,
+ 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1519,
+ 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1762, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1519,
+ 1519, 0, 0, 0, 0, 1762, 0, 0, 1762, 0,
+ 0, 0, 0, 0, 0, 0, 1762, 1762, 0, 0,
+ 0, 0, 0, 1762, 1762, 0, 0, 0, 1762, 0,
+ 0, 0, 1762, 0, 0, 1762, 1762, 0, 0, 0,
+ 1762, 5555, 0, 0, 0, 0, 1762, 1194, 1194, 1194,
+ 1194, 0, 0, 0, 5119, 5133, 5119, 0, 1762, 5119,
+ 0, 0, 5569, 0, 0, 0, 4546, 0, 0, 0,
+ 4546, 0, 0, 0, 0, 0, 5584, 0, 0, 0,
+ 1517, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1332, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1762, 0, 0, 0, 4602, 0, 0,
+ 0, 0, 3855, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1115, 0, 0, 1762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3214,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 5660, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1762, 947, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 1520, 0,
+ 0, 0, 0, 0, 947, 0, 0, 947, 0, 0,
+ 1293, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1293, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1520, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 949, 0, 0, 0, 0, 0, 0, 3214,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2386, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4256, 0, 0, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 1527, 1293, 0, 4278, 947,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1527, 0, 0, 0, 1194, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1194, 0, 0, 0,
+ 0, 0, 5801, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1520, 0, 0, 0, 0, 0,
+ 0, 1762, 0, 0, 1762, 0, 0, 1762, 1762, 1762,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1762, 1762, 0, 0, 1762, 0, 947, 947,
+ 0, 0, 0, 0, 0, 1151, 0, 1520, 0, 1151,
+ 0, 949, 0, 0, 5119, 0, 0, 0, 4546, 0,
+ 0, 0, 0, 4546, 0, 0, 4546, 949, 1520, 4137,
+ 0, 5856, 0, 0, 1762, 947, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 0, 5194, 0, 1762, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5194,
+ 1332, 1293, 0, 1293, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 1520, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1305, 1332, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1305, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5379, 0,
+ 0, 1151, 1151, 1194, 0, 0, 0, 0, 1194, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3214, 0, 0,
+ 0, 0, 0, 0, 0, 947, 947, 1194, 0, 0,
+ 0, 5429, 0, 0, 5999, 0, 0, 0, 947, 0,
+ 0, 0, 0, 1527, 947, 1293, 1194, 5194, 947, 0,
+ 947, 0, 0, 0, 1527, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1762, 0, 0, 0, 1762, 0, 1762, 0,
+ 1519, 0, 0, 0, 1519, 1519, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0,
+ 0, 947, 1762, 947, 947, 0, 4546, 0, 0, 0,
+ 5856, 0, 0, 1762, 0, 6084, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1194, 1519, 2386, 0, 0, 0, 0, 1519,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1762, 0,
+ 0, 0, 0, 1762, 1762, 0, 0, 0, 1293, 1293,
+ 1293, 1293, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1762,
+ 0, 0, 0, 0, 0, 0, 949, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1194, 0, 0, 4546, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1194, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1762, 0, 0, 0, 0, 0, 1762, 0, 0, 949,
+ 0, 0, 1762, 0, 947, 0, 6246, 0, 0, 0,
+ 0, 0, 0, 1762, 0, 0, 0, 0, 0, 0,
+ 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2386, 947, 0, 0, 0, 5194, 0,
+ 0, 0, 0, 0, 0, 0, 1332, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0,
+ 0, 0, 947, 947, 947, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 0, 2386, 2386, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1293, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6336, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 1519, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 947, 947,
+ 0, 5801, 0, 0, 0, 0, 0, 0, 0, 1762,
+ 1762, 1762, 0, 947, 0, 4137, 0, 0, 1762, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1762, 0, 1762,
+ 0, 1762, 6084, 0, 0, 0, 0, 0, 0, 0,
+ 3855, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1305, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1293,
+ 0, 0, 0, 0, 0, 0, 2386, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1151,
+ 0, 3214, 0, 0, 0, 0, 0, 0, 1762, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5194, 1519,
+ 0, 0, 0, 0, 0, 0, 1305, 1305, 6448, 0,
+ 0, 0, 1762, 0, 1519, 1762, 0, 0, 0, 1519,
+ 1151, 0, 0, 0, 0, 1762, 0, 0, 0, 6246,
+ 1527, 0, 0, 0, 0, 1762, 0, 0, 0, 0,
+ 2386, 2386, 6480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1293, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1527, 0, 0,
+ 0, 0, 0, 0, 1520, 0, 1151, 0, 1520, 1520,
+ 0, 0, 0, 6336, 1293, 1293, 0, 0, 0, 5194,
+ 0, 0, 0, 1151, 0, 0, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 949, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1762, 0, 0, 0, 0, 1762, 6529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 1762,
+ 0, 0, 0, 1520, 1762, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1762, 0, 0, 0, 0,
+ 947, 947, 947, 0, 1520, 0, 1762, 0, 6559, 6560,
+ 949, 6563, 0, 0, 0, 0, 0, 0, 0, 1293,
+ 0, 0, 5194, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 6246, 0, 0, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 0, 1762,
+ 949, 0, 0, 949, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1305, 1305, 0, 0, 6606, 0, 0,
+ 1519, 0, 0, 1519, 0, 1519, 0, 0, 0, 0,
+ 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 947, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 947, 1519, 0,
+ 0, 0, 0, 1527, 0, 0, 1519, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1527, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 947,
+ 0, 1519, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 947, 0, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1527, 1527, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1519, 0, 1519, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 947, 947, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0,
+ 1520, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 947, 0, 0, 0, 0,
+ 947, 947, 0, 0, 0, 0, 0, 947, 947, 947,
+ 0, 0, 947, 0, 947, 0, 947, 947, 947, 947,
+ 947, 947, 0, 947, 0, 947, 947, 0, 0, 947,
+ 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1527, 947, 947, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 81, 82,
+ 0, 84, 85, 86, 0, 1519, 0, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 0,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 35, 0, 1520, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1519, 0, 0, 0, 0, 126,
+ 0, 0, 0, 128, 129, 130, 131, 132, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1519, 0, 0, 0,
+ 0, 134, 0, 0, 947, 0, 0, 0, 138, 0,
+ 139, 0, 0, 0, 0, 0, 0, 0, 142, 0,
+ 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 145, 0, 0, 0, 0, 0, 0, 146, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 149, 150, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 158, 0, 0, 0, 0,
+ 160, 0, 0, 0, 0, 947, 0, 162, 0, 0,
+ 0, 0, 0, 163, 0, 164, 0, 0, 0, 0,
+ 0, 0, 166, 0, 167, 0, 0, 0, 0, 0,
+ 0, 1519, 0, 168, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 170, 171,
+ 0, 0, 0, 0, 1519, 172, 0, 173, 0, 0,
+ 174, 175, 0, 176, 0, 0, 0, 0, 0, 0,
+ 0, 0, 177, 178, 0, 179, 0, 0, 0, 1519,
+ 0, 0, 0, 0, 1520, 0, 0, 1520, 0, 1520,
+ 0, 0, 0, 0, 1520, 0, 0, 0, 184, 185,
+ 186, 0, 0, 0, 0, 0, 0, 0, 187, 188,
+ 0, 0, 0, 0, 190, 0, 0, 191, 0, 192,
+ 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0,
+ 0, 0, 0, 0, 0, 193, 194, 0, 195, 196,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 0,
+ 1520, 0, 197, 1522, 198, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 200,
+ 0, 0, 0, 0, 0, 1520, 0, 0, 0, 947,
+ 947, 947, 947, 947, 947, 947, 947, 947, 0, 947,
+ 0, 207, 0, 0, 0, 0, 0, 209, 0, 947,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 214, 0, 0, 216,
+ 0, 0, 217, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 0, 0, 219, 0,
+ 0, 0, 0, 0, 1520, 221, 1520, 0, 0, 0,
+ 0, 0, 0, 222, 223, 0, 0, 0, 947, 224,
+ 0, 225, 947, 0, 0, 947, 0, 947, 0, 0,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 947, 232, 0, 0, 233,
+ 0, 0, 0, 0, 947, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 0, 1520,
+ 1527, 1527, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 1527,
+ 947, 0, 947, 947, 0, 1527, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1151, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 1519, 0, 0, 1522, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0,
+ 1520, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1520, 0, 0, 0, 0, 0,
+ 1519, 0, 0, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1151, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1520, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 947, 947, 947, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 0, 0, 0, 0, 0, 1519,
+ 0, 0, 0, 947, 1527, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1522, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1527, 0,
+ 0, 0, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1519, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1527, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 0,
+ 1527, 947, 0, 947, 947, 1527, 1520, 0, 0, 0,
+ 0, 0, 0, 947, 0, 0, 0, 0, 947, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1519, 1520, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 947, 947, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 947, 947, 947,
+ 947, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 947, 0, 0, 947, 0, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 947, 0, 0,
+ 947, 1523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1522, 0, 0, 0, 947,
+ 0, 947, 0, 947, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 947, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0,
+ 0, 0, 1522, 0, 0, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 1522,
+ 0, 0, 0, 0, 1520, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 1522, 0, 0, 0, 1527, 0, 0, 1527,
+ 0, 1527, 0, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1527, 0, 0, 0, 0, 0,
+ 0, 0, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1527, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1519, 0, 1522, 1520, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 1527, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1523, 0, 0, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 1523, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1522, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0,
+ 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1522, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 947, 0, 0, 1520, 0, 0, 0, 0,
+ 1523, 1527, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0,
+ 0, 0, 0, 1519, 1519, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1520, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1527, 0, 0, 1522, 0, 0, 0, 0,
+ 0, 0, 0, 1523, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1519, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 1527, 0, 0,
+ 0, 0, 0, 947, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 947, 0, 0, 947, 0, 0, 0,
+ 1527, 947, 947, 947, 947, 0, 0, 947, 947, 947,
+ 947, 947, 947, 947, 947, 947, 947, 0, 0, 0,
+ 947, 947, 947, 0, 0, 1527, 0, 0, 0, 0,
+ 947, 0, 0, 0, 947, 0, 0, 0, 947, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 947,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 947, 947, 0, 0, 0, 947,
+ 947, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1519, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1523, 1520, 0, 947, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1527, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 952,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 1523, 0, 0, 0, 0, 0, 952, 0, 0, 952,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1523, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1520, 0, 0, 0, 1527, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1523, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 952, 0, 0, 0, 0, 1530, 0, 0,
+ 0, 952, 0, 0, 0, 0, 1520, 0, 952, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1530, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 1520, 1520, 1523,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 0,
+ 1523, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1527, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 952, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 1522, 1527,
+ 947, 947, 1522, 1522, 0, 0, 0, 0, 0, 0,
+ 1523, 947, 0, 0, 0, 0, 0, 952, 0, 1520,
+ 0, 0, 0, 1523, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 1522, 0, 0,
+ 0, 0, 0, 0, 0, 1523, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 947, 0, 0, 0, 0, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 947, 947, 0, 1527, 0, 0, 0, 947,
+ 947, 0, 0, 0, 947, 0, 0, 0, 947, 0,
+ 0, 947, 947, 0, 0, 0, 947, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 952, 952, 0,
+ 0, 0, 947, 0, 0, 0, 947, 0, 0, 0,
+ 952, 0, 0, 0, 0, 1530, 952, 0, 0, 0,
+ 952, 0, 952, 0, 0, 0, 1530, 0, 0, 0,
+ 0, 0, 0, 1523, 0, 0, 0, 0, 0, 947,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 952, 952, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1527, 0, 0,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1522, 0, 0, 0, 1522, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 0, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 0,
+ 0, 0, 0, 0, 0, 1530, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 1522, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 1527, 0,
+ 0, 0, 1522, 0, 0, 0, 0, 1522, 0, 0,
+ 0, 0, 0, 0, 952, 952, 952, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 0,
+ 947, 0, 0, 947, 947, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 947,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 0,
+ 0, 0, 0, 0, 947, 0, 952, 0, 0, 947,
+ 952, 952, 947, 947, 0, 0, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 952, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 947, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1530, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0,
+ 0, 1522, 0, 1522, 0, 0, 0, 0, 1522, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1522, 0, 0, 1530,
+ 0, 0, 0, 0, 1522, 0, 1523, 0, 0, 0,
+ 1523, 1523, 0, 947, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1522,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 947, 0,
+ 0, 0, 947, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 947, 0, 0, 1523, 0, 0, 947, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 1527, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0,
+ 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 952, 952, 952, 0, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1527, 0, 0, 0, 0, 1527,
+ 1527, 1530, 0, 0, 947, 0, 0, 0, 0, 947,
+ 947, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 947, 0, 0, 0, 0,
+ 0, 1522, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 947, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1522, 0, 0, 952, 0, 0, 952,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 952,
+ 1527, 1527, 0, 0, 0, 1530, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 1530, 0, 0,
+ 0, 0, 0, 0, 0, 0, 947, 0, 0, 0,
+ 952, 952, 947, 0, 0, 947, 0, 0, 947, 0,
+ 0, 0, 0, 0, 0, 952, 0, 0, 952, 947,
+ 0, 0, 0, 0, 0, 0, 947, 1530, 1530, 0,
+ 0, 0, 0, 0, 1523, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1522, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 952,
+ 952, 0, 0, 0, 0, 0, 0, 0, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 0,
+ 0, 0, 1523, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 952, 0, 0,
+ 0, 0, 952, 952, 0, 0, 0, 0, 0, 952,
+ 952, 952, 0, 947, 952, 0, 952, 0, 952, 952,
+ 952, 952, 952, 952, 0, 952, 0, 952, 952, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1530, 952, 952, 952, 0,
+ 0, 0, 0, 0, 0, 947, 947, 947, 0, 0,
+ 0, 0, 0, 952, 947, 0, 0, 0, 1527, 1522,
+ 0, 0, 0, 947, 0, 947, 0, 947, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1523, 0, 1522, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1523, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 947, 0, 0, 0, 0, 0,
+ 0, 0, 947, 947, 0, 0, 0, 0, 947, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 947,
+ 0, 0, 0, 0, 0, 947, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1522, 0, 947, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 947, 0, 0,
+ 0, 0, 947, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 0, 0, 0, 947, 0, 0, 0, 0,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 947, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 947, 0, 0, 0, 947, 0, 0, 0,
+ 1522, 0, 0, 0, 0, 0, 0, 0, 947, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 1523,
+ 0, 1523, 0, 0, 0, 1522, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 947, 947, 0, 0, 947,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 947,
+ 947, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1523, 0, 0, 0, 0, 0,
+ 0, 0, 1523, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1523, 0, 0,
+ 0, 952, 952, 952, 952, 952, 952, 952, 952, 952,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 952, 0, 0, 952, 0, 952,
+ 0, 0, 952, 0, 0, 0, 0, 0, 1522, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 952, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 80, 0, 0, 1523,
+ 0, 83, 0, 0, 0, 87, 0, 88, 0, 90,
+ 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 112, 113, 1530, 0,
+ 0, 1523, 1530, 1530, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 121, 0, 0, 0, 1522, 952, 0,
+ 0, 0, 0, 122, 0, 123, 124, 0, 0, 952,
+ 0, 1530, 952, 0, 952, 952, 0, 1530, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 133, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 135, 0, 136, 137, 0,
+ 1523, 0, 0, 0, 140, 0, 141, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 143, 0,
+ 144, 0, 1523, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 147, 0, 148, 0, 0,
+ 151, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 152, 0, 153, 0, 0,
+ 0, 154, 0, 0, 0, 0, 0, 6020, 0, 0,
+ 0, 0, 0, 0, 0, 157, 0, 159, 0, 0,
+ 0, 1522, 0, 0, 161, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 165, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 169, 1522,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1522, 0, 0, 0, 0, 0, 1523, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 180, 181,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 1523, 0, 952, 952, 952, 0, 183, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 189, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 1530, 0, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 199, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 201, 0, 0, 0, 0, 0, 202, 203, 0,
+ 204, 0, 0, 0, 0, 205, 0, 0, 4939, 0,
+ 0, 206, 0, 0, 208, 0, 0, 0, 0, 0,
+ 1530, 210, 0, 0, 1530, 0, 0, 211, 212, 0,
+ 0, 0, 0, 0, 0, 213, 0, 0, 0, 215,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 218,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 220, 0, 0, 0, 0, 0,
+ 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 226, 0, 227, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 229, 0, 0, 0, 0,
+ 0, 230, 0, 0, 0, 0, 231, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 234,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 246, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1530, 0, 0,
+ 247, 0, 0, 0, -148, 0, 0, 0, 0, 0,
+ 952, 0, 1530, 952, 0, 952, 952, 1530, 1523, 0,
+ 0, 0, 0, 0, 0, 952, 0, 0, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1523, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 952, 952, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 952,
+ 952, 952, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 952, 0, 0, 952, 0, 952, 0, 0,
+ 771, 0, 0, 0, 0, 0, 0, 0, 952, 952,
+ 0, 0, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0,
+ 0, 952, 0, 952, 0, 952, 0, 771, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 0, 0, 0, 1000,
+ 1010, 0, 0, 1015, 0, 0, 952, 0, 0, 1010,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1010, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 1523,
+ 0, 0, 0, 0, 0, 0, 1207, 0, 1522, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1207, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 1530, 0, 1530, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 952,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1522, 0, 0, 0, 0, 0, 1530, 0, 0, 0,
+ 0, 0, 0, 0, 1530, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1530,
+ 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0,
+ 0, 1522, 1522, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1258, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1522, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 952, 0, 0, 1523, 0, 0,
+ 0, 0, 0, 1530, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1530, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1000, 1530, 0,
+ 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1010, 1010, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1258, 0, 0, 952, 0, 0, 1530,
+ 0, 0, 0, 0, 0, 952, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 952, 0, 0, 952, 0,
+ 0, 0, 1530, 952, 952, 952, 952, 0, 0, 952,
+ 952, 952, 952, 952, 952, 952, 952, 952, 952, 0,
+ 0, 0, 952, 952, 952, 0, 0, 1530, 0, 0,
+ 0, 0, 952, 0, 0, 0, 952, 0, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 952, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 952, 952, 0, 0,
+ 0, 952, 952, 0, 0, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 1295, 952, 0, 0, 1299, 0, 0, 0, 0, 0,
+ 0, 952, 1334, 0, 0, 1336, 0, 0, 1341, 1342,
+ 0, 1345, 0, 1348, 0, 0, 1354, 0, 1356, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1384, 0, 0, 0, 0, 0, 1523, 0, 952, 0,
+ 0, 1420, 0, 0, 0, 1424, 0, 0, 0, 0,
+ 0, 0, 1436, 1437, 952, 0, 1443, 0, 1446, 1447,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 1258,
+ 0, 1010, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1490, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1556, 0, 1558, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1572, 1574, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1010, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1530, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1258, 0, 771, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1523, 0, 1207, 0, 0, 1523,
+ 1523, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1525, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 952, 0, 1525, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1909, 0, 0, 1910, 0, 1913, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 1956, 1530, 952, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 1523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2130, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2169, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 2181, 0, 2182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2185, 0, 0,
+ 0, 0, 0, 0, 2195, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 952, 952, 0, 1530, 0, 0,
+ 0, 952, 952, 0, 0, 0, 952, 0, 0, 0,
+ 952, 0, 0, 952, 952, 2246, 0, 2248, 952, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1525,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1530,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 2406, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2421, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 771,
+ 771, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1207, 1572, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 740, 0,
+ 0, 0, 0, 784, 0, 784, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 784, 0, 0, 771, 0,
+ 0, 0, 0, 3077, 0, 0, 3077, 0, 0, 952,
+ 0, 0, 952, 0, 3084, 952, 952, 952, 0, 0,
+ 784, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3092, 784, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 952, 784, 784, 952, 0, 784, 0, 0, 0,
+ 0, 0, 784, 0, 0, 0, 1107, 0, 0, 952,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 952, 0, 0, 952, 952, 0, 0, 1107, 0,
+ 0, 0, 952, 0, 3176, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 784, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 952, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3265, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 952,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 3387, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 952, 1525, 952, 0, 0, 0,
+ 3423, 0, 0, 784, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 1530, 952, 1525, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3485, 0, 3489, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 3510, 0, 0, 0, 0, 1530, 0, 0, 0,
+ 0, 1530, 1530, 0, 0, 0, 952, 0, 0, 0,
+ 0, 952, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 3548, 0,
+ 3549, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1572, 3558, 0, 3559, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 3580,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 1572, 1530, 1530, 0, 1572, 0, 0, 0, 1572,
+ 0, 1525, 1572, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 952, 0, 0, 952, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 784, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1525, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 784,
+ 784, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1525, 1525, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 784, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 952, 952,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 1530, 0, 0, 0, 0, 952, 0, 952, 0, 952,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 952, 0, 0, 0,
+ 0, 0, 0, 0, 952, 952, 0, 0, 0, 0,
+ 952, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1472, 784, 0, 784, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 952,
+ 0, 0, 0, 0, 952, 784, 0, 0, 784, 784,
+ 0, 0, 0, 0, 0, 0, 0, 952, 0, 0,
+ 0, 0, 952, 740, 0, 1107, 0, 1107, 0, 0,
+ 0, 0, 0, 740, 0, 0, 0, 784, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 952, 0, 0, 0, 1107, 1107, 0,
+ 0, 0, 0, 0, 952, 0, 0, 0, 952, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 952, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3785, 0, 0, 0, 0,
+ 0, 0, 0, 0, 784, 0, 784, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 952, 952, 0,
+ 0, 952, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 952, 952, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 740, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 740,
+ 740, 0, 0, 1891, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1746, 1746, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 740, 1258, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3881, 3882, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3897,
+ 3898, 0, 0, 0, 3901, 3902, 0, 0, 3904, 3905,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3916, 0, 0, 0, 0, 0, 0,
+ 3925, 0, 0, 0, 3928, 3929, 740, 0, 3932, 3933,
+ 0, 0, 0, 0, 0, 3938, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3953, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3970,
+ 0, 0, 0, 0, 3972, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3978,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3985, 0,
+ 0, 3989, 0, 3991, 3994, 3996, 0, 0, 0, 0,
+ 4004, 4007, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4020, 0, 0, 0, 0, 4029, 0, 0, 0, 4032,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4042,
+ 4043, 0, 0, 0, 4048, 0, 0, 0, 0, 0,
+ 4057, 4058, 0, 0, 0, 0, 0, 4063, 0, 0,
+ 4065, 2144, 2148, 0, 0, 0, 0, 4077, 4078, 0,
+ 0, 0, 0, 4082, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4089, 0, 0, 4092, 0,
+ 0, 1525, 0, 4095, 0, 1525, 1525, 0, 0, 4098,
+ 4099, 0, 1572, 0, 1572, 0, 0, 4105, 1572, 0,
+ 4107, 0, 0, 0, 4114, 4115, 4116, 4117, 0, 4119,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4144, 4145, 0, 4147, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4156, 4157, 4158, 0,
+ 0, 784, 0, 784, 1525, 0, 784, 0, 784, 0,
+ 1525, 784, 784, 784, 0, 0, 0, 2381, 0, 0,
+ 0, 0, 0, 0, 784, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 784, 0,
+ 784, 0, 0, 0, 0, 784, 0, 0, 0, 0,
+ 0, 1525, 0, 4210, 0, 0, 0, 0, 0, 0,
+ 0, 4234, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4247, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4317, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2935, 4350, 0, 4352, 0, 0, 0, 0, 0, 0,
+ 0, 0, 784, 784, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 740,
+ 0, 0, 0, 0, 740, 740, 0, 0, 0, 0,
+ 2436, 0, 0, 1258, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1572, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2451, 0, 0, 0, 0, 0, 0, 0, 0, 1525,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2469, 2470,
+ 2471, 0, 2474, 0, 0, 0, 0, 4416, 0, 0,
+ 0, 784, 0, 740, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2925, 3081, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1525, 0, 0, 0, 1525, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3009, 740, 0, 0, 3021, 3026, 0, 0, 0, 0,
+ 0, 740, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1525, 0, 0, 0, 740, 0, 0, 740, 740, 0,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 1525, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1572, 0, 0, 0, 0, 4637,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4649,
+ 0, 0, 0, 0, 0, 0, 0, 740, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4656, 0, 0, 0,
+ 4656, 0, 0, 0, 0, 4667, 4668, 4669, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4699, 4700, 4701, 4702, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4720, 0,
+ 4724, 4725, 4726, 0, 0, 0, 2144, 2144, 2144, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 0, 1525, 0, 1525, 0, 0, 0,
+ 0, 1525, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 784, 0, 784, 0,
+ 0, 0, 784, 0, 784, 0, 0, 784, 0, 1525,
+ 0, 784, 0, 4802, 0, 0, 2935, 1525, 0, 0,
+ 0, 0, 4808, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1525, 0, 0, 0, 0, 0, 4818, 4819,
+ 0, 0, 0, 4820, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4862, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 1525, 0, 0, 0, 0, 0, 1572,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4898, 0, 0, 0, 0, 1010, 0, 0, 0, 0,
+ 0, 4910, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4949, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1000, 0, 0, 1010, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1525, 0, 3654, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3674, 4979,
+ 3675, 4980, 3677, 0, 0, 3691, 3694, 3699, 0, 0,
+ 0, 0, 3705, 0, 0, 3710, 0, 0, 1572, 0,
+ 0, 0, 0, 0, 0, 0, 1525, 0, 0, 0,
+ 3717, 3718, 3719, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5004, 0, 0, 0, 3720, 0, 0,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1525, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3727, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3744, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1525, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3746, 0, 0, 5198, 0, 0, 5205, 0, 5206,
+ 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0,
+ 0, 0, 5213, 0, 0, 0, 0, 0, 0, 2917,
+ 0, 0, 0, 0, 5219, 0, 0, 0, 5222, 0,
+ 1525, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5246, 0, 0,
+ 0, 2381, 0, 0, 0, 0, 0, 0, 3786, 0,
+ 0, 0, 0, 0, 0, 5250, 0, 0, 3081, 0,
+ 5254, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5289, 0, 0, 0, 5293,
+ 0, 0, 0, 0, 0, 0, 0, 5298, 5299, 5300,
+ 5301, 0, 0, 0, 0, 0, 0, 5305, 5306, 5307,
+ 5308, 0, 0, 0, 0, 0, 5310, 5311, 0, 0,
+ 0, 0, 5318, 5319, 0, 5321, 5322, 5323, 5324, 5325,
+ 5326, 5327, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5336, 0, 0, 0, 5339, 5340, 5341, 5342, 0,
+ 0, 0, 0, 0, 0, 3753, 3754, 3755, 3756, 3757,
+ 3758, 3759, 3760, 3761, 0, 3762, 0, 0, 0, 4656,
+ 0, 0, 0, 1525, 0, 1746, 0, 0, 2144, 0,
+ 0, 0, 0, 0, 0, 740, 0, 5362, 0, 740,
+ 0, 0, 0, 0, 0, 3870, 0, 1891, 0, 0,
+ 784, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3720, 0, 0, 0, 3727, 0,
+ 0, 3744, 0, 3746, 0, 0, 3806, 0, 740, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5444, 1525, 0, 0, 0, 0, 0, 0,
+ 2470, 2471, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0,
+ 0, 0, 0, 0, 0, 4656, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5479, 0, 5480,
+ 0, 0, 0, 0, 0, 0, 0, 1572, 1572, 1572,
+ 1572, 1572, 0, 0, 0, 0, 0, 0, 2917, 0,
+ 5494, 0, 2917, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3930, 0, 0, 0, 0, 0, 0, 0,
+ 0, 740, 0, 0, 0, 0, 0, 0, 0, 740,
+ 0, 0, 740, 1525, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 740, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5640, 5641, 5642, 0, 0, 0, 5643, 5644, 5645, 5646,
+ 0, 0, 0, 5648, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5667,
+ 5668, 5669, 5670, 5671, 0, 5673, 5674, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5683, 5684, 0,
+ 1525, 0, 0, 0, 0, 0, 4168, 4169, 2144, 0,
+ 2917, 0, 4173, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 5689, 0, 0, 3687,
+ 0, 0, 0, 0, 1572, 1572, 0, 1572, 0, 4202,
+ 0, 0, 0, 2917, 2917, 2917, 0, 0, 2917, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 784, 2381, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 740, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5753, 0,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1525, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5807, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4421,
+ 0, 0, 0, 0, 4427, 0, 3081, 0, 0, 0,
+ 0, 740, 1572, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1572, 0, 0,
+ 0, 0, 2474, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3699, 0, 3699, 3699, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4487, 0, 0, 4490,
+ 0, 4492, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4511, 0, 4514, 0, 4516,
+ 0, 0, 0, 1525, 0, 0, 0, 0, 5900, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5910, 0, 0,
+ 0, 0, 5915, 5916, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5927, 0, 0, 0, 0, 0, 0, 5929,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3009, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3026, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5980, 5981, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5989, 0,
+ 1010, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6006, 0, 0, 0, 2917,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4656, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6042, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4635, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1572, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1572, 0, 0, 0,
+ 0, 0, 0, 2917, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 6090, 0, 0, 2917, 0, 0, 0, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6107, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6114, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1572, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6173, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 740, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1525, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4656,
+ 0, 0, 0, 0, 0, 0, 0, 0, 784, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1525, 0, 0, 1572, 0, 0, 0,
+ 0, 0, 2144, 0, 0, 0, 0, 0, 2144, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 784, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1525,
+ 6274, 0, 0, 0, 1525, 1525, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6287, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4888, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6315, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6326, 0, 0, 740, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1525, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6396,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 6417, 0, 0, 0, 0, 0, 0, 0,
+ 5021, 0, 0, 0, 0, 0, 0, 0, 0, 5025,
+ 0, 0, 0, 0, 0, 0, 0, 5027, 0, 5028,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5050, 5051, 5052, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3870, 0, 0, 0, 3705, 0, 0, 0, 0, 0,
+ 0, 0, 5076, 0, 0, 5079, 0, 5081, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5084, 6493, 0,
+ 0, 0, 0, 0, 0, 5091, 5092, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1525, 0, 5138, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 740, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5156, 0, 0, 0, 0, 0, 2917, 0,
+ 0, 0, 0, 0, 0, 0, 740, 0, 5169, 0,
+ 0, 0, 0, 740, 0, 0, 0, 0, 2917, 2917,
+ 0, 2917, 0, 0, 740, 0, 3687, 3687, 0, 4464,
+ 0, 3687, 0, 0, 0, 2917, 0, 0, 2917, 0,
+ 0, 0, 0, 2917, 0, 0, 0, 0, 0, 2917,
+ 0, 0, 0, 0, 2917, 0, 0, 0, 0, 0,
+ 0, 2917, 2917, 2917, 2917, 0, 0, 0, 3687, 3687,
+ 0, 2917, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2917, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 2917, 2917, 2917,
+ 2917, 2917, 2917, 2917, 2917, 2917, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 740,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 740, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2917, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5451, 5452, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5459, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3081,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5511, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5517,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5536, 5538,
+ 0, 0, 0, 0, 0, 5542, 5543, 0, 0, 0,
+ 5544, 0, 0, 0, 5545, 0, 0, 5548, 5549, 0,
+ 0, 0, 5553, 740, 0, 0, 0, 0, 5557, 740,
+ 0, 0, 0, 740, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2917, 2917, 0, 0, 0, 2917, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1746, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5621, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5686, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5722, 0,
+ 0, 0, 0, 0, 0, 2917, 0, 0, 0, 0,
+ 0, 2917, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4464,
+ 4464, 0, 0, 3687, 3687, 3687, 3687, 0, 0, 3687,
+ 3687, 3687, 3687, 3687, 3687, 3687, 3687, 3687, 3687, 4464,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2917, 0, 0, 2917, 0, 2917, 0, 0, 4464,
+ 4464, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 3687, 3687, 2917, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 784, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5813, 0, 0, 0, 0, 0, 5817,
+ 5818, 5819, 0, 0, 0, 0, 0, 0, 0, 740,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5830, 5831, 0, 0, 5832, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2917,
+ 0, 0, 0, 0, 0, 0, 5858, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5874,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 784, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3687, 0, 0, 0, 0, 0, 0, 0, 740, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3705, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2917, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6063, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6081, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 740, 0, 0, 0, 0,
+ 6121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6157, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 0, 0, 0, 2917,
+ 0, 2917, 2917, 0, 0, 0, 0, 4464, 4464, 4464,
+ 4464, 0, 0, 0, 4464, 4464, 4464, 4464, 4464, 4464,
+ 4464, 4464, 4464, 4464, 2917, 2917, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 0, 0, 2917, 0, 2917, 0, 0, 2917, 0,
+ 0, 4464, 4464, 0, 0, 2917, 2917, 0, 0, 0,
+ 0, 0, 6228, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2474, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2917, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 0, 6276, 0,
+ 0, 0, 0, 2917, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6362, 6362, 6362, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6081, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4464, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6425, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6449, 0, 0, 6362, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6081, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 2917, 0, 0, 0,
+ 0, 0, 0, 2917, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 0, 0, 0, 0,
+ 0, 2917, 3687, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 6536, 2917, 0, 0, 0, 2917, 2917, 2917, 2917,
+ 0, 0, 2917, 2917, 0, 0, 0, 2917, 0, 0,
+ 0, 2917, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6362, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6558, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2917, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2144, 0, 0, 0, 0, 81, 82, 0, 84,
+ 85, 86, 0, 0, 0, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 0, 0, 0,
+ 101, 102, 103, 104, 0, 105, 106, 107, 108, 0,
+ 109, 110, 111, 0, 0, 0, 0, 0, 114, 115,
+ 2917, 0, 0, 0, 116, 0, 0, 0, 0, 0,
+ 0, 0, 0, 117, 0, 118, 0, 119, 0, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 126, 0, 0,
+ 0, 128, 129, 130, 131, 132, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 134,
+ 0, 0, 0, 0, 0, 0, 138, 0, 139, 0,
+ 0, 0, 0, 0, 0, 0, 142, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 145, 0,
+ 0, 0, 0, 0, 0, 146, 0, 2917, 0, 4464,
+ 3687, 2917, 2917, 2917, 0, 149, 150, 0, 0, 0,
+ 0, 0, 0, 0, 2917, 2917, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 3687, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 156, 0, 0, 0, 0,
+ 0, 0, 2917, 158, 0, 0, 0, 0, 160, 0,
+ 0, 0, 0, 0, 0, 162, 0, 0, 2917, 0,
+ 0, 163, 0, 164, 0, 0, 0, 0, 0, 0,
+ 166, 0, 167, 0, 0, 0, 0, 0, 0, 0,
+ 0, 168, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 170, 171, 0, 0,
+ 0, 0, 0, 172, 0, 173, 0, 0, 174, 175,
+ 0, 176, 0, 0, 0, 0, 0, 0, 0, 0,
+ 177, 178, 0, 179, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 184, 185, 186, 0,
+ 0, 0, 0, 0, 0, 0, 187, 188, 0, 0,
+ 0, 0, 190, 0, 0, 191, 0, 192, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 193, 194, 0, 195, 196, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 197, 0, 198, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 200, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4464,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 207,
+ 3687, 0, 0, 4464, 0, 209, 0, 2917, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 214, 2917, 0, 216, 0, 0,
+ 217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 219, 0, 0, 0,
+ 0, 0, 0, 221, 0, 0, 0, 0, 0, 0,
+ 0, 222, 223, 0, 0, 2917, 0, 224, 0, 225,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 228,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 232, 0, 0, 233, 0, 0,
+ 0, 2917, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3860, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2917, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4464, 0, 3687, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2917, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2917, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2917,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2917, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3687,
+ 0, 0, 0, 0, 3687, 0, 0, 0, 0, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 4464,
+ 0, 0, 4464, 0, 0, 0, 0, 755, 0, 756,
+ 2917, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2917, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 800, 438, 439, 440, 801, 802, 803, 804,
+ 805, 806, 807, 441, 442, 443, 808, 444, 445, 446,
+ 447, 126, 448, 449, 450, 128, 129, 130, 131, 132,
+ 809, 451, 452, 453, 454, 455, 456, 457, 810, 811,
+ 458, 459, 812, 134, 460, 813, 461, 462, 463, 464,
+ 138, 814, 139, 815, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 816, 817, 473, 474, 475, 476, 477,
+ 478, 818, 145, 479, 480, 819, 820, 821, 822, 146,
+ 823, 824, 825, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 826, 489, 827, 490, 491, 492, 493, 494,
+ 495, 496, 828, 497, 498, 499, 500, 829, 830, 501,
+ 502, 503, 504, 505, 831, 506, 507, 508, 832, 509,
+ 510, 511, 833, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 834, 520, 835, 521, 522, 523, 162,
+ 524, 836, 525, 837, 526, 163, 838, 164, 527, 528,
+ 529, 530, 839, 531, 166, 840, 167, 532, 533, 841,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 842, 542, 543, 544, 545, 546, 547, 548, 843, 549,
+ 170, 171, 844, 550, 551, 552, 845, 172, 846, 173,
+ 847, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 848, 849, 560, 177, 178, 561, 179, 850, 562,
+ 563, 564, 851, 852, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 185, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 853, 587, 588, 190, 589, 854, 191,
+ 590, 192, 591, 592, 593, 855, 594, 595, 856, 857,
+ 596, 597, 598, 858, 859, 599, 600, 193, 194, 601,
+ 195, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 860, 611, 612, 197, 613, 198, 614, 615, 616,
+ 861, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 862, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 863, 644, 645, 207, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 864,
+ 659, 660, 661, 662, 663, 865, 665, 666, 214, 667,
+ 668, 216, 669, 670, 217, 671, 866, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 867, 686, 687, 868, 688, 221, 689, 690,
+ 691, 692, 693, 869, 694, 222, 223, 870, 871, 696,
+ 697, 224, 698, 225, 872, 699, 700, 701, 702, 703,
+ 704, 705, 706, 873, 874, 707, 708, 709, 710, 711,
+ 875, 876, 712, 713, 714, 715, 716, 877, 232, 878,
+ 717, 233, 718, 719, 720, 721, 879, 880, 722, 881,
+ 882, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 80, 0, 0, 81, 82, 83, 84, 85, 86,
+ 87, 0, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 100, 0, 1067, 101, 102,
+ 103, 104, 0, 105, 106, 107, 108, 0, 109, 110,
+ 111, 112, 113, 0, 0, 0, 114, 115, 0, 0,
+ 0, 0, 116, 0, 0, 0, 0, 0, 0, 0,
+ 0, 117, 0, 118, 0, 119, 120, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 121, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 122, 0,
+ 123, 124, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 125, 0, 0, 126, 0, 0, 127, 128,
+ 129, 130, 131, 132, 0, 0, 0, 0, 133, 0,
+ 0, 0, 0, 0, 0, 0, 0, 134, 0, 0,
+ 135, 0, 136, 137, 138, 0, 139, 0, 0, 140,
+ 0, 141, 0, 0, 142, 0, 0, 0, 0, 0,
+ 0, 0, 0, 143, 0, 144, 145, 0, 0, 0,
+ 0, 0, 0, 146, 0, 0, 0, 0, 0, 0,
+ 147, 0, 148, 149, 150, 151, 0, 0, 0, 0,
+ 0, -1668, 0, 0, 0, 0, 0, 0, 0, 0,
+ 152, 0, 153, 0, 0, 0, 154, 0, 0, 0,
+ 0, 0, 155, 156, 0, 0, 0, 0, 0, 0,
+ 157, 158, 159, 0, 0, 0, 160, 0, 0, 161,
+ 0, 0, 0, 162, 0, 0, 0, 0, 0, 163,
+ 0, 164, 0, 0, 0, 0, 165, 0, 166, 0,
+ 167, 0, 0, 0, 0, 0, 0, 0, 0, 168,
+ 0, 0, 0, 169, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 170, 171, 0, 0, -1668, 0,
+ 0, 172, 0, 173, 0, 0, 174, 175, 0, 176,
+ 0, 0, 0, 0, 0, 0, 0, 0, 177, 178,
+ 0, 179, 0, 180, 181, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 0, 0, 184, 185, 186, 0, 0, 0,
+ 0, 0, 0, 0, 187, 188, 0, 0, 0, 189,
+ 190, 0, 0, 191, 0, 192, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 193, 194, 0, 195, 196, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 197, 0,
+ 198, 0, 199, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 200, 201, 0, 0, 0,
+ 0, 0, 202, 203, 0, 204, 0, 0, 0, 0,
+ 205, 0, 0, 0, 0, 0, 206, 207, 0, 208,
+ 0, 0, 0, 209, 0, 0, 210, 0, 0, 0,
+ 0, 0, 211, 212, 0, 0, 0, 0, 0, 0,
+ 213, 0, 214, 0, 215, 216, 0, 0, 217, 0,
+ 0, 0, 0, 0, 218, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 219, 0, 0, 0, 0, 220,
+ 0, 221, 0, 0, 0, 0, 0, 0, 0, 222,
+ 223, 0, 0, 0, 0, 224, 0, 225, 0, 226,
+ 0, 227, 0, 0, 0, 0, 0, 228, 0, 0,
+ 229, 0, 0, -1668, 0, 0, 230, 0, 0, 0,
+ 0, 231, 232, 0, 0, 233, 0, 0, 0, 0,
+ 0, 0, 0, 0, 234, 0, 0, 0, 0, 0,
+ 0, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 0, 0, 0, 0, 0, 246, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 81, 82,
+ 0, 84, 85, 86, 0, 247, 0, 89, 0, -148,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 0,
+ 0, 0, 101, 102, 103, 104, 0, 105, 106, 107,
+ 108, 0, 109, 110, 111, 0, 0, 0, 0, 0,
+ 114, 115, 0, 0, 0, 0, 116, 0, 0, 0,
+ 0, 0, 0, 0, 0, 117, 0, 118, 0, 119,
+ 0, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 126,
+ 0, 0, 0, 128, 129, 130, 131, 132, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 134, 0, 0, 0, 0, 0, 0, 138, 0,
+ 139, 0, 0, 0, 0, 0, 0, 0, 142, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 145, 0, 0, 0, 0, 0, 0, 146, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 149, 150, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 156, 0, 0,
+ 0, 0, 0, 0, 0, 158, 0, 0, 0, 0,
+ 160, 0, 0, 0, 0, 0, 0, 162, 0, 0,
+ 0, 0, 0, 163, 0, 164, 0, 0, 0, 0,
+ 0, 0, 166, 0, 167, 0, 0, 0, 0, 0,
+ 0, 0, 0, 168, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 170, 171,
+ 0, 0, 0, 0, 0, 172, 0, 173, 0, 0,
+ 174, 175, 0, 176, 0, 0, 0, 0, 0, 0,
+ 0, 0, 177, 178, 0, 179, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 184, 185,
+ 186, 0, 0, 0, 0, 0, 0, 0, 187, 188,
+ 0, 0, 0, 0, 190, 0, 0, 191, 0, 192,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 193, 194, 0, 195, 196,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 197, 0, 198, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 200,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 207, 0, 0, 0, 0, 0, 209, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 214, 0, 0, 216,
+ 0, 0, 217, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 219, 0,
+ 0, 0, 0, 0, 0, 221, 0, 0, 0, 0,
+ 0, 0, 0, 222, 223, 0, 0, 0, 0, 224,
+ 0, 225, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 228, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 232, 0, 0, 233,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 0, 0, 0, 0,
+ 0, 0, 793, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 794, 98, 99, 749, 795, 3862, 101, 102, 103,
+ 104, 796, 797, 106, 107, 108, 0, 109, 798, 799,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 429, 0, 0,
+ 37, 0, 38, 39, 0, 1664, 1665, 1666, 40, 1667,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 2138, 438, 439, 440, 0,
+ 0, 0, 0, 1668, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 126, 448, 449, 450, 128, 1669,
+ 130, 1670, 1671, 0, 451, 452, 453, 454, 455, 456,
+ 457, 1672, 1673, 458, 459, 1674, 1675, 460, 0, 461,
+ 462, 463, 464, 1676, 0, 1677, 0, 465, 466, 467,
+ 468, 469, 470, 142, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 145, 479, 480, 0, 1678,
+ 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485, 486,
+ 763, 487, 1685, 1686, 488, 1687, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 2139, 0, 501, 502, 1498, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 1688, 516, 517, 518, 519, 1689, 1690, 520, 0, 521,
+ 522, 523, 1691, 524, 0, 525, 0, 526, 163, 0,
+ 164, 527, 528, 529, 530, 0, 531, 1692, 0, 1693,
+ 532, 533, 0, 534, 535, 765, 536, 537, 168, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 170, 171, 0, 550, 551, 552, 1501,
+ 1694, 0, 1695, 0, 553, 174, 175, 554, 176, 555,
+ 556, 557, 558, 559, 0, 0, 560, 1696, 178, 561,
+ 179, 0, 562, 563, 564, 1697, 1698, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 1699, 185, 1700, 579, 580, 581, 582,
+ 583, 584, 585, 187, 1701, 586, 1702, 587, 588, 190,
+ 589, 1703, 1704, 590, 1705, 591, 592, 593, 0, 594,
+ 595, 0, 0, 1706, 597, 598, 0, 0, 599, 600,
+ 193, 194, 601, 195, 1707, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 1708, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 1709, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 207, 646, 647, 648,
+ 649, 650, 1710, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 1711, 665,
+ 666, 214, 667, 668, 216, 669, 670, 1712, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 1713, 685, 0, 686, 687, 0, 688,
+ 221, 689, 690, 691, 692, 693, 0, 694, 1714, 1715,
+ 0, 0, 696, 697, 1716, 698, 1717, 1718, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 1719, 707, 708,
+ 709, 710, 711, 1720, 0, 712, 713, 714, 715, 716,
+ 769, 1721, 2140, 717, 233, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729,
+ 245, 770, 729, 730, 1730, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1731, 1732, 2141, 0, 0,
+ 0, 0, 0, 0, 1734, 2142, 793, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 794, 98, 99, 749, 795,
+ 0, 101, 102, 103, 104, 796, 797, 106, 107, 108,
+ 0, 109, 798, 799, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 429, 0, 0, 37, 0, 38, 39, 0, 1664,
+ 1665, 1666, 40, 1667, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 1668, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 126, 448,
+ 449, 450, 128, 1669, 130, 1670, 1671, 0, 451, 452,
+ 453, 454, 455, 456, 457, 1672, 1673, 458, 459, 1674,
+ 1675, 460, 0, 461, 462, 463, 464, 1676, 0, 1677,
+ 0, 465, 466, 467, 468, 469, 470, 142, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 145,
+ 479, 480, 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684,
+ 483, 484, 485, 486, 763, 487, 1685, 1686, 488, 1687,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 1498, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 1688, 516, 517, 518, 519, 1689,
+ 1690, 520, 0, 521, 522, 523, 1691, 524, 0, 525,
+ 0, 526, 163, 0, 164, 527, 528, 529, 530, 0,
+ 531, 1692, 0, 1693, 532, 533, 0, 534, 535, 765,
+ 536, 537, 168, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 170, 171, 0,
+ 550, 551, 552, 1501, 1694, 0, 1695, 0, 553, 174,
+ 175, 554, 176, 555, 556, 557, 558, 559, 0, 0,
+ 560, 1696, 178, 561, 179, 0, 562, 563, 564, 1697,
+ 1698, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 1699, 185, 1700,
+ 579, 580, 581, 582, 583, 584, 585, 187, 1701, 586,
+ 1702, 587, 588, 190, 589, 1703, 1704, 590, 1705, 591,
+ 592, 593, 0, 594, 595, 0, 0, 1706, 597, 598,
+ 0, 0, 599, 600, 193, 194, 601, 195, 1707, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 1708, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 1709, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 207, 646, 647, 648, 649, 650, 1710, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 212, 659, 660, 661,
+ 662, 663, 1711, 665, 666, 214, 667, 668, 216, 669,
+ 670, 1712, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 1713, 685, 0,
+ 686, 687, 220, 688, 221, 689, 690, 691, 692, 693,
+ 0, 694, 1714, 1715, 0, 0, 696, 697, 1716, 698,
+ 1717, 1718, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 1719, 707, 708, 709, 710, 711, 1720, 0, 712,
+ 713, 714, 715, 716, 2472, 1721, 0, 717, 233, 718,
+ 719, 720, 721, 0, 0, 722, 0, 234, 723, 724,
+ 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725, 240,
+ 1726, 1727, 1728, 1729, 245, 770, 729, 730, 1730, 0,
+ 246, 0, 0, 0, 0, 0, 0, 0, 0, 1731,
+ 1732, 0, 0, 0, 0, 0, 0, 0, 1734, 6254,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 1666, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 452, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 1687, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 1702, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 1706, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 1710, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 1719, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 1730, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1731, 1732, 0, 0, 0, 0, 0,
+ 0, 0, 1734, 3689, 793, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 794, 98, 99, 749, 795, 0, 101,
+ 102, 103, 104, 796, 797, 106, 107, 108, 0, 109,
+ 798, 799, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 38, 39, 0, 1664, 1665, 1666,
+ 40, 1667, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 1668, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 126, 448, 449, 450,
+ 128, 1669, 130, 1670, 1671, 0, 451, 452, 453, 454,
+ 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460,
+ 0, 461, 462, 463, 464, 1676, 0, 1677, 0, 465,
+ 466, 467, 468, 469, 470, 142, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 145, 479, 480,
+ 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484,
+ 485, 486, 763, 487, 1685, 1686, 488, 1687, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 1498, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 1688, 516, 517, 518, 519, 1689, 1690, 520,
+ 0, 521, 522, 523, 1691, 524, 0, 525, 0, 526,
+ 163, 0, 164, 527, 528, 529, 530, 0, 531, 1692,
+ 0, 1693, 532, 533, 0, 534, 535, 765, 536, 537,
+ 168, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 170, 171, 0, 550, 551,
+ 552, 1501, 1694, 0, 1695, 0, 553, 174, 175, 554,
+ 176, 555, 556, 557, 558, 559, 0, 0, 560, 1696,
+ 178, 561, 179, 0, 562, 563, 564, 1697, 1698, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 1699, 185, 1700, 579, 580,
+ 581, 582, 583, 584, 585, 187, 1701, 586, 1702, 587,
+ 588, 190, 589, 1703, 1704, 590, 1705, 591, 592, 593,
+ 0, 594, 595, 0, 0, 1706, 597, 598, 0, 0,
+ 599, 600, 193, 194, 601, 195, 1707, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 1708,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 1709, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 207, 646,
+ 647, 648, 649, 650, 1710, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 1711, 665, 666, 214, 667, 668, 216, 669, 670, 1712,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 1713, 685, 0, 686, 687,
+ 0, 688, 221, 689, 690, 691, 692, 693, 0, 694,
+ 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 1719,
+ 707, 708, 709, 710, 711, 1720, 0, 712, 713, 714,
+ 715, 716, 769, 1721, 0, 717, 233, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727,
+ 1728, 1729, 245, 770, 729, 730, 1730, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1731, 1732, 0,
+ 0, 0, 0, 0, 0, 0, 1734, 5029, 793, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 794, 98, 99,
+ 749, 795, 0, 101, 102, 103, 104, 796, 797, 106,
+ 107, 108, 0, 109, 798, 799, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 429, 0, 0, 37, 0, 38, 39,
+ 0, 1664, 1665, 1666, 40, 1667, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 1668,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 126, 448, 449, 450, 128, 1669, 130, 1670, 1671, 0,
+ 451, 452, 453, 454, 455, 456, 457, 1672, 1673, 458,
+ 459, 1674, 1675, 460, 0, 461, 462, 463, 464, 1676,
+ 0, 1677, 0, 465, 466, 467, 468, 469, 470, 142,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 145, 479, 480, 0, 1678, 1679, 1680, 1681, 1682,
+ 1683, 1684, 483, 484, 485, 486, 763, 487, 1685, 1686,
+ 488, 1687, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 1498, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 1688, 516, 517, 518,
+ 519, 1689, 1690, 520, 0, 521, 522, 523, 1691, 524,
+ 0, 525, 0, 526, 163, 0, 164, 527, 528, 529,
+ 530, 0, 531, 1692, 0, 1693, 532, 533, 0, 534,
+ 535, 765, 536, 537, 168, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 170,
+ 171, 0, 550, 551, 552, 1501, 1694, 0, 1695, 0,
+ 553, 174, 175, 554, 176, 555, 556, 557, 558, 559,
+ 0, 0, 560, 1696, 178, 561, 179, 0, 562, 563,
+ 564, 1697, 1698, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 1699,
+ 185, 1700, 579, 580, 581, 582, 583, 584, 585, 187,
+ 1701, 586, 1702, 587, 588, 190, 589, 1703, 1704, 590,
+ 1705, 591, 592, 593, 0, 594, 595, 0, 0, 1706,
+ 597, 598, 0, 0, 599, 600, 193, 194, 601, 195,
+ 1707, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 1708, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 1709, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 207, 646, 647, 648, 649, 650, 1710, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 1711, 665, 666, 214, 667, 668,
+ 216, 669, 670, 1712, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 1713,
+ 685, 0, 686, 687, 0, 688, 221, 689, 690, 691,
+ 692, 693, 0, 694, 1714, 1715, 0, 0, 696, 697,
+ 1716, 698, 1717, 1718, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 1719, 707, 708, 709, 710, 711, 1720,
+ 0, 712, 713, 714, 715, 716, 769, 1721, 0, 717,
+ 233, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 1722, 1723, 1724,
+ 1725, 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730,
+ 1730, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1731, 1732, 0, 0, 0, 0, 0, 0, 0,
+ 1734, 5098, 793, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 794, 98, 99, 749, 795, 0, 101, 102, 103,
+ 104, 796, 797, 106, 107, 108, 0, 109, 798, 799,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 126, 448, 449, 450, 0, 1491,
+ 130, 1492, 1493, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 1494, 1495, 460, 0, 461,
+ 462, 463, 464, 0, 0, 139, 0, 465, 466, 467,
+ 468, 469, 470, 142, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 145, 479, 480, 0, 0,
+ 0, 0, 146, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 1496, 1497, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 1498, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 0, 516, 517, 518, 519, 0, 0, 520, 0, 521,
+ 522, 523, 1499, 524, 0, 525, 0, 526, 163, 0,
+ 164, 527, 528, 529, 530, 0, 531, 0, 0, 0,
+ 532, 533, 0, 534, 535, 765, 536, 537, 168, 538,
+ 539, 540, 541, 3100, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 170, 3101, 0, 550, 551, 552, 1501,
+ 1502, 0, 1503, 0, 553, 174, 175, 554, 176, 555,
+ 556, 557, 558, 559, 0, 0, 560, 0, 178, 561,
+ 179, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 1504, 185, 1505, 579, 580, 581, 582,
+ 583, 584, 585, 0, 0, 586, 0, 587, 588, 190,
+ 589, 0, 0, 590, 1506, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 3103, 194, 601, 195, 0, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 0, 613, 0,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 1507, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 207, 646, 647, 648,
+ 649, 650, 0, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 3104, 667, 668, 216, 669, 670, 1509, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 0, 685, 0, 686, 687, 0, 688,
+ 221, 689, 690, 691, 692, 693, 0, 694, 1510, 1511,
+ 0, 0, 696, 697, 0, 698, 0, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 0, 1512, 3105, 717, 233, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 770, 729, 730, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 3202, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 0,
+ 1491, 130, 1492, 1493, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 1494, 1495, 460, 0,
+ 461, 462, 463, 464, 0, 0, 139, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 0, 0, 0, 146, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 1496, 1497, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 1498, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 0, 516, 517, 518, 519, 0, 0, 520, 0,
+ 521, 522, 523, 1499, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 0, 0,
+ 0, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 3100, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 3101, 0, 550, 551, 552,
+ 1501, 1502, 0, 1503, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 0, 178,
+ 561, 179, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 1504, 185, 1505, 579, 580, 581,
+ 582, 583, 584, 585, 0, 0, 586, 0, 587, 588,
+ 190, 589, 0, 0, 590, 1506, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 3103, 194, 601, 195, 0, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 0, 613,
+ 0, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 1507, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 0, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 3104, 667, 668, 216, 669, 670, 1509, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 0, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 1510,
+ 1511, 0, 0, 696, 697, 0, 698, 0, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 0, 1512, 3105, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 770, 729, 730, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 793, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 4294, 92, 93, 94,
+ 95, 96, 97, 794, 98, 99, 749, 795, 0, 101,
+ 102, 103, 104, 796, 797, 106, 107, 108, 0, 109,
+ 798, 799, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 38, 39, 0, 1664, 1665, 1666,
+ 40, 1667, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 1668, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 126, 448, 449, 450,
+ 128, 1669, 130, 1670, 1671, 0, 451, 452, 453, 454,
+ 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460,
+ 0, 461, 462, 463, 464, 1676, 0, 1677, 0, 465,
+ 466, 467, 468, 469, 470, 142, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 145, 479, 480,
+ 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484,
+ 485, 486, 763, 487, 1685, 1686, 488, 1687, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 1498, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 1688, 516, 517, 518, 519, 1689, 1690, 520,
+ 0, 521, 522, 523, 1691, 524, 0, 525, 0, 526,
+ 163, 0, 164, 527, 528, 529, 530, 0, 531, 1692,
+ 0, 1693, 532, 533, 0, 534, 535, 765, 536, 537,
+ 168, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 170, 171, 0, 550, 551,
+ 552, 1501, 1694, 0, 1695, 0, 553, 174, 175, 554,
+ 176, 555, 556, 557, 558, 559, 0, 0, 560, 1696,
+ 178, 561, 179, 0, 562, 563, 564, 1697, 1698, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 1699, 185, 1700, 579, 580,
+ 581, 582, 583, 584, 585, 187, 1701, 586, 1702, 587,
+ 588, 190, 589, 1703, 1704, 590, 1705, 591, 592, 593,
+ 0, 594, 595, 0, 0, 1706, 597, 598, 0, 0,
+ 599, 600, 193, 194, 601, 195, 1707, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 1708,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 1709, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 207, 646,
+ 647, 648, 649, 650, 1710, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 212, 659, 660, 661, 662, 663,
+ 1711, 665, 666, 214, 667, 668, 216, 669, 670, 1712,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 1713, 685, 0, 686, 687,
+ 220, 688, 221, 689, 690, 691, 692, 693, 0, 694,
+ 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 1719,
+ 707, 708, 709, 710, 711, 1720, 0, 712, 713, 714,
+ 715, 716, 2472, 1721, 0, 717, 233, 718, 719, 720,
+ 721, 0, 0, 722, 0, 234, 723, 724, 725, 726,
+ 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727,
+ 1728, 1729, 245, 770, 729, 730, 1730, 0, 246, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1731, 1732, 0,
+ 0, 0, 0, 0, 0, 0, 1734, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 38, 39, 0,
+ 1664, 1665, 1666, 40, 1667, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 1668, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 128, 1669, 130, 1670, 1671, 3695, 451,
+ 452, 453, 454, 455, 456, 457, 1672, 1673, 458, 459,
+ 1674, 1675, 460, 0, 461, 462, 463, 464, 1676, 0,
+ 1677, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 1678, 1679, 1680, 1681, 1682, 1683,
+ 1684, 483, 484, 485, 486, 763, 487, 1685, 1686, 488,
+ 1687, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 1498,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 1688, 516, 517, 518, 519,
+ 1689, 1690, 520, 0, 521, 522, 523, 1691, 524, 0,
+ 525, 0, 526, 163, 3696, 164, 527, 528, 529, 530,
+ 0, 531, 1692, 0, 1693, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 171,
+ 0, 550, 551, 552, 1501, 1694, 0, 1695, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 3697, 560, 1696, 178, 561, 179, 0, 562, 563, 564,
+ 1697, 1698, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 1699, 185,
+ 1700, 579, 580, 581, 582, 583, 584, 585, 187, 1701,
+ 586, 1702, 587, 588, 190, 589, 1703, 1704, 590, 1705,
+ 591, 592, 593, 0, 594, 595, 0, 0, 1706, 597,
+ 598, 0, 0, 599, 600, 193, 194, 601, 195, 1707,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 1708, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 1709,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 1710, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 1711, 665, 666, 214, 667, 668, 216,
+ 669, 670, 1712, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 1713, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 1714, 1715, 0, 3698, 696, 697, 1716,
+ 698, 1717, 1718, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 1719, 707, 708, 709, 710, 711, 1720, 0,
+ 712, 713, 714, 715, 716, 769, 1721, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725,
+ 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730, 1730,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1731, 1732, 0, 0, 0, 0, 0, 0, 0, 1734,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 1666, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, -2167, 438, 439, 440, 0, 0, 0,
+ -2167, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 452, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 1687, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 1702, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 1706, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 1710, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, -2167, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 1719, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 1730, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1731, 1732, 0, 0, 0, 0, 0,
+ 0, 0, 1734, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 429, 0,
+ 0, 37, 0, 38, 39, 0, 1664, 1665, 1666, 40,
+ 1667, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, -2165, 438, 439, 440,
+ 0, 0, 0, -2165, 1668, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 1669, 130, 1670, 1671, 0, 451, 452, 453, 454, 455,
+ 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460, 0,
+ 461, 462, 463, 464, 1676, 0, 1677, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485,
+ 486, 763, 487, 1685, 1686, 488, 1687, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 1498, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 1688, 516, 517, 518, 519, 1689, 1690, 520, 0,
+ 521, 522, 523, 1691, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 1692, 0,
+ 1693, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 171, 0, 550, 551, 552,
+ 1501, 1694, 0, 1695, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 1696, 178,
+ 561, 179, 0, 562, 563, 564, 1697, 1698, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 1699, 185, 1700, 579, 580, 581,
+ 582, 583, 584, 585, 187, 1701, 586, 1702, 587, 588,
+ 190, 589, 1703, 1704, 590, 1705, 591, 592, 593, 0,
+ 594, 595, 0, 0, 1706, 597, 598, 0, 0, 599,
+ 600, 193, 194, 601, 195, 1707, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 1708, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 1709, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 1710, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 1711,
+ 665, 666, 214, 667, 668, 216, 669, 670, 1712, 671,
+ -2165, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 1713, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 1714,
+ 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 1719, 707,
+ 708, 709, 710, 711, 1720, 0, 712, 713, 714, 715,
+ 716, 769, 1721, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728,
+ 1729, 245, 770, 729, 730, 1730, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1731, 1732, 0, 0,
+ 0, 0, 0, 0, 0, 1734, 793, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 794, 98, 99, 749, 795,
+ 0, 101, 102, 103, 104, 796, 797, 106, 107, 108,
+ 0, 109, 798, 799, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 429, 0, 0, 37, 0, 38, 39, 0, 1664,
+ 1665, 1666, 40, 1667, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 1668, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 126, 448,
+ 449, 450, 128, 1669, 130, 1670, 1671, 0, 451, 452,
+ 453, 454, 455, 456, 457, 1672, 1673, 458, 459, 1674,
+ 1675, 460, 0, 461, 462, 463, 464, 1676, 0, 1677,
+ 0, 465, 466, 467, 468, 469, 470, 142, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 145,
+ 479, 480, 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684,
+ 483, 484, 485, 486, 763, 487, 1685, 1686, 488, 1687,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 1498, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 1688, 516, 517, 518, 519, 1689,
+ 1690, 520, 0, 521, 522, 523, 1691, 524, 0, 525,
+ 0, 526, 163, 0, 164, 527, 528, 529, 530, 0,
+ 531, 1692, 0, 1693, 532, 533, 0, 534, 535, 765,
+ 536, 537, 168, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 170, 171, 0,
+ 550, 551, 552, 1501, 1694, 0, 1695, 0, 553, 174,
+ 175, 554, 176, 555, 556, 557, 558, 559, 0, 0,
+ 560, 1696, 178, 561, 179, 0, 562, 563, 564, 1697,
+ 1698, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 1699, 185, 1700,
+ 579, 580, 581, 582, 583, 584, 585, 187, 1701, 586,
+ 1702, 587, 588, 190, 589, 1703, 1704, 590, 1705, 591,
+ 592, 593, 0, 594, 595, 0, 0, 1706, 597, 598,
+ 0, 0, 599, 600, 193, 194, 601, 195, 1707, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 1708, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 1709, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 207, 646, 647, 648, 649, 650, 1710, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 1711, 665, 666, 214, 667, 668, 216, 669,
+ 670, 1712, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 1713, 685, 0,
+ 686, 687, 0, 688, 221, 689, 690, 691, 692, 693,
+ 0, 694, 1714, 1715, 0, 0, 696, 697, 1716, 698,
+ 1717, 1718, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 1719, 707, 708, 709, 710, 711, 1720, 0, 712,
+ 713, 714, 715, 716, 769, 1721, 0, 717, 233, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725, 240,
+ 1726, 1727, 1728, 1729, 245, 770, 729, 730, 1730, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1731,
+ 1732, 0, 0, 0, 0, 0, 2433, 3647, 1734, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 429, 0, 0, 37, 0, 38,
+ 39, 0, 1664, 1665, 1666, 40, 1667, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 1668, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 126, 448, 449, 450, 128, 1669, 130, 1670, 1671,
+ 0, 451, 452, 453, 454, 455, 456, 457, 1672, 1673,
+ 458, 459, 1674, 1675, 460, 0, 461, 462, 463, 464,
+ 1676, 0, 1677, 0, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 145, 479, 480, 0, 1678, 1679, 1680, 1681,
+ 1682, 1683, 1684, 483, 484, 485, 486, 763, 487, 1685,
+ 1686, 488, 1687, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 1498, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 1688, 516, 517,
+ 518, 519, 1689, 1690, 520, 0, 521, 522, 523, 1691,
+ 524, 0, 525, 0, 526, 163, 0, 164, 527, 528,
+ 529, 530, 0, 531, 1692, 0, 1693, 532, 533, 0,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 170, 171, 0, 550, 551, 552, 1501, 1694, 0, 1695,
+ 0, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 0, 0, 560, 1696, 178, 561, 179, 0, 562,
+ 563, 564, 1697, 1698, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 1699, 185, 1700, 579, 580, 581, 582, 583, 584, 585,
+ 187, 1701, 586, 1702, 587, 588, 190, 589, 1703, 1704,
+ 590, 1705, 591, 592, 593, 0, 594, 595, 0, 0,
+ 1706, 597, 598, 0, 0, 599, 600, 193, 194, 601,
+ 195, 1707, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 1708, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 1709, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 207, 646, 647, 648, 649, 650, 1710,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 1711, 665, 666, 214, 667,
+ 668, 216, 669, 670, 1712, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 1713, 685, 0, 686, 687, 0, 688, 221, 689, 690,
+ 691, 692, 693, 0, 694, 1714, 1715, 0, 0, 696,
+ 697, 1716, 698, 1717, 1718, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 1719, 707, 708, 709, 710, 711,
+ 1720, 0, 712, 713, 714, 715, 716, 769, 1721, 0,
+ 717, 233, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 1722, 1723,
+ 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770, 729,
+ 730, 1730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1731, 1732, 1733, 0, 0, 0, 0, 0,
+ 0, 1734, 793, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 794, 98, 99, 749, 795, 0, 101, 102, 103,
+ 104, 796, 797, 106, 107, 108, 0, 109, 798, 799,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 429, 0, 0,
+ 37, 0, 38, 39, 0, 1664, 1665, 1666, 40, 1667,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 3019, 438, 439, 440, 0,
+ 0, 0, 0, 1668, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 126, 448, 449, 450, 128, 1669,
+ 130, 1670, 1671, 0, 451, 452, 453, 454, 455, 456,
+ 457, 1672, 1673, 458, 459, 1674, 1675, 460, 0, 461,
+ 462, 463, 464, 1676, 0, 1677, 0, 465, 466, 467,
+ 468, 469, 470, 142, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 145, 479, 480, 0, 1678,
+ 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485, 486,
+ 763, 487, 1685, 1686, 488, 1687, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 1498, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 1688, 516, 517, 518, 519, 1689, 1690, 520, 0, 521,
+ 522, 523, 1691, 524, 0, 525, 0, 526, 163, 0,
+ 164, 527, 528, 529, 530, 0, 531, 1692, 0, 1693,
+ 532, 533, 0, 534, 535, 765, 536, 537, 168, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 170, 171, 0, 550, 551, 552, 1501,
+ 1694, 0, 1695, 0, 553, 174, 175, 554, 176, 555,
+ 556, 557, 558, 559, 0, 0, 560, 1696, 178, 561,
+ 179, 0, 562, 563, 564, 1697, 1698, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 1699, 185, 1700, 579, 580, 581, 582,
+ 583, 584, 585, 187, 1701, 586, 1702, 587, 588, 190,
+ 589, 1703, 1704, 590, 1705, 591, 592, 593, 0, 594,
+ 595, 0, 0, 1706, 597, 598, 0, 0, 599, 600,
+ 193, 194, 601, 195, 1707, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 1708, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 1709, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 207, 646, 647, 648,
+ 649, 650, 1710, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 1711, 665,
+ 666, 214, 667, 668, 216, 669, 670, 1712, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 1713, 685, 0, 686, 687, 0, 688,
+ 221, 689, 690, 691, 692, 693, 0, 694, 1714, 1715,
+ 0, 0, 696, 697, 1716, 698, 1717, 1718, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 1719, 707, 708,
+ 709, 710, 711, 1720, 0, 712, 713, 714, 715, 716,
+ 769, 1721, 0, 717, 233, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729,
+ 245, 770, 729, 730, 1730, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1731, 1732, 0, 0, 0,
+ 0, 0, 0, 0, 1734, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 429, 0, 0, 37, 0, 38, 39, 0, 1664, 1665,
+ 1666, 40, 1667, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 1668, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 1669, 130, 1670, 1671, 0, 451, 452, 453,
+ 454, 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675,
+ 460, 0, 461, 462, 463, 464, 1676, 0, 1677, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483,
+ 484, 485, 486, 763, 487, 1685, 1686, 488, 1687, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 1498, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 1688, 516, 517, 518, 519, 1689, 1690,
+ 520, 0, 521, 522, 523, 1691, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 1692, 0, 1693, 532, 533, 0, 534, 535, 765, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 1501, 1694, 0, 1695, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 1696, 178, 561, 179, 0, 562, 563, 564, 1697, 1698,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 1699, 185, 1700, 579,
+ 580, 581, 582, 583, 584, 585, 187, 1701, 586, 1702,
+ 587, 588, 190, 589, 1703, 1704, 590, 1705, 591, 592,
+ 593, 0, 594, 595, 0, 0, 1706, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 1707, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 1708, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 1709, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 1710, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 1711, 665, 666, 214, 667, 668, 216, 669, 670,
+ 1712, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 1713, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717,
+ 1718, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 1719, 707, 708, 709, 710, 711, 1720, 0, 712, 713,
+ 714, 715, 716, 769, 1721, 4170, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726,
+ 1727, 1728, 1729, 245, 770, 729, 730, 1730, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1731, 1732,
+ 0, 0, 0, 0, 0, 0, 0, 1734, 793, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 794, 98, 99,
+ 749, 795, 0, 101, 102, 103, 104, 796, 797, 106,
+ 107, 108, 0, 109, 798, 799, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 429, 0, 0, 37, 0, 38, 39,
+ 0, 1664, 1665, 1666, 40, 1667, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 1668,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 126, 448, 449, 450, 128, 1669, 130, 1670, 1671, 0,
+ 451, 452, 453, 454, 455, 456, 457, 1672, 1673, 458,
+ 459, 1674, 1675, 460, 0, 461, 462, 463, 464, 1676,
+ 0, 1677, 0, 465, 466, 467, 468, 469, 470, 142,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 145, 479, 480, 0, 1678, 1679, 1680, 1681, 1682,
+ 1683, 1684, 483, 484, 485, 486, 763, 487, 1685, 1686,
+ 488, 1687, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 1498, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 1688, 516, 517, 518,
+ 519, 1689, 1690, 520, 0, 521, 522, 523, 1691, 524,
+ 0, 525, 0, 526, 163, 3696, 164, 527, 528, 529,
+ 530, 0, 531, 1692, 0, 1693, 532, 533, 0, 534,
+ 535, 765, 536, 537, 168, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 170,
+ 171, 0, 550, 551, 552, 1501, 1694, 0, 1695, 0,
+ 553, 174, 175, 554, 176, 555, 556, 557, 558, 559,
+ 0, 0, 560, 1696, 178, 561, 179, 0, 562, 563,
+ 564, 1697, 1698, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 1699,
+ 185, 1700, 579, 580, 581, 582, 583, 584, 585, 187,
+ 1701, 586, 1702, 587, 588, 190, 589, 1703, 1704, 590,
+ 1705, 591, 592, 593, 0, 594, 595, 0, 0, 1706,
+ 597, 598, 0, 0, 599, 600, 193, 194, 601, 195,
+ 1707, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 1708, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 1709, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 207, 646, 647, 648, 649, 650, 1710, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 1711, 665, 666, 214, 667, 668,
+ 216, 669, 670, 1712, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 1713,
+ 685, 0, 686, 687, 0, 688, 221, 689, 690, 691,
+ 692, 693, 0, 694, 1714, 1715, 0, 0, 696, 697,
+ 1716, 698, 1717, 1718, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 1719, 707, 708, 709, 710, 711, 1720,
+ 0, 712, 713, 714, 715, 716, 769, 1721, 0, 717,
+ 233, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 1722, 1723, 1724,
+ 1725, 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730,
+ 1730, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1731, 1732, 0, 0, 0, 0, 0, 0, 0,
+ 1734, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 429, 0, 0, 37,
+ 0, 38, 39, 0, 1664, 1665, 1666, 40, 1667, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 1668, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 128, 1669, 130,
+ 1670, 1671, 0, 451, 452, 453, 454, 455, 456, 457,
+ 1672, 1673, 458, 459, 1674, 1675, 460, 0, 461, 462,
+ 463, 464, 1676, 0, 1677, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 1678, 1679,
+ 1680, 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763,
+ 487, 1685, 1686, 488, 1687, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 1498, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 1688,
+ 516, 517, 518, 519, 1689, 1690, 520, 0, 521, 522,
+ 523, 1691, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 1692, 0, 1693, 532,
+ 533, 0, 534, 535, 765, 536, 537, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 171, 0, 550, 551, 552, 1501, 1694,
+ 0, 1695, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 1696, 178, 561, 179,
+ 0, 562, 563, 564, 1697, 1698, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 1699, 185, 1700, 579, 580, 581, 582, 583,
+ 584, 585, 187, 1701, 586, 1702, 587, 588, 190, 589,
+ 1703, 1704, 590, 1705, 591, 592, 593, 0, 594, 595,
+ 0, 0, 1706, 597, 598, 0, 0, 599, 600, 193,
+ 194, 601, 195, 1707, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 1708, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 1709, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 1710, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 1711, 665, 666,
+ 214, 667, 668, 216, 669, 670, 1712, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 1713, 685, 0, 686, 687, 0, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 1714, 1715, 3747,
+ 0, 696, 697, 1716, 698, 1717, 1718, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 1719, 707, 708, 709,
+ 710, 711, 1720, 0, 712, 713, 714, 715, 716, 769,
+ 1721, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245,
+ 770, 729, 730, 1730, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1731, 1732, 0, 0, 0, 0,
+ 0, 0, 0, 1734, 793, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 794, 98, 99, 749, 795, 0, 101,
+ 102, 103, 104, 796, 797, 106, 107, 108, 0, 109,
+ 798, 799, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 38, 39, 0, 1664, 1665, 1666,
+ 40, 1667, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 1668, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 126, 448, 449, 450,
+ 128, 1669, 130, 1670, 1671, 0, 451, 452, 453, 454,
+ 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460,
+ 0, 461, 462, 463, 464, 1676, 0, 1677, 0, 465,
+ 466, 467, 468, 469, 470, 142, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 145, 479, 480,
+ 5155, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484,
+ 485, 486, 763, 487, 1685, 1686, 488, 1687, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 1498, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 1688, 516, 517, 518, 519, 1689, 1690, 520,
+ 0, 521, 522, 523, 1691, 524, 0, 525, 0, 526,
+ 163, 0, 164, 527, 528, 529, 530, 0, 531, 1692,
+ 0, 1693, 532, 533, 0, 534, 535, 765, 536, 537,
+ 168, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 170, 171, 0, 550, 551,
+ 552, 1501, 1694, 0, 1695, 0, 553, 174, 175, 554,
+ 176, 555, 556, 557, 558, 559, 0, 0, 560, 1696,
+ 178, 561, 179, 0, 562, 563, 564, 1697, 1698, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 1699, 185, 1700, 579, 580,
+ 581, 582, 583, 584, 585, 187, 1701, 586, 1702, 587,
+ 588, 190, 589, 1703, 1704, 590, 1705, 591, 592, 593,
+ 0, 594, 595, 0, 0, 1706, 597, 598, 0, 0,
+ 599, 600, 193, 194, 601, 195, 1707, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 1708,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 1709, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 207, 646,
+ 647, 648, 649, 650, 1710, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 1711, 665, 666, 214, 667, 668, 216, 669, 670, 1712,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 1713, 685, 0, 686, 687,
+ 0, 688, 221, 689, 690, 691, 692, 693, 0, 694,
+ 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 1719,
+ 707, 708, 709, 710, 711, 1720, 0, 712, 713, 714,
+ 715, 716, 769, 1721, 0, 717, 233, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727,
+ 1728, 1729, 245, 770, 729, 730, 1730, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1731, 1732, 0,
+ 0, 0, 0, 0, 0, 0, 1734, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 38, 39, 0,
+ 1664, 1665, 1666, 40, 1667, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 1668, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 6359, 1669, 130, 1670, 1671, 0, 451,
+ 452, 453, 454, 455, 456, 457, 1672, 1673, 458, 459,
+ 1674, 1675, 460, 0, 461, 462, 463, 464, 1676, 0,
+ 1677, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 6360, 1678, 1679, 1680, 1681, 1682, 1683,
+ 1684, 483, 484, 485, 486, 763, 487, 1685, 1686, 488,
+ 1687, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 1498,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 1688, 516, 517, 518, 519,
+ 1689, 1690, 520, 0, 521, 522, 523, 1691, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 1692, 0, 1693, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 171,
+ 0, 550, 551, 552, 1501, 1694, 0, 1695, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 1696, 178, 561, 179, 0, 562, 563, 564,
+ 1697, 1698, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 1699, 185,
+ 1700, 579, 580, 581, 582, 583, 584, 585, 187, 1701,
+ 586, 1702, 587, 588, 190, 589, 1703, 1704, 590, 1705,
+ 591, 592, 593, 0, 594, 595, 0, 0, 1706, 597,
+ 598, 0, 0, 599, 600, 193, 194, 601, 195, 1707,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 1708, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 1709,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 1710, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 1711, 665, 666, 214, 667, 668, 216,
+ 669, 670, 1712, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 1713, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 1714, 1715, 0, 0, 696, 697, 1716,
+ 698, 1717, 1718, 699, 700, 701, 702, 703, 6361, 705,
+ 706, 0, 1719, 707, 708, 709, 710, 711, 1720, 0,
+ 712, 713, 714, 715, 716, 769, 1721, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725,
+ 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730, 1730,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1731, 1732, 0, 0, 0, 0, 0, 0, 0, 1734,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 1666, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 452, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 6360, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 1687, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 1702, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 1706, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 1710, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 6361, 705, 706, 0, 1719, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 1730, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1731, 1732, 0, 0, 0, 0, 0,
+ 0, 0, 1734, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 429, 0,
+ 0, 37, 0, 38, 39, 0, 1664, 1665, 1666, 40,
+ 1667, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 1668, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 1669, 130, 1670, 1671, 0, 451, 452, 453, 454, 455,
+ 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460, 0,
+ 461, 462, 463, 464, 1676, 0, 1677, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485,
+ 486, 763, 487, 1685, 1686, 488, 1687, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 1498, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 1688, 516, 517, 518, 519, 1689, 1690, 520, 0,
+ 521, 522, 523, 1691, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 1692, 0,
+ 1693, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 171, 0, 550, 551, 552,
+ 1501, 1694, 0, 1695, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 1696, 178,
+ 561, 179, 0, 562, 563, 564, 1697, 1698, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 1699, 185, 1700, 579, 580, 581,
+ 582, 583, 584, 585, 187, 1701, 586, 1702, 587, 588,
+ 190, 589, 1703, 1704, 590, 1705, 591, 592, 593, 0,
+ 594, 595, 0, 0, 1706, 597, 598, 0, 0, 599,
+ 600, 193, 194, 601, 195, 1707, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 1708, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 1709, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 1710, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 1711,
+ 665, 666, 214, 667, 668, 216, 669, 670, 1712, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 1713, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 1714,
+ 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 1719, 707,
+ 708, 709, 710, 711, 1720, 0, 712, 713, 714, 715,
+ 716, 769, 1721, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728,
+ 1729, 245, 770, 729, 730, 1730, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1731, 1732, 0, 0,
+ 0, 0, 0, 0, 0, 1734, 793, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 794, 98, 99, 749, 795,
+ 0, 101, 102, 103, 104, 796, 797, 106, 107, 108,
+ 0, 109, 798, 799, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 429, 0, 0, 37, 0, 38, 39, 0, 1664,
+ 1665, 1666, 40, 1667, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 1668, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 126, 448,
+ 449, 450, 128, 1669, 130, 1670, 1671, 0, 451, 452,
+ 453, 454, 455, 456, 457, 1672, 1673, 458, 459, 1674,
+ 1675, 460, 0, 461, 462, 463, 464, 1676, 0, 1677,
+ 0, 465, 466, 467, 468, 469, 470, 142, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 145,
+ 479, 480, 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684,
+ 483, 484, 485, 486, 763, 487, 1685, 1686, 488, 1687,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 1498, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 1688, 516, 517, 518, 519, 1689,
+ 1690, 520, 0, 521, 522, 523, 1691, 524, 0, 525,
+ 0, 526, 163, 0, 164, 527, 528, 529, 530, 0,
+ 531, 1692, 0, 1693, 532, 533, 0, 534, 535, 765,
+ 536, 537, 168, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 170, 171, 0,
+ 550, 551, 552, 1501, 1694, 0, 1695, 0, 553, 174,
+ 175, 554, 176, 555, 556, 557, 558, 559, 0, 0,
+ 560, 1696, 178, 561, 179, 0, 562, 563, 564, 1697,
+ 1698, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 1699, 185, 1700,
+ 579, 580, 581, 582, 583, 584, 585, 187, 1701, 586,
+ 1702, 587, 588, 190, 589, 1703, 1704, 590, 1705, 591,
+ 592, 593, 0, 594, 595, 0, 0, 1706, 597, 598,
+ 0, 0, 599, 600, 193, 194, 601, 195, 1707, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 1708, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 1709, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 207, 646, 647, 648, 649, 650, 1710, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 1711, 665, 666, 214, 667, 668, 216, 669,
+ 670, 1712, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 1713, 685, 0,
+ 686, 687, 0, 688, 221, 689, 690, 691, 692, 693,
+ 0, 694, 1714, 1715, 0, 0, 696, 697, 1716, 698,
+ 1717, 1718, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 1719, 707, 708, 709, 710, 711, 1720, 0, 712,
+ 713, 714, 715, 716, 769, 1721, 0, 717, 233, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725, 240,
+ 1726, 1727, 1728, 1729, 245, 770, 729, 730, 1730, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3022,
+ 3023, 0, 0, 0, 0, 0, 0, 0, 1734, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 429, 0, 0, 37, 0, 38,
+ 39, 0, 1664, 1665, 1666, 40, 1667, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 1668, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 126, 448, 449, 450, 128, 1669, 130, 1670, 1671,
+ 0, 451, 452, 453, 454, 455, 456, 457, 1672, 1673,
+ 458, 459, 1674, 1675, 460, 0, 461, 462, 463, 464,
+ 1676, 0, 1677, 0, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 145, 479, 480, 0, 1678, 1679, 1680, 1681,
+ 1682, 1683, 1684, 483, 484, 485, 486, 763, 487, 1685,
+ 1686, 488, 1687, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 1498, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 1688, 516, 517,
+ 518, 519, 1689, 1690, 520, 0, 521, 522, 523, 1691,
+ 524, 0, 525, 0, 526, 163, 0, 164, 527, 528,
+ 529, 530, 0, 531, 1692, 0, 1693, 532, 533, 0,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 170, 171, 0, 550, 551, 552, 1501, 1694, 0, 1695,
+ 0, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 0, 0, 560, 1696, 178, 561, 179, 0, 562,
+ 563, 564, 1697, 1698, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 1699, 185, 1700, 579, 580, 581, 582, 583, 584, 585,
+ 187, 1701, 586, 1702, 587, 588, 190, 589, 1703, 1704,
+ 590, 1705, 591, 592, 593, 0, 594, 595, 0, 0,
+ 1706, 597, 598, 0, 0, 599, 600, 193, 194, 601,
+ 195, 1707, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 1708, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 1709, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 207, 646, 647, 648, 649, 650, 1710,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 1711, 665, 666, 214, 667,
+ 668, 216, 669, 670, 1712, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 1713, 685, 0, 686, 687, 0, 688, 221, 689, 690,
+ 691, 692, 693, 0, 694, 1714, 1715, 0, 0, 696,
+ 697, 1716, 698, 1717, 1718, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 1719, 707, 708, 709, 710, 711,
+ 1720, 0, 712, 713, 714, 715, 716, 769, 1721, 0,
+ 717, 233, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 5525, 1722, 1723,
+ 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770, 729,
+ 730, 1730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1731, 1732, 0, 0, 0, 0, 0, 0,
+ 0, 1734, 793, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 794, 98, 99, 749, 795, 0, 101, 102, 103,
+ 104, 796, 797, 106, 107, 108, 0, 109, 798, 799,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 429, 0, 0,
+ 37, 0, 38, 39, 0, 1664, 1665, 1666, 40, 1667,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 1668, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 126, 448, 449, 450, 128, 1669,
+ 130, 1670, 1671, 0, 451, 452, 453, 454, 455, 456,
+ 457, 1672, 1673, 458, 459, 1674, 1675, 460, 0, 461,
+ 462, 463, 464, 1676, 0, 1677, 0, 465, 466, 467,
+ 468, 469, 470, 142, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 145, 479, 480, 0, 1678,
+ 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485, 486,
+ 763, 487, 1685, 1686, 488, 1687, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 1498, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 1688, 516, 517, 518, 519, 1689, 1690, 520, 0, 521,
+ 522, 523, 1691, 524, 0, 525, 0, 526, 163, 0,
+ 164, 527, 528, 529, 530, 0, 531, 1692, 0, 1693,
+ 532, 533, 0, 534, 535, 765, 536, 537, 168, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 170, 171, 0, 550, 551, 552, 1501,
+ 1694, 0, 1695, 0, 553, 174, 175, 554, 176, 555,
+ 556, 557, 558, 559, 0, 0, 560, 1696, 178, 561,
+ 179, 0, 562, 563, 564, 1697, 1698, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 1699, 185, 1700, 579, 580, 581, 582,
+ 583, 584, 5537, 187, 1701, 586, 1702, 587, 588, 190,
+ 589, 1703, 1704, 590, 1705, 591, 592, 593, 0, 594,
+ 595, 0, 0, 1706, 597, 598, 0, 0, 599, 600,
+ 193, 194, 601, 195, 1707, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 1708, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 1709, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 207, 646, 647, 648,
+ 649, 650, 1710, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 1711, 665,
+ 666, 214, 667, 668, 216, 669, 670, 1712, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 1713, 685, 0, 686, 687, 0, 688,
+ 221, 689, 690, 691, 692, 693, 0, 694, 1714, 1715,
+ 0, 0, 696, 697, 1716, 698, 1717, 1718, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 1719, 707, 708,
+ 709, 710, 711, 1720, 0, 712, 713, 714, 715, 716,
+ 769, 1721, 0, 717, 233, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729,
+ 245, 770, 729, 730, 1730, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1731, 1732, 0, 0, 0,
+ 0, 0, 0, 0, 1734, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 429, 0, 0, 37, 0, 38, 39, 0, 1664, 1665,
+ 1666, 40, 1667, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 1668, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 1669, 130, 1670, 1671, 0, 451, 452, 453,
+ 454, 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675,
+ 460, 0, 461, 462, 463, 464, 1676, 0, 1677, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 6071, 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483,
+ 484, 485, 486, 763, 487, 1685, 1686, 488, 1687, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 1498, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 1688, 516, 517, 518, 519, 1689, 1690,
+ 520, 0, 521, 522, 523, 1691, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 1692, 0, 6072, 532, 533, 0, 534, 535, 765, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 1501, 1694, 0, 1695, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 1696, 178, 561, 179, 0, 562, 563, 564, 1697, 1698,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 1699, 185, 1700, 579,
+ 580, 581, 582, 583, 584, 585, 187, 1701, 586, 1702,
+ 587, 588, 190, 589, 1703, 1704, 590, 1705, 591, 592,
+ 593, 0, 594, 595, 0, 0, 1706, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 1707, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 1708, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 1709, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 6073, 649, 650, 1710, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 1711, 665, 666, 214, 667, 668, 216, 669, 670,
+ 1712, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 1713, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717,
+ 1718, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 1719, 707, 708, 709, 710, 711, 1720, 0, 712, 713,
+ 714, 715, 716, 769, 1721, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726,
+ 1727, 1728, 1729, 245, 770, 729, 730, 1730, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1731, 1732,
+ 0, 0, 0, 0, 0, 0, 0, 6074, 793, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 794, 98, 99,
+ 749, 795, 0, 101, 102, 103, 104, 796, 797, 106,
+ 107, 108, 0, 109, 798, 799, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 429, 0, 0, 37, 0, 38, 39,
+ 0, 1664, 1665, 1666, 40, 1667, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 1668,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 126, 448, 449, 450, -3465, 1669, 130, 1670, 1671, 0,
+ 451, 452, 453, 454, 455, 456, 457, 1672, 1673, 458,
+ 459, 1674, 1675, 460, 0, 461, 462, 463, 464, 1676,
+ 0, 1677, 0, 465, 466, 467, 468, 469, 470, 142,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 145, 479, 480, 6360, 1678, 1679, 1680, 1681, 1682,
+ 1683, 1684, 483, 484, 485, 486, 763, 487, 1685, 1686,
+ 488, 1687, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 1498, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 1688, 516, 517, 518,
+ 519, 1689, 1690, 520, 0, 521, 522, 523, 1691, 524,
+ 0, 525, 0, 526, 163, 0, 164, 527, 528, 529,
+ 530, 0, 531, 1692, 0, 1693, 532, 533, 0, 534,
+ 535, 765, 536, 537, -3465, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 170,
+ 171, 0, 550, 551, 552, 1501, 1694, 0, 1695, 0,
+ 553, 0, 0, 554, 176, 555, 556, 557, 558, 559,
+ 0, 0, 560, 1696, 178, 561, -3465, 0, 562, 563,
+ 564, 1697, 1698, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 1699,
+ 185, 1700, 579, 580, 581, 582, 583, 584, 585, 187,
+ 1701, 586, 1702, 587, 588, 0, 589, 1703, 1704, 590,
+ 1705, 591, 592, 593, 0, 594, 595, 0, 0, 1706,
+ 597, 598, 0, 0, 599, 600, 193, 194, 601, 195,
+ 1707, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 1708, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 1709, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 207, 646, 647, 648, 649, 650, 1710, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 1711, 665, 666, 214, 667, 668,
+ -3465, 669, 670, 1712, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 1713,
+ 685, 0, 686, 687, 0, 688, 221, 689, 690, 691,
+ 692, 693, 0, 694, 1714, 1715, 0, 0, 696, 697,
+ 1716, 698, 1717, 1718, 699, 700, 701, 702, 703, 6361,
+ 705, 706, 0, 1719, 707, 708, 709, 710, 711, 1720,
+ 0, 712, 713, 714, 715, 716, 769, 1721, 0, 717,
+ 233, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 1722, 1723, 1724,
+ 1725, 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730,
+ -3465, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1731, 1732, 0, 0, 0, 0, 0, 0, 0,
+ 1734, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 429, 0, 0, 37,
+ 0, 38, 39, 0, 1664, 1665, 1666, 40, 1667, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 1668, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 128, 1669, 130,
+ 1670, 1671, 0, 451, 452, 453, 454, 455, 456, 457,
+ 1672, 1673, 458, 459, 1674, 1675, 460, 0, 461, 462,
+ 463, 464, 1676, 0, 1677, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 1678, 1679,
+ 1680, 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763,
+ 487, 1685, 1686, 488, 6056, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 1498, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 1688,
+ 516, 517, 518, 519, 1689, 1690, 520, 0, 521, 522,
+ 523, 1691, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 1692, 0, 1693, 532,
+ 533, 0, 534, 535, 765, 536, 537, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 171, 0, 550, 551, 552, 1501, 1694,
+ 0, 1695, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 1696, 178, 561, 179,
+ 0, 562, 563, 564, 1697, 1698, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 1699, 185, 1700, 579, 580, 581, 582, 583,
+ 584, 585, 187, 1701, 586, 0, 587, 588, 190, 589,
+ 1703, 1704, 590, 1705, 591, 592, 593, 0, 594, 595,
+ 0, 0, 1706, 597, 598, 0, 0, 599, 600, 193,
+ 194, 601, 195, 1707, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 1708, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 1709, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 3681, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 1711, 665, 666,
+ 214, 667, 668, 216, 669, 670, 1712, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 1713, 685, 0, 686, 687, 0, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 1714, 1715, 0,
+ 0, 696, 697, 1716, 698, 1717, 1718, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 1720, 0, 712, 713, 714, 715, 716, 769,
+ 1721, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245,
+ 770, 729, 730, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3682, 3683, 0, 0, 0, 0,
+ 0, 0, 0, 3684, 793, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 794, 98, 99, 749, 795, 0, 101,
+ 102, 103, 104, 796, 797, 106, 107, 108, 0, 109,
+ 798, 799, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 38, 39, 0, 1664, 1665, 1666,
+ 40, 1667, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 1668, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 126, 448, 449, 450,
+ 128, 1669, 130, 1670, 1671, 0, 451, 452, 453, 454,
+ 455, 456, 457, 1672, 1673, 458, 459, 1674, 1675, 460,
+ 0, 461, 462, 463, 464, 1676, 0, 1677, 0, 465,
+ 466, 467, 468, 469, 470, 142, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 145, 479, 480,
+ 0, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484,
+ 485, 486, 763, 487, 1685, 1686, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 1498, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 1688, 516, 517, 518, 519, 1689, 1690, 520,
+ 0, 521, 522, 523, 1691, 524, 0, 525, 0, 526,
+ 163, 0, 164, 527, 528, 529, 530, 0, 531, 1692,
+ 0, 1693, 532, 533, 0, 534, 535, 765, 536, 537,
+ 168, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 170, 171, 0, 550, 551,
+ 552, 1501, 1694, 0, 1695, 0, 553, 174, 175, 554,
+ 176, 555, 556, 557, 558, 559, 0, 0, 560, 1696,
+ 178, 561, 179, 0, 562, 563, 564, 1697, 1698, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 1699, 185, 1700, 579, 580,
+ 581, 582, 583, 584, 585, 187, 1701, 586, 0, 587,
+ 588, 190, 589, 1703, 1704, 590, 1705, 591, 592, 593,
+ 0, 594, 595, 0, 0, 1706, 597, 598, 0, 0,
+ 599, 600, 193, 194, 601, 195, 1707, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 1708,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 1709, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 207, 646,
+ 647, 648, 649, 650, 3681, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 1711, 665, 666, 214, 667, 668, 216, 669, 670, 1712,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 1713, 685, 0, 686, 687,
+ 0, 688, 221, 689, 690, 691, 692, 693, 0, 694,
+ 1714, 1715, 0, 0, 696, 697, 1716, 698, 1717, 1718,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 1720, 0, 712, 713, 714,
+ 715, 716, 769, 1721, 0, 717, 233, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727,
+ 1728, 1729, 245, 770, 729, 730, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3682, 3683, 0,
+ 0, 0, 0, 0, 0, 0, 3684, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 38, 39, 0,
+ 1664, 1665, 0, 40, 1667, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 1668, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 128, 1669, 130, 1670, 1671, 0, 451,
+ 452, 453, 454, 455, 456, 457, 1672, 1673, 458, 459,
+ 1674, 1675, 460, 0, 461, 462, 463, 464, 1676, 0,
+ 1677, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 1678, 1679, 1680, 1681, 1682, 1683,
+ 1684, 483, 484, 485, 486, 763, 487, 1685, 1686, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 1498,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 1688, 516, 517, 518, 519,
+ 1689, 1690, 520, 0, 521, 522, 523, 1691, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 1692, 0, 1693, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 171,
+ 0, 550, 551, 552, 1501, 1694, 0, 1695, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 1696, 178, 561, 179, 0, 562, 563, 564,
+ 1697, 1698, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 1699, 185,
+ 1700, 579, 580, 581, 582, 583, 584, 585, 187, 1701,
+ 586, 0, 587, 588, 190, 589, 1703, 1704, 590, 1705,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 194, 601, 195, 1707,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 1708, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 1709,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 3818, 3819, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 1711, 665, 666, 214, 667, 668, 216,
+ 669, 670, 1712, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 1713, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 1714, 1715, 0, 0, 696, 697, 1716,
+ 698, 1717, 1718, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 1720, 0,
+ 712, 713, 714, 715, 716, 769, 1721, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 1722, 1723, 1724, 1725,
+ 240, 1726, 1727, 1728, 1729, 245, 770, 729, 730, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3820, 3821, 0, 0, 0, 0, 0, 0, 0, 3684,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 0, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 452, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 3681, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 3684, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 0, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 5060, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 3681, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 3684, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 38, 39, 0, 1664, 1665, 0, 40, 1667, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 1668, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 1669, 130, 1670,
+ 1671, 0, 451, 452, 453, 454, 455, 456, 457, 1672,
+ 1673, 458, 459, 1674, 1675, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 1685, 1686, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 1498, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 1688, 516,
+ 517, 518, 519, 1689, 1690, 520, 0, 521, 522, 523,
+ 1691, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 1693, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 1501, 1694, 0,
+ 1695, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 1699, 185, 1700, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 1703,
+ 1704, 590, 1705, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 1709, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 3681, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 1712, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 1714, 1715, 0, 0,
+ 696, 697, 1716, 698, 1717, 1718, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 1721,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 5566, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 3684, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 4534, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 1191, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 4535, 652, 653, 654, 655, 656, 657, 768, 658,
+ 212, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 220, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 2472, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 234, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 4536, 770,
+ 729, 730, 0, 0, 246, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 4537, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 4534, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 1191, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 4535, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 4536, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 4537, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 4250, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 4535, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 4536, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 247, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 5189, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 1673, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 1676, 0, 1677, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 1678, 1679, 1680,
+ 1681, 1682, 1683, 1684, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 1689, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 1692, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 1696, 178, 561, 179, 0,
+ 562, 563, 564, 1697, 1698, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 1701, 586, 0, 587, 588, 190, 589, 0,
+ 1704, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 1707, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 1708, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 1711, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 1713, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 1716, 698, 1717, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 1720, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 1722,
+ 1723, 1724, 1725, 240, 1726, 1727, 1728, 1729, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 6332, 92, 93, 94, 95, 96, 97, 794,
+ 98, 99, 749, 795, 0, 101, 102, 103, 104, 796,
+ 797, 106, 107, 108, 0, 109, 798, 799, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 0,
+ 146, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 0, 0, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 5902, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 5116, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, -1778, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, -1778, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, -1778, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, -1778,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, -1778,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, -1778, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, -1778, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 0, 0, 0, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 1821, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 212, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 220, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 2472, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 234, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 0,
+ 0, 246, 0, 0, 0, 0, 0, 0, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 247,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 212, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 220, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 2472, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 234, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 0,
+ 0, 246, 0, 0, 0, 0, 0, 0, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 247,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 4339, 4340,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 0,
+ 0, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 4340,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 0, 0, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 1806, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 0, 0, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 3851, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 0, 0,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 5095, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 0, 0, 0, 0, 0, 0, 0, 0, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 5583, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 429, 0, 0, 37, 0, 38,
+ 39, 0, 0, 0, 1313, 40, 0, 0, 0, 0,
+ 0, 1314, 1315, 1316, 430, 431, 432, 433, 434, 435,
+ 436, 437, 800, 438, 439, 440, 801, 802, 803, 804,
+ 805, 806, 807, 441, 442, 443, 808, 444, 445, 446,
+ 447, 126, 448, 449, 450, 0, 1491, 130, 1492, 1493,
+ 809, 451, 452, 453, 454, 455, 456, 457, 810, 811,
+ 458, 459, 1494, 1495, 460, 813, 461, 462, 463, 464,
+ 0, 814, 139, 815, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 817, 473, 474, 475, 476, 477,
+ 478, 818, 145, 479, 480, 0, 820, 821, 822, 146,
+ 823, 824, 825, 483, 484, 485, 486, 763, 487, 1496,
+ 1497, 488, 826, 489, 827, 490, 491, 492, 493, 494,
+ 495, 496, 828, 497, 498, 499, 500, 829, 830, 501,
+ 502, 1498, 504, 505, 831, 506, 507, 508, 832, 509,
+ 510, 511, 833, 512, 513, 514, 515, 0, 516, 517,
+ 518, 519, 0, 834, 520, 835, 521, 522, 523, 1499,
+ 524, 836, 525, 837, 526, 163, 838, 164, 527, 528,
+ 529, 530, 839, 531, 0, 840, 0, 532, 533, 841,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 842, 542, 543, 544, 545, 546, 547, 548, 843, 549,
+ 170, 0, 0, 550, 551, 552, 1501, 1502, 846, 1503,
+ 847, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 848, 849, 560, 0, 178, 561, 179, 850, 562,
+ 563, 564, 851, 852, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 1504, 185, 1505, 579, 580, 581, 582, 583, 584, 585,
+ 4833, 0, 586, 853, 587, 588, 190, 589, 854, 0,
+ 590, 1506, 591, 592, 593, 855, 594, 595, 856, 857,
+ 4834, 597, 598, 858, 859, 599, 600, 0, 194, 601,
+ 195, 0, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 860, 611, 612, 0, 613, 0, 614, 615, 616,
+ 861, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 1507, 627, 628, 629, 630, 862, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 863, 644, 645, 207, 646, 647, 648, 649, 650, 0,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 864,
+ 659, 660, 661, 662, 663, 865, 665, 666, 3104, 667,
+ 668, 216, 669, 670, 1509, 671, 866, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 0, 685, 867, 686, 687, 868, 688, 221, 689, 690,
+ 691, 692, 693, 869, 694, 1510, 1511, 0, 871, 696,
+ 697, 0, 698, 0, 872, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 874, 707, 708, 709, 710, 711,
+ 875, 876, 712, 713, 714, 715, 716, 0, 1512, 878,
+ 717, 233, 718, 719, 720, 721, 879, 880, 722, 881,
+ 882, 723, 724, 725, 726, 727, 728, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 770, 729,
+ 730, 0, 0, 0, 0, 0, 0, 0, 0, 1319,
+ 1320, 1321, 4835, 4836, 1324, 1325, 1326, 1327, 793, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 794, 98, 99,
+ 749, 795, 0, 101, 102, 103, 104, 796, 797, 106,
+ 107, 108, 0, 109, 798, 799, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 429, 0, 0, 37, 0, 38, 39,
+ 0, 0, 0, 1313, 40, 0, 0, 0, 0, 0,
+ 1314, 1315, 1316, 430, 431, 432, 433, 434, 435, 436,
+ 437, 800, 438, 439, 440, 801, 802, 803, 804, 805,
+ 806, 807, 441, 442, 443, 808, 444, 445, 446, 447,
+ 126, 448, 449, 450, 0, 1491, 130, 1492, 1493, 809,
+ 451, 452, 453, 454, 455, 456, 457, 810, 811, 458,
+ 459, 1494, 1495, 460, 813, 461, 462, 463, 464, 0,
+ 814, 139, 815, 465, 466, 467, 468, 469, 470, 142,
+ 471, 472, 761, 817, 473, 474, 475, 476, 477, 478,
+ 818, 145, 479, 480, 0, 820, 821, 822, 146, 823,
+ 824, 825, 483, 484, 485, 486, 763, 487, 1496, 1497,
+ 488, 826, 489, 827, 490, 491, 492, 493, 494, 495,
+ 496, 828, 497, 498, 499, 500, 829, 830, 501, 502,
+ 1498, 504, 505, 831, 506, 507, 508, 832, 509, 510,
+ 511, 833, 512, 513, 514, 515, 0, 516, 517, 518,
+ 519, 0, 834, 520, 835, 521, 522, 523, 1499, 524,
+ 836, 525, 837, 526, 163, 838, 164, 527, 528, 529,
+ 530, 839, 531, 0, 840, 0, 532, 533, 841, 534,
+ 535, 765, 536, 537, 168, 538, 539, 540, 541, 842,
+ 542, 543, 544, 545, 546, 547, 548, 843, 549, 170,
+ 0, 0, 550, 551, 552, 1501, 1502, 846, 1503, 847,
+ 553, 174, 175, 554, 176, 555, 556, 557, 558, 559,
+ 848, 849, 560, 0, 178, 561, 179, 850, 562, 563,
+ 564, 851, 852, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 1504,
+ 185, 1505, 579, 580, 581, 582, 583, 584, 585, 5281,
+ 0, 586, 853, 587, 588, 190, 589, 854, 0, 590,
+ 1506, 591, 592, 593, 855, 594, 595, 856, 857, 4834,
+ 597, 598, 858, 859, 599, 600, 0, 194, 601, 195,
+ 0, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 860, 611, 612, 0, 613, 0, 614, 615, 616, 861,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 1507, 627, 628, 629, 630, 862, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 863,
+ 644, 645, 207, 646, 647, 648, 649, 650, 0, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 864, 659,
+ 660, 661, 662, 663, 865, 665, 666, 3104, 667, 668,
+ 216, 669, 670, 1509, 671, 866, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 0,
+ 685, 867, 686, 687, 868, 688, 221, 689, 690, 691,
+ 692, 693, 869, 694, 1510, 1511, 0, 871, 696, 697,
+ 0, 698, 0, 872, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 874, 707, 708, 709, 710, 711, 875,
+ 876, 712, 713, 714, 715, 716, 0, 1512, 878, 717,
+ 233, 718, 719, 720, 721, 879, 880, 722, 881, 882,
+ 723, 724, 725, 726, 727, 728, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 770, 729, 730,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1319, 1320,
+ 1321, 4835, 4836, 1324, 1325, 1326, 1327, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 1313, 0, 0, 0, 0, 0, 0, 1314, 1315,
+ 1316, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 1317, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 1318, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1319, 1320, 1321, 1322,
+ 1323, 1324, 1325, 1326, 1327, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 1313,
+ 0, 0, 0, 0, 0, 0, 1314, 1315, 1316, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 1432, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 1433,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1319, 1320, 1321, 1322, 1323, 1324,
+ 1325, 1326, 1327, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 1313, 0, 0,
+ 0, 0, 0, 0, 1314, 1315, 1316, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 1543, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 1544, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 1545, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326,
+ 1327, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0,
+ 0, 0, 1314, 1315, 1316, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 2173, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 2174, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0,
+ 1314, 1315, 1316, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1319, 1320,
+ 1321, 1322, 1323, 1324, 1325, 1326, 1327, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 1313, 0, 0, 0, 0, 0, 0, 1314, 1315,
+ 1316, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 3945, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 3946, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1319, 1320, 1321, 1322,
+ 1323, 1324, 1325, 1326, 1327, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 1313,
+ 0, 0, 0, 0, 0, 0, 1314, 1315, 1316, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 5881, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1319, 1320, 1321, 1322, 1323, 1324,
+ 1325, 1326, 1327, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 800, 438, 439, 440,
+ 801, 802, 803, 804, 805, 806, 807, 441, 442, 443,
+ 808, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 129, 130, 131, 132, 809, 451, 452, 453, 454, 455,
+ 456, 457, 810, 811, 458, 459, 812, 134, 460, 813,
+ 461, 462, 463, 464, 138, 814, 139, 815, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 816, 817, 473,
+ 474, 475, 476, 477, 478, 818, 145, 479, 480, 819,
+ 820, 821, 822, 146, 823, 824, 825, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 826, 489, 827, 490,
+ 491, 492, 493, 494, 495, 496, 828, 497, 498, 499,
+ 500, 829, 830, 501, 502, 503, 504, 505, 831, 506,
+ 507, 508, 832, 509, 510, 511, 833, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 834, 520, 835,
+ 521, 522, 523, 162, 524, 836, 525, 837, 526, 163,
+ 838, 164, 527, 528, 529, 530, 839, 531, 166, 840,
+ 167, 532, 533, 841, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 842, 542, 543, 544, 545, 546,
+ 547, 548, 843, 549, 170, 171, 844, 550, 551, 552,
+ 845, 172, 846, 173, 847, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 848, 849, 560, 177, 178,
+ 561, 179, 850, 562, 563, 564, 851, 852, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 185, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 853, 587, 588,
+ 190, 589, 854, 191, 590, 192, 591, 592, 593, 855,
+ 594, 595, 856, 857, 596, 597, 598, 858, 859, 599,
+ 600, 193, 194, 601, 195, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 860, 611, 612, 197, 613,
+ 198, 614, 615, 616, 861, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 862, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 863, 644, 645, 207, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 864, 659, 660, 661, 662, 663, 865,
+ 665, 666, 214, 667, 668, 216, 669, 670, 217, 671,
+ 866, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 867, 686, 687, 868,
+ 688, 221, 689, 690, 691, 692, 693, 869, 694, 222,
+ 223, 870, 871, 696, 697, 224, 698, 225, 872, 699,
+ 700, 701, 702, 703, 704, 705, 706, 873, 874, 707,
+ 708, 709, 710, 711, 875, 876, 712, 713, 714, 715,
+ 716, 877, 232, 878, 717, 233, 718, 719, 720, 721,
+ 879, 880, 722, 881, 882, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 0, 793, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 2150, 92,
+ 93, 94, 95, 96, 97, 794, 98, 99, 749, 795,
+ 0, 101, 102, 103, 104, 796, 797, 106, 107, 108,
+ 0, 109, 798, 799, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 126, 448,
+ 449, 450, 0, 1491, 130, 1492, 1493, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 1494,
+ 1495, 460, 0, 461, 462, 463, 464, 0, 0, 139,
+ 0, 465, 466, 467, 468, 469, 470, 142, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 145,
+ 479, 480, 0, 0, 0, 0, 146, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 1496, 1497, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 1498, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 0, 516, 517, 518, 519, 0,
+ 0, 520, 0, 521, 522, 523, 1499, 524, 0, 525,
+ 0, 526, 163, 0, 164, 527, 528, 529, 530, 0,
+ 531, 0, 0, 0, 532, 533, 0, 534, 535, 765,
+ 536, 537, 168, 538, 539, 540, 541, 3100, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 170, 3101, 0,
+ 550, 551, 552, 1501, 1502, 0, 1503, 0, 553, 174,
+ 175, 554, 176, 555, 556, 557, 558, 559, 0, 0,
+ 560, 0, 178, 561, 179, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 1504, 185, 1505,
+ 579, 580, 581, 582, 583, 584, 585, 0, 0, 586,
+ 0, 587, 588, 190, 589, 0, 0, 590, 1506, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 3102, 599, 600, 3103, 194, 601, 195, 0, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 0, 613, 0, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 1507, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 207, 646, 647, 648, 649, 650, 0, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 3104, 667, 668, 216, 669,
+ 670, 1509, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 0, 685, 0,
+ 686, 687, 0, 688, 221, 689, 690, 691, 692, 693,
+ 0, 694, 1510, 1511, 0, 0, 696, 697, 0, 698,
+ 0, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 0, 1512, 3105, 717, 233, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 770, 729, 730, 0, 0,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 3106, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 0, 0, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 1198, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 0, 0, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 6302, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 429, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 1088, 432, 433, 434, 435, 436, 437, 1089, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 1090, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 1091, 162, 524, 0, 525, 0,
+ 1092, 0, 1093, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 1094, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 1095, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 1096, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 1097, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 1098, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 0, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 1099, 1100,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 1088, 432, 433, 434, 435, 436, 437,
+ 1089, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 1122, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 1091, 162, 524, 0,
+ 525, 0, 1123, 0, 1093, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 1094, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 1095, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 1096, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 1097,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 1098, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 0,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 1099, 1100, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 429, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 1597, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 1093, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 1094, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 0, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 1099, 1100, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 429, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 1602, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 1093, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 538, 539,
+ 540, 541, 1094, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 0, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 1099, 1100, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 429, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 764, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 1777, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1168, 1778, 81, 82, 746, 84,
+ 85, 86, 747, 1169, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 1170, 459, 1141, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 1171,
+ 0, 1172, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 1173, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 1174, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 1175, 647, 648, 649, 650, 209, 651, 652, 653, 1176,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 1177, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 1178, 223, 0, 0, 1179, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 1145, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 1180, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 38, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 800, 438, 439, 440, 801, 802, 803, 804, 805, 806,
+ 807, 441, 442, 443, 808, 444, 445, 446, 447, 126,
+ 448, 449, 450, 128, 129, 130, 131, 132, 809, 451,
+ 452, 453, 454, 455, 456, 457, 810, 811, 458, 459,
+ 812, 134, 460, 813, 461, 462, 463, 464, 138, 814,
+ 139, 815, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 816, 817, 473, 474, 475, 476, 477, 478, 818,
+ 145, 479, 480, 819, 820, 821, 822, 146, 823, 824,
+ 825, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 826, 489, 827, 490, 491, 492, 493, 494, 495, 496,
+ 828, 497, 498, 499, 500, 829, 830, 501, 502, 503,
+ 504, 505, 831, 506, 507, 508, 832, 509, 510, 511,
+ 833, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 834, 520, 835, 521, 522, 523, 162, 524, 836,
+ 525, 837, 526, 163, 838, 164, 527, 528, 529, 530,
+ 839, 531, 166, 840, 167, 532, 533, 841, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 842, 542,
+ 543, 544, 545, 546, 547, 548, 843, 549, 170, 171,
+ 844, 550, 551, 552, 845, 172, 846, 173, 847, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 848,
+ 849, 560, 177, 178, 561, 179, 850, 562, 563, 564,
+ 851, 852, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 185,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 853, 587, 588, 190, 589, 854, 191, 590, 192,
+ 591, 592, 593, 855, 594, 595, 856, 857, 596, 597,
+ 598, 858, 859, 599, 600, 193, 194, 601, 195, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 860,
+ 611, 612, 197, 613, 198, 614, 615, 616, 861, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 862, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 863, 644,
+ 645, 207, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 864, 659, 660,
+ 661, 662, 663, 865, 665, 666, 214, 667, 668, 216,
+ 669, 670, 217, 671, 866, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 867, 686, 687, 868, 688, 221, 689, 690, 691, 692,
+ 693, 869, 694, 222, 223, 870, 871, 696, 697, 224,
+ 698, 225, 872, 699, 700, 701, 702, 703, 704, 705,
+ 706, 873, 874, 707, 708, 709, 710, 711, 875, 876,
+ 712, 713, 714, 715, 716, 877, 232, 878, 717, 233,
+ 718, 719, 720, 721, 879, 880, 722, 881, 882, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 800, 438, 439, 440, 801, 802, 803, 804,
+ 805, 806, 807, 441, 442, 443, 808, 444, 445, 446,
+ 447, 126, 448, 449, 450, 128, 129, 130, 131, 132,
+ 809, 451, 452, 453, 454, 455, 456, 457, 810, 811,
+ 458, 459, 812, 134, 460, 813, 461, 462, 463, 464,
+ 138, 814, 139, 815, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 816, 817, 473, 474, 475, 476, 477,
+ 478, 818, 145, 479, 480, 819, 820, 821, 822, 146,
+ 823, 824, 825, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 826, 489, 827, 490, 491, 492, 493, 494,
+ 495, 496, 828, 497, 498, 499, 500, 829, 830, 501,
+ 502, 503, 504, 505, 831, 506, 507, 508, 832, 509,
+ 510, 511, 833, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 834, 520, 835, 521, 522, 523, 162,
+ 524, 836, 525, 837, 526, 163, 838, 164, 527, 528,
+ 529, 530, 839, 531, 166, 840, 167, 532, 533, 841,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 842, 542, 543, 544, 545, 546, 547, 548, 843, 549,
+ 170, 171, 844, 550, 551, 552, 845, 172, 846, 173,
+ 847, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 848, 849, 560, 177, 178, 561, 179, 850, 562,
+ 563, 564, 851, 852, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 185, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 853, 587, 588, 190, 589, 854, 191,
+ 590, 192, 591, 592, 593, 855, 594, 595, 856, 857,
+ 596, 597, 598, 858, 859, 599, 600, 193, 194, 601,
+ 195, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 860, 611, 612, 197, 613, 198, 614, 615, 616,
+ 861, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 862, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 863, 644, 645, 207, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 864,
+ 659, 660, 661, 662, 663, 865, 665, 666, 214, 667,
+ 668, 216, 669, 670, 217, 671, 866, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 867, 686, 687, 868, 688, 221, 689, 690,
+ 691, 692, 693, 869, 694, 222, 223, 870, 871, 696,
+ 697, 224, 698, 225, 872, 699, 700, 701, 702, 703,
+ 704, 705, 706, 873, 874, 707, 708, 709, 710, 711,
+ 875, 876, 712, 713, 714, 715, 716, 877, 232, 878,
+ 717, 233, 718, 719, 720, 721, 879, 880, 722, 881,
+ 882, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 4011, 435, 436, 437, 800, 438, 439, 440, 801, 802,
+ 803, 804, 805, 806, 807, 441, 442, 443, 808, 444,
+ 445, 446, 447, 126, 448, 449, 450, 128, 129, 130,
+ 131, 132, 809, 451, 452, 453, 454, 455, 456, 457,
+ 810, 811, 458, 459, 812, 134, 460, 813, 461, 462,
+ 463, 464, 138, 814, 139, 815, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 816, 817, 473, 474, 475,
+ 476, 477, 478, 818, 145, 479, 480, 819, 820, 821,
+ 822, 146, 823, 824, 825, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 826, 489, 827, 490, 491, 492,
+ 493, 494, 495, 496, 828, 497, 498, 499, 500, 829,
+ 830, 501, 502, 503, 4012, 505, 831, 506, 507, 508,
+ 832, 509, 510, 511, 833, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 834, 520, 835, 521, 522,
+ 523, 162, 524, 836, 525, 837, 526, 163, 838, 164,
+ 527, 528, 529, 530, 839, 531, 166, 840, 167, 532,
+ 533, 841, 534, 535, 765, 536, 537, 168, 538, 539,
+ 540, 541, 842, 542, 543, 544, 545, 546, 547, 548,
+ 843, 549, 170, 171, 844, 550, 551, 552, 845, 172,
+ 846, 173, 847, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 848, 849, 560, 177, 178, 561, 179,
+ 850, 562, 563, 564, 851, 852, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 185, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 853, 587, 588, 190, 589,
+ 854, 191, 590, 192, 591, 592, 593, 855, 594, 595,
+ 856, 857, 596, 597, 598, 858, 859, 599, 600, 193,
+ 194, 601, 195, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 860, 611, 612, 197, 613, 198, 614,
+ 615, 616, 861, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 862, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 863, 644, 645, 207, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 864, 659, 660, 661, 662, 663, 865, 4013, 666,
+ 214, 667, 668, 216, 669, 670, 217, 671, 866, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 867, 686, 687, 868, 688, 221,
+ 689, 690, 691, 692, 693, 869, 694, 222, 223, 870,
+ 871, 696, 697, 224, 698, 225, 872, 699, 700, 701,
+ 702, 703, 704, 705, 706, 873, 874, 707, 708, 709,
+ 710, 711, 875, 876, 712, 713, 714, 715, 716, 877,
+ 232, 878, 717, 233, 718, 719, 720, 721, 879, 880,
+ 722, 881, 882, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 129, 130, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 1673, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 1676, 0, 1677, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 1678, 1679, 1680, 1681, 1682, 1683, 1684, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 1689, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 1692, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 1696, 178,
+ 561, 179, 0, 562, 563, 564, 1697, 1698, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 185, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 1701, 586, 0, 587, 588,
+ 190, 589, 0, 1704, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 194, 601, 195, 1707, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 1708, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 1711,
+ 665, 666, 214, 667, 668, 216, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 1713, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 1716, 698, 1717, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 1720, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 1722, 1723, 1724, 1725, 240, 1726, 1727, 1728,
+ 1729, 245, 770, 729, 730, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 429, 0, 0, 37, 0, 38, 39, 0, 1664, 1665,
+ 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 1669, 130, 1670, 1671, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 1674, 1675,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 1685, 1686, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 1498, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 1690,
+ 520, 0, 521, 522, 523, 1691, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 1501, 1694, 0, 1695, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 1699, 185, 1700, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 1703, 191, 590, 1705, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 1709, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 1712, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 1714, 1715, 0, 0, 696, 697, 224, 698, 225,
+ 1718, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 1721, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 128, 129, 130, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 139, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 0, 0, 0, 146, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 178, 561, 179, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 185,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 190, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 194, 601, 195, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 216,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 126, 448, 449, 450, 128, 129, 130, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 139, 0, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 145, 479, 480, 0, 0, 0, 0, 146,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 163, 0, 164, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 1484, 168, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 170, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 178, 561, 179, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 185, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 190, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 194, 601,
+ 195, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 207, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 216, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 221, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 233, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 128, 129, 130,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 139, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 0, 0,
+ 0, 146, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 1535, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 178, 561, 179,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 185, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 190, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 194, 601, 195, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 216, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 129, 130, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 139, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 0, 0, 0, 146, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 1549, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 178,
+ 561, 179, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 185, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 190, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 194, 601, 195, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 216, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 1553, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 0, 1491, 130, 1492, 1493, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 1494, 1495, 460, 0, 461, 462, 463, 464, 0, 0,
+ 139, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 0, 0, 0, 146, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 1496, 1497, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 1498,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 0, 516, 517, 518, 519,
+ 0, 0, 520, 0, 521, 522, 523, 1499, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 0, 0, 0, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 3100, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 3101,
+ 0, 550, 551, 552, 1501, 1502, 0, 1503, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 0, 178, 561, 179, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 1504, 185,
+ 1505, 579, 580, 581, 582, 583, 584, 585, 0, 0,
+ 586, 0, 587, 588, 190, 589, 0, 0, 590, 1506,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 3103, 194, 601, 195, 0,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 0, 613, 0, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 1507,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 0, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 3104, 667, 668, 216,
+ 669, 670, 1509, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 0, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 1510, 1511, 0, 0, 696, 697, 0,
+ 698, 0, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 0, 1512, 3105, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 770, 729, 730, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 126, 448, 449, 450, 0, 1491, 130, 1492, 1493,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 1494, 1495, 460, 0, 461, 462, 463, 464,
+ 0, 0, 139, 0, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 145, 479, 480, 0, 0, 0, 0, 146,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 1496,
+ 1497, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 1498, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 0, 516, 517,
+ 518, 519, 0, 0, 520, 0, 521, 522, 523, 1499,
+ 524, 0, 525, 0, 526, 163, 0, 164, 527, 528,
+ 529, 530, 0, 531, 0, 0, 0, 532, 533, 0,
+ 534, 535, 765, 536, 537, 168, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 170, 0, 0, 550, 551, 552, 1501, 1502, 0, 1503,
+ 0, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 0, 0, 560, 0, 178, 561, 179, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 1504, 185, 1505, 579, 580, 581, 582, 583, 584, 585,
+ 0, 0, 586, 0, 587, 588, 190, 589, 3188, 0,
+ 590, 1506, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 0, 194, 601,
+ 195, 0, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 0, 613, 0, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 1507, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 207, 646, 647, 648, 649, 650, 0,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 3104, 667,
+ 668, 216, 669, 670, 1509, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 0, 685, 0, 686, 687, 4933, 688, 221, 689, 690,
+ 691, 692, 693, 0, 694, 1510, 1511, 0, 0, 696,
+ 697, 0, 698, 0, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 0, 1512, 0,
+ 717, 233, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 770, 729,
+ 730, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 0, 1491, 130,
+ 1492, 1493, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 1494, 1495, 460, 0, 461, 462,
+ 463, 464, 0, 0, 139, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 0, 0,
+ 0, 146, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 1496, 1497, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 1498, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 0,
+ 516, 517, 518, 519, 0, 0, 520, 0, 521, 522,
+ 523, 1499, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 0, 0, 0, 532,
+ 533, 0, 534, 535, 765, 536, 537, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 0, 0, 550, 551, 552, 1501, 1502,
+ 0, 1503, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 0, 178, 561, 179,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 1504, 185, 1505, 579, 580, 581, 582, 583,
+ 584, 585, 3259, 0, 586, 0, 587, 588, 190, 589,
+ 0, 0, 590, 1506, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 0,
+ 194, 601, 195, 0, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 0, 613, 0, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 1507, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 0, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 1508, 667, 668, 216, 669, 670, 1509, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 0, 685, 0, 686, 687, 0, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 1510, 1511, 0,
+ 0, 696, 697, 0, 698, 0, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 0,
+ 1512, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 770, 729, 730, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 0,
+ 1491, 130, 1492, 1493, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 1494, 1495, 460, 0,
+ 461, 462, 463, 464, 0, 0, 139, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 0, 0, 0, 146, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 1496, 1497, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 1498, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 0, 516, 517, 518, 519, 0, 0, 520, 0,
+ 521, 522, 523, 1499, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 0, 0,
+ 0, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 0, 0, 550, 551, 552,
+ 1501, 1502, 0, 1503, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 0, 178,
+ 561, 179, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 1504, 185, 1505, 579, 580, 581,
+ 582, 583, 584, 585, 4737, 0, 586, 0, 587, 588,
+ 190, 589, 0, 0, 590, 1506, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 0, 194, 601, 195, 0, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 0, 613,
+ 0, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 1507, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 0, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 1508, 667, 668, 216, 669, 670, 1509, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 0, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 1510,
+ 1511, 0, 0, 696, 697, 0, 698, 0, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 0, 1512, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 770, 729, 730, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 0, 1491, 130, 1492, 1493, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 1494, 1495,
+ 460, 0, 461, 462, 463, 464, 0, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 1496, 1497, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 1498, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 0, 516, 517, 518, 519, 0, 0,
+ 520, 0, 521, 522, 523, 1499, 524, 6374, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 0, 0, 0, 532, 533, 0, 534, 535, 765, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 0, 0, 550,
+ 551, 552, 1501, 1502, 0, 1503, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 0, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 1504, 185, 1505, 579,
+ 580, 581, 582, 583, 584, 585, 0, 0, 586, 0,
+ 587, 588, 190, 589, 0, 0, 590, 1506, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 0, 194, 601, 195, 0, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 0, 613, 0, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 1507, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 0, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 1508, 667, 668, 216, 669, 670,
+ 1509, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 0, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 1510, 1511, 0, 0, 696, 697, 0, 698, 0,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 1512, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 770, 729, 730, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 0, 1491, 130, 1492, 1493, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 1494, 1495, 460, 0, 461, 462, 463, 464, 0, 0,
+ 139, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 0, 0, 0, 146, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 1496, 1497, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 1498,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 0, 516, 517, 518, 519,
+ 0, 0, 520, 0, 521, 522, 523, 1499, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 0, 0, 0, 532, 533, 0, 534, 535,
+ 765, 536, 1500, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 0,
+ 0, 550, 551, 552, 1501, 1502, 0, 1503, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 0, 178, 561, 179, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 1504, 185,
+ 1505, 579, 580, 581, 582, 583, 584, 585, 0, 0,
+ 586, 0, 587, 588, 190, 589, 0, 0, 590, 1506,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 0, 194, 601, 195, 0,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 0, 613, 0, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 1507,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 0, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 1508, 667, 668, 216,
+ 669, 670, 1509, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 0, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 1510, 1511, 0, 0, 696, 697, 0,
+ 698, 0, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 0, 1512, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 770, 729, 730, 793,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 794, 98,
+ 99, 749, 795, 0, 101, 102, 103, 104, 796, 797,
+ 106, 107, 108, 0, 109, 798, 799, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 126, 448, 449, 450, 0, 1491, 130, 1492, 1493,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 1494, 1495, 460, 0, 461, 462, 463, 464,
+ 0, 0, 139, 0, 465, 466, 467, 468, 469, 470,
+ 142, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 145, 479, 480, 0, 0, 0, 0, 146,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 1496,
+ 1497, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 1498, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 0, 516, 517,
+ 518, 519, 0, 0, 520, 0, 521, 522, 523, 1499,
+ 524, 0, 525, 0, 526, 163, 0, 164, 527, 528,
+ 529, 530, 0, 531, 0, 0, 0, 532, 533, 0,
+ 534, 535, 765, 536, 1561, 168, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 170, 0, 0, 550, 551, 552, 1501, 1502, 0, 1503,
+ 0, 553, 174, 175, 554, 176, 555, 556, 557, 558,
+ 559, 0, 0, 560, 0, 178, 561, 179, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 1504, 185, 1505, 579, 580, 581, 582, 583, 584, 585,
+ 0, 0, 586, 0, 587, 588, 190, 589, 0, 0,
+ 590, 1506, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 0, 194, 601,
+ 195, 0, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 0, 613, 0, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 1507, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 207, 646, 647, 648, 649, 650, 0,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 1508, 667,
+ 668, 216, 669, 670, 1509, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 0, 685, 0, 686, 687, 0, 688, 221, 689, 690,
+ 691, 692, 693, 0, 694, 1510, 1511, 0, 0, 696,
+ 697, 0, 698, 0, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 0, 1512, 0,
+ 717, 233, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 770, 729,
+ 730, 793, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 794, 98, 99, 749, 795, 0, 101, 102, 103, 104,
+ 796, 797, 106, 107, 108, 0, 109, 798, 799, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 0, 1491, 130,
+ 1492, 1493, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 1494, 1495, 460, 0, 461, 462,
+ 463, 464, 0, 0, 139, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 0, 0,
+ 0, 146, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 1496, 1497, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 1498, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 0,
+ 516, 517, 518, 519, 0, 0, 520, 0, 521, 522,
+ 523, 1499, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 0, 0, 0, 532,
+ 533, 0, 534, 535, 765, 536, 537, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 0, 0, 550, 551, 552, 1501, 1502,
+ 0, 1503, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 0, 178, 561, 179,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 1504, 185, 1505, 579, 580, 581, 582, 583,
+ 584, 585, 0, 0, 586, 0, 587, 588, 190, 589,
+ 0, 0, 590, 1506, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 0,
+ 194, 601, 195, 0, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 0, 613, 0, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 1507, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 0, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 1508, 667, 668, 216, 669, 670, 1509, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 0, 685, 0, 686, 687, 0, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 1510, 1511, 0,
+ 0, 696, 697, 0, 698, 0, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 0,
+ 1512, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 770, 729, 730, 793, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 794, 98, 99, 749, 795, 0, 101, 102,
+ 103, 104, 796, 797, 106, 107, 108, 0, 109, 798,
+ 799, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 0,
+ 1491, 130, 1492, 1493, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 1494, 1495, 460, 0,
+ 461, 462, 463, 464, 0, 0, 139, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 0, 0, 0, 146, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 1496, 1497, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 1498, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 0, 516, 517, 518, 519, 0, 0, 520, 0,
+ 521, 522, 523, 1499, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 0, 0,
+ 0, 532, 533, 0, 534, 535, 765, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 0, 0, 550, 551, 552,
+ 1501, 1502, 0, 1503, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 0, 178,
+ 561, 179, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 1504, 185, 1505, 579, 580, 581,
+ 582, 583, 584, 585, 0, 0, 586, 0, 587, 588,
+ 190, 589, 0, 0, 590, 1506, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 0, 194, 601, 195, 0, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 0, 613,
+ 0, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 1507, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 0, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 3104, 667, 668, 216, 669, 670, 1509, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 0, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 1510,
+ 1511, 0, 0, 696, 697, 0, 698, 0, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 0, 1512, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 770, 729, 730, 793, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 794, 98, 99, 749, 795, 0,
+ 101, 102, 103, 104, 796, 797, 106, 107, 108, 0,
+ 109, 798, 799, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 0, 1491, 130, 1492, 1493, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 1494, 1495,
+ 460, 0, 461, 462, 463, 464, 0, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 1496, 1497, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 1498, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 0, 516, 517, 518, 519, 0, 0,
+ 520, 0, 521, 522, 523, 1499, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 0, 0, 0, 532, 533, 0, 534, 535, 765, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 0, 0, 550,
+ 551, 552, 1501, 1502, 0, 1503, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 0, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 1504, 185, 1505, 579,
+ 580, 581, 582, 583, 584, 585, 0, 0, 586, 0,
+ 587, 588, 190, 589, 0, 0, 590, 1506, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 0, 194, 601, 195, 0, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 0, 613, 0, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 1507, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 0, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 0, 667, 668, 216, 669, 670,
+ 1509, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 0, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 1510, 1511, 0, 0, 696, 697, 0, 698, 0,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 1512, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 770, 729, 730, 793, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 794, 98, 99, 749,
+ 795, 0, 101, 102, 103, 104, 796, 797, 106, 107,
+ 108, 0, 109, 798, 799, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 0, 0, 130, 0, 0, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 0, 0, 460, 0, 461, 462, 463, 464, 0, 0,
+ 139, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 0, 0, 0, 146, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 0, 0, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 0, 516, 517, 518, 519,
+ 0, 0, 520, 0, 521, 522, 523, 0, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 0, 0, 0, 532, 533, 0, 534, 535,
+ 765, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 0,
+ 0, 550, 551, 552, 0, 0, 0, 0, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 0, 178, 561, 179, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 0, 185,
+ 0, 579, 580, 581, 582, 583, 584, 585, 0, 0,
+ 586, 0, 587, 588, 190, 589, 0, 0, 590, 0,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 0, 194, 601, 195, 0,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 0, 613, 0, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 0,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 0, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 0, 667, 668, 216,
+ 669, 670, 0, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 0, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 0, 0, 0, 0, 696, 697, 0,
+ 698, 0, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 0, 0, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 800, 438, 439, 440, 801, 802, 803, 804, 805,
+ 806, 807, 441, 442, 443, 808, 444, 445, 446, 447,
+ 126, 448, 449, 450, 128, 129, 130, 131, 132, 809,
+ 451, 452, 453, 454, 455, 456, 457, 810, 811, 458,
+ 459, 0, 134, 460, 813, 461, 462, 463, 464, 138,
+ 814, 139, 815, 465, 466, 467, 468, 469, 470, 142,
+ 471, 472, 816, 817, 473, 474, 475, 476, 477, 478,
+ 818, 145, 479, 480, 0, 820, 821, 822, 146, 823,
+ 824, 825, 483, 484, 485, 486, 0, 487, 149, 150,
+ 488, 826, 489, 827, 490, 491, 492, 493, 494, 495,
+ 496, 828, 497, 498, 499, 500, 829, 830, 501, 502,
+ 503, 504, 505, 831, 506, 507, 508, 832, 509, 510,
+ 511, 833, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 834, 520, 835, 521, 522, 523, 162, 524,
+ 836, 525, 837, 526, 163, 838, 164, 527, 528, 529,
+ 530, 839, 531, 166, 840, 167, 532, 533, 841, 534,
+ 535, 0, 536, 537, 168, 538, 539, 540, 541, 842,
+ 542, 543, 544, 545, 546, 547, 548, 843, 549, 170,
+ 171, 0, 550, 551, 552, 0, 172, 846, 173, 847,
+ 553, 174, 175, 554, 176, 555, 556, 557, 558, 559,
+ 848, 849, 560, 177, 178, 561, 179, 850, 562, 563,
+ 564, 851, 852, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 0, 574, 575, 0, 576, 577, 578, 184,
+ 185, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 853, 587, 588, 190, 589, 854, 191, 590,
+ 192, 591, 592, 593, 855, 594, 595, 856, 857, 596,
+ 597, 598, 858, 859, 599, 600, 193, 194, 601, 195,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 860, 611, 612, 197, 613, 198, 614, 615, 616, 861,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 862, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 863,
+ 644, 645, 207, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 0, 658, 864, 659,
+ 660, 661, 662, 663, 865, 665, 666, 214, 667, 668,
+ 216, 669, 670, 217, 671, 866, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 867, 686, 687, 868, 688, 221, 689, 690, 691,
+ 692, 693, 869, 694, 222, 223, 0, 871, 696, 697,
+ 224, 698, 225, 872, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 874, 707, 708, 709, 710, 711, 875,
+ 876, 712, 713, 714, 715, 716, 0, 232, 878, 717,
+ 233, 718, 719, 720, 721, 879, 880, 722, 881, 882,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 0, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 3140, 461, 462, 463, 464,
+ 138, 0, 0, 3209, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 3141, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 3210, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 3143, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 3211, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 3144, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 3145, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 3140, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 3141, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 3210, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 3143, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 4220, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 3144, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 3145, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 1156, 436, 437, 1108, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 1109, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 1157, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 1110, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 1111, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 1108, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 1109, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 3913, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 1110,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 1111, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 3140,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 3141, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 3210, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 3143, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 3144, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 3145, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 759, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 762, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 764, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 1108, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 1109, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 1110, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 1111, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 1007, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 429, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 1008,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 1009, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 429, 0, 0, 37, 0, 0, 39, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 1261, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 2388, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 2389, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 2390,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 2391, 526, 0, 0, 0, 2392, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 2393, 2394, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 2395, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 2396, 650, 209, 651,
+ 652, 653, 2397, 655, 656, 657, 768, 658, 0, 2398,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 2399, 688, 0, 2400, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 2401, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 1109, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 1110, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 1111,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 2377, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 3773, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 3774, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 3078, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 3775, 688, 0, 689,
+ 3776, 691, 3777, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 3778, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 429, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 786, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 429, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 764, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 429, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 954, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 429,
+ 0, 0, 37, 0, 0, 39, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 1351, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 1352, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 1191, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 429, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 1474,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 3992, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 3993, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 4005, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 4006,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 429, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 429, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 1013, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 429, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 1070, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 429, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 1126, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 1191, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 1308, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 1309,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 1780, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 1963, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 1191, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 2020, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 2021, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 2250, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 2377, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 3078, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 39, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 5116, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 5130, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 5225, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 1138,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 1140, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 1141, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 0, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 1142, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 1143, 223, 0, 0, 1144, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 1145, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 1185, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 1141, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 0, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 1186, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 1187, 223, 0, 0, 1188, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 1145, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 1204, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 1333, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 1343, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 1346, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 1362, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 1418,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 1423, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 1439, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 1442, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 1444, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 1489, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 1555, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 1557, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 1567, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 1570, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 1573,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 1791, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 1170, 459, 1141, 134,
+ 1792, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 1174, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 1175, 647, 648, 649, 650, 209, 651, 652, 653, 1176,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 1784, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 1178, 223, 0, 0, 1179, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 1145, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 1180, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 1911, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 1912, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 1140, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 1141, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 0, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 1145, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 2199, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 2233, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 2235, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 2311, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 2313, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 2315, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 2428, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 3043, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 537, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 0, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 760,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 761, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 3479, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 578, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 769, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 760, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 761, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 3483, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 769, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 458,
+ 459, 760, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 761, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 3568, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 578, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 646, 647, 648, 649, 650, 209, 651,
+ 652, 653, 654, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 663, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 689, 690, 691,
+ 692, 693, 0, 694, 222, 223, 0, 0, 696, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 769, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 728, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 458, 459, 760, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 761, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 3924, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 578,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 646, 647, 648, 649, 650, 209,
+ 651, 652, 653, 654, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 663, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 222, 223, 0, 0, 696,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 769, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 728, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 760, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 761, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 3981, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 578, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 769, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 760, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 761, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 3995, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 578, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 769,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 760, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 761, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 3997, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 578, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 663, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 0, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 769, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 765, 536, 4141, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 746, 84, 85,
+ 86, 747, 0, 748, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 749, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 750, 751, 0, 0, 0, 752, 753, 0,
+ 0, 0, 0, 754, 0, 0, 0, 0, 0, 0,
+ 0, 0, 755, 0, 756, 0, 757, 758, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 0, 448, 449, 450,
+ 128, 129, 0, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 760, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 0, 0, 465,
+ 466, 467, 468, 469, 470, 0, 471, 472, 761, 0,
+ 473, 474, 475, 476, 477, 478, 0, 0, 479, 480,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 484,
+ 485, 486, 763, 487, 149, 150, 488, 0, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 4181, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 0, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 0, 0, 0, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 765, 536, 537,
+ 0, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 0, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 0, 0, 554,
+ 0, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 0, 561, 0, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 766, 574,
+ 575, 767, 576, 577, 578, 184, 0, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 0, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 0, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 0, 601, 0, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 0, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 768, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 0, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 0, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 0,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 769, 232, 0, 717, 0, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 770, 729, 730, 81, 82, 746, 84,
+ 85, 86, 747, 0, 748, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 749, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 750, 751, 0, 0, 0, 752, 753,
+ 0, 0, 0, 0, 754, 0, 0, 0, 0, 0,
+ 0, 0, 0, 755, 0, 756, 0, 757, 758, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 0, 448, 449,
+ 450, 128, 129, 0, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 760, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 0, 0,
+ 465, 466, 467, 468, 469, 470, 0, 471, 472, 761,
+ 0, 473, 474, 475, 476, 477, 478, 0, 0, 479,
+ 480, 0, 0, 0, 0, 0, 0, 0, 0, 483,
+ 484, 485, 486, 763, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 0, 0, 0, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 765, 536,
+ 5403, 0, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 0, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 0, 0,
+ 554, 0, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 0, 561, 0, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 766,
+ 574, 575, 767, 576, 577, 578, 184, 0, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 0, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 0, 601, 0, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 0,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 768, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 0, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 0, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 769, 232, 0, 717, 0, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 770, 729, 730, 81, 82, 746,
+ 84, 85, 86, 747, 0, 748, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 749, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 750, 751, 0, 0, 0, 752,
+ 753, 0, 0, 0, 0, 754, 0, 0, 0, 0,
+ 0, 0, 0, 0, 755, 0, 756, 0, 757, 758,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 0, 448,
+ 449, 450, 128, 129, 0, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 1170, 459, 1141,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 0,
+ 0, 465, 466, 467, 468, 469, 470, 0, 471, 472,
+ 0, 0, 473, 474, 475, 476, 477, 478, 0, 0,
+ 479, 480, 0, 0, 0, 0, 0, 0, 0, 0,
+ 483, 484, 485, 486, 763, 487, 149, 150, 488, 0,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 0, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 0, 0, 0, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 765,
+ 536, 537, 0, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 0, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 0,
+ 0, 554, 0, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 0, 561, 0, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 766, 574, 575, 767, 576, 577, 1174, 184, 0, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 0, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 0, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 0, 601, 0, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 0, 1175, 647, 648, 649, 650, 209, 651, 652, 653,
+ 1176, 655, 656, 657, 768, 658, 0, 659, 660, 661,
+ 662, 1784, 0, 665, 666, 214, 667, 668, 0, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 0, 689, 690, 691, 692, 693,
+ 0, 694, 1178, 223, 0, 0, 1179, 697, 224, 698,
+ 225, 0, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 1145, 232, 0, 717, 0, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 1180, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 770, 729, 730, 81, 82,
+ 746, 84, 85, 86, 747, 0, 748, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 749,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 750, 751, 0, 0, 0,
+ 752, 753, 0, 0, 0, 0, 754, 0, 0, 0,
+ 0, 0, 0, 0, 0, 755, 0, 756, 0, 757,
+ 758, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 0,
+ 448, 449, 450, 128, 129, 0, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 1141, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 0, 0, 465, 466, 467, 468, 469, 470, 0, 471,
+ 472, 0, 0, 473, 474, 475, 476, 477, 478, 0,
+ 0, 479, 480, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 484, 485, 486, 763, 487, 149, 150, 488,
+ 0, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 0, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 0, 0, 0, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 765, 536, 537, 0, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 0, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 0, 0, 554, 0, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 0, 561, 0, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 766, 574, 575, 767, 576, 577, 578, 184, 0,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 0, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 0, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 0, 601, 0, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 0, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 768, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 0,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 0, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 0, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 1145, 232, 0, 717, 0,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 770, 729, 730, 81,
+ 82, 746, 84, 85, 86, 747, 0, 748, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 749, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 750, 751, 0, 0,
+ 0, 752, 753, 0, 0, 0, 0, 754, 0, 0,
+ 0, 0, 0, 0, 0, 0, 755, 0, 756, 0,
+ 757, 758, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 435, 436,
+ 437, 0, 438, 439, 440, 0, 0, 0, 0, 0,
+ 0, 0, 441, 442, 443, 0, 444, 445, 446, 447,
+ 0, 448, 449, 450, 128, 129, 0, 131, 132, 0,
+ 451, 452, 453, 454, 455, 456, 457, 0, 0, 1170,
+ 459, 1141, 134, 460, 0, 461, 462, 463, 464, 138,
+ 0, 0, 0, 465, 466, 467, 468, 469, 470, 0,
+ 471, 472, 0, 0, 473, 474, 475, 476, 477, 478,
+ 0, 0, 479, 480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 484, 485, 486, 763, 487, 149, 150,
+ 488, 0, 489, 0, 490, 491, 492, 493, 494, 495,
+ 496, 0, 497, 498, 499, 500, 0, 0, 501, 502,
+ 503, 504, 505, 0, 506, 507, 508, 0, 509, 510,
+ 511, 0, 512, 513, 514, 515, 158, 516, 517, 518,
+ 519, 160, 0, 520, 0, 521, 522, 523, 162, 524,
+ 0, 525, 0, 526, 0, 0, 0, 527, 528, 529,
+ 530, 0, 531, 166, 0, 167, 532, 533, 0, 534,
+ 535, 765, 536, 537, 0, 538, 539, 540, 541, 0,
+ 542, 543, 544, 545, 546, 547, 548, 0, 549, 0,
+ 171, 0, 550, 551, 552, 0, 172, 0, 173, 0,
+ 553, 0, 0, 554, 0, 555, 556, 557, 558, 559,
+ 0, 0, 560, 177, 0, 561, 0, 0, 562, 563,
+ 564, 0, 0, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 766, 574, 575, 767, 576, 577, 1174, 184,
+ 0, 186, 579, 580, 581, 582, 583, 584, 585, 187,
+ 188, 586, 0, 587, 588, 0, 589, 0, 191, 590,
+ 192, 591, 592, 593, 0, 594, 595, 0, 0, 596,
+ 597, 598, 0, 0, 599, 600, 193, 0, 601, 0,
+ 196, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 0, 611, 612, 197, 613, 198, 614, 615, 616, 0,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 200, 627, 628, 629, 630, 0, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 0,
+ 644, 645, 0, 1175, 647, 648, 649, 650, 209, 651,
+ 652, 653, 1176, 655, 656, 657, 768, 658, 0, 659,
+ 660, 661, 662, 1784, 0, 665, 666, 214, 667, 668,
+ 0, 669, 670, 217, 671, 0, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 219,
+ 685, 0, 686, 687, 0, 688, 0, 3127, 690, 691,
+ 692, 693, 0, 694, 1178, 223, 0, 0, 1179, 697,
+ 224, 698, 225, 0, 699, 700, 701, 702, 703, 704,
+ 705, 706, 0, 0, 707, 708, 709, 710, 711, 0,
+ 0, 712, 713, 714, 715, 716, 1145, 232, 0, 717,
+ 0, 718, 719, 720, 721, 0, 0, 722, 0, 0,
+ 723, 724, 725, 726, 727, 1180, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 770, 729, 730,
+ 81, 82, 746, 84, 85, 86, 747, 0, 748, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 749, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 750, 751, 0,
+ 0, 0, 752, 753, 0, 0, 0, 0, 754, 0,
+ 0, 0, 0, 0, 0, 0, 0, 755, 0, 756,
+ 0, 757, 758, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 430, 431, 432, 433, 434, 435,
+ 436, 437, 0, 438, 439, 440, 0, 0, 0, 0,
+ 0, 0, 0, 441, 442, 443, 0, 444, 445, 446,
+ 447, 0, 448, 449, 450, 128, 129, 0, 131, 132,
+ 0, 451, 452, 453, 454, 455, 456, 457, 0, 0,
+ 1170, 459, 1141, 134, 460, 0, 461, 462, 463, 464,
+ 138, 0, 0, 0, 465, 466, 467, 468, 469, 470,
+ 0, 471, 472, 0, 0, 473, 474, 475, 476, 477,
+ 478, 0, 0, 479, 480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 484, 485, 486, 763, 487, 149,
+ 150, 488, 0, 489, 0, 490, 491, 492, 493, 494,
+ 495, 496, 0, 497, 498, 499, 500, 0, 0, 501,
+ 502, 503, 504, 505, 0, 506, 507, 508, 0, 509,
+ 510, 511, 0, 512, 513, 514, 515, 158, 516, 517,
+ 518, 519, 160, 0, 520, 0, 521, 522, 523, 162,
+ 524, 0, 525, 0, 526, 0, 0, 0, 527, 528,
+ 529, 530, 0, 531, 166, 0, 167, 532, 533, 0,
+ 534, 535, 765, 536, 537, 0, 538, 539, 540, 541,
+ 0, 542, 543, 544, 545, 546, 547, 548, 0, 549,
+ 0, 171, 0, 550, 551, 552, 0, 172, 0, 173,
+ 0, 553, 0, 0, 554, 0, 555, 556, 557, 558,
+ 559, 0, 0, 560, 177, 0, 561, 0, 0, 562,
+ 563, 564, 0, 0, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 766, 574, 575, 767, 576, 577, 1174,
+ 184, 0, 186, 579, 580, 581, 582, 583, 584, 585,
+ 187, 188, 586, 0, 587, 588, 0, 589, 0, 191,
+ 590, 192, 591, 592, 593, 0, 594, 595, 0, 0,
+ 596, 597, 598, 0, 0, 599, 600, 193, 0, 601,
+ 0, 196, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 0, 611, 612, 197, 613, 198, 614, 615, 616,
+ 0, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 200, 627, 628, 629, 630, 0, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 0, 644, 645, 0, 1175, 647, 648, 649, 650, 209,
+ 651, 652, 653, 3192, 655, 656, 657, 768, 658, 0,
+ 659, 660, 661, 662, 3193, 0, 665, 666, 214, 667,
+ 668, 0, 669, 670, 217, 671, 0, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 219, 685, 0, 686, 687, 0, 688, 0, 689, 690,
+ 691, 692, 693, 0, 694, 1178, 223, 0, 0, 3194,
+ 697, 224, 698, 225, 0, 699, 700, 701, 702, 703,
+ 704, 705, 706, 0, 0, 707, 708, 709, 710, 711,
+ 0, 0, 712, 713, 714, 715, 716, 1145, 232, 0,
+ 717, 0, 718, 719, 720, 721, 0, 0, 722, 0,
+ 0, 723, 724, 725, 726, 727, 1180, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 770, 729,
+ 730, 81, 82, 746, 84, 85, 86, 747, 0, 748,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 749, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 750, 751,
+ 0, 0, 0, 752, 753, 0, 0, 0, 0, 754,
+ 0, 0, 0, 0, 0, 0, 0, 0, 755, 0,
+ 756, 0, 757, 758, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 0, 448, 449, 450, 128, 129, 0, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 1170, 459, 1141, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 0, 0, 465, 466, 467, 468, 469,
+ 470, 0, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 0, 479, 480, 0, 0, 0, 0,
+ 0, 0, 0, 0, 483, 484, 485, 486, 763, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 0, 0, 0, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 765, 536, 537, 0, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 0, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 0, 0, 554, 0, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 0, 561, 0, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 766, 574, 575, 767, 576, 577,
+ 1174, 184, 0, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 0, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 0,
+ 601, 0, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 0, 1175, 647, 648, 649, 650,
+ 209, 651, 652, 653, 3269, 655, 656, 657, 768, 658,
+ 0, 659, 660, 661, 662, 3193, 0, 665, 666, 214,
+ 667, 668, 0, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 0, 689,
+ 690, 691, 692, 693, 0, 694, 1178, 223, 0, 0,
+ 3194, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 1145, 232,
+ 0, 717, 0, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 1180, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 770,
+ 729, 730, 81, 82, 746, 84, 85, 86, 747, 0,
+ 748, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 749, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 750,
+ 751, 0, 0, 0, 752, 753, 0, 0, 0, 0,
+ 754, 0, 0, 0, 0, 0, 0, 0, 0, 755,
+ 0, 756, 0, 757, 758, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 0, 0,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 0, 448, 449, 450, 128, 129, 0,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 1170, 459, 1141, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 0, 0, 465, 466, 467, 468,
+ 469, 470, 0, 471, 472, 0, 0, 473, 474, 475,
+ 476, 477, 478, 0, 0, 479, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 483, 484, 485, 486, 763,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 0, 0, 0,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 765, 536, 537, 0, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 0, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 0, 0, 554, 0, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 0, 561, 0,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 766, 574, 575, 767, 576,
+ 577, 1174, 184, 0, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 0, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 0, 601, 0, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 0, 1175, 647, 648, 649,
+ 650, 209, 651, 652, 653, 3286, 655, 656, 657, 768,
+ 658, 0, 659, 660, 661, 662, 3193, 0, 665, 666,
+ 214, 667, 668, 0, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 0, 688, 0,
+ 689, 690, 691, 692, 693, 0, 694, 1178, 223, 0,
+ 0, 3194, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 1145,
+ 232, 0, 717, 0, 718, 719, 720, 721, 0, 0,
+ 722, 0, 0, 723, 724, 725, 726, 727, 1180, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 770, 729, 730, 81, 82, 746, 84, 85, 86, 747,
+ 0, 748, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 749, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 750, 751, 0, 0, 0, 752, 753, 0, 0, 0,
+ 0, 754, 0, 0, 0, 0, 0, 0, 0, 0,
+ 755, 0, 756, 0, 757, 758, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 0, 448, 449, 450, 128, 129,
+ 0, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 1170, 459, 1141, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 0, 0, 465, 466, 467,
+ 468, 469, 470, 0, 471, 472, 0, 0, 473, 474,
+ 475, 476, 477, 478, 0, 0, 479, 480, 0, 0,
+ 0, 0, 0, 0, 0, 0, 483, 484, 485, 486,
+ 763, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 0, 0,
+ 0, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 765, 536, 537, 0, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 0, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 0, 0, 554, 0, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 0, 561,
+ 0, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 766, 574, 575, 767,
+ 576, 577, 1174, 184, 0, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 0,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 0, 601, 0, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 0, 1175, 647, 648,
+ 649, 650, 209, 651, 652, 653, 1176, 655, 656, 657,
+ 768, 658, 0, 659, 660, 661, 662, 3193, 0, 665,
+ 666, 214, 667, 668, 0, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 0, 689, 690, 691, 692, 693, 0, 694, 1178, 223,
+ 0, 0, 3194, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 1145, 232, 0, 717, 0, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 1180,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 770, 729, 730, 81, 82, 746, 84, 85, 86,
+ 747, 0, 748, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 749, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 750, 751, 0, 0, 0, 752, 753, 0, 0,
+ 0, 0, 754, 0, 0, 0, 0, 0, 0, 0,
+ 0, 755, 0, 756, 0, 757, 758, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 0, 448, 449, 450, 128,
+ 129, 0, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 760, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 0, 0, 465, 466,
+ 467, 468, 469, 470, 0, 471, 472, 761, 0, 473,
+ 474, 475, 476, 477, 478, 0, 0, 479, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 483, 484, 485,
+ 486, 763, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 0, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 0,
+ 0, 0, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 0, 533, 0, 534, 535, 765, 536, 537, 0,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 0, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 0, 0, 554, 0,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 0,
+ 561, 0, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 766, 574, 575,
+ 767, 576, 577, 578, 184, 0, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 0, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 0, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 0, 601, 0, 196, 602, 603, 604, 605,
+ 606, 607, 0, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 0, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 0, 646, 647,
+ 648, 649, 650, 209, 0, 652, 653, 654, 655, 656,
+ 657, 768, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 0, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 0, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 0, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 769, 232, 0, 717, 0, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 770, 729, 730, 81, 82, 0, 84, 85,
+ 86, 0, 0, 0, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 0, 0, 0, 101,
+ 102, 103, 104, 0, 105, 106, 107, 108, -3220, 109,
+ 110, 111, 0, 0, 0, 0, 0, 114, 115, 0,
+ 0, 0, 0, 116, 0, 0, 0, 0, 0, 0,
+ 0, 0, 117, 0, 118, 0, 119, 120, 35, 0,
+ 424, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 126, 0, 0, 0,
+ 128, 129, 130, 131, 132, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 134, 0,
+ 0, 0, 0, 0, 0, 138, 0, 139, 0, 0,
+ 0, 0, 0, 0, 0, 142, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 145, 0, 0,
+ 0, 0, 0, 0, 146, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 149, 150, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 0, 0, 0, 0, 0,
+ 0, 0, 158, 0, 0, 0, 0, 160, 0, 0,
+ 0, 0, 0, 0, 162, 0, 0, 0, 0, 0,
+ 163, 0, 164, 0, 0, 0, 0, 0, 0, 166,
+ 0, 167, 0, 0, 0, 0, 0, 0, 0, 0,
+ 168, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 170, 171, 0, 0, 0,
+ 0, 0, 172, 0, 173, 0, 0, 174, 175, 0,
+ 176, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 178, 0, 179, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 184, 185, 186, 0, 0,
+ 0, 0, 0, 0, 0, 187, 188, 0, 0, 0,
+ 0, 190, 0, 0, 191, 0, 192, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 193, 194, 0, 195, 196, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 197,
+ 0, 198, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 200, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 207, 0,
+ 0, 0, 0, 0, 209, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 214, 0, 0, 216, 0, 0, 217,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 219, 0, 0, 0, 0,
+ 0, 0, 221, 0, 0, 0, 0, 0, 0, 0,
+ 222, 223, 0, 0, 0, 0, 224, 0, 225, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 228, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 232, 0, 0, 233, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 81, 82, 0, 84, 85, 86, 0,
+ 0, 0, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 0, 0, 0, 101, 102, 103,
+ 104, 0, 105, 106, 107, 108, -3221, 109, 110, 111,
+ 0, 0, 0, 0, 0, 114, 115, 0, 0, 0,
+ 0, 116, 0, 0, 0, 0, 0, 0, 0, 0,
+ 117, 0, 118, 0, 119, 120, 35, 0, 1256, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 126, 0, 0, 0, 128, 129,
+ 130, 131, 132, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 134, 0, 0, 0,
+ 0, 0, 0, 138, 0, 139, 0, 0, 0, 0,
+ 0, 0, 0, 142, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 145, 0, 0, 0, 0,
+ 0, 0, 146, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 149, 150, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 156, 0, 0, 0, 0, 0, 0, 0,
+ 158, 0, 0, 0, 0, 160, 0, 0, 0, 0,
+ 0, 0, 162, 0, 0, 0, 0, 0, 163, 0,
+ 164, 0, 0, 0, 0, 0, 0, 166, 0, 167,
+ 0, 0, 0, 0, 0, 0, 0, 0, 168, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 170, 171, 0, 0, 0, 0, 0,
+ 172, 0, 173, 0, 0, 174, 175, 0, 176, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 178, 0,
+ 179, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 184, 185, 186, 0, 0, 0, 0,
+ 0, 0, 0, 187, 188, 0, 0, 0, 0, 190,
+ 0, 0, 191, 0, 192, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 193, 194, 0, 195, 196, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 197, 0, 198,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 200, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 207, 0, 0, 0,
+ 0, 0, 209, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 214, 0, 0, 216, 0, 0, 217, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 219, 0, 0, 0, 0, 0, 0,
+ 221, 0, 0, 0, 0, 0, 0, 0, 222, 223,
+ 0, 0, 0, 0, 224, 0, 225, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 228, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 232, 0, 0, 233, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 81, 82, 0, 84, 85, 86, 0, 0, 0,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 0, 0, 0, 101, 102, 103, 104, 0,
+ 105, 106, 107, 108, 0, 109, 110, 111, 0, 0,
+ 0, 0, 0, 114, 115, 0, 0, 0, 0, 116,
+ 0, 0, 0, 0, 0, 0, 0, 0, 117, 0,
+ 118, 0, 119, 0, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 126, 0, 0, 0, 128, 129, 130, 131,
+ 132, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 134, 0, 0, 0, 0, 0,
+ 0, 138, 0, 139, 0, 0, 0, 0, 0, 0,
+ 0, 142, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 145, 0, 0, 0, 0, 0, 0,
+ 146, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 149, 150, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 156, 0, 0, 0, 0, 0, 0, 0, 158, 0,
+ 0, 0, 0, 160, 0, 0, 0, 0, 0, 0,
+ 162, 0, 0, 0, 0, 0, 163, 0, 164, 0,
+ 0, 0, 0, 0, 0, 166, 0, 167, 0, 0,
+ 0, 0, 0, 0, 0, 0, 168, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 170, 171, 0, 0, 0, 0, 0, 172, 0,
+ 173, 0, 0, 174, 175, 0, 176, 0, 0, 0,
+ 0, 0, 0, 0, 0, 177, 178, 0, 179, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 184, 185, 186, 0, 0, 0, 0, 0, 0,
+ 0, 187, 188, 0, 0, 0, 0, 190, 0, 0,
+ 191, 0, 192, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 193, 194,
+ 0, 195, 196, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 197, 0, 198, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 200, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 207, 0, 0, 0, 0, 0,
+ 209, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 214,
+ 0, 0, 216, 0, 0, 217, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 219, 0, 0, 0, 0, 0, 0, 221, 0,
+ 0, 0, 0, 0, 0, 0, 222, 223, 0, 0,
+ 0, 0, 224, 0, 225, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 228, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 232,
+ 0, 0, 233, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 81,
+ 82, 0, 84, 85, 86, 0, 0, 0, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 0, 0, 0, 101, 102, 103, 104, 0, 105, 106,
+ 107, 108, 0, 109, 110, 111, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 126, 0, 0, 0, 128, 129, 130, 131, 132, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 134, 0, 0, 0, 0, 0, 0, 138,
+ 0, 139, 0, 0, 0, 0, 0, 0, 0, 142,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 145, 0, 0, 0, 0, 0, 0, 146, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 149, 150,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 156, 0,
+ 0, 0, 0, 0, 0, 0, 158, 0, 0, 0,
+ 0, 160, 0, 0, 0, 0, 0, 0, 162, 0,
+ 0, 0, 0, 0, 163, 0, 164, 0, 0, 0,
+ 0, 0, 0, 166, 0, 167, 0, 0, 0, 0,
+ 0, 0, 0, 0, 168, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
+ 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
+ 0, 174, 175, 0, 176, 0, 0, 0, 0, 0,
+ 0, 0, 0, 177, 178, 0, 179, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
+ 185, 186, 0, 0, 0, 0, 0, 0, 0, 187,
+ 188, 0, 0, 0, 0, 190, 0, 0, 191, 0,
+ 192, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 193, 194, 0, 195,
+ 196, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 197, 0, 198, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 207, 0, 0, 0, 0, 0, 209, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 214, 0, 0,
+ 216, 0, 0, 217, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 219,
+ 0, 0, 0, 0, 0, 0, 221, 0, 0, 0,
+ 0, 0, 0, 0, 222, 223, 0, 0, 0, 0,
+ 224, 0, 225, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 228, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 232, 0, 0,
+ 233, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 35, 429, 0,
+ 0, 37, 0, 38, 39, 0, 0, 0, 0, 40,
+ 0, 0, 0, 0, 0, 0, 0, 0, 430, 431,
+ 432, 433, 434, 435, 436, 437, 0, 438, 439, 440,
+ 0, 0, 0, 0, 0, 0, 0, 441, 442, 443,
+ 0, 444, 445, 446, 447, 126, 448, 449, 450, 128,
+ 129, 130, 131, 132, 0, 451, 452, 453, 454, 455,
+ 456, 457, 0, 0, 458, 459, 0, 134, 460, 0,
+ 461, 462, 463, 464, 138, 0, 139, 0, 465, 466,
+ 467, 468, 469, 470, 142, 471, 472, 0, 0, 473,
+ 474, 475, 476, 477, 478, 0, 145, 479, 480, 0,
+ 0, 0, 0, 146, 0, 0, 0, 483, 484, 485,
+ 486, 0, 487, 149, 150, 488, 0, 489, 0, 490,
+ 491, 492, 493, 494, 495, 496, 0, 497, 498, 499,
+ 500, 0, 0, 501, 502, 503, 504, 505, 0, 506,
+ 507, 508, 0, 509, 510, 511, 0, 512, 513, 514,
+ 515, 158, 516, 517, 518, 519, 160, 2156, 520, 0,
+ 521, 522, 523, 162, 524, 0, 525, 0, 526, 163,
+ 0, 164, 527, 528, 529, 530, 0, 531, 166, 0,
+ 167, 532, 533, 0, 534, 535, 0, 536, 537, 168,
+ 538, 539, 540, 541, 0, 542, 543, 544, 545, 546,
+ 547, 548, 0, 549, 170, 171, 0, 550, 551, 552,
+ 0, 172, 0, 173, 0, 553, 174, 175, 554, 176,
+ 555, 556, 557, 558, 559, 0, 0, 560, 177, 178,
+ 561, 179, 0, 562, 563, 564, 0, 0, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 0, 574, 575,
+ 0, 576, 577, 578, 184, 185, 186, 579, 580, 581,
+ 582, 583, 584, 585, 187, 188, 586, 0, 587, 588,
+ 190, 589, 0, 191, 590, 192, 591, 592, 593, 0,
+ 594, 595, 2157, 0, 596, 597, 598, 0, 0, 599,
+ 600, 193, 194, 601, 195, 196, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 0, 611, 612, 197, 613,
+ 198, 614, 615, 616, 0, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 200, 627, 628, 629, 630,
+ 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 0, 644, 645, 207, 646, 647,
+ 648, 649, 650, 209, 651, 652, 653, 654, 655, 656,
+ 657, 0, 658, 0, 659, 660, 661, 662, 663, 0,
+ 665, 666, 214, 667, 668, 216, 669, 670, 217, 671,
+ 0, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ 681, 682, 683, 684, 219, 685, 0, 686, 687, 0,
+ 688, 221, 689, 690, 691, 692, 693, 0, 694, 222,
+ 223, 0, 0, 696, 697, 224, 698, 225, 2158, 699,
+ 700, 701, 702, 703, 704, 705, 706, 0, 0, 707,
+ 708, 709, 710, 711, 0, 0, 712, 713, 714, 715,
+ 716, 0, 232, 0, 717, 233, 718, 719, 720, 721,
+ 0, 0, 722, 0, 0, 723, 724, 725, 726, 727,
+ 728, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 0, 729, 730, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 1869, 1870, 6136, 0,
+ 0, 0, 0, 0, 0, 6137, 430, 431, 432, 433,
+ 434, 435, 436, 437, 0, 438, 439, 440, 123, 124,
+ 0, 0, 0, 0, 0, 441, 442, 443, 0, 444,
+ 445, 446, 447, 126, 448, 449, 450, 128, 129, 130,
+ 131, 132, 0, 451, 452, 453, 454, 455, 456, 457,
+ 0, 0, 458, 459, 0, 134, 460, 0, 461, 462,
+ 463, 464, 138, 0, 139, 0, 465, 466, 467, 468,
+ 469, 470, 142, 471, 472, 0, 0, 473, 474, 475,
+ 476, 477, 478, 0, 145, 479, 480, 0, 0, 0,
+ 0, 146, 0, 0, 0, 483, 484, 485, 486, 0,
+ 487, 149, 150, 488, 0, 489, 0, 490, 491, 492,
+ 493, 494, 495, 496, 0, 497, 498, 499, 500, 0,
+ 0, 501, 502, 503, 504, 505, 0, 506, 507, 508,
+ 0, 509, 510, 511, 0, 512, 513, 514, 515, 158,
+ 516, 517, 518, 519, 160, 0, 520, 0, 521, 522,
+ 523, 162, 524, 0, 525, 0, 526, 163, 0, 164,
+ 527, 528, 529, 530, 0, 531, 166, 0, 167, 532,
+ 533, 0, 534, 535, 0, 536, 537, 168, 538, 539,
+ 540, 541, 0, 542, 543, 544, 545, 546, 547, 548,
+ 0, 549, 170, 171, 0, 550, 551, 552, 0, 172,
+ 0, 173, 0, 553, 174, 175, 554, 176, 555, 556,
+ 557, 558, 559, 0, 0, 560, 177, 178, 561, 179,
+ 0, 562, 563, 564, 0, 0, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 0, 574, 575, 0, 576,
+ 577, 578, 184, 185, 186, 579, 580, 581, 582, 583,
+ 584, 585, 187, 188, 586, 0, 587, 588, 190, 589,
+ 0, 191, 590, 192, 591, 592, 593, 0, 594, 595,
+ 0, 0, 596, 597, 598, 0, 0, 599, 600, 193,
+ 194, 601, 195, 196, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 0, 611, 612, 197, 613, 198, 614,
+ 615, 616, 0, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 200, 627, 628, 629, 630, 0, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 0, 644, 645, 207, 646, 647, 648, 649,
+ 650, 209, 651, 652, 653, 654, 655, 656, 657, 0,
+ 658, 212, 659, 660, 661, 662, 663, 0, 665, 666,
+ 214, 667, 668, 216, 669, 670, 217, 671, 0, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, 681, 682,
+ 683, 684, 219, 685, 0, 686, 687, 220, 688, 221,
+ 689, 690, 691, 692, 693, 0, 694, 222, 223, 0,
+ 0, 696, 697, 224, 698, 225, 0, 699, 700, 701,
+ 702, 703, 704, 705, 706, 0, 0, 707, 708, 709,
+ 710, 711, 0, 0, 712, 713, 714, 715, 716, 231,
+ 232, 0, 717, 233, 718, 719, 720, 721, 0, 0,
+ 722, 0, 234, 723, 724, 725, 726, 727, 728, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 0, 729, 730, 0, 0, 246, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 2480, 0, 0,
+ 2481, 0, 0, 247, 2482, 2483, 2484, 2485, 2486, 2487,
+ 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497,
+ 2498, 2499, 2500, 0, 2501, 2502, 2503, 2504, 2505, 2506,
+ 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516,
+ 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526,
+ 2527, 2528, 2529, 2530, 2531, 0, 0, 2532, 2533, 2534,
+ 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544,
+ 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554,
+ 2555, 2556, 2557, 2558, 0, 2559, 2560, 2561, 2562, 2563,
+ 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573,
+ 0, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582,
+ 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592,
+ 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602,
+ 2603, 2604, 2605, 2606, 2607, 0, 2608, 2609, 2610, 2611,
+ 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 0, 0,
+ 2620, 2621, 2622, 2623, 0, 2624, 2625, 2626, 2627, 0,
+ 2628, 2629, 2630, 2631, 2632, 0, 2633, 2634, 0, 2635,
+ 2636, 2637, 0, 2638, 2639, 0, 2640, 2641, 2642, 2643,
+ 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653,
+ 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663,
+ 2664, 0, 2665, 0, 2666, 2667, 2668, 2669, 2670, 2671,
+ 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681,
+ 2682, 0, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690,
+ 2691, 2692, 2693, 2694, 2695, 2696, 0, 2697, 2698, 0,
+ 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708,
+ 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718,
+ 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 0, 2727,
+ 2728, 0, 2729, 2730, 2731, 2732, 2733, 0, 2734, 2735,
+ 2736, 2737, 0, 0, 2738, 2739, 2740, 2741, 2742, 2743,
+ 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 0,
+ 2753, 2754, 2755, 2756, 2757, 2758, 2759, 2760, 2761, 2762,
+ 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772,
+ 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782,
+ 2783, 2784, 2785, 0, 2786, 2787, 2788, 2789, 2790, 2791,
+ 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801,
+ 0, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810,
+ 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820,
+ 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830,
+ 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840,
+ 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850,
+ 0, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859,
+ 2860, 2861, 2862, 2863, 2864, 2865, 0, 2866, 2867, 2868,
+ 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878,
+ 2879, 2880, 2881, 0, 2882, 2883, 2884, 2885, 2886, 2887,
+ 0, 2888, 0, 0, 0, 0, 2889, 2890, 2891, 2892,
+ 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902,
+ 2903, 0, 2904, 2905, 2906, 0, 0, 0, 0, 0,
+ 0, 0, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914,
+ 2915, 35, 429, 0, 0, 37, 0, 38, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 430, 431, 432, 433, 434, 435, 436, 437,
+ 0, 438, 439, 440, 0, 0, 0, 0, 0, 0,
+ 0, 441, 442, 443, 0, 444, 445, 446, 447, 126,
+ 448, 449, 450, 128, 129, 130, 131, 132, 0, 451,
+ 452, 453, 454, 455, 456, 457, 0, 0, 458, 459,
+ 0, 134, 460, 0, 461, 462, 463, 464, 138, 0,
+ 139, 0, 465, 466, 467, 468, 469, 470, 142, 471,
+ 472, 0, 0, 473, 474, 475, 476, 477, 478, 0,
+ 145, 479, 480, 0, 0, 0, 0, 146, 0, 0,
+ 0, 483, 484, 485, 486, 0, 487, 149, 150, 488,
+ 2969, 489, 0, 490, 491, 492, 493, 494, 495, 496,
+ 0, 497, 498, 499, 500, 0, 0, 501, 502, 503,
+ 504, 505, 0, 506, 507, 508, 0, 509, 510, 511,
+ 0, 512, 513, 514, 515, 158, 516, 517, 518, 519,
+ 160, 2156, 520, 0, 521, 522, 523, 162, 524, 0,
+ 525, 0, 526, 163, 0, 164, 527, 528, 529, 530,
+ 0, 531, 166, 0, 167, 532, 533, 0, 534, 535,
+ 0, 536, 537, 168, 538, 539, 540, 541, 0, 542,
+ 543, 544, 545, 546, 547, 548, 0, 549, 170, 171,
+ 0, 550, 551, 552, 0, 172, 0, 173, 0, 553,
+ 174, 175, 554, 176, 555, 556, 557, 558, 559, 0,
+ 0, 560, 177, 178, 561, 179, 0, 562, 563, 564,
+ 0, 0, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 0, 574, 575, 0, 576, 577, 578, 184, 185,
+ 186, 579, 580, 581, 582, 583, 584, 585, 187, 188,
+ 586, 0, 587, 588, 190, 589, 0, 191, 590, 192,
+ 591, 592, 593, 0, 594, 595, 2157, 0, 596, 597,
+ 598, 0, 0, 599, 600, 193, 194, 601, 195, 196,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 0,
+ 611, 612, 197, 613, 198, 614, 615, 616, 0, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 200,
+ 627, 628, 629, 630, 0, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 0, 644,
+ 645, 207, 646, 647, 648, 649, 650, 209, 651, 652,
+ 653, 654, 655, 656, 657, 0, 658, 0, 659, 660,
+ 661, 662, 663, 0, 665, 666, 214, 667, 668, 216,
+ 669, 670, 217, 671, 0, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 681, 682, 683, 684, 219, 685,
+ 0, 686, 687, 0, 688, 221, 689, 690, 691, 692,
+ 693, 0, 694, 222, 223, 0, 0, 696, 697, 224,
+ 698, 225, 2158, 699, 700, 701, 702, 703, 704, 705,
+ 706, 0, 0, 707, 708, 709, 710, 711, 0, 0,
+ 712, 713, 714, 715, 716, 0, 232, 0, 717, 233,
+ 718, 719, 720, 721, 0, 0, 722, 0, 0, 723,
+ 724, 725, 726, 727, 728, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 0, 729, 730, 0,
+ 35, 429, 0, 0, 37, 0, 38, 39, 0, 0,
+ 1869, 1870, 40, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 435, 436, 437, 0,
+ 438, 439, 440, 0, 0, 0, 0, 0, 0, 0,
+ 441, 442, 443, 0, 444, 445, 446, 447, 126, 448,
+ 449, 450, 128, 129, 130, 131, 132, 0, 451, 452,
+ 453, 454, 455, 456, 457, 0, 0, 458, 459, 0,
+ 134, 460, 0, 461, 462, 463, 464, 138, 0, 139,
+ 0, 465, 466, 467, 468, 469, 470, 142, 471, 472,
+ 0, 0, 473, 474, 475, 476, 477, 478, 0, 145,
+ 479, 480, 0, 0, 0, 0, 146, 0, 0, 0,
+ 483, 484, 485, 486, 0, 487, 149, 150, 488, 2974,
+ 489, 0, 490, 491, 492, 493, 494, 495, 496, 0,
+ 497, 498, 499, 500, 0, 0, 501, 502, 503, 504,
+ 505, 0, 506, 507, 508, 0, 509, 510, 511, 0,
+ 512, 513, 514, 515, 158, 516, 517, 518, 519, 160,
+ 2156, 520, 0, 521, 522, 523, 162, 524, 0, 525,
+ 0, 526, 163, 0, 164, 527, 528, 529, 530, 0,
+ 531, 166, 0, 167, 532, 533, 0, 534, 535, 0,
+ 536, 537, 168, 538, 539, 540, 541, 0, 542, 543,
+ 544, 545, 546, 547, 548, 0, 549, 170, 171, 0,
+ 550, 551, 552, 0, 172, 0, 173, 0, 553, 174,
+ 175, 554, 176, 555, 556, 557, 558, 559, 0, 0,
+ 560, 177, 178, 561, 179, 0, 562, 563, 564, 0,
+ 0, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 0, 574, 575, 0, 576, 577, 578, 184, 185, 186,
+ 579, 580, 581, 582, 583, 584, 585, 187, 188, 586,
+ 0, 587, 588, 190, 589, 0, 191, 590, 192, 591,
+ 592, 593, 0, 594, 595, 2157, 0, 596, 597, 598,
+ 0, 0, 599, 600, 193, 194, 601, 195, 196, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 0, 611,
+ 612, 197, 613, 198, 614, 615, 616, 0, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 200, 627,
+ 628, 629, 630, 0, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 0, 644, 645,
+ 207, 646, 647, 648, 649, 650, 209, 651, 652, 653,
+ 654, 655, 656, 657, 0, 658, 0, 659, 660, 661,
+ 662, 663, 0, 665, 666, 214, 667, 668, 216, 669,
+ 670, 217, 671, 0, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 681, 682, 683, 684, 219, 685, 0,
+ 686, 687, 0, 688, 221, 689, 690, 691, 692, 693,
+ 0, 694, 222, 223, 0, 0, 696, 697, 224, 698,
+ 225, 2158, 699, 700, 701, 702, 703, 704, 705, 706,
+ 0, 0, 707, 708, 709, 710, 711, 0, 0, 712,
+ 713, 714, 715, 716, 0, 232, 0, 717, 233, 718,
+ 719, 720, 721, 0, 0, 722, 0, 0, 723, 724,
+ 725, 726, 727, 728, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 0, 729, 730, 0, 35,
+ 429, 0, 0, 37, 0, 38, 39, 0, 0, 1869,
+ 1870, 40, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 2156,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 2157, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 2158, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 0, 729, 730, 0, 35, 429,
+ 0, 0, 37, 0, 0, 39, 0, 0, 1869, 1870,
+ 40, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 435, 436, 437, 0, 438, 439,
+ 440, 0, 0, 0, 0, 0, 0, 0, 441, 442,
+ 443, 0, 444, 445, 446, 447, 126, 448, 449, 450,
+ 128, 129, 130, 131, 132, 0, 451, 452, 453, 454,
+ 455, 456, 457, 0, 0, 458, 459, 0, 134, 460,
+ 0, 461, 462, 463, 464, 138, 0, 139, 0, 465,
+ 466, 467, 468, 469, 470, 142, 471, 472, 0, 0,
+ 473, 474, 475, 476, 477, 478, 0, 145, 479, 480,
+ 0, 0, 0, 0, 146, 0, 0, 0, 483, 484,
+ 485, 486, 0, 487, 149, 150, 488, 3906, 489, 0,
+ 490, 491, 492, 493, 494, 495, 496, 0, 497, 498,
+ 499, 500, 0, 0, 501, 502, 503, 504, 505, 0,
+ 506, 507, 508, 0, 509, 510, 511, 0, 512, 513,
+ 514, 515, 158, 516, 517, 518, 519, 160, 2156, 520,
+ 0, 521, 522, 523, 162, 524, 0, 525, 0, 526,
+ 163, 0, 164, 527, 528, 529, 530, 0, 531, 166,
+ 0, 167, 532, 533, 0, 534, 535, 0, 536, 537,
+ 168, 538, 539, 540, 541, 0, 542, 543, 544, 545,
+ 546, 547, 548, 0, 549, 170, 171, 0, 550, 551,
+ 552, 0, 172, 0, 173, 0, 553, 174, 175, 554,
+ 176, 555, 556, 557, 558, 559, 0, 0, 560, 177,
+ 178, 561, 179, 0, 562, 563, 564, 0, 0, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 0, 574,
+ 575, 0, 576, 577, 578, 184, 185, 186, 579, 580,
+ 581, 582, 583, 584, 585, 187, 188, 586, 0, 587,
+ 588, 190, 589, 0, 191, 590, 192, 591, 592, 593,
+ 0, 594, 595, 2157, 0, 596, 597, 598, 0, 0,
+ 599, 600, 193, 194, 601, 195, 196, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 0, 611, 612, 197,
+ 613, 198, 614, 615, 616, 0, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 200, 627, 628, 629,
+ 630, 0, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 0, 644, 645, 207, 646,
+ 647, 648, 649, 650, 209, 651, 652, 653, 654, 655,
+ 656, 657, 0, 658, 0, 659, 660, 661, 662, 663,
+ 0, 665, 666, 214, 667, 668, 216, 669, 670, 217,
+ 671, 0, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 681, 682, 683, 684, 219, 685, 0, 686, 687,
+ 0, 688, 221, 689, 690, 691, 692, 693, 0, 694,
+ 222, 223, 0, 0, 696, 697, 224, 698, 225, 2158,
+ 699, 700, 701, 702, 703, 704, 705, 706, 0, 0,
+ 707, 708, 709, 710, 711, 0, 0, 712, 713, 714,
+ 715, 716, 0, 232, 0, 717, 233, 718, 719, 720,
+ 721, 0, 0, 722, 0, 0, 723, 724, 725, 726,
+ 727, 728, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 0, 729, 730, 35, 429, 0, 0,
+ 37, 0, 0, 39, 0, 0, 0, 1099, 1100, 0,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 435, 436, 437, 0, 438, 439, 440, 0,
+ 0, 0, 0, 0, 0, 0, 441, 442, 443, 0,
+ 444, 445, 446, 447, 126, 448, 449, 450, 128, 129,
+ 130, 131, 132, 0, 451, 452, 453, 454, 455, 456,
+ 457, 0, 0, 458, 459, 0, 134, 460, 0, 461,
+ 462, 463, 464, 138, 0, 139, 0, 465, 466, 467,
+ 468, 469, 470, 142, 471, 472, 0, 0, 473, 474,
+ 475, 476, 477, 478, 0, 145, 479, 480, 0, 0,
+ 0, 481, 146, 0, 0, 482, 483, 484, 485, 486,
+ 0, 487, 149, 150, 488, 0, 489, 0, 490, 491,
+ 492, 493, 494, 495, 496, 0, 497, 498, 499, 500,
+ 0, 0, 501, 502, 503, 504, 505, 0, 506, 507,
+ 508, 0, 509, 510, 511, 0, 512, 513, 514, 515,
+ 158, 516, 517, 518, 519, 160, 0, 520, 0, 521,
+ 522, 523, 162, 524, 0, 525, 0, 526, 163, 0,
+ 164, 527, 528, 529, 530, 0, 531, 166, 0, 167,
+ 532, 533, 0, 534, 535, 0, 536, 537, 168, 538,
+ 539, 540, 541, 0, 542, 543, 544, 545, 546, 547,
+ 548, 0, 549, 170, 171, 0, 550, 551, 552, 0,
+ 172, 0, 173, 0, 553, 174, 175, 554, 176, 555,
+ 556, 557, 558, 559, 0, 0, 560, 177, 178, 561,
+ 179, 0, 562, 563, 564, 0, 0, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 0, 574, 575, 0,
+ 576, 577, 578, 184, 185, 186, 579, 580, 581, 582,
+ 583, 584, 585, 187, 188, 586, 0, 587, 588, 190,
+ 589, 0, 191, 590, 192, 591, 592, 593, 0, 594,
+ 595, 0, 0, 596, 597, 598, 0, 0, 599, 600,
+ 193, 194, 601, 195, 196, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 0, 611, 612, 197, 613, 198,
+ 614, 615, 616, 0, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 200, 627, 628, 629, 630, 0,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 0, 644, 645, 207, 646, 647, 648,
+ 649, 650, 209, 651, 652, 653, 654, 655, 656, 657,
+ 0, 658, 0, 659, 660, 661, 662, 663, 664, 665,
+ 666, 214, 667, 668, 216, 669, 670, 217, 671, 0,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 219, 685, 0, 686, 687, 0, 688,
+ 221, 689, 690, 691, 692, 693, 0, 694, 222, 223,
+ 695, 0, 696, 697, 224, 698, 225, 0, 699, 700,
+ 701, 702, 703, 704, 705, 706, 0, 0, 707, 708,
+ 709, 710, 711, 0, 0, 712, 713, 714, 715, 716,
+ 0, 232, 0, 717, 233, 718, 719, 720, 721, 0,
+ 0, 722, 0, 0, 723, 724, 725, 726, 727, 728,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 0, 729, 730, 35, 429, 0, 0, 37, 0,
+ 0, 39, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 1337, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 481, 146, 0, 0, 482, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 664, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 1358, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 1359,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 481, 146, 0, 0, 482, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 664, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 3357, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 4380, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 39, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 2156,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 2157, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 2158, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 481, 146, 0, 0, 482, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 1450, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 664, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 1538, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 481, 146, 0, 0, 482, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 1551, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 664, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 481,
+ 146, 0, 0, 482, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 1563, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 1564,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 664, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 123, 124, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 39, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 0,
+ 146, 0, 0, 0, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 2954, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 729, 730, 0, 37, 0, 0, 39, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 430, 431, 432, 433, 434, 435, 436, 437, 0, 438,
+ 439, 440, 0, 0, 0, 0, 0, 0, 0, 441,
+ 442, 443, 0, 444, 445, 446, 447, 126, 448, 449,
+ 450, 128, 129, 130, 131, 132, 0, 451, 452, 453,
+ 454, 455, 456, 457, 0, 0, 458, 459, 0, 134,
+ 460, 0, 461, 462, 463, 464, 138, 0, 139, 0,
+ 465, 466, 467, 468, 469, 470, 142, 471, 472, 0,
+ 0, 473, 474, 475, 476, 477, 478, 0, 145, 479,
+ 480, 0, 0, 0, 0, 146, 0, 0, 0, 483,
+ 484, 485, 486, 0, 487, 149, 150, 488, 0, 489,
+ 0, 490, 491, 492, 493, 494, 495, 496, 0, 497,
+ 498, 499, 500, 0, 0, 501, 502, 503, 504, 505,
+ 0, 506, 507, 508, 0, 509, 510, 511, 0, 512,
+ 513, 514, 515, 158, 516, 517, 518, 519, 160, 0,
+ 520, 0, 521, 522, 523, 162, 524, 0, 525, 0,
+ 526, 163, 0, 164, 527, 528, 529, 530, 0, 531,
+ 166, 0, 167, 532, 533, 0, 534, 535, 0, 536,
+ 537, 168, 538, 539, 540, 541, 0, 542, 543, 544,
+ 545, 546, 547, 548, 0, 549, 170, 171, 0, 550,
+ 551, 552, 0, 172, 0, 173, 0, 553, 174, 175,
+ 554, 176, 555, 556, 557, 558, 559, 0, 0, 560,
+ 177, 178, 561, 179, 0, 562, 563, 564, 0, 0,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 0,
+ 574, 575, 0, 576, 577, 578, 184, 185, 186, 579,
+ 580, 581, 582, 583, 584, 585, 187, 188, 586, 0,
+ 587, 588, 190, 589, 0, 191, 590, 192, 591, 592,
+ 593, 0, 594, 595, 0, 0, 596, 597, 598, 0,
+ 0, 599, 600, 193, 194, 601, 195, 196, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 0, 611, 612,
+ 197, 613, 198, 614, 615, 616, 0, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 200, 627, 628,
+ 629, 630, 0, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 0, 644, 645, 207,
+ 646, 647, 648, 649, 650, 209, 651, 652, 653, 654,
+ 655, 656, 657, 0, 658, 0, 659, 660, 661, 662,
+ 663, 0, 665, 666, 214, 667, 668, 216, 669, 670,
+ 217, 671, 0, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, 681, 682, 683, 684, 219, 685, 0, 686,
+ 687, 0, 688, 221, 689, 690, 691, 692, 693, 0,
+ 694, 222, 223, 0, 0, 696, 697, 224, 698, 225,
+ 0, 699, 700, 701, 702, 703, 704, 705, 706, 0,
+ 0, 707, 708, 709, 710, 711, 0, 0, 712, 713,
+ 714, 715, 716, 0, 232, 0, 717, 233, 718, 719,
+ 720, 721, 0, 0, 722, 0, 0, 723, 724, 725,
+ 726, 727, 728, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 35, 729, 730, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 435, 436, 437, 0, 438, 439, 440, 0, 0, 0,
+ 0, 0, 0, 0, 441, 442, 443, 0, 444, 445,
+ 446, 447, 126, 448, 449, 450, 128, 129, 130, 131,
+ 132, 0, 451, 452, 453, 454, 455, 456, 457, 0,
+ 0, 458, 459, 0, 134, 460, 0, 461, 462, 463,
+ 464, 138, 0, 139, 0, 465, 466, 467, 468, 469,
+ 470, 142, 471, 472, 0, 0, 473, 474, 475, 476,
+ 477, 478, 0, 145, 479, 480, 0, 0, 0, 0,
+ 146, 0, 0, 0, 483, 484, 485, 486, 0, 487,
+ 149, 150, 488, 0, 489, 0, 490, 491, 492, 493,
+ 494, 495, 496, 0, 497, 498, 499, 500, 0, 0,
+ 501, 502, 503, 504, 505, 0, 506, 507, 508, 0,
+ 509, 510, 511, 0, 512, 513, 514, 515, 158, 516,
+ 517, 518, 519, 160, 0, 520, 0, 521, 522, 523,
+ 162, 524, 0, 525, 0, 526, 163, 0, 164, 527,
+ 528, 529, 530, 0, 531, 166, 0, 167, 532, 533,
+ 0, 534, 535, 0, 536, 537, 168, 538, 539, 540,
+ 541, 0, 542, 543, 544, 545, 546, 547, 548, 0,
+ 549, 170, 171, 0, 550, 551, 552, 0, 172, 0,
+ 173, 0, 553, 174, 175, 554, 176, 555, 556, 557,
+ 558, 559, 0, 0, 560, 177, 178, 561, 179, 0,
+ 562, 563, 564, 0, 0, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 0, 574, 575, 0, 576, 577,
+ 578, 184, 185, 186, 579, 580, 581, 582, 583, 584,
+ 585, 187, 188, 586, 0, 587, 588, 190, 589, 0,
+ 191, 590, 192, 591, 592, 593, 0, 594, 595, 0,
+ 0, 596, 597, 598, 0, 0, 599, 600, 193, 194,
+ 601, 195, 196, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 0, 611, 612, 197, 613, 198, 614, 615,
+ 616, 0, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 200, 627, 628, 629, 630, 0, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 0, 644, 645, 207, 646, 647, 648, 649, 650,
+ 209, 651, 652, 653, 654, 655, 656, 657, 0, 658,
+ 0, 659, 660, 661, 662, 663, 0, 665, 666, 214,
+ 667, 668, 216, 669, 670, 217, 671, 0, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
+ 684, 219, 685, 0, 686, 687, 0, 688, 221, 689,
+ 690, 691, 692, 693, 0, 694, 222, 223, 0, 0,
+ 696, 697, 224, 698, 225, 0, 699, 700, 701, 702,
+ 703, 704, 705, 706, 0, 0, 707, 708, 709, 710,
+ 711, 0, 0, 712, 713, 714, 715, 716, 0, 232,
+ 0, 717, 233, 718, 719, 720, 721, 0, 0, 722,
+ 0, 0, 723, 724, 725, 726, 727, 728, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 0,
+ 729, 730
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 2, 1373, 247, 73, 73, 73, 73, 73, 73, 73,
+ 110, 73, 73, 73, 957, 73, 73, 73, 1189, 73,
+ 161, 73, 79, 73, 73, 1222, 73, 914, 73, 978,
+ 73, 220, 1344, 88, 1381, 922, 79, 206, 925, 1172,
+ 375, 1167, 183, 919, 226, 1541, 392, 1508, 392, 148,
+ 2072, 1377, 151, 110, 1921, 1250, 156, 2, 1293, 1109,
+ 1110, 1111, 1216, 1064, 1218, 1115, 1949, 2011, 1345, 1023,
+ 125, 1194, 1511, 1995, 1195, 3426, 1371, 1496, 1497, 2351,
+ 1023, 83, 1137, 1445, 791, 90, 1656, 1506, 3632, 1179,
+ 159, 1046, 147, 148, 159, 100, 151, 1988, 1361, 156,
+ 199, 3492, 157, 1434, 110, 1060, 1344, 3108, 3109, 3788,
+ 905, 919, 1995, 3985, 2000, 1353, 1311, 2229, 1449, 4258,
+ 3609, 1988, 1072, 1526, 2416, 1363, 3324, 1269, 228, 3842,
+ 2943, 136, 165, 1076, 3958, 1310, 4285, 2433, 2140, 1269,
+ 133, 4011, 1269, 4013, 199, 147, 151, 1203, 4307, 915,
+ 156, 153, 4582, 125, 3454, 792, 3439, 1420, 924, 4638,
+ 1335, 1424, 2106, 2107, 3345, 1340, 1429, 1863, 1864, 1865,
+ 978, 228, 938, 206, 110, 1438, 363, 4681, 122, 181,
+ 2286, 1621, 1305, 959, 377, 3851, 1381, 1059, 1451, 4207,
+ 4634, 1075, 1135, 1927, 1044, 4537, 1978, 1047, 377, 205,
+ 4921, 4905, 205, 1101, 4543, 213, 4867, 213, 110, 215,
+ 976, 4904, 215, 4917, 2100, 4909, 982, 1858, 1859, 246,
+ 156, 1175, 228, 3816, 5434, 2337, 2937, 1490, 994, 3712,
+ 5567, 161, 1175, 1041, 4716, 5733, 5442, 3391, 2984, 3393,
+ 3394, 2127, 5384, 3023, 3398, 3399, 3400, 4908, 3402, 3403,
+ 3404, 3025, 2034, 183, 156, 5227, 3002, 1302, 1201, 1579,
+ 3884, 4272, 1385, 1494, 1495, 3739, 1685, 1686, 4604, 2051,
+ 1213, 5194, 20, 5769, 1505, 5583, 1715, 5585, 5781, 1604,
+ 5763, 1219, 13, 1219, 29, 9, 1705, 5648, 4340, 1067,
+ 1335, 5433, 228, 1528, 4542, 1340, 4544, 1264, 1265, 123,
+ 1007, 5061, 76, 76, 1961, 6000, 83, 76, 107, 76,
+ 70, 85, 86, 383, 383, 383, 383, 383, 383, 383,
+ 76, 383, 383, 383, 13, 383, 228, 383, 5689, 383,
+ 76, 383, 76, 383, 383, 392, 383, 132, 383, 70,
+ 13, 85, 86, 76, 75, 76, 163, 78, 79, 392,
+ 81, 76, 85, 86, 5010, 5011, 5012, 76, 5014, 5015,
+ 5016, 5017, 5018, 76, 1414, 94, 116, 116, 1266, 1267,
+ 427, 1091, 3855, 428, 76, 1095, 1096, 1097, 76, 76,
+ 2455, 76, 76, 5983, 427, 1105, 899, 3454, 85, 86,
+ 85, 86, 76, 98, 4898, 112, 83, 70, 104, 76,
+ 132, 112, 76, 1458, 147, 76, 242, 79, 70, 242,
+ 242, 149, 98, 75, 76, 149, 237, 1588, 154, 81,
+ 266, 188, 188, 132, 132, 101, 69, 114, 286, 242,
+ 73, 3960, 132, 69, 70, 286, 190, 73, 1381, 75,
+ 76, 70, 4924, 1674, 1675, 81, 75, 76, 70, 78,
+ 79, 98, 81, 75, 98, 242, 1940, 5429, 105, 81,
+ 147, 105, 1169, 242, 360, 1827, 141, 5696, 5697, 1700,
+ 98, 286, 137, 354, 270, 242, 132, 105, 70, 208,
+ 96, 99, 3782, 1809, 355, 1435, 70, 5885, 193, 81,
+ 374, 75, 393, 251, 6359, 149, 355, 81, 410, 6194,
+ 215, 1796, 111, 119, 244, 1392, 6002, 242, 190, 1396,
+ 425, 1398, 94, 442, 83, 400, 159, 6428, 6429, 1395,
+ 83, 244, 160, 429, 132, 471, 104, 234, 242, 3282,
+ 132, 1587, 132, 192, 242, 132, 290, 149, 425, 5900,
+ 483, 234, 3842, 98, 219, 114, 5854, 83, 160, 191,
+ 242, 507, 188, 21, 339, 901, 370, 901, 7, 344,
+ 5770, 10, 11, 425, 239, 69, 70, 69, 70, 70,
+ 213, 73, 21, 22, 23, 280, 25, 26, 147, 81,
+ 81, 30, 31, 32, 6184, 339, 1757, 1395, 243, 1644,
+ 149, 1386, 274, 1548, 408, 457, 413, 2058, 160, 1794,
+ 1771, 160, 70, 296, 1799, 1800, 149, 242, 3361, 394,
+ 149, 567, 1735, 83, 526, 190, 149, 249, 505, 414,
+ 262, 567, 36, 330, 38, 161, 208, 570, 287, 272,
+ 1801, 1802, 6543, 356, 519, 335, 1513, 549, 249, 1762,
+ 695, 570, 396, 6338, 222, 744, 745, 183, 203, 285,
+ 390, 195, 567, 335, 6519, 264, 507, 339, 570, 1536,
+ 531, 567, 420, 281, 1990, 281, 567, 526, 210, 1546,
+ 335, 307, 1627, 1550, 570, 471, 259, 1554, 1734, 1556,
+ 395, 120, 414, 567, 193, 1562, 567, 4216, 1643, 744,
+ 745, 1568, 507, 695, 1571, 94, 483, 6193, 4716, 182,
+ 286, 1599, 1657, 6101, 483, 414, 1604, 1661, 2192, 1593,
+ 2041, 386, 570, 442, 414, 181, 483, 222, 1661, 5423,
+ 571, 429, 453, 4741, 570, 83, 1964, 6422, 98, 286,
+ 435, 567, 181, 376, 483, 411, 791, 570, 570, 4878,
+ 459, 460, 442, 567, 933, 483, 567, 516, 101, 483,
+ 92, 468, 512, 570, 567, 427, 114, 468, 414, 507,
+ 2091, 497, 512, 512, 453, 5727, 2138, 2139, 567, 4641,
+ 5109, 1966, 5532, 1286, 2431, 570, 505, 483, 5120, 4918,
+ 453, 1976, 5124, 5993, 2022, 471, 563, 270, 512, 147,
+ 557, 557, 565, 567, 567, 1851, 569, 897, 567, 1577,
+ 505, 2078, 569, 6498, 2067, 452, 414, 2070, 452, 208,
+ 518, 567, 414, 561, 414, 528, 570, 414, 1819, 6419,
+ 565, 567, 565, 567, 452, 500, 569, 558, 559, 483,
+ 528, 1076, 5168, 6329, 567, 570, 549, 1791, 570, 6342,
+ 897, 2136, 567, 2339, 901, 6328, 6541, 2022, 1791, 5505,
+ 488, 549, 567, 567, 567, 498, 1799, 1800, 901, 6357,
+ 5108, 570, 5110, 506, 2059, 567, 509, 2062, 2063, 567,
+ 567, 483, 567, 567, 1594, 324, 563, 1597, 570, 221,
+ 1600, 187, 1602, 567, 2303, 1605, 3887, 1222, 3889, 1609,
+ 567, 897, 1079, 567, 2390, 963, 567, 559, 963, 963,
+ 6129, 963, 963, 4101, 4102, 2401, 4924, 1845, 4106, 1845,
+ 1009, 1878, 567, 6274, 570, 4404, 4968, 4969, 4970, 4971,
+ 4972, 483, 558, 559, 483, 339, 6287, 5889, 6424, 558,
+ 559, 6239, 1121, 382, 509, 570, 558, 559, 570, 183,
+ 483, 1986, 526, 2383, 483, 3051, 429, 1088, 2145, 1090,
+ 483, 1092, 1007, 242, 1009, 5878, 4828, 1098, 960, 570,
+ 4243, 897, 570, 507, 4438, 549, 558, 559, 570, 167,
+ 570, 370, 4983, 570, 558, 559, 415, 2172, 3791, 6189,
+ 522, 1122, 1123, 569, 567, 3091, 6192, 470, 471, 3095,
+ 2035, 560, 561, 562, 563, 897, 505, 560, 561, 562,
+ 563, 6497, 4626, 4827, 183, 471, 1195, 2052, 378, 408,
+ 1075, 132, 69, 570, 258, 1070, 73, 522, 1211, 1074,
+ 69, 1023, 1024, 193, 73, 181, 5998, 76, 2348, 6171,
+ 76, 4185, 1211, 107, 76, 6396, 193, 1226, 145, 2364,
+ 254, 3821, 242, 442, 493, 2370, 6188, 181, 3822, 0,
+ 248, 2282, 2283, 236, 80, 129, 24, 83, 411, 3805,
+ 443, 87, 88, 89, 97, 1067, 266, 437, 1073, 343,
+ 254, 355, 425, 6571, 427, 319, 2479, 121, 322, 258,
+ 2029, 141, 28, 425, 567, 1090, 286, 1092, 558, 559,
+ 560, 561, 562, 563, 360, 157, 76, 1102, 221, 5760,
+ 335, 24, 159, 445, 157, 475, 180, 477, 5721, 182,
+ 280, 510, 1301, 192, 1169, 254, 1171, 1122, 1123, 4602,
+ 6330, 335, 1067, 280, 1126, 6462, 483, 160, 188, 4953,
+ 388, 221, 69, 6339, 183, 488, 73, 6099, 200, 1196,
+ 319, 3852, 6104, 322, 5623, 183, 319, 200, 4741, 322,
+ 2476, 335, 6349, 1196, 181, 212, 354, 242, 1160, 13,
+ 1090, 442, 1092, 76, 286, 1173, 218, 1173, 1170, 1177,
+ 76, 1177, 1174, 1175, 1176, 449, 4889, 1204, 73, 485,
+ 286, 266, 5664, 2354, 567, 1961, 246, 254, 2238, 433,
+ 13, 181, 1122, 1123, 483, 269, 335, 270, 381, 1171,
+ 558, 559, 560, 561, 562, 563, 4207, 80, 287, 258,
+ 83, 244, 2155, 570, 87, 88, 89, 261, 416, 2275,
+ 258, 2029, 266, 529, 6430, 1295, 425, 286, 6434, 5568,
+ 5572, 370, 284, 141, 4534, 5577, 335, 4537, 5580, 354,
+ 6437, 3108, 526, 317, 354, 352, 320, 106, 294, 5753,
+ 242, 188, 160, 310, 433, 102, 103, 188, 239, 303,
+ 433, 335, 1264, 1265, 159, 2398, 2399, 1269, 557, 408,
+ 319, 5965, 471, 322, 266, 1375, 511, 167, 5417, 339,
+ 569, 319, 5431, 567, 344, 237, 374, 3209, 5992, 570,
+ 6496, 6012, 3178, 414, 286, 369, 5455, 511, 5991, 4300,
+ 544, 5995, 344, 5964, 570, 1250, 6010, 507, 360, 567,
+ 372, 219, 360, 370, 282, 471, 5188, 193, 1375, 372,
+ 167, 491, 445, 567, 1269, 188, 386, 511, 526, 188,
+ 356, 239, 278, 5994, 5947, 505, 6542, 471, 4638, 413,
+ 187, 2342, 402, 1349, 1350, 335, 1349, 1350, 505, 349,
+ 2473, 24, 247, 6550, 2309, 445, 429, 390, 248, 282,
+ 6566, 34, 436, 6569, 344, 544, 1311, 3253, 2323, 1375,
+ 568, 571, 511, 571, 374, 222, 2432, 2433, 3380, 1381,
+ 243, 2336, 456, 2439, 433, 507, 3120, 571, 2389, 2445,
+ 2446, 2447, 2393, 266, 427, 433, 2397, 470, 471, 2400,
+ 2456, 507, 339, 447, 280, 2461, 69, 344, 339, 2281,
+ 73, 3052, 439, 3054, 476, 288, 3198, 474, 80, 476,
+ 2307, 83, 5936, 476, 5938, 87, 88, 89, 5942, 5943,
+ 183, 344, 5876, 94, 355, 2312, 1381, 167, 344, 1375,
+ 500, 526, 2318, 2320, 511, 107, 545, 499, 507, 3471,
+ 565, 94, 243, 486, 569, 488, 2306, 187, 410, 492,
+ 80, 5, 2334, 83, 354, 138, 2364, 87, 88, 89,
+ 2265, 2321, 2370, 1375, 2324, 2359, 5980, 340, 386, 567,
+ 24, 6185, 377, 356, 104, 5989, 83, 442, 383, 1734,
+ 34, 507, 222, 523, 568, 544, 159, 242, 429, 349,
+ 5166, 360, 191, 167, 2453, 258, 4995, 401, 5850, 2317,
+ 2318, 5381, 138, 139, 80, 507, 5005, 83, 507, 94,
+ 568, 266, 570, 1467, 374, 100, 416, 157, 1593, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 6042, 354,
+ 570, 286, 2392, 4934, 359, 2395, 2396, 208, 114, 212,
+ 147, 567, 1088, 244, 1090, 121, 1092, 404, 2930, 435,
+ 355, 1907, 1098, 1907, 442, 208, 319, 567, 171, 322,
+ 200, 4638, 190, 262, 1576, 1577, 242, 1579, 567, 571,
+ 258, 147, 373, 253, 248, 1640, 1122, 1123, 435, 4889,
+ 4890, 1596, 500, 1598, 138, 76, 1601, 313, 1603, 3490,
+ 266, 1606, 1607, 1608, 94, 526, 2932, 3682, 3683, 282,
+ 2936, 201, 3687, 6092, 1619, 570, 188, 349, 512, 3486,
+ 286, 211, 5771, 3490, 471, 160, 288, 1814, 1633, 505,
+ 1635, 1576, 1577, 208, 1579, 1637, 526, 1830, 1831, 349,
+ 1833, 319, 374, 3104, 507, 2453, 5664, 310, 251, 3724,
+ 3725, 1830, 1831, 188, 1833, 2431, 4854, 448, 1847, 1661,
+ 442, 247, 4816, 207, 374, 356, 513, 4821, 288, 6173,
+ 517, 94, 6102, 188, 404, 313, 193, 100, 568, 526,
+ 433, 571, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 208, 570, 4891, 356, 261, 3802, 358, 557, 470,
+ 266, 6215, 549, 292, 133, 435, 565, 370, 567, 568,
+ 569, 570, 141, 429, 1250, 4716, 4897, 567, 208, 2356,
+ 567, 307, 1777, 1778, 98, 395, 344, 370, 1264, 1265,
+ 316, 526, 335, 1269, 1736, 506, 356, 303, 282, 190,
+ 4741, 471, 372, 1745, 340, 408, 335, 6335, 6336, 412,
+ 108, 412, 413, 237, 429, 433, 426, 1759, 474, 485,
+ 80, 218, 507, 83, 248, 408, 961, 87, 88, 89,
+ 461, 98, 344, 190, 442, 1311, 203, 471, 205, 442,
+ 370, 442, 266, 513, 104, 208, 3133, 503, 570, 1791,
+ 356, 544, 1794, 1795, 319, 370, 526, 1799, 1800, 442,
+ 1857, 1858, 1859, 529, 339, 1777, 1778, 2978, 400, 156,
+ 231, 474, 528, 476, 567, 1858, 1859, 109, 408, 549,
+ 5120, 1876, 6326, 4890, 5124, 152, 571, 1927, 155, 203,
+ 245, 123, 3528, 408, 161, 567, 474, 567, 6268, 290,
+ 198, 507, 231, 5982, 436, 1381, 476, 304, 237, 1794,
+ 1907, 567, 6001, 368, 1799, 1800, 445, 567, 1915, 160,
+ 231, 266, 189, 526, 1907, 503, 383, 442, 94, 369,
+ 1927, 1066, 1915, 290, 100, 3070, 1878, 480, 307, 471,
+ 370, 447, 408, 304, 412, 483, 233, 179, 339, 475,
+ 528, 477, 567, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 570, 3036, 1876, 571, 316, 2096, 433, 505,
+ 483, 6499, 339, 6417, 442, 304, 505, 503, 408, 246,
+ 435, 1927, 339, 4924, 1869, 1870, 420, 519, 335, 567,
+ 351, 1937, 259, 304, 418, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 271, 396, 247, 370, 3090, 1894,
+ 1895, 369, 442, 5497, 6433, 1857, 471, 483, 180, 557,
+ 3090, 413, 351, 3090, 218, 127, 1161, 370, 288, 270,
+ 3208, 569, 1978, 2043, 5798, 369, 358, 231, 2048, 396,
+ 3292, 547, 208, 237, 557, 408, 369, 279, 370, 6493,
+ 442, 1927, 558, 559, 560, 561, 562, 563, 513, 191,
+ 451, 408, 109, 408, 370, 408, 307, 412, 75, 424,
+ 3341, 526, 506, 156, 81, 430, 123, 3884, 293, 442,
+ 360, 1966, 437, 385, 442, 1927, 408, 3894, 2034, 1076,
+ 284, 1976, 5383, 435, 549, 197, 356, 442, 6187, 442,
+ 3536, 385, 313, 335, 517, 2051, 6205, 238, 442, 517,
+ 304, 2121, 567, 80, 3292, 2125, 83, 472, 359, 442,
+ 87, 88, 89, 190, 4086, 242, 188, 6546, 963, 471,
+ 262, 5422, 179, 5617, 2076, 5619, 442, 104, 220, 494,
+ 231, 272, 2084, 244, 3975, 228, 237, 485, 1135, 266,
+ 2190, 3329, 432, 5963, 567, 317, 526, 351, 320, 567,
+ 188, 3296, 243, 225, 3435, 2982, 360, 5407, 3975, 3304,
+ 237, 513, 3307, 5792, 2059, 2, 277, 2062, 2063, 5402,
+ 292, 526, 121, 485, 4420, 3363, 268, 3458, 3459, 3460,
+ 3461, 458, 3463, 2190, 461, 276, 518, 259, 247, 431,
+ 570, 485, 141, 6015, 549, 94, 427, 274, 101, 237,
+ 291, 3272, 3273, 304, 1201, 3276, 155, 3488, 429, 370,
+ 301, 6534, 4164, 335, 567, 567, 1213, 529, 4170, 3344,
+ 408, 245, 279, 5371, 475, 128, 477, 3374, 3375, 3376,
+ 1075, 1076, 6331, 370, 2190, 529, 73, 488, 427, 567,
+ 3133, 5345, 79, 5347, 5348, 5349, 83, 408, 307, 500,
+ 351, 412, 503, 474, 442, 6344, 370, 488, 335, 208,
+ 159, 6584, 339, 6037, 2216, 149, 571, 339, 2220, 2408,
+ 2043, 408, 4108, 110, 396, 2048, 160, 2172, 335, 528,
+ 571, 442, 503, 370, 6106, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 408, 499, 133, 3510, 4360, 488,
+ 549, 3206, 201, 429, 2190, 442, 2425, 528, 1794, 208,
+ 147, 288, 211, 1799, 1800, 5565, 5945, 4153, 567, 156,
+ 83, 408, 5572, 445, 6423, 5988, 570, 5577, 419, 149,
+ 5580, 3168, 458, 3170, 3171, 526, 4578, 218, 2190, 5661,
+ 160, 400, 507, 3169, 2359, 162, 567, 313, 2121, 313,
+ 231, 114, 2125, 526, 237, 442, 237, 313, 549, 5609,
+ 313, 565, 526, 3434, 568, 569, 1211, 391, 205, 3320,
+ 168, 3322, 5811, 5623, 431, 3326, 213, 260, 215, 356,
+ 313, 5144, 5704, 505, 147, 549, 80, 4281, 205, 83,
+ 5407, 228, 1878, 87, 88, 89, 2348, 570, 2416, 2351,
+ 424, 2416, 2416, 284, 2416, 2416, 2361, 571, 2363, 180,
+ 104, 3169, 2367, 437, 2369, 573, 475, 2372, 477, 528,
+ 3165, 2376, 329, 304, 4449, 4450, 4451, 4452, 3085, 526,
+ 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464,
+ 549, 2424, 3795, 408, 503, 243, 353, 39, 472, 6271,
+ 80, 2501, 549, 2348, 3599, 6544, 2351, 87, 88, 89,
+ 519, 370, 6091, 429, 370, 429, 141, 238, 526, 282,
+ 351, 370, 147, 429, 571, 526, 429, 442, 276, 360,
+ 1966, 3481, 313, 483, 5632, 160, 49, 4512, 4513, 3205,
+ 1976, 549, 2444, 291, 2501, 404, 429, 412, 123, 408,
+ 237, 272, 408, 301, 67, 404, 3512, 507, 474, 408,
+ 474, 396, 570, 188, 388, 190, 18, 19, 474, 570,
+ 5622, 474, 313, 260, 409, 370, 3895, 442, 5630, 327,
+ 557, 5781, 3922, 442, 117, 37, 442, 503, 40, 503,
+ 3440, 474, 569, 442, 169, 2501, 317, 503, 5565, 320,
+ 503, 80, 104, 438, 83, 392, 354, 140, 87, 88,
+ 89, 354, 528, 408, 528, 3281, 359, 107, 6390, 194,
+ 503, 246, 528, 2059, 15, 528, 2062, 2063, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 212, 528, 129,
+ 427, 216, 5609, 435, 288, 528, 316, 442, 429, 274,
+ 5850, 567, 425, 567, 427, 5709, 5623, 348, 2035, 549,
+ 237, 567, 96, 238, 567, 2501, 241, 488, 499, 339,
+ 565, 419, 3627, 3628, 526, 2052, 571, 567, 130, 471,
+ 413, 256, 519, 260, 567, 119, 80, 3784, 429, 83,
+ 180, 565, 432, 474, 3360, 3596, 2211, 549, 572, 2501,
+ 568, 3796, 565, 571, 567, 203, 569, 205, 294, 442,
+ 1339, 163, 356, 6485, 339, 488, 2231, 341, 562, 344,
+ 114, 513, 503, 567, 33, 569, 6017, 121, 3684, 1358,
+ 3507, 229, 1361, 474, 526, 567, 2172, 2983, 3515, 2983,
+ 3696, 558, 559, 560, 561, 562, 313, 528, 318, 1335,
+ 3885, 568, 204, 147, 1340, 3532, 246, 549, 567, 507,
+ 5229, 386, 503, 5664, 488, 3542, 4688, 5236, 3545, 344,
+ 3547, 3548, 3728, 410, 3551, 567, 356, 402, 3555, 269,
+ 3557, 5879, 432, 3560, 3961, 562, 567, 528, 5988, 5887,
+ 567, 5902, 569, 526, 270, 107, 5907, 5908, 1593, 316,
+ 565, 69, 570, 3793, 569, 73, 574, 316, 6387, 288,
+ 3987, 435, 570, 571, 5781, 3771, 549, 129, 568, 394,
+ 570, 6265, 216, 475, 3962, 477, 567, 317, 350, 400,
+ 320, 80, 354, 331, 332, 333, 334, 570, 571, 164,
+ 338, 339, 4686, 155, 4688, 335, 344, 471, 331, 332,
+ 333, 334, 3639, 6053, 3641, 3642, 4678, 3634, 572, 4626,
+ 570, 475, 429, 477, 574, 436, 566, 261, 180, 181,
+ 570, 4846, 266, 1668, 70, 500, 188, 356, 4664, 369,
+ 568, 566, 570, 5784, 203, 570, 205, 4899, 3695, 513,
+ 3697, 3698, 6092, 1688, 568, 2465, 3745, 571, 2468, 4037,
+ 471, 457, 526, 560, 561, 562, 457, 474, 695, 303,
+ 229, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 567, 457, 569, 413, 1719, 549, 568, 488, 570, 6508,
+ 4270, 85, 86, 4403, 246, 4721, 503, 318, 565, 1734,
+ 567, 3636, 260, 567, 568, 156, 436, 571, 519, 568,
+ 568, 570, 570, 3796, 102, 103, 568, 269, 570, 570,
+ 571, 528, 356, 526, 519, 528, 456, 168, 567, 475,
+ 569, 477, 128, 4204, 3581, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 568, 432, 570, 4249, 475, 294,
+ 477, 6191, 490, 203, 568, 205, 570, 4336, 4337, 5171,
+ 567, 573, 568, 501, 570, 317, 517, 6586, 320, 425,
+ 426, 3912, 331, 332, 333, 334, 2985, 354, 568, 338,
+ 570, 81, 568, 335, 570, 344, 2983, 339, 568, 568,
+ 570, 570, 425, 426, 107, 1830, 1831, 3745, 1833, 568,
+ 2983, 570, 243, 568, 568, 570, 570, 4210, 568, 568,
+ 570, 570, 567, 447, 3909, 3910, 129, 369, 568, 2961,
+ 570, 558, 559, 560, 561, 562, 3135, 4911, 3137, 566,
+ 526, 567, 528, 3041, 6325, 276, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 3939, 6053, 568, 3177, 570,
+ 291, 568, 3133, 570, 429, 3052, 3939, 3054, 425, 426,
+ 301, 413, 568, 568, 570, 570, 570, 180, 3816, 3052,
+ 897, 3054, 128, 568, 901, 570, 519, 568, 905, 570,
+ 3120, 425, 426, 4906, 436, 6092, 327, 914, 915, 568,
+ 3085, 570, 568, 156, 570, 922, 4927, 924, 925, 568,
+ 117, 570, 6342, 568, 456, 570, 458, 546, 3925, 461,
+ 568, 938, 570, 547, 568, 568, 570, 570, 4113, 568,
+ 4927, 570, 290, 3120, 558, 559, 560, 561, 562, 563,
+ 957, 490, 3074, 568, 526, 570, 528, 3022, 3023, 568,
+ 354, 570, 501, 3272, 3273, 6234, 6235, 3276, 3090, 976,
+ 569, 3093, 3094, 6365, 6366, 982, 269, 357, 568, 4054,
+ 570, 237, 568, 80, 570, 357, 83, 994, 340, 341,
+ 87, 88, 89, 568, 3120, 570, 354, 4072, 419, 3996,
+ 568, 3998, 570, 546, 6191, 3070, 1013, 6427, 568, 117,
+ 570, 3133, 568, 6433, 570, 568, 1023, 570, 357, 546,
+ 3240, 1028, 290, 560, 317, 3090, 1033, 320, 3093, 3094,
+ 1037, 1038, 568, 241, 570, 567, 5125, 1044, 5127, 1046,
+ 1047, 80, 335, 3263, 83, 4491, 567, 570, 87, 88,
+ 89, 69, 1059, 1060, 368, 73, 568, 568, 3319, 3236,
+ 1067, 128, 242, 3240, 3120, 568, 4236, 570, 286, 1076,
+ 3192, 568, 3198, 570, 567, 114, 369, 95, 560, 4639,
+ 4640, 571, 121, 435, 4623, 568, 3263, 570, 568, 568,
+ 570, 570, 568, 568, 570, 570, 4411, 568, 3120, 570,
+ 568, 5243, 570, 568, 568, 570, 570, 568, 147, 570,
+ 3236, 568, 282, 570, 3240, 568, 568, 570, 570, 471,
+ 413, 435, 568, 573, 570, 3434, 6546, 568, 1135, 570,
+ 568, 568, 570, 570, 3354, 567, 4257, 3263, 4212, 4136,
+ 4214, 159, 568, 436, 570, 4142, 4387, 3269, 568, 4212,
+ 570, 4214, 4227, 3279, 4229, 6342, 4571, 471, 573, 1166,
+ 1167, 513, 483, 456, 3286, 4611, 1173, 568, 1175, 570,
+ 1177, 568, 483, 570, 526, 107, 568, 3354, 570, 483,
+ 3236, 5223, 483, 568, 3240, 570, 568, 483, 570, 1196,
+ 568, 288, 570, 214, 1201, 213, 1203, 549, 128, 513,
+ 3420, 568, 568, 570, 570, 282, 1213, 3263, 568, 568,
+ 570, 570, 526, 288, 3236, 567, 483, 568, 3240, 570,
+ 569, 568, 261, 570, 568, 4299, 570, 266, 3354, 567,
+ 3352, 3296, 568, 530, 570, 549, 4299, 567, 567, 3304,
+ 6427, 3263, 3307, 3420, 408, 568, 6433, 570, 266, 568,
+ 568, 570, 570, 567, 272, 4376, 266, 1264, 1265, 356,
+ 568, 568, 570, 570, 303, 223, 569, 3389, 4444, 3391,
+ 223, 3393, 3394, 568, 354, 570, 3398, 3399, 3400, 4207,
+ 3402, 3403, 3404, 568, 568, 570, 570, 568, 1295, 570,
+ 568, 568, 570, 570, 3420, 568, 567, 570, 3354, 266,
+ 354, 4656, 4478, 4546, 4687, 568, 408, 570, 223, 223,
+ 266, 223, 354, 237, 408, 223, 571, 356, 302, 3684,
+ 190, 507, 354, 5518, 348, 567, 237, 4402, 568, 141,
+ 339, 107, 3354, 339, 530, 3457, 567, 354, 237, 339,
+ 117, 3454, 1349, 1350, 2359, 117, 339, 493, 4524, 339,
+ 159, 4348, 519, 4350, 370, 4352, 519, 488, 376, 6546,
+ 3482, 237, 389, 3728, 3420, 572, 1373, 1374, 1375, 223,
+ 223, 223, 567, 516, 1381, 567, 567, 382, 223, 1386,
+ 106, 530, 567, 223, 1391, 1392, 223, 570, 223, 1396,
+ 4950, 1398, 223, 223, 223, 1402, 223, 223, 3420, 237,
+ 223, 2416, 420, 223, 3526, 4802, 3581, 223, 447, 223,
+ 1417, 354, 223, 471, 3070, 567, 107, 302, 3074, 237,
+ 237, 354, 567, 76, 76, 567, 4741, 567, 567, 237,
+ 567, 567, 567, 567, 3090, 567, 76, 567, 567, 567,
+ 567, 4824, 567, 567, 567, 567, 76, 567, 76, 567,
+ 567, 469, 1459, 567, 1461, 1462, 567, 567, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 5454, 567, 567,
+ 527, 567, 567, 366, 3776, 3777, 3778, 3133, 567, 567,
+ 498, 3846, 286, 3703, 570, 570, 107, 171, 506, 3709,
+ 286, 509, 5073, 288, 107, 4812, 302, 570, 237, 237,
+ 351, 1508, 349, 442, 560, 433, 570, 282, 547, 322,
+ 187, 506, 557, 13, 567, 570, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 571, 3703, 570, 137, 567,
+ 567, 483, 3709, 483, 3599, 429, 483, 518, 483, 429,
+ 569, 1548, 483, 483, 304, 429, 483, 483, 483, 557,
+ 160, 429, 223, 354, 434, 299, 483, 80, 483, 344,
+ 83, 196, 483, 354, 87, 88, 89, 474, 506, 1576,
+ 1577, 374, 1579, 567, 483, 425, 349, 3703, 483, 259,
+ 1587, 104, 567, 3709, 160, 196, 370, 570, 266, 223,
+ 507, 114, 483, 196, 507, 483, 483, 471, 121, 471,
+ 483, 483, 182, 196, 483, 324, 483, 128, 483, 128,
+ 483, 358, 483, 393, 483, 483, 483, 483, 483, 393,
+ 1627, 5816, 483, 393, 147, 483, 474, 483, 374, 374,
+ 80, 116, 2647, 83, 1641, 116, 1643, 87, 88, 89,
+ 3296, 483, 483, 572, 570, 568, 288, 3703, 3304, 483,
+ 1657, 3307, 288, 3709, 1661, 354, 288, 288, 354, 288,
+ 493, 288, 288, 3319, 114, 1672, 288, 567, 288, 3782,
+ 288, 121, 107, 483, 3796, 223, 4991, 223, 354, 339,
+ 188, 3703, 507, 526, 223, 223, 518, 3709, 223, 354,
+ 339, 5137, 339, 310, 339, 1702, 107, 147, 107, 294,
+ 237, 431, 106, 567, 567, 565, 223, 569, 567, 223,
+ 567, 223, 481, 481, 507, 507, 5162, 483, 483, 565,
+ 223, 13, 483, 1730, 1731, 1732, 570, 1734, 343, 3842,
+ 324, 3796, 348, 242, 522, 324, 83, 232, 261, 1746,
+ 481, 483, 570, 266, 251, 567, 567, 1754, 567, 242,
+ 485, 284, 557, 568, 259, 3820, 3821, 259, 445, 355,
+ 292, 107, 5765, 570, 507, 288, 289, 33, 570, 9,
+ 570, 570, 363, 128, 568, 429, 507, 292, 568, 568,
+ 303, 567, 292, 344, 1791, 344, 483, 1794, 4716, 483,
+ 483, 237, 1799, 1800, 344, 117, 567, 4872, 4873, 354,
+ 451, 354, 425, 339, 302, 302, 302, 354, 483, 196,
+ 474, 261, 570, 4741, 354, 260, 266, 3939, 408, 342,
+ 5884, 483, 483, 354, 354, 1832, 396, 439, 442, 1836,
+ 1837, 360, 5392, 356, 4011, 4012, 4013, 107, 288, 289,
+ 568, 288, 294, 392, 1851, 557, 223, 237, 507, 507,
+ 1857, 1858, 1859, 303, 107, 349, 519, 239, 567, 393,
+ 439, 6056, 223, 567, 4985, 4986, 4987, 4988, 4989, 223,
+ 472, 1878, 223, 222, 349, 339, 526, 107, 339, 96,
+ 354, 354, 507, 5059, 294, 4011, 4012, 4013, 561, 349,
+ 257, 257, 342, 237, 107, 4017, 238, 565, 568, 568,
+ 1907, 568, 546, 546, 322, 294, 356, 237, 1915, 339,
+ 354, 5157, 568, 568, 1921, 439, 266, 95, 266, 5234,
+ 1927, 266, 570, 266, 447, 266, 530, 483, 249, 570,
+ 1937, 570, 242, 1940, 567, 321, 128, 1944, 526, 354,
+ 348, 242, 366, 3599, 375, 242, 570, 338, 4070, 568,
+ 523, 365, 316, 505, 312, 4011, 4012, 4013, 483, 546,
+ 568, 568, 568, 568, 128, 548, 523, 568, 568, 568,
+ 5353, 1978, 570, 570, 354, 567, 2991, 270, 354, 4288,
+ 557, 1988, 4979, 568, 568, 4982, 4206, 568, 570, 4011,
+ 4012, 4013, 570, 568, 568, 567, 4924, 447, 567, 567,
+ 567, 567, 513, 557, 568, 568, 571, 567, 223, 567,
+ 5007, 483, 483, 483, 354, 278, 344, 4139, 2025, 357,
+ 226, 483, 339, 223, 547, 155, 3041, 2034, 434, 4206,
+ 442, 6018, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 223, 223, 302, 2051, 270, 434, 226, 354, 434,
+ 483, 2058, 507, 557, 4273, 226, 304, 570, 376, 226,
+ 376, 504, 483, 4185, 483, 4520, 458, 483, 314, 314,
+ 483, 314, 429, 429, 196, 4197, 4198, 429, 4387, 5148,
+ 4206, 483, 483, 483, 483, 4207, 4274, 483, 483, 483,
+ 4212, 223, 4214, 429, 116, 339, 4284, 547, 4273, 483,
+ 483, 568, 483, 4322, 288, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 568, 2122, 442, 568, 566, 288,
+ 254, 358, 493, 237, 117, 181, 568, 568, 237, 568,
+ 570, 2138, 2139, 2140, 4322, 567, 570, 107, 223, 568,
+ 3796, 4263, 4207, 223, 483, 5220, 237, 4322, 2155, 254,
+ 4206, 349, 557, 4518, 507, 223, 237, 429, 429, 566,
+ 2167, 429, 429, 357, 567, 6307, 439, 429, 221, 567,
+ 507, 2178, 4537, 570, 221, 288, 4298, 4299, 288, 214,
+ 288, 288, 288, 2190, 4206, 2192, 288, 2194, 288, 288,
+ 288, 5312, 5313, 565, 5315, 83, 570, 242, 366, 568,
+ 568, 338, 5372, 568, 518, 568, 2213, 567, 5205, 568,
+ 523, 242, 251, 416, 2221, 480, 512, 549, 4340, 158,
+ 5148, 237, 2229, 107, 4526, 4527, 4528, 4529, 5303, 493,
+ 557, 507, 507, 568, 557, 1837, 570, 570, 567, 570,
+ 2247, 483, 294, 568, 278, 128, 474, 223, 458, 5246,
+ 5247, 246, 493, 226, 434, 2262, 483, 483, 2265, 483,
+ 483, 2268, 483, 429, 4484, 568, 429, 408, 2275, 568,
+ 6465, 526, 128, 568, 2281, 6470, 131, 567, 474, 513,
+ 237, 354, 147, 223, 181, 493, 2293, 568, 288, 288,
+ 288, 288, 273, 567, 483, 530, 292, 354, 567, 2306,
+ 2307, 107, 2309, 2310, 374, 354, 5922, 4484, 5924, 567,
+ 570, 166, 5603, 5587, 2321, 352, 2323, 2324, 568, 570,
+ 567, 493, 113, 483, 80, 5400, 2333, 2334, 5888, 2336,
+ 2337, 570, 568, 80, 567, 566, 83, 248, 5335, 5336,
+ 181, 2348, 439, 242, 2351, 2, 4411, 288, 568, 568,
+ 242, 128, 568, 366, 524, 291, 568, 568, 4484, 524,
+ 567, 570, 364, 568, 291, 567, 567, 114, 128, 473,
+ 361, 4493, 227, 255, 121, 568, 493, 480, 349, 242,
+ 557, 526, 483, 147, 260, 2392, 267, 272, 2395, 2396,
+ 4578, 260, 344, 4578, 4578, 344, 4578, 4578, 557, 128,
+ 147, 483, 474, 141, 483, 483, 223, 226, 263, 570,
+ 288, 568, 570, 567, 483, 195, 244, 188, 107, 507,
+ 266, 4534, 439, 349, 4537, 2432, 2433, 567, 4484, 107,
+ 507, 2438, 2439, 339, 239, 439, 222, 2444, 2445, 2446,
+ 2447, 349, 526, 2450, 299, 2452, 128, 2454, 2455, 2456,
+ 2457, 2458, 2459, 153, 2461, 474, 2463, 2464, 107, 526,
+ 2467, 94, 4484, 242, 354, 237, 5933, 100, 403, 216,
+ 357, 5468, 5763, 567, 2481, 2482, 2483, 2484, 570, 275,
+ 335, 568, 5479, 5480, 339, 286, 512, 4748, 242, 5742,
+ 455, 567, 2499, 568, 2501, 4715, 567, 4717, 4759, 5496,
+ 374, 4967, 568, 4967, 161, 567, 291, 567, 432, 568,
+ 525, 204, 145, 160, 261, 370, 371, 354, 5835, 266,
+ 4740, 567, 402, 483, 568, 4638, 183, 6087, 107, 223,
+ 483, 223, 237, 4710, 567, 567, 107, 567, 4715, 567,
+ 4717, 344, 567, 567, 270, 315, 567, 567, 439, 223,
+ 568, 4207, 181, 408, 107, 5624, 303, 412, 568, 358,
+ 493, 242, 417, 4740, 453, 568, 237, 453, 201, 557,
+ 128, 426, 107, 150, 180, 208, 474, 567, 211, 434,
+ 567, 512, 567, 259, 4710, 6145, 6146, 442, 507, 4715,
+ 5665, 4717, 237, 335, 4716, 474, 354, 474, 567, 454,
+ 568, 76, 230, 567, 426, 238, 426, 5676, 463, 356,
+ 530, 141, 467, 357, 4740, 141, 571, 204, 5933, 4741,
+ 209, 526, 526, 80, 567, 567, 522, 4749, 107, 567,
+ 4752, 234, 4754, 570, 234, 2642, 511, 242, 570, 272,
+ 512, 474, 442, 344, 399, 272, 5822, 354, 354, 567,
+ 439, 4716, 107, 107, 4710, 357, 267, 567, 357, 4715,
+ 244, 4717, 244, 222, 567, 567, 521, 568, 5675, 3684,
+ 6137, 523, 567, 483, 568, 2682, 4741, 570, 4800, 128,
+ 5676, 128, 128, 193, 4740, 76, 462, 505, 4710, 439,
+ 209, 425, 219, 4715, 4816, 4717, 5624, 568, 361, 4821,
+ 447, 567, 335, 107, 93, 409, 339, 567, 567, 425,
+ 104, 242, 5719, 3728, 344, 483, 349, 570, 4740, 570,
+ 567, 362, 5843, 6155, 567, 358, 2733, 4915, 425, 150,
+ 222, 453, 453, 5854, 526, 3750, 5664, 370, 188, 526,
+ 6300, 5917, 5918, 244, 244, 507, 567, 383, 5676, 5791,
+ 3438, 3766, 568, 2124, 3796, 4411, 1307, 4715, 3248, 1800,
+ 3329, 4690, 3987, 6291, 1350, 3355, 3409, 3782, 4198, 5717,
+ 4835, 4836, 6135, 6404, 4870, 408, 4889, 4890, 411, 412,
+ 5765, 5362, 4688, 5741, 3916, 3586, 6270, 1349, 5623, 6164,
+ 4967, 6393, 6163, 6310, 6427, 3920, 4984, 4919, 5407, 4890,
+ 547, 4916, 4924, 4901, 4967, 5926, 6109, 4860, 3423, 442,
+ 3423, 558, 559, 560, 561, 562, 563, 80, 4710, 4247,
+ 83, 4012, 5401, 1345, 6384, 6385, 4885, 3842, 5748, 4293,
+ 6030, 3846, 4952, 6509, 6602, 6591, 4206, 5732, 4923, 5678,
+ 6323, 2202, 6118, 5905, 5681, 154, 4968, 4969, 4970, 4971,
+ 4972, 114, 183, 2455, 4994, 5875, 5919, 6505, 121, 4924,
+ 3440, 2463, 2245, 959, 1628, 3109, 4927, 3894, 4304, 2242,
+ 5933, 2262, 5791, 6018, 6050, 2317, 1024, 510, 2419, 2419,
+ 5877, 1057, 4140, 3354, 147, 6349, 6550, 5009, 5010, 5011,
+ 5012, 6067, 5014, 5015, 5016, 5017, 5018, 5186, 6074, 4740,
+ 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 1944,
+ 2917, 1190, 4958, 4960, 80, 3385, 2155, 83, 5605, 3003,
+ 2927, 5161, 6264, 2930, 4608, 3813, 4991, 3039, 3570, 1818,
+ 1840, 5928, 1771, 6103, 3828, 1839, 4550, 6404, 3013, 6255,
+ 6379, 5142, 3038, 6064, 1590, 1842, 4537, 5109, 114, 5851,
+ 4534, 1847, 6053, 216, 6052, 121, 4534, 4609, 5126, 6557,
+ 6373, 6468, 6242, 5820, 4486, 5591, 6256, 5228, 6257, 2924,
+ 2457, 5159, 5160, 3750, 3652, 3384, 2983, 5238, 3748, 2986,
+ 2927, 147, 695, 2990, 4319, 1471, 2993, 3500, 2995, 2255,
+ 6225, 2998, 3074, 393, 3790, 1069, 1287, 3090, 261, 3049,
+ 4615, 3082, 94, 266, 1859, 3083, 3013, 5120, 100, 5143,
+ 1267, 5124, 4616, 1267, 4575, 3022, 3023, 1853, 1774, 5141,
+ 426, 3582, 5144, 5145, 3094, 2381, 2, 5603, -1, -1,
+ -1, 6100, 1576, 1857, -1, -1, 1101, 6328, -1, -1,
+ 303, -1, -1, -1, -1, 3052, 6043, 3054, -1, 5171,
+ 216, -1, -1, 145, -1, -1, -1, -1, -1, -1,
+ 4716, -1, -1, -1, -1, -1, -1, 3074, -1, 1640,
+ -1, -1, -1, -1, 6137, 6251, -1, 6253, -1, 5144,
+ -1, -1, -1, -1, -1, 4741, 3093, 3094, -1, -1,
+ 3097, 6583, 4748, 356, -1, 261, -1, 3104, -1, -1,
+ 266, 3108, 3109, 4759, -1, -1, 5171, -1, 3115, 201,
+ -1, -1, -1, 3120, 3121, -1, 208, -1, 3125, 211,
+ -1, -1, -1, -1, -1, -1, 3133, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 303, -1, -1,
+ -1, -1, -1, -1, 3151, -1, 238, 3154, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3165, -1,
+ 3167, 3168, -1, 3170, 3171, -1, 3173, -1, -1, 5234,
+ -1, -1, 6100, -1, -1, -1, -1, -1, 3185, -1,
+ 272, -1, -1, -1, 447, -1, -1, -1, -1, -1,
+ 356, 3198, -1, -1, -1, -1, -1, -1, 3205, 3206,
+ -1, -1, -1, -1, 5381, -1, -1, 3214, -1, -1,
+ 5332, 5333, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5345, -1, 5347, 5348, 5349, 6291, 3236,
+ 3237, 94, -1, 3240, -1, -1, -1, 100, -1, -1,
+ -1, -1, -1, 335, -1, -1, -1, 339, -1, -1,
+ -1, -1, 115, -1, 3261, 5381, 3263, 349, -1, 4274,
+ 3267, -1, -1, -1, -1, -1, 358, 3274, 4924, 4284,
+ -1, 6278, 3279, -1, 3281, 3282, 6593, 3284, 370, -1,
+ -1, 447, 145, 3290, 547, -1, -1, -1, -1, 80,
+ -1, 5413, 83, -1, 5407, 558, 559, 560, 561, 562,
+ 563, -1, -1, 3310, -1, -1, -1, 4322, -1, 3316,
+ -1, -1, 6488, -1, -1, -1, 3323, -1, -1, 411,
+ 412, -1, -1, 114, -1, 5381, -1, -1, -1, 3336,
+ 121, 5453, -1, -1, -1, 4991, 199, -1, 201, -1,
+ -1, 6404, 3349, 6350, 6351, 208, -1, 3354, 211, -1,
+ 442, -1, -1, 3360, 3361, -1, 147, -1, -1, 5381,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3378, 3379, 3380, -1, 238, -1, 3384, -1, -1,
+ -1, 547, -1, 5505, -1, -1, -1, -1, -1, -1,
+ -1, 6388, 558, 559, 560, 561, 562, 563, -1, -1,
+ -1, -1, -1, -1, 3411, 3412, -1, -1, -1, 272,
+ 1067, 3013, -1, 3420, -1, -1, -1, -1, 510, -1,
+ 3427, -1, -1, -1, -1, 216, -1, -1, -1, -1,
+ 3437, 1088, -1, 1090, -1, 1092, -1, -1, -1, -1,
+ -1, 1098, 1099, 1100, -1, -1, -1, 3454, -1, -1,
+ -1, -1, 5565, -1, -1, -1, -1, -1, -1, 5572,
+ 3467, -1, -1, -1, 5577, 1122, 1123, 5580, -1, -1,
+ 261, 5780, 335, -1, -1, 266, 339, 5602, -1, 3486,
+ -1, -1, -1, 3490, -1, -1, 349, -1, -1, -1,
+ -1, -1, -1, -1, 5714, 358, 5609, -1, -1, -1,
+ -1, -1, -1, 4518, -1, 3512, -1, 370, -1, -1,
+ 5623, -1, 303, -1, -1, -1, -1, -1, -1, 4534,
+ -1, -1, 4537, -1, -1, -1, -1, -1, 5593, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5714, -1, 5758,
+ -1, -1, 5664, -1, -1, 408, -1, -1, 411, 412,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5746, -1,
+ -1, -1, -1, 4578, -1, 356, -1, -1, -1, -1,
+ -1, 5759, 5228, -1, -1, -1, -1, -1, 5234, 442,
+ -1, -1, 5238, 5758, -1, -1, -1, 5709, 5714, 5777,
+ 6597, 6598, -1, 1250, -1, -1, 5718, -1, -1, 5664,
+ 3607, 5791, 5791, 5791, 5791, 5791, 5791, 5791, -1, 5791,
+ 5791, 5791, 1269, 5791, -1, 5791, 3623, 5791, 3625, 5791,
+ -1, 5791, 5791, -1, 5791, 3632, 5791, -1, -1, 3636,
+ -1, 3638, 3639, -1, 3641, 3642, 3643, -1, -1, -1,
+ -1, -1, -1, -1, 3651, -1, -1, 510, -1, 3656,
+ -1, -1, -1, -1, 1311, -1, 447, -1, 5714, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5781, -1,
+ -1, -1, -1, -1, -1, 3682, 3683, 3684, -1, -1,
+ 3687, -1, -1, -1, -1, -1, -1, -1, 3695, 3696,
+ 3697, 3698, 5714, -1, -1, 80, 3703, 112, 83, -1,
+ -1, 3708, 3709, -1, 3711, -1, 3713, -1, -1, 6074,
+ -1, -1, -1, -1, -1, -1, -1, 3724, 3725, -1,
+ -1, 3728, -1, -1, 1381, -1, -1, -1, -1, 114,
+ -1, -1, -1, -1, -1, -1, 121, 5850, -1, -1,
+ 3747, -1, 3749, -1, 3751, -1, -1, -1, -1, -1,
+ -1, -1, 167, -1, -1, -1, 547, -1, -1, -1,
+ -1, -1, 147, -1, 3771, -1, -1, 558, 559, 560,
+ 561, 562, 563, -1, -1, 3782, -1, -1, -1, 94,
+ -1, -1, -1, -1, 80, 100, 5963, 83, -1, 3796,
+ -1, 87, 88, 89, -1, -1, -1, -1, -1, -1,
+ 115, -1, 5990, 218, -1, -1, 3813, -1, 104, -1,
+ -1, 5933, -1, -1, -1, 5937, 231, -1, 114, -1,
+ -1, 3828, 237, -1, -1, 121, -1, 242, -1, -1,
+ 145, 216, -1, 248, -1, 3842, 251, 5963, -1, -1,
+ 255, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5933, 284,
+ -1, 286, -1, -1, 4889, 5988, 261, 3884, -1, -1,
+ 3887, 266, 3889, -1, 199, -1, 201, 3894, -1, 304,
+ -1, -1, -1, 208, -1, -1, 211, -1, -1, -1,
+ 4915, 6089, 3909, 3910, -1, -1, -1, 5963, 3915, -1,
+ -1, -1, -1, -1, -1, 6135, -1, -1, 303, 1576,
+ 1577, -1, 1579, 238, -1, -1, -1, -1, -1, 3936,
+ -1, -1, 3939, -1, -1, 3942, 351, -1, -1, 354,
+ 6053, 5963, -1, 3950, -1, 360, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 272, 6135, -1,
+ -1, -1, -1, -1, -1, 261, -1, -1, 3975, 4984,
+ 266, 356, -1, -1, -1, -1, -1, -1, -1, 6092,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 288, 289, -1, -1, -1, 83, -1, -1,
+ -1, 416, -1, -1, 4011, 4012, 4013, 303, 5664, 6135,
+ -1, -1, -1, -1, -1, 6137, -1, -1, -1, 6141,
+ 335, 6143, -1, 6243, 339, 6147, 6148, -1, 4035, -1,
+ -1, -1, -1, -1, 349, -1, -1, 4044, -1, 4046,
+ -1, -1, -1, 358, -1, -1, 342, 4054, -1, -1,
+ -1, -1, -1, 468, -1, 370, -1, -1, -1, -1,
+ 356, -1, 447, 359, -1, 4072, 6243, -1, -1, -1,
+ -1, -1, 6437, -1, -1, -1, -1, -1, 6191, 6135,
+ 3682, 3683, -1, -1, 499, 3687, -1, -1, -1, -1,
+ -1, -1, -1, 408, -1, -1, 411, 412, -1, -1,
+ -1, -1, -1, -1, -1, 5120, -1, -1, 523, 5124,
+ 525, 526, -1, 6135, -1, -1, -1, 6243, -1, -1,
+ -1, -1, 3724, 3725, -1, -1, -1, 442, -1, -1,
+ 4137, -1, -1, -1, -1, -1, 6324, 1794, -1, -1,
+ -1, -1, 1799, 1800, 5159, 5160, -1, -1, -1, -1,
+ -1, 447, 4159, 568, -1, 570, 571, 4164, -1, -1,
+ -1, 6349, 547, 4170, 6349, 6349, -1, 6349, 6349, -1,
+ -1, -1, 4179, 558, 559, 560, 561, 562, 563, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6243, -1, -1,
+ -1, -1, -1, -1, -1, 510, -1, -1, -1, 4206,
+ 4207, -1, -1, -1, -1, 4212, -1, 4214, -1, -1,
+ 1867, -1, 1869, 1870, -1, -1, -1, -1, -1, -1,
+ 4227, 6243, 4229, -1, -1, -1, -1, -1, -1, 6342,
+ 4237, 1888, -1, -1, -1, -1, -1, 1894, 1895, -1,
+ -1, -1, -1, 4250, -1, -1, -1, -1, -1, 6437,
+ -1, 547, 6437, 6437, -1, 6437, 6437, -1, -1, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, -1, -1,
+ -1, 4278, 568, -1, 570, -1, -1, 5933, -1, -1,
+ -1, -1, 6404, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4299, 4300, -1, -1, -1, -1, -1, -1,
+ -1, -1, 107, -1, -1, -1, -1, -1, -1, 1966,
+ -1, -1, -1, -1, 6427, -1, -1, 4324, -1, 1976,
+ 6433, -1, -1, -1, -1, -1, 131, -1, -1, -1,
+ -1, -1, -1, 6553, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4360, -1, -1, -1, -1, -1, -1,
+ -1, 166, 6550, -1, 131, 6550, 6550, -1, 6550, 6550,
+ -1, 6591, -1, 4380, -1, -1, 6553, -1, -1, -1,
+ -1, -1, 6602, -1, 6040, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4402, -1, -1, 4405, 166,
+ -1, -1, 2059, -1, -1, 2062, 2063, -1, -1, -1,
+ -1, -1, -1, -1, 6591, 4422, -1, -1, 4425, -1,
+ -1, -1, 227, -1, 4431, 6602, -1, 6553, -1, -1,
+ -1, 6553, 4439, 6546, 4441, -1, -1, 4444, 1033, 6561,
+ -1, 4448, 4449, 4450, 4451, 4452, -1, -1, 4455, 4456,
+ 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 263, -1,
+ 227, 4468, 4469, 4470, 1059, 6591, 4473, -1, -1, 6591,
+ -1, 4478, -1, -1, -1, 4482, 6602, 4484, -1, 4486,
+ 6602, -1, -1, 6605, -1, 107, -1, 4494, 6553, 294,
+ 4497, -1, 4499, -1, 299, -1, 263, 6553, -1, -1,
+ -1, -1, 4509, -1, -1, 4512, 4513, -1, -1, 131,
+ 4517, 4518, -1, -1, -1, 2172, -1, 4524, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6591, 4534, -1, -1,
+ 4537, 6553, 299, -1, 339, 6591, -1, 6602, -1, -1,
+ 4547, -1, -1, -1, 166, -1, 6602, -1, -1, -1,
+ -1, 80, -1, -1, 83, -1, -1, 5572, 87, 88,
+ 89, -1, 5577, -1, -1, 5580, 371, -1, -1, 6591,
+ -1, -1, 339, -1, -1, 104, -1, -1, -1, -1,
+ 6602, -1, -1, -1, -1, 114, -1, 4594, -1, -1,
+ -1, -1, 121, -1, -1, -1, 2253, -1, -1, -1,
+ -1, -1, -1, 4610, 371, 227, -1, 412, -1, -1,
+ -1, -1, 417, -1, -1, -1, -1, -1, 147, 4626,
+ -1, 426, 2279, -1, -1, -1, -1, -1, -1, 434,
+ -1, 4638, 2289, -1, 2291, -1, -1, 442, -1, -1,
+ 2297, 263, -1, -1, 2301, 412, -1, 414, -1, 454,
+ 417, -1, 4659, -1, -1, -1, -1, -1, 463, 426,
+ -1, -1, 467, -1, -1, -1, -1, 434, -1, -1,
+ -1, -1, 294, -1, -1, 442, -1, 299, -1, -1,
+ -1, 486, -1, -1, -1, -1, -1, 454, -1, -1,
+ -1, 2348, -1, -1, 2351, -1, 463, -1, -1, -1,
+ 467, -1, -1, 4710, -1, -1, -1, -1, 4715, 4716,
+ 4717, -1, -1, -1, -1, -1, 521, 339, -1, -1,
+ 525, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5746, 261, 4740, 4741, -1, -1, 266, -1, -1,
+ -1, -1, -1, -1, 5759, -1, -1, -1, -1, 371,
+ -1, -1, -1, -1, 521, -1, -1, -1, -1, 288,
+ 289, -1, 5777, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4779, -1, 303, 4782, 5791, -1, -1, -1,
+ 94, -1, -1, -1, 2441, 2442, 100, -1, -1, -1,
+ 412, 2448, 2449, -1, -1, 417, 1391, -1, -1, -1,
+ -1, 115, -1, -1, 426, -1, -1, 1402, -1, -1,
+ -1, -1, 434, 342, -1, -1, -1, -1, -1, -1,
+ 442, 2478, 1417, -1, -1, -1, -1, 356, -1, 915,
+ 359, 145, 454, -1, -1, 5850, -1, -1, 924, 4846,
+ -1, 463, -1, -1, -1, 467, -1, 4449, 4450, 4451,
+ 4452, -1, 938, 4455, 4456, 4457, 4458, 4459, 4460, 4461,
+ 4462, 4463, 4464, -1, 486, 4872, 4873, 73, -1, 4876,
+ -1, -1, -1, 79, -1, 4882, -1, 83, -1, -1,
+ 4482, -1, 4889, 4890, -1, -1, -1, 201, -1, -1,
+ 976, -1, 4899, -1, 208, -1, 982, 211, -1, 521,
+ -1, -1, -1, 525, 110, -1, -1, -1, 994, -1,
+ 4512, 4513, -1, -1, -1, -1, 4923, 4924, 447, -1,
+ 4927, 4928, 4929, -1, 238, -1, -1, -1, 80, -1,
+ -1, 83, 4939, -1, -1, 87, 88, 89, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 156, -1, 104, -1, -1, -1, -1, -1, 272, -1,
+ 4967, -1, 114, -1, -1, -1, -1, -1, -1, 121,
+ -1, -1, -1, 5988, -1, 5990, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4994, -1, -1,
+ -1, -1, -1, -1, -1, 147, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5020, -1, -1, -1, -1, 547, -1,
+ -1, 335, 228, -1, 5031, 339, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 349, -1, -1, -1, -1,
+ -1, 570, -1, -1, 358, -1, 1641, -1, -1, -1,
+ -1, -1, 5059, -1, -1, 5062, 370, -1, -1, 6074,
+ -1, -1, -1, 5070, 5071, -1, 5073, -1, -1, -1,
+ 5077, 5078, -1, -1, 6089, 5082, -1, -1, -1, 5086,
+ -1, -1, 5089, 5090, -1, -1, -1, 5094, -1, -1,
+ -1, -1, -1, 5100, 408, -1, -1, 411, 412, -1,
+ -1, -1, -1, -1, -1, 5112, -1, -1, -1, 261,
+ -1, -1, -1, 5120, 266, -1, -1, 5124, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 442, -1,
+ -1, -1, -1, -1, -1, -1, 288, 289, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5157, 303, -1, -1, -1, 92, -1, -1, -1, -1,
+ 97, -1, -1, -1, 5171, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1264, 1265,
+ -1, -1, 5189, -1, -1, -1, 392, -1, -1, -1,
+ 342, -1, -1, -1, -1, -1, 510, -1, 135, -1,
+ 5207, -1, -1, -1, 356, -1, -1, 359, -1, -1,
+ -1, 148, -1, 5220, -1, -1, -1, -1, -1, -1,
+ -1, 427, -1, -1, -1, -1, -1, 164, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5245, -1,
+ -1, -1, -1, -1, 4846, 182, -1, 92, -1, -1,
+ -1, -1, 97, -1, -1, 5262, -1, -1, -1, -1,
+ 5267, -1, -1, -1, -1, -1, -1, 5274, -1, 206,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 217, -1, -1, 5290, -1, -1, 2943, -1, -1, 226,
+ -1, -1, -1, -1, -1, 447, 5303, -1, -1, -1,
+ -1, -1, 239, 148, 149, -1, 133, 244, -1, 6324,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 164,
+ -1, -1, -1, -1, -1, -1, -1, 5334, -1, -1,
+ -1, -1, -1, 270, 6349, -1, -1, 182, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5360, -1, -1, -1, -1, -1, -1,
+ -1, 206, -1, -1, -1, 3022, 3023, -1, -1, 5376,
+ -1, -1, 217, -1, 5381, -1, -1, -1, -1, 316,
+ -1, 226, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5400, 239, 547, -1, -1, -1, 244,
+ 5407, -1, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, -1, 3070, -1, -1, -1, -1, 570, 356,
+ -1, -1, 6437, -1, -1, 270, -1, -1, -1, -1,
+ 2025, -1, -1, 3090, -1, -1, 3093, 3094, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5454, -1, 5456,
+ 295, -1, 389, 390, -1, -1, 393, -1, -1, -1,
+ 5062, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 316, -1, -1, -1, -1, 3133, -1, -1, -1,
+ -1, 94, -1, 420, -1, -1, 423, 100, -1, -1,
+ 5497, -1, 429, -1, -1, -1, -1, 80, -1, 436,
+ 83, -1, 439, -1, 87, 88, 89, -1, 5515, -1,
+ 5112, 5518, -1, -1, 5521, 5522, 5523, -1, -1, -1,
+ -1, 458, -1, -1, -1, -1, -1, -1, 465, -1,
+ -1, 114, 145, -1, 471, 6550, -1, 474, 121, 5546,
+ 5547, 478, -1, 5550, 389, 390, -1, -1, 393, 486,
+ -1, -1, -1, -1, -1, -1, 493, -1, 5565, -1,
+ 3217, -1, -1, -1, 147, 5572, -1, -1, -1, -1,
+ 5577, -1, 2167, 5580, 5581, 420, -1, -1, 423, -1,
+ -1, 5588, 519, 2178, 429, -1, -1, -1, 201, -1,
+ -1, 436, -1, -1, 439, 208, 131, -1, 211, 2194,
+ -1, -1, 5609, -1, 5611, -1, -1, -1, -1, -1,
+ 5617, -1, 5619, 458, -1, -1, 5623, -1, -1, -1,
+ 465, -1, -1, -1, -1, 238, 471, -1, -1, 474,
+ -1, 166, -1, 478, -1, -1, -1, -1, -1, 3296,
+ -1, -1, -1, -1, -1, -1, -1, 3304, 493, -1,
+ 3307, -1, 2247, -1, -1, -1, -1, 5664, 5665, 272,
+ -1, -1, 3319, -1, -1, -1, -1, -1, 5675, -1,
+ -1, -1, -1, 2268, 519, -1, -1, -1, 261, -1,
+ -1, -1, -1, 266, -1, -1, 2281, -1, -1, -1,
+ -1, 897, 227, -1, -1, 901, -1, -1, 2293, -1,
+ -1, -1, -1, -1, -1, 288, 289, 5714, 914, 915,
+ -1, -1, 5719, -1, -1, -1, 922, -1, 924, 925,
+ 303, -1, 335, -1, -1, -1, 339, -1, 263, -1,
+ -1, -1, 938, -1, -1, -1, 349, -1, 2333, 2334,
+ -1, -1, -1, -1, -1, 358, -1, -1, -1, -1,
+ -1, 957, -1, -1, -1, -1, -1, 370, -1, 342,
+ -1, -1, -1, -1, 299, -1, -1, -1, -1, -1,
+ 976, -1, -1, 356, 5781, -1, 982, 5784, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 994, -1,
+ -1, -1, 1878, -1, -1, 408, -1, -1, 411, 412,
+ 335, -1, -1, -1, 339, -1, 94, -1, -1, 5816,
+ -1, -1, 100, 5820, -1, 5822, -1, 1023, 80, -1,
+ -1, 83, -1, -1, -1, 87, 88, 89, -1, 442,
+ -1, 1037, 1038, 5840, -1, 370, 371, -1, 1044, 5846,
+ 1046, 1047, 104, 5850, -1, -1, -1, -1, -1, 5856,
+ 5857, -1, 114, -1, 1060, -1, -1, 145, -1, 121,
+ -1, -1, -1, -1, 447, -1, -1, -1, 3525, 3526,
+ 1076, -1, -1, 408, -1, -1, -1, 412, -1, -1,
+ -1, -1, 417, -1, -1, 147, 2481, -1, -1, -1,
+ -1, 426, -1, -1, -1, 5902, -1, 510, -1, 434,
+ 5907, 5908, -1, -1, -1, 5912, -1, 442, -1, -1,
+ 5917, 5918, 5919, 201, -1, -1, 5518, -1, -1, 454,
+ 208, -1, -1, 211, -1, -1, 5933, -1, 463, 1135,
+ -1, -1, 467, -1, 73, -1, -1, -1, -1, -1,
+ 79, -1, 3599, -1, 83, -1, 5953, -1, -1, -1,
+ 238, -1, -1, 5960, -1, -1, 5963, -1, -1, -1,
+ -1, -1, -1, -1, 547, -1, -1, -1, -1, 1175,
+ -1, 110, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 5988, -1, -1, 272, -1, 521, -1, -1, -1,
+ 1196, -1, -1, -1, -1, 1201, -1, -1, -1, 261,
+ -1, -1, 94, -1, 266, -1, -1, 1213, 100, -1,
+ -1, 6018, 6019, -1, -1, -1, -1, 156, -1, -1,
+ -1, -1, -1, -1, -1, -1, 288, 289, -1, -1,
+ -1, -1, -1, 6040, -1, -1, 2122, 6044, -1, -1,
+ -1, 303, -1, 6050, -1, -1, 6053, 335, -1, 6056,
+ -1, 339, -1, 145, -1, -1, -1, -1, 1264, 1265,
+ 6067, 349, -1, -1, -1, -1, 205, 6074, -1, -1,
+ 358, -1, -1, -1, 213, -1, 215, -1, 905, -1,
+ 342, -1, 370, -1, -1, 6092, -1, 914, -1, 228,
+ -1, -1, -1, -1, 356, 922, -1, 359, 925, -1,
+ -1, -1, -1, 6110, -1, -1, -1, -1, -1, 201,
+ -1, -1, -1, -1, -1, -1, 208, -1, -1, 211,
+ 408, -1, -1, 411, 412, -1, -1, 2213, 6135, -1,
+ 6137, -1, -1, -1, 3791, 2221, -1, 3794, -1, 3796,
+ -1, -1, -1, 2229, -1, -1, 238, -1, 80, -1,
+ -1, 83, -1, -1, 442, 87, 88, 89, -1, -1,
+ -1, -1, -1, 3820, 3821, -1, -1, -1, -1, 1375,
+ -1, -1, 104, -1, -1, 1381, -1, -1, -1, -1,
+ 272, -1, 114, -1, 6191, 447, 1392, -1, -1, 121,
+ 1396, -1, 1398, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1028, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1037, -1, -1, -1, 5816, 147, -1, 1044, -1, -1,
+ 1047, -1, 510, -1, 2310, -1, 6233, 6234, 6235, -1,
+ -1, -1, -1, -1, -1, 6242, 6243, -1, 5840, 6246,
+ -1, -1, -1, 335, 6251, -1, 6253, 339, 6255, -1,
+ -1, 2337, -1, 392, -1, -1, -1, 349, 6265, -1,
+ -1, -1, -1, -1, -1, -1, 358, -1, -1, -1,
+ -1, 6278, -1, -1, -1, -1, -1, -1, 370, -1,
+ -1, -1, -1, -1, 6291, 547, -1, -1, 427, -1,
+ -1, -1, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, -1, -1, -1, -1, 568, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 408, -1, -1, 411,
+ 412, -1, -1, -1, -1, 6332, -1, -1, -1, 261,
+ -1, -1, -1, -1, 266, 6342, -1, -1, -1, -1,
+ -1, -1, 1548, 6350, 6351, -1, -1, -1, -1, 6356,
+ 442, -1, 6359, -1, -1, -1, 288, 289, -1, -1,
+ -1, -1, 6369, -1, -1, -1, -1, -1, 6375, -1,
+ -1, 303, 6379, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6404, -1, -1,
+ -1, -1, -1, -1, -1, -1, 83, -1, -1, -1,
+ 342, -1, -1, -1, -1, -1, -1, -1, 510, -1,
+ 6427, 1627, -1, -1, 356, -1, 6433, 359, -1, -1,
+ -1, -1, -1, 110, -1, -1, -1, 1643, -1, -1,
+ -1, -1, -1, 6450, -1, -1, -1, -1, -1, -1,
+ -1, 1657, -1, -1, 6056, 1661, -1, -1, 6465, -1,
+ -1, 6468, -1, 6470, -1, -1, -1, -1, -1, -1,
+ -1, 131, -1, -1, -1, -1, 6483, -1, -1, 156,
+ -1, 6488, -1, -1, -1, 80, -1, -1, 83, -1,
+ -1, -1, 87, 88, 89, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 166, -1, -1, 104,
+ -1, -1, 6519, -1, -1, 447, -1, -1, -1, 114,
+ -1, -1, -1, 6530, -1, -1, 121, 6534, 205, -1,
+ -1, -1, -1, -1, -1, -1, 213, -1, 215, 6546,
+ -1, -1, -1, -1, -1, -1, 6553, -1, -1, -1,
+ 4207, 228, 147, -1, -1, -1, 94, -1, -1, 1386,
+ -1, -1, 100, -1, -1, 1392, -1, 227, -1, 1396,
+ -1, 1398, 3167, 4230, -1, -1, 6583, 6584, 3173, -1,
+ 6587, -1, -1, -1, 6591, 1791, -1, -1, -1, -1,
+ 6597, 6598, -1, 1799, 1800, 6602, -1, -1, -1, -1,
+ -1, -1, -1, 263, -1, -1, -1, 145, -1, -1,
+ -1, -1, -1, -1, -1, 547, -1, -1, -1, 3214,
+ -1, -1, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 1459, -1, 1461, 1462, 568, -1, -1, 299,
+ 6242, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1857, 1858, 1859, 167, -1, -1, -1, -1, -1,
+ -1, -1, -1, 201, -1, -1, 261, -1, -1, -1,
+ 208, 266, 1878, 211, -1, 335, 4333, -1, 80, 339,
+ -1, 83, -1, 4340, -1, 87, 88, 89, -1, -1,
+ -1, -1, -1, 288, 289, -1, -1, -1, -1, -1,
+ 238, 1907, 104, -1, -1, 218, -1, -1, 303, 1915,
+ 370, 371, 114, -1, -1, -1, -1, -1, 231, 121,
+ -1, 1927, -1, -1, 237, -1, -1, -1, -1, 242,
+ -1, -1, -1, -1, 272, 248, -1, -1, 251, -1,
+ -1, -1, 255, -1, -1, 147, -1, 342, 408, -1,
+ -1, -1, 412, -1, 4411, -1, -1, 417, 897, -1,
+ -1, 356, 901, -1, 359, -1, 426, 6369, -1, -1,
+ -1, 284, -1, -1, 434, -1, 915, -1, -1, -1,
+ -1, -1, 442, -1, -1, 924, -1, -1, -1, -1,
+ -1, 304, -1, -1, 454, -1, -1, 335, -1, 938,
+ -1, 339, -1, 463, -1, -1, -1, 467, -1, -1,
+ -1, 349, -1, -1, -1, -1, -1, 3412, 957, -1,
+ 358, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 370, -1, -1, -1, -1, 976, 351, -1,
+ -1, 354, -1, 982, -1, -1, -1, 360, -1, -1,
+ -1, -1, 447, -1, -1, 994, -1, -1, -1, 261,
+ -1, 521, -1, 6465, 266, -1, -1, -1, 6470, -1,
+ 408, -1, -1, 411, 412, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1023, -1, 288, 289, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1038,
+ -1, 303, -1, 416, 442, -1, -1, 1046, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2122, -1, -1, -1,
+ -1, 1060, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1076, -1, -1,
+ 342, -1, -1, -1, -1, -1, -1, -1, -1, 2155,
+ -1, -1, 547, -1, 356, 4612, -1, 359, 471, -1,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, -1,
+ -1, -1, 510, 568, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2190, -1, 499, -1, 3074, -1,
+ -1, -1, -1, -1, -1, -1, 1135, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2213, -1, -1,
+ 523, 3097, 525, 526, -1, 2221, -1, -1, -1, -1,
+ -1, -1, -1, 2229, -1, -1, -1, -1, 3623, 3115,
+ -1, -1, -1, -1, 1173, 3121, 1175, -1, 1177, 3125,
+ -1, -1, -1, 3638, -1, 447, -1, -1, 3643, -1,
+ -1, -1, 565, -1, -1, 568, 569, 1196, 571, 4716,
+ -1, -1, 1201, -1, -1, 3151, -1, -1, -1, -1,
+ -1, -1, -1, 80, 1213, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, 4741, -1, -1, -1, -1, -1,
+ -1, 4748, -1, -1, -1, -1, -1, 104, -1, 3185,
+ 2306, 2307, 4759, 2309, 2310, -1, -1, 114, -1, -1,
+ -1, -1, -1, -1, 121, 2321, -1, 2323, 2324, 3205,
+ -1, -1, -1, -1, -1, 1264, 1265, -1, -1, -1,
+ 2336, 2337, -1, -1, -1, -1, -1, -1, -1, -1,
+ 147, -1, -1, -1, -1, 547, -1, -1, -1, -1,
+ -1, 3237, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, -1, -1, -1, -1, 568, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3261, -1, -1, 4835, 4836,
+ -1, 3267, -1, -1, -1, -1, 2392, -1, 3274, 2395,
+ 2396, -1, -1, -1, -1, 3281, -1, -1, 3284, 80,
+ -1, -1, 83, -1, 3290, -1, 87, 88, 89, 94,
+ 1349, 1350, -1, -1, -1, 100, -1, -1, -1, -1,
+ 897, -1, -1, 104, 3310, -1, -1, -1, -1, -1,
+ 3316, -1, -1, 114, -1, -1, 1375, 3323, 915, -1,
+ 121, -1, 1381, -1, -1, -1, -1, 924, -1, -1,
+ 3336, -1, -1, -1, 261, -1, -1, -1, -1, 266,
+ 145, 938, -1, 3349, -1, -1, 147, 4924, -1, -1,
+ -1, -1, -1, -1, 3360, -1, -1, -1, -1, -1,
+ 957, 288, 289, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2501, 303, -1, -1, 976,
+ -1, -1, -1, -1, -1, 982, -1, -1, -1, -1,
+ -1, 4968, 4969, 4970, 4971, 4972, 201, 994, -1, -1,
+ -1, -1, -1, 208, 80, -1, 211, 83, -1, -1,
+ -1, 87, 88, 89, 4991, 342, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1023, 3942, 104, 356,
+ -1, -1, 359, 238, -1, 3950, -1, -1, 114, -1,
+ -1, 1038, -1, -1, -1, 121, -1, -1, -1, 1046,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 261, -1, -1, 1060, -1, 266, -1, 272, -1, -1,
+ -1, 147, -1, -1, -1, -1, -1, -1, -1, 1076,
+ -1, -1, -1, -1, -1, -1, -1, 288, 289, 1548,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 303, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2262, -1, -1, 2265, -1,
+ 447, -1, -1, -1, -1, -1, -1, -1, -1, 4044,
+ 335, 4046, -1, -1, 339, -1, -1, -1, 1135, -1,
+ -1, 342, -1, -1, 349, -1, 94, -1, -1, -1,
+ -1, -1, 100, 358, -1, 356, -1, -1, 359, 2306,
+ 2307, -1, -1, -1, -1, 370, -1, 5144, 1627, -1,
+ -1, -1, -1, -1, 2321, -1, 1173, 2324, 1175, -1,
+ 1177, -1, -1, -1, 1643, 261, -1, -1, -1, -1,
+ 266, -1, -1, -1, 5171, -1, -1, 145, 1657, -1,
+ -1, 3607, 1661, 408, 1201, -1, 411, 412, -1, -1,
+ -1, -1, 288, 289, -1, -1, 1213, -1, -1, 3625,
+ 547, -1, 4137, -1, -1, -1, 3632, 303, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 442, -1, -1,
+ -1, 568, -1, -1, -1, 2392, 447, -1, 2395, 2396,
+ -1, 5228, -1, 201, -1, -1, -1, 5234, -1, -1,
+ 208, 5238, -1, 211, 4179, -1, 342, 1264, 1265, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 356, -1, -1, 359, -1, -1, -1, -1, 5265, 5266,
+ 238, -1, -1, 5270, 5271, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 510, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 272, -1, -1, -1, -1, -1,
+ -1, -1, 1791, -1, -1, -1, -1, -1, -1, -1,
+ 1799, 1800, -1, -1, -1, -1, 547, -1, -1, -1,
+ -1, -1, 1349, 1350, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 4278, -1, -1, -1, 568, -1, -1,
+ -1, 447, -1, -1, -1, -1, -1, -1, 1375, -1,
+ -1, -1, -1, -1, 1381, -1, -1, 335, -1, -1,
+ -1, 339, -1, -1, -1, -1, -1, -1, 1857, 1858,
+ 1859, 349, -1, -1, -1, -1, -1, -1, -1, 4324,
+ 358, -1, -1, -1, -1, -1, -1, -1, -1, 1878,
+ -1, -1, 370, -1, -1, -1, -1, -1, 80, -1,
+ -1, 83, -1, -1, -1, 87, 88, 89, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1907, -1,
+ -1, -1, 104, -1, -1, -1, 1915, 2983, -1, -1,
+ 408, -1, 114, 411, 412, -1, -1, -1, 1927, 121,
+ -1, 547, -1, -1, -1, -1, -1, -1, 1937, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, -1, -1,
+ 80, -1, 568, 83, 442, 147, -1, 87, 88, 89,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4425, -1, -1, -1, 104, -1, -1, -1, -1, 1978,
+ -1, -1, -1, -1, 114, -1, 3052, -1, 3054, -1,
+ 3936, 121, -1, 4448, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3074, -1,
+ -1, 1548, -1, -1, -1, -1, -1, 147, 4473, -1,
+ -1, -1, 510, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3097, -1, -1, -1, 2034, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3115,
+ -1, -1, 2051, -1, 3120, 3121, -1, -1, -1, 3125,
+ -1, -1, -1, -1, -1, -1, -1, 3133, -1, 261,
+ -1, -1, -1, -1, 266, -1, 5593, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3151, -1, -1, -1, 4035,
+ 1627, -1, -1, -1, -1, -1, 288, 289, -1, -1,
+ -1, -1, 3168, -1, 3170, 3171, 1643, -1, -1, -1,
+ -1, 303, -1, -1, -1, -1, -1, -1, -1, 3185,
+ 1657, -1, -1, 2122, 1661, -1, -1, -1, -1, -1,
+ -1, 261, -1, -1, -1, -1, 266, -1, -1, 3205,
+ 3206, -1, -1, -1, -1, -1, -1, 5664, -1, -1,
+ 342, -1, -1, -1, -1, -1, 2155, -1, 288, 289,
+ -1, -1, -1, -1, 356, -1, -1, 359, -1, -1,
+ 3236, 3237, -1, 303, 3240, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2190, -1, -1, -1, 3261, -1, 3263, -1, -1,
+ -1, 3267, -1, -1, -1, -1, -1, -1, 3274, -1,
+ -1, -1, 342, 4159, 2213, 3281, -1, -1, 3284, -1,
+ -1, -1, 2221, -1, 3290, -1, 356, -1, -1, 359,
+ 2229, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3310, -1, -1, -1, -1, -1,
+ 3316, -1, -1, -1, 1791, 447, -1, 3323, -1, -1,
+ -1, -1, 1799, 1800, -1, -1, 80, -1, -1, 83,
+ 3336, -1, -1, 87, 88, 89, -1, -1, -1, -1,
+ -1, -1, -1, 3349, -1, -1, -1, -1, 3354, -1,
+ 104, -1, -1, -1, 3360, -1, -1, -1, -1, -1,
+ 114, -1, -1, -1, -1, -1, -1, 121, -1, -1,
+ 2309, 2310, -1, -1, -1, -1, -1, 447, -1, -1,
+ 1857, -1, -1, -1, 2323, -1, -1, -1, -1, -1,
+ 92, -1, -1, 147, -1, 97, -1, 2336, 2337, -1,
+ -1, 1878, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3420, 547, -1, -1, -1, -1,
+ -1, -1, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, -1, 135, -1, -1, 568, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 148, 149, -1, -1,
+ 1927, -1, -1, -1, -1, -1, -1, -1, 160, -1,
+ 1937, -1, 164, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4360, -1, 5933, 547, -1, -1,
+ 182, 4876, -1, -1, -1, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 4380, -1, -1, -1, 568, -1,
+ -1, 1978, -1, -1, 206, -1, -1, 261, -1, -1,
+ -1, -1, 266, -1, -1, 217, -1, -1, -1, 4405,
+ -1, -1, 167, -1, 226, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 288, 289, -1, 239, 3165, -1,
+ -1, 3168, 244, 3170, 3171, -1, -1, -1, -1, 303,
+ -1, -1, -1, -1, -1, -1, -1, 2034, -1, -1,
+ -1, -1, 2501, -1, -1, -1, -1, -1, 270, -1,
+ -1, -1, -1, 218, 2051, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6040, -1, -1, 231, -1, 342, -1,
+ -1, -1, 237, 295, -1, -1, -1, 242, -1, -1,
+ -1, 3607, 356, 248, -1, 359, 251, -1, -1, -1,
+ 255, -1, -1, -1, 316, -1, -1, -1, -1, 3625,
+ -1, -1, -1, -1, -1, -1, 3632, -1, -1, -1,
+ -1, -1, -1, 3639, -1, 3641, 3642, -1, -1, 284,
+ -1, -1, -1, -1, -1, 2122, -1, -1, -1, -1,
+ -1, -1, -1, -1, 356, -1, -1, -1, -1, 304,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6127, -1, -1, -1, -1, -1, -1, 379, 2155, -1,
+ -1, -1, -1, -1, -1, -1, -1, 389, 390, -1,
+ -1, 393, -1, 447, -1, -1, -1, 3703, -1, -1,
+ -1, -1, -1, 3709, -1, -1, 351, -1, -1, 354,
+ -1, -1, -1, 2190, -1, 360, -1, -1, 420, -1,
+ -1, 423, -1, -1, -1, 427, -1, 429, -1, -1,
+ -1, -1, -1, -1, 436, -1, 2213, 439, -1, -1,
+ -1, -1, -1, -1, 2221, -1, -1, -1, -1, -1,
+ -1, -1, 2229, -1, -1, -1, 458, -1, -1, -1,
+ -1, -1, -1, 465, -1, -1, -1, -1, -1, 471,
+ -1, 416, 474, 4659, -1, -1, 478, -1, -1, -1,
+ -1, -1, -1, -1, 486, -1, 488, -1, -1, -1,
+ 3796, 493, -1, 547, -1, -1, -1, -1, -1, -1,
+ -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ -1, -1, 5207, -1, 568, -1, -1, 519, -1, -1,
+ -1, -1, -1, -1, -1, -1, 471, 3454, -1, -1,
+ -1, -1, 2309, 2310, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2323, -1, -1, -1,
+ 5245, -1, 906, 907, 499, -1, 910, -1, -1, 2336,
+ 2337, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5267, -1, -1, -1, 930, -1, 523, -1,
+ 525, 526, -1, 937, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4779, -1, -1, 4782, -1, -1, -1,
+ -1, -1, -1, 3909, 3910, -1, -1, -1, -1, -1,
+ -1, -1, 966, 5, 968, -1, -1, 971, -1, -1,
+ 565, -1, -1, 568, 569, -1, 571, -1, -1, -1,
+ 3936, 985, 24, 3939, -1, -1, -1, 991, -1, 5334,
+ -1, -1, 34, 35, -1, -1, -1, -1, -1, 41,
+ 42, -1, -1, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, -1, -1,
+ -1, 73, -1, 75, 76, -1, -1, -1, -1, 81,
+ -1, -1, -1, -1, -1, -1, 4882, -1, -1, -1,
+ -1, -1, -1, -1, 167, 4011, 4012, 4013, -1, 3636,
+ -1, -1, 3639, 4899, 3641, 3642, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2501, -1, -1, -1, -1, 4035,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2983, -1, 138, -1, 4054, -1,
+ -1, -1, -1, -1, -1, 218, -1, -1, -1, -1,
+ -1, 5456, -1, -1, -1, -1, 4072, -1, 231, -1,
+ -1, -1, -1, -1, 237, -1, -1, -1, -1, 242,
+ -1, -1, -1, -1, -1, 248, -1, -1, 251, -1,
+ -1, -1, 255, -1, -1, -1, 6553, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4994, -1,
+ -1, -1, -1, 3052, -1, 3054, -1, -1, -1, -1,
+ -1, 284, -1, 215, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6591, 3074, -1, -1, -1, -1,
+ -1, 304, -1, 235, -1, 6602, -1, -1, -1, -1,
+ -1, -1, -1, 4159, -1, 3782, -1, -1, 3097, -1,
+ -1, -1, -1, -1, -1, -1, 258, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3115, -1, -1, -1,
+ -1, 3120, 3121, -1, -1, -1, 3125, -1, 351, -1,
+ 282, 354, -1, -1, 3133, -1, -1, 360, -1, -1,
+ 4206, -1, -1, -1, -1, -1, 4212, -1, 4214, -1,
+ -1, -1, 3151, -1, -1, 3842, -1, -1, -1, -1,
+ -1, 4227, -1, 4229, -1, -1, -1, 319, -1, -1,
+ 322, -1, -1, 92, -1, -1, -1, -1, 97, -1,
+ -1, -1, -1, -1, -1, -1, 3185, -1, -1, -1,
+ -1, -1, 344, 416, -1, -1, -1, -1, -1, 3198,
+ -1, -1, -1, 1317, 1318, -1, 3205, 3206, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, 916, -1, -1, -1, -1, 148,
+ -1, -1, -1, 4299, -1, -1, 928, 3236, 3237, -1,
+ -1, 3240, -1, -1, -1, 164, -1, 939, 471, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3261, 182, 3263, -1, 958, -1, 3267, -1,
+ -1, -1, 964, -1, 1388, 3274, 499, -1, -1, -1,
+ 3279, 433, 3281, -1, -1, 3284, -1, 206, -1, 1403,
+ -1, 3290, -1, -1, 4360, -1, -1, -1, 217, -1,
+ 523, -1, 525, 526, -1, -1, -1, 226, -1, -1,
+ -1, 3310, -1, -1, 4380, -1, 5262, 3316, 1432, 1433,
+ 239, -1, -1, -1, 3323, 244, -1, -1, 5274, -1,
+ -1, 483, 251, -1, -1, -1, 4402, 3336, -1, 4405,
+ -1, -1, 565, 1457, -1, 568, 569, 499, 571, -1,
+ 3349, 270, -1, -1, -1, 3354, -1, -1, -1, -1,
+ -1, 3360, 514, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 544, -1, -1, -1, -1, 316, -1, -1,
+ -1, 5856, -1, -1, -1, 557, 558, 559, 560, 561,
+ 562, -1, -1, 565, 566, 567, 568, -1, 4484, -1,
+ 572, 3420, -1, -1, -1, -1, -1, -1, -1, 1543,
+ 1544, -1, -1, -1, -1, -1, -1, 356, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5902, -1, -1,
+ 369, -1, 5907, 5908, -1, -1, -1, -1, -1, -1,
+ 379, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 389, 390, -1, -1, 393, -1, -1, -1, -1, -1,
+ 1172, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1191,
+ -1, 420, -1, -1, 423, -1, -1, -1, 427, -1,
+ 429, -1, -1, -1, -1, -1, -1, 436, -1, -1,
+ 439, -1, 1214, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3074, -1, 458,
+ -1, -1, -1, -1, -1, -1, 465, -1, -1, -1,
+ -1, 5497, 471, -1, -1, 474, -1, -1, -1, 478,
+ 3097, -1, -1, -1, 6019, -1, -1, 486, -1, 488,
+ -1, -1, -1, -1, 493, -1, -1, -1, 3115, -1,
+ -1, -1, -1, 3120, 3121, -1, -1, 506, 3125, -1,
+ -1, -1, -1, 4659, -1, -1, 3133, -1, -1, -1,
+ 519, -1, -1, -1, -1, -1, -1, -1, 3607, -1,
+ -1, -1, -1, -1, 3151, -1, -1, -1, -1, -1,
+ 1312, -1, -1, -1, -1, -1, 3625, -1, -1, -1,
+ -1, -1, -1, 3632, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4710, -1, -1, -1, 3185, 4715,
+ -1, 4717, -1, -1, -1, -1, 80, -1, -1, 83,
+ -1, 3198, -1, 87, 88, 89, -1, -1, 3205, 3206,
+ -1, 5617, -1, 5619, 4740, -1, -1, -1, -1, -1,
+ 104, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 114, -1, -1, -1, -1, -1, -1, 121, -1, 3236,
+ 3237, -1, -1, 3240, 3703, -1, -1, -1, -1, -1,
+ 3709, -1, -1, 4779, -1, -1, 4782, -1, -1, -1,
+ -1, -1, -1, 147, 3261, -1, 3263, -1, -1, -1,
+ 3267, -1, -1, -1, 1426, -1, -1, 3274, -1, -1,
+ -1, -1, 3279, -1, 3281, -1, -1, 3284, -1, -1,
+ -1, -1, -1, 3290, -1, -1, -1, -1, -1, -1,
+ -1, 1453, 1454, 1455, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3310, -1, -1, -1, -1, -1, 3316,
+ -1, -1, -1, -1, -1, -1, 3323, -1, -1, -1,
+ -1, 6246, -1, -1, -1, -1, -1, 3796, -1, 3336,
+ -1, -1, 80, -1, -1, 83, 4872, 4873, -1, 87,
+ 88, 89, 3349, -1, -1, -1, 4882, 3354, -1, -1,
+ -1, -1, -1, 3360, -1, -1, 104, -1, -1, -1,
+ -1, -1, -1, 4899, -1, -1, 114, 261, -1, -1,
+ -1, -1, 266, 121, -1, -1, -1, 4534, -1, -1,
+ 4537, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 288, 289, -1, 1981, -1, 147,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 303,
+ -1, -1, -1, 3420, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2006, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4967, -1, -1, 1033, -1, -1, -1, -1, -1,
+ 3909, 3910, -1, -1, -1, -1, -1, -1, 342, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4994, -1,
+ 1059, -1, 356, -1, 1626, 359, -1, 3936, -1, -1,
+ 3939, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4638, -1, -1, -1, 1647, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1656, 2079, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 261, -1, -1, -1, -1, 266, -1,
+ -1, -1, -1, -1, 2108, 2109, 2110, 2111, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 288, 289, 4011, 4012, 4013, -1, -1, -1, -1, -1,
+ -1, -1, -1, 447, -1, 303, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4035, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4054, -1, -1, -1, 2173,
+ 2174, -1, -1, -1, 342, -1, -1, -1, -1, -1,
+ 3607, -1, -1, 4072, -1, 2189, -1, -1, 356, -1,
+ -1, 359, -1, -1, -1, -1, -1, -1, 3625, -1,
+ -1, -1, -1, -1, -1, 3632, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2223,
+ 2224, 2225, 2226, -1, 1806, -1, -1, -1, -1, -1,
+ -1, -1, -1, 547, -1, -1, -1, -1, -1, -1,
+ 110, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ -1, -1, -1, -1, 568, -1, -1, -1, -1, -1,
+ -1, -1, -1, 133, 5220, -1, 1848, -1, -1, -1,
+ 4159, -1, -1, -1, -1, -1, 3703, -1, -1, 447,
+ -1, -1, 3709, -1, -1, -1, 156, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5262, -1, -1, -1,
+ -1, -1, 4889, 4890, -1, -1, -1, 4206, 5274, -1,
+ -1, -1, -1, 4212, -1, 4214, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 205, 2340, -1, 4227, -1,
+ 4229, -1, 2346, 213, -1, 215, -1, 5303, -1, -1,
+ -1, -1, -1, -1, 1373, -1, -1, -1, 228, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3796,
+ -1, -1, 1391, -1, -1, -1, -1, -1, -1, 547,
+ -1, -1, -1, 1402, -1, -1, -1, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, -1, -1, 1417, -1,
+ 568, -1, -1, -1, -1, -1, 80, -1, -1, 83,
+ 4299, -1, 1994, 87, 88, 89, -1, -1, -1, -1,
+ -1, 2003, -1, -1, -1, 5381, -1, -1, -1, 6265,
+ 104, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 114, -1, -1, -1, 5400, -1, -1, 121, -1, 2031,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4360, 2054, 147, -1, 2057, -1, -1, -1, -1,
+ -1, -1, 3909, 3910, -1, -1, -1, -1, -1, 1508,
+ -1, 4380, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3936,
+ -1, -1, 3939, 4402, -1, -1, 4405, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2112, -1, -1, -1, -1, 2539, -1, -1, -1, -1,
+ -1, 5497, -1, 5120, 2126, -1, -1, 5124, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2154, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2165, 4011, 4012, 4013, 261, -1, -1,
+ -1, -1, 266, -1, -1, 4484, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4035, -1,
+ -1, -1, -1, -1, 288, 289, -1, -1, -1, -1,
+ -1, -1, 1641, -1, -1, 2207, -1, 4054, -1, 303,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4072, -1, -1, -1, -1,
+ 2232, -1, -1, -1, -1, -1, -1, 2239, -1, -1,
+ -1, 5617, -1, 5619, -1, -1, -1, -1, 342, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 356, -1, -1, 359, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5665,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5675,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4159, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 80, -1, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, -1, -1, -1, -1, 5714, -1,
+ -1, -1, -1, 5719, -1, -1, -1, 104, -1, -1,
+ 4659, -1, -1, 447, -1, 2357, -1, 114, -1, 4206,
+ -1, -1, -1, -1, 121, 4212, -1, 4214, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5376,
+ 4227, -1, 4229, -1, -1, -1, -1, -1, -1, -1,
+ 147, -1, -1, -1, -1, -1, 2398, 2399, -1, -1,
+ -1, 4710, -1, -1, -1, -1, 4715, -1, 4717, -1,
+ 5407, -1, -1, -1, -1, -1, 2418, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4740, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4299, 547, -1, -1, -1, -1, -1, -1,
+ -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 4779, -1, -1, 4782, 568, -1, -1, -1, -1, -1,
+ -1, -1, 1921, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 261, -1, -1, -1, -1, 266,
+ -1, -1, -1, 4360, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 288, 289, 4380, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5919, -1, -1, 303, -1, -1, 1988,
+ -1, -1, -1, -1, -1, 4402, -1, 5933, 4405, -1,
+ -1, -1, -1, 4872, 4873, 2989, -1, -1, 5565, -1,
+ -1, -1, -1, 4882, -1, 5572, -1, -1, -1, -1,
+ 5577, -1, -1, 5580, 5581, 342, 2025, 5963, -1, -1,
+ 4899, -1, -1, -1, -1, -1, -1, -1, -1, 356,
+ -1, -1, 359, -1, -1, -1, -1, 897, -1, -1,
+ -1, -1, 5609, -1, -1, 905, -1, -1, -1, 2058,
+ -1, -1, -1, -1, 914, -1, 5623, -1, -1, -1,
+ -1, -1, 922, -1, -1, 925, -1, 4484, -1, -1,
+ -1, -1, 80, -1, -1, 83, -1, -1, -1, 87,
+ 88, 89, -1, -1, -1, -1, -1, -1, 4967, -1,
+ -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 114, -1, 5675, -1,
+ -1, -1, -1, 121, -1, 4994, -1, -1, -1, -1,
+ 447, -1, -1, -1, -1, -1, -1, -1, -1, 2138,
+ 2139, 2140, -1, -1, -1, -1, -1, -1, -1, 147,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5719, -1, -1, -1, -1, -1, 2167, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1028, 2178,
+ -1, -1, -1, 1033, -1, -1, -1, 1037, -1, -1,
+ 3174, -1, -1, -1, 1044, 2194, -1, 1047, -1, 6135,
+ -1, 6137, -1, -1, -1, -1, -1, -1, -1, 1059,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5781, -1, -1, -1, -1, -1,
+ 547, -1, -1, -1, -1, -1, -1, -1, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, -1, 2247, -1,
+ -1, 568, 4659, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 261, -1, -1, -1, -1, 266, 2268,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2281, -1, -1, -1, -1, -1, -1, -1,
+ 288, 289, -1, 5850, 2293, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4710, -1, 303, -1, 6243, 4715, -1,
+ 4717, -1, -1, -1, -1, -1, 1166, 1167, 3302, -1,
+ -1, 3305, -1, 1173, -1, -1, -1, 1177, -1, 6265,
+ -1, -1, -1, 4740, 2333, 2334, -1, -1, -1, -1,
+ -1, -1, 6278, -1, 342, -1, -1, -1, -1, -1,
+ -1, 5220, -1, 1203, -1, 6291, -1, -1, 356, -1,
+ -1, 359, -1, -1, 2926, -1, -1, -1, -1, -1,
+ -1, -1, 4779, -1, -1, 4782, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2952, -1, -1, 5262, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5960, -1, 5274, -1, -1, 3392, -1,
+ -1, -1, -1, -1, 6350, 6351, -1, -1, -1, -1,
+ -1, 3405, 2984, -1, -1, -1, -1, -1, -1, 3413,
+ -1, 5988, -1, -1, 5303, -1, -1, -1, -1, -1,
+ 3002, 3003, -1, -1, -1, -1, -1, -1, -1, 447,
+ -1, -1, -1, -1, -1, 2454, -1, -1, 2457, -1,
+ -1, -1, -1, -1, -1, 4872, 4873, -1, 6404, 3453,
+ -1, -1, -1, -1, 3036, 4882, -1, -1, -1, -1,
+ -1, -1, 2481, -1, -1, -1, -1, -1, -1, -1,
+ 3474, -1, 4899, -1, -1, -1, 6053, -1, -1, 1349,
+ 1350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5381, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1373, 1374, 1375, -1, -1, -1, -1,
+ -1, 5400, -1, -1, -1, 6092, 1386, -1, -1, -1,
+ -1, 1391, 1392, -1, -1, -1, 1396, -1, 1398, 547,
+ -1, -1, 1402, -1, 3538, -1, 3540, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, -1, 1417, -1, -1,
+ 568, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4994, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1459,
+ -1, 1461, 1462, -1, -1, -1, -1, 6553, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5497, -1,
+ -1, -1, -1, -1, 6191, -1, -1, -1, -1, 80,
+ -1, -1, 83, -1, -1, -1, 87, 88, 89, -1,
+ -1, -1, -1, 3637, -1, 6591, 3218, -1, 1508, -1,
+ 3644, 6597, 6598, 104, -1, -1, 6602, -1, -1, -1,
+ -1, 3233, -1, 114, -1, -1, -1, -1, -1, 80,
+ 121, -1, 83, -1, -1, -1, 87, 88, 89, -1,
+ 3252, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 104, -1, -1, 147, -1, -1, -1,
+ -1, -1, -1, 114, -1, -1, -1, -1, -1, -1,
+ 121, 6278, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1587, -1, -1,
+ -1, -1, -1, -1, -1, -1, 147, -1, 5617, -1,
+ 5619, -1, -1, -1, -1, -1, 80, -1, -1, 83,
+ -1, -1, -1, 87, 88, 89, -1, -1, 3330, 3331,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 104, -1, -1, -1, -1, 6342, -1, -1, -1, -1,
+ 114, 1641, -1, 6350, 6351, -1, 5665, 121, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5220, -1, -1, -1, -1, -1, -1,
+ 261, -1, 1672, 147, -1, 266, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5714, -1, 288, 289, -1,
+ -1, -1, 1702, -1, -1, 5262, -1, -1, -1, -1,
+ 261, -1, 303, -1, -1, 266, -1, 5274, -1, 3431,
+ 6427, -1, -1, -1, -1, -1, 6433, -1, -1, -1,
+ 1730, 1731, 1732, -1, 1734, -1, -1, 288, 289, -1,
+ -1, -1, -1, 6450, -1, -1, 5303, -1, -1, -1,
+ -1, 342, 303, -1, 1754, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 356, -1, -1, 359, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2930, -1, -1, -1, -1, -1, 261, -1, -1,
+ -1, 342, 266, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 356, -1, -1, 359, -1,
+ -1, 3945, 3946, -1, 288, 289, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5381, -1, -1, 6534, -1, 303,
+ -1, -1, 1832, -1, -1, -1, 1836, 1837, -1, 6546,
+ -1, -1, -1, 5400, -1, -1, -1, -1, -1, -1,
+ -1, 1851, -1, -1, -1, -1, 447, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 342, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6584, -1, -1,
+ 6587, -1, 356, -1, -1, 359, -1, -1, -1, -1,
+ 6597, 6598, -1, -1, -1, -1, 447, -1, -1, -1,
+ 5919, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5933, -1, -1, -1, -1, -1,
+ -1, 1921, -1, -1, -1, -1, -1, 1927, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1937, -1, -1,
+ 5497, -1, -1, -1, 5963, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3104, 547, -1, -1, 3108,
+ 3109, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 447, -1, -1, -1, 568, 1978, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1988, -1,
+ -1, -1, -1, -1, -1, -1, 547, -1, -1, -1,
+ -1, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, -1, -1, -1, -1, 568, 3167, -1,
+ -1, -1, -1, -1, 3173, 2025, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2034, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4181, -1, -1,
+ -1, 2051, -1, -1, -1, -1, -1, -1, 2058, -1,
+ 5617, -1, 5619, 3775, -1, 3214, -1, -1, 80, -1,
+ -1, 83, -1, 547, -1, 87, 88, 89, -1, -1,
+ -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ -1, -1, 104, 3805, 568, -1, -1, -1, -1, -1,
+ -1, -1, 114, -1, -1, -1, -1, -1, 5665, 121,
+ -1, -1, -1, -1, -1, -1, 6135, -1, 6137, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 147, -1, -1, 2138, 2139,
+ 2140, -1, 80, -1, -1, 83, -1, -1, -1, 87,
+ 88, 89, -1, -1, -1, -1, -1, 5714, -1, -1,
+ -1, -1, -1, -1, -1, -1, 104, 2167, -1, -1,
+ -1, -1, -1, -1, -1, -1, 114, -1, 2178, -1,
+ -1, -1, -1, 121, -1, -1, -1, -1, -1, -1,
+ 2190, -1, -1, -1, 2194, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 147,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6243, -1, -1, -1, -1, 4363,
+ -1, 3380, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6265, 2247, -1, 261,
+ -1, -1, -1, -1, 266, -1, -1, -1, -1, -1,
+ -1, -1, 2262, 3412, -1, 2265, -1, -1, 2268, -1,
+ -1, -1, 6291, -1, -1, 2275, 288, 289, -1, 80,
+ -1, 2281, 83, -1, -1, -1, 87, 88, 89, -1,
+ -1, 303, -1, 2293, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 104, -1, -1, 2306, 2307, -1, -1,
+ -1, -1, -1, 114, -1, -1, -1, -1, -1, -1,
+ 121, 2321, -1, 261, 2324, -1, -1, -1, 266, -1,
+ 342, -1, -1, 2333, 2334, -1, -1, 3486, -1, -1,
+ 4052, 3490, -1, -1, 356, -1, 147, 359, -1, -1,
+ 288, 289, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5919, -1, -1, 303, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5933, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6404, -1, -1, -1, -1,
+ -1, -1, 2392, -1, -1, 2395, 2396, -1, -1, -1,
+ -1, -1, -1, -1, 342, -1, 5963, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 356, -1,
+ -1, 359, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2432, 2433, -1, 447, -1, -1, 2438, 2439,
+ -1, -1, -1, -1, -1, 2445, 2446, 2447, -1, -1,
+ 2450, -1, 2452, -1, 2454, 2455, 2456, 2457, 2458, 2459,
+ 261, 2461, -1, 2463, 2464, 266, -1, 2467, -1, -1,
+ -1, -1, -1, -1, 3623, -1, -1, -1, -1, -1,
+ -1, 2481, 2482, 2483, 2484, -1, -1, 288, 289, 3638,
+ -1, -1, -1, -1, 3643, -1, -1, -1, -1, 2499,
+ -1, 2501, 303, -1, -1, -1, 4218, 4219, 4220, 447,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4235, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6553, 547, -1, -1, -1, -1,
+ -1, 342, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, -1, -1, -1, 356, 568, -1, 359, 4271,
+ 4272, -1, -1, -1, 4276, -1, -1, -1, -1, -1,
+ -1, -1, 6591, -1, -1, -1, -1, -1, 6135, -1,
+ 6137, -1, -1, 6602, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 547,
+ -1, -1, -1, -1, -1, -1, -1, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, -1, -1, -1, -1,
+ 568, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2642, -1, -1, -1, 447, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2682, -1, -1, -1, 6243, -1, 4400, -1,
+ -1, 4403, -1, -1, -1, -1, 4830, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6265, -1,
+ 4844, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2733, 6291, 3884, -1, -1, 3887, -1,
+ 3889, -1, -1, -1, -1, 3894, 547, -1, -1, -1,
+ -1, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, -1, -1, -1, -1, 568, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3942, -1, -1, -1, -1, -1, -1,
+ -1, 3950, -1, -1, -1, -1, -1, -1, -1, 5,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4531,
+ 4532, 4533, -1, -1, -1, -1, 3975, -1, 24, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 34, 35,
+ -1, -1, -1, -1, -1, 41, 42, 6404, -1, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, -1, -1, -1, 73, -1, 75,
+ 76, -1, -1, -1, -1, 81, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4044, -1, 4046, -1, -1,
+ -1, -1, -1, -1, 5, -1, -1, 2907, 2908, 2909,
+ 2910, 2911, 2912, 2913, 2914, 2915, -1, 2917, -1, -1,
+ -1, -1, -1, 24, -1, -1, -1, 2927, -1, -1,
+ 2930, -1, -1, 34, 35, -1, -1, -1, 39, -1,
+ 41, 42, 138, -1, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, -1,
+ 71, -1, 73, -1, 75, 76, -1, -1, -1, -1,
+ 81, -1, -1, -1, -1, -1, 2986, -1, 4137, -1,
+ 2990, -1, -1, 2993, -1, 2995, 6553, -1, 2998, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3013, -1, 4164, -1, -1, -1, 215,
+ -1, 4170, 3022, 3023, -1, 94, -1, -1, -1, -1,
+ 4179, 100, -1, -1, 6591, -1, -1, 138, 107, 235,
+ -1, -1, -1, -1, -1, 6602, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4207, -1,
+ 129, -1, 258, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 145, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 282, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3104, -1, -1, -1, 3108, 3109,
+ -1, 180, -1, -1, 215, -1, -1, -1, -1, -1,
+ 3120, -1, -1, 319, -1, -1, 322, -1, -1, 4278,
+ -1, -1, 201, -1, 235, -1, -1, -1, -1, 208,
+ -1, 4853, 211, -1, -1, -1, -1, -1, 344, -1,
+ -1, 4300, -1, -1, 3154, -1, -1, 258, -1, -1,
+ -1, -1, -1, -1, -1, 3165, -1, 3167, 3168, 238,
+ 3170, 3171, 4884, 3173, -1, 4324, -1, -1, -1, -1,
+ 5314, 282, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5329, -1, -1, 3198, -1,
+ 269, -1, -1, 272, 4916, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3214, -1, -1, -1, 319, -1,
+ -1, 322, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3236, 433, -1, 4951,
+ 3240, -1, -1, 344, -1, -1, -1, -1, 317, -1,
+ -1, 320, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3263, -1, -1, 335, -1, -1, -1,
+ 339, 4983, -1, -1, -1, -1, 4425, -1, -1, 3279,
+ 349, -1, -1, -1, -1, -1, 5420, 483, -1, 358,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4448,
+ 369, 370, -1, 499, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 514, -1,
+ -1, -1, -1, -1, 4473, -1, -1, -1, -1, -1,
+ -1, -1, 433, -1, -1, -1, -1, -1, -1, 408,
+ -1, -1, 411, 412, 413, -1, -1, -1, 544, -1,
+ -1, -1, -1, -1, 3354, -1, -1, -1, -1, -1,
+ -1, 557, 558, 559, 560, 561, 562, 436, -1, 565,
+ 566, 567, -1, 442, -1, -1, 572, 573, 3378, 3379,
+ 3380, -1, 483, -1, 3384, -1, -1, 456, -1, 5101,
+ 5102, 5103, 5104, -1, -1, -1, -1, -1, 499, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3411, 3412, 514, -1, -1, -1, -1, -1, -1,
+ 3420, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 510, -1, 544, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3454, -1, 557, 558, 559, 560,
+ 561, 562, -1, -1, 565, 566, 567, 568, -1, 570,
+ 571, 572, 573, 574, -1, -1, -1, 4626, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3486, -1, -1, -1,
+ 3490, 5625, -1, 5627, -1, -1, -1, -1, -1, -1,
+ 5, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3512, -1, -1, -1, -1, -1, -1, 24,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 34,
+ 35, -1, -1, -1, -1, -1, 41, 42, -1, -1,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, -1, -1, 4716, 73, -1,
+ 75, 76, -1, -1, -1, -1, 81, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4741, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3623, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 138, -1, -1, 3636, -1, 3638, 3639,
+ -1, 3641, 3642, 3643, -1, 5779, -1, -1, -1, -1,
+ -1, 3651, -1, -1, -1, -1, 3656, -1, -1, -1,
+ -1, -1, -1, -1, -1, 80, -1, -1, 83, -1,
+ -1, -1, 87, 88, 89, -1, -1, -1, -1, -1,
+ -1, -1, 3682, 3683, 3684, -1, -1, 3687, -1, 104,
+ -1, -1, -1, -1, -1, 3695, 3696, 3697, 3698, 114,
+ -1, -1, -1, 3703, -1, -1, 121, -1, 3708, 3709,
+ 215, 3711, -1, 3713, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3724, 3725, -1, 4876, 3728, -1,
+ 235, -1, 147, -1, -1, -1, -1, 5449, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3747, 5460, 3749,
+ -1, 3751, -1, 258, -1, -1, -1, -1, -1, 80,
+ -1, -1, 83, -1, -1, -1, 87, 88, 89, -1,
+ -1, 3771, -1, -1, -1, 4924, -1, 282, 4927, -1,
+ -1, -1, 3782, 104, -1, -1, -1, 108, -1, 5923,
+ -1, 5925, -1, 114, -1, -1, -1, -1, -1, -1,
+ 121, -1, -1, -1, -1, -1, -1, -1, -1, 1033,
+ -1, -1, -1, 3813, 319, -1, -1, 322, -1, -1,
+ -1, -1, -1, -1, -1, -1, 147, -1, 3828, -1,
+ -1, -1, -1, -1, -1, 1059, -1, -1, -1, 344,
+ -1, -1, 3842, -1, -1, -1, 261, -1, -1, -1,
+ -1, 266, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 288, 289, -1, -1, 198, -1, -1,
+ -1, -1, -1, -1, 3884, -1, -1, 3887, 303, 3889,
+ -1, -1, -1, -1, 3894, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 80, -1, 3915, 83, -1, -1, -1,
+ 87, 88, 89, -1, 5073, -1, -1, 342, 433, -1,
+ -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
+ 261, 356, 3942, -1, 359, 266, -1, 114, -1, -1,
+ 3950, -1, -1, -1, 121, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 288, 289, -1,
+ -1, -1, -1, -1, -1, 3975, -1, -1, 483, -1,
+ 147, -1, 303, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 499, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 514,
+ -1, 4011, 4012, 4013, -1, -1, -1, -1, -1, -1,
+ -1, 342, -1, -1, -1, 5737, -1, -1, -1, -1,
+ 5742, -1, 447, -1, -1, 356, -1, -1, 359, 544,
+ -1, -1, 6176, -1, 4044, -1, 4046, -1, -1, 5761,
+ -1, -1, 557, 558, 559, 560, 561, 562, 5207, -1,
+ 565, 566, 567, 568, -1, -1, -1, 572, -1, -1,
+ 237, -1, -1, -1, -1, 242, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 261, -1, 5245, -1, -1, 266,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5267, -1,
+ -1, 288, 289, -1, -1, -1, 447, -1, -1, -1,
+ -1, -1, 547, -1, -1, -1, 303, 4137, -1, -1,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, -1,
+ -1, 566, -1, -1, -1, -1, -1, -1, -1, 6293,
+ -1, -1, -1, -1, 4164, -1, -1, 1391, -1, -1,
+ 4170, -1, -1, -1, 5886, 342, -1, -1, 1402, 4179,
+ -1, -1, -1, -1, -1, 5334, 507, -1, -1, 356,
+ -1, -1, 359, 1417, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4206, 4207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 547, -1, -1, -1,
+ -1, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, -1, -1, -1, -1, -1, -1, -1,
+ 4250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6398, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5985, -1, -1, -1, -1, 4278, -1,
+ 447, -1, -1, -1, 1508, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6428, 6429, -1, 5, -1, -1,
+ 4300, -1, 6014, -1, -1, 5454, -1, 5456, -1, -1,
+ -1, -1, -1, -1, -1, -1, 24, -1, -1, -1,
+ -1, -1, -1, -1, 4324, -1, 34, 35, -1, -1,
+ -1, -1, -1, 41, 42, -1, -1, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, -1, -1, -1, 73, -1, 75, 76, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ 547, -1, -1, -1, -1, -1, -1, -1, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, -1, -1, -1,
+ -1, -1, -1, -1, 80, -1, -1, 83, -1, 6543,
+ -1, 87, 88, 89, -1, -1, -1, 1641, -1, -1,
+ -1, -1, 4422, -1, -1, 4425, -1, -1, 104, -1,
+ 138, 4431, -1, -1, -1, -1, -1, -1, 114, 4439,
+ -1, 4441, -1, -1, 4444, 121, -1, -1, 4448, 4449,
+ 4450, 4451, 4452, -1, -1, 4455, 4456, 4457, 4458, 4459,
+ 4460, 4461, 4462, 4463, 4464, -1, -1, -1, 4468, 4469,
+ 4470, 147, -1, 4473, -1, -1, -1, -1, 4478, -1,
+ -1, -1, 4482, -1, 4484, -1, 4486, -1, -1, -1,
+ -1, -1, -1, -1, 4494, -1, -1, 4497, -1, 4499,
+ -1, -1, -1, -1, -1, -1, -1, 215, -1, 4509,
+ -1, -1, 4512, 4513, -1, 5664, -1, 4517, 4518, -1,
+ -1, -1, -1, -1, 4524, -1, -1, 235, -1, -1,
+ -1, -1, -1, -1, 4534, -1, -1, 4537, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4547, -1, -1,
+ 258, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 236, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1794, -1, -1, -1, 282, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 261, -1, -1, -1, -1,
+ 266, -1, -1, -1, 4594, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4610, 319, 288, 289, 322, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4626, 303, -1, -1,
+ -1, -1, -1, -1, -1, 5784, 344, -1, 4638, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 80, -1, -1, 83, -1, -1,
+ -1, 87, 88, 89, -1, -1, 342, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
+ 356, -1, -1, 359, -1, -1, -1, -1, 114, -1,
+ -1, -1, -1, -1, -1, 121, -1, 1921, -1, -1,
+ -1, -1, -1, -1, -1, 381, -1, 5856, -1, -1,
+ 4710, -1, -1, -1, -1, 4715, 4716, 4717, -1, -1,
+ -1, 147, -1, -1, -1, 433, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 80, -1, -1, 83,
+ 4740, 4741, -1, 87, 88, 89, -1, -1, -1, -1,
+ -1, -1, -1, 5902, -1, -1, -1, -1, 5907, 5908,
+ 104, -1, -1, 107, 1988, -1, -1, -1, -1, -1,
+ 114, 447, -1, -1, -1, 483, -1, 121, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 499, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2025, -1, 147, -1, -1, 514, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2058, 261, 544, -1, -1, -1,
+ 266, -1, -1, -1, -1, -1, 4846, -1, -1, 557,
+ 558, 559, 560, 561, 562, -1, -1, 565, 566, 567,
+ -1, -1, 288, 289, 572, -1, -1, -1, -1, 6018,
+ 6019, 547, -1, -1, -1, -1, 4876, 303, -1, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, -1, 4889,
+ 4890, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 342, 261, -1, -1,
+ -1, -1, 266, -1, 4924, -1, -1, 4927, 4928, 4929,
+ 356, -1, -1, 359, -1, -1, -1, -1, -1, 4939,
+ -1, -1, -1, 2167, 288, 289, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2178, -1, -1, 383, -1, 303,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2194, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 80, -1, -1, 83, -1,
+ -1, -1, 87, 88, 89, -1, -1, -1, 342, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
+ -1, -1, 356, -1, -1, 359, -1, -1, -1, 114,
+ 5020, 447, -1, 2247, -1, -1, 121, -1, -1, -1,
+ -1, 5031, -1, -1, -1, -1, -1, -1, 464, -1,
+ -1, -1, -1, -1, 2268, -1, -1, -1, -1, -1,
+ -1, -1, 147, -1, -1, -1, -1, 2281, -1, 5059,
+ -1, -1, 5062, -1, -1, -1, -1, -1, -1, 2293,
+ 5070, 5071, -1, 5073, -1, -1, -1, 5077, 5078, -1,
+ -1, -1, 5082, -1, -1, -1, 5086, -1, -1, 5089,
+ 5090, -1, -1, -1, 5094, -1, -1, 6246, -1, -1,
+ 5100, -1, -1, 447, -1, -1, -1, -1, -1, 2333,
+ 2334, -1, 5112, -1, -1, -1, -1, -1, -1, -1,
+ 5120, 547, -1, -1, 5124, -1, -1, -1, -1, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1033, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5157, -1, -1,
+ -1, 80, -1, -1, 83, -1, 261, -1, 87, 88,
+ 89, 266, -1, 1059, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 104, -1, -1, 107, 5189,
+ -1, -1, -1, 288, 289, 114, -1, -1, -1, -1,
+ -1, -1, 121, 547, -1, -1, -1, 5207, 303, -1,
+ -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ -1, -1, -1, -1, -1, -1, -1, -1, 147, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5245, -1, 342, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2481, -1, -1,
+ -1, 356, 80, -1, 359, 83, -1, 5267, -1, 87,
+ 88, 89, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 377, -1, -1, -1, 104, -1, -1, -1,
+ 5290, 80, -1, -1, 83, -1, 114, -1, 87, 88,
+ 89, -1, -1, 121, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 104, -1, -1, 107, -1,
+ -1, -1, -1, -1, -1, 114, -1, -1, -1, 147,
+ -1, -1, 121, -1, 5334, -1, -1, -1, -1, -1,
+ -1, -1, 261, -1, -1, -1, -1, 266, -1, -1,
+ -1, -1, 447, -1, -1, -1, -1, -1, 147, 133,
+ 5360, -1, -1, -1, -1, -1, -1, -1, -1, 288,
+ 289, -1, -1, -1, -1, -1, 5376, -1, -1, -1,
+ -1, 5381, -1, -1, 303, -1, -1, -1, -1, -1,
+ -1, 165, 80, -1, -1, 83, -1, -1, -1, 87,
+ 88, 89, -1, -1, -1, -1, 180, 5407, -1, -1,
+ -1, -1, -1, -1, -1, 189, 104, -1, -1, -1,
+ -1, -1, -1, 342, 242, -1, 114, -1, -1, -1,
+ 204, -1, 206, 121, 6583, -1, 210, 356, -1, -1,
+ 359, -1, -1, 261, -1, -1, 220, -1, 266, -1,
+ -1, -1, 547, -1, 5454, 229, 5456, -1, -1, 147,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, -1,
+ 288, 289, 261, -1, -1, -1, -1, 266, -1, -1,
+ -1, -1, -1, -1, -1, 303, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 288,
+ 289, -1, -1, -1, -1, 1391, -1, -1, -1, -1,
+ -1, -1, -1, -1, 303, 5515, 1402, -1, 5518, -1,
+ -1, 5521, 5522, 5523, 342, -1, -1, 80, 447, -1,
+ 83, 1417, -1, -1, 87, 88, 89, -1, 356, -1,
+ -1, 359, -1, -1, -1, -1, 5546, 5547, -1, -1,
+ 5550, 104, -1, 342, 107, -1, -1, -1, -1, -1,
+ -1, 114, -1, -1, -1, 5565, -1, 356, 121, -1,
+ 359, -1, 5572, 261, -1, -1, -1, 5577, 266, -1,
+ 5580, 5581, -1, -1, -1, -1, -1, -1, 5588, -1,
+ -1, -1, -1, -1, 147, -1, -1, -1, -1, -1,
+ 288, 289, -1, -1, -1, -1, -1, -1, -1, 5609,
+ -1, 5611, -1, -1, -1, 303, -1, -1, -1, -1,
+ -1, -1, 1508, 5623, -1, -1, -1, -1, 547, 447,
+ -1, -1, -1, -1, -1, -1, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 342, -1, -1, -1, 447, -1,
+ -1, -1, -1, -1, 5664, -1, -1, -1, 356, -1,
+ -1, 359, -1, -1, -1, 5675, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 261, -1,
+ -1, -1, -1, 266, 5714, -1, -1, -1, -1, 5719,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 547,
+ -1, -1, -1, -1, -1, 288, 289, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, -1, -1, -1, -1,
+ 303, -1, -1, -1, -1, 1641, -1, -1, 547, 447,
+ -1, -1, -1, -1, -1, -1, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, -1, -1, -1, -1, -1,
+ -1, 5781, -1, -1, 5784, -1, -1, -1, -1, 342,
+ -1, 479, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 94, 356, -1, -1, 359, -1, 100, -1,
+ -1, -1, -1, -1, -1, 107, 5816, -1, -1, -1,
+ 5820, -1, 5822, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 129, -1, -1,
+ 5840, -1, -1, -1, -1, -1, 5846, -1, -1, -1,
+ 5850, -1, -1, 145, -1, -1, 5856, 5857, -1, 547,
+ -1, -1, -1, -1, -1, -1, -1, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, -1, -1, -1, -1,
+ 3104, -1, -1, -1, 3108, 3109, -1, -1, 180, -1,
+ -1, -1, -1, -1, 447, -1, -1, -1, -1, -1,
+ -1, -1, 5902, -1, -1, -1, -1, 5907, 5908, 201,
+ -1, -1, 5912, -1, -1, -1, 208, 5917, 5918, 211,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3167, -1, -1, 238, -1, -1, 3173,
+ -1, -1, -1, 5953, -1, -1, -1, -1, -1, -1,
+ 5960, -1, -1, 5963, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 269, -1, -1,
+ 272, -1, -1, -1, -1, -1, -1, -1, 5988, -1,
+ 3214, -1, -1, -1, 547, -1, -1, -1, -1, -1,
+ -1, -1, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, -1, -1, -1, 80, -1, -1, 83, 6018, 6019,
+ -1, 87, 88, 89, -1, 317, -1, -1, 320, -1,
+ -1, -1, -1, -1, -1, 1921, -1, -1, 104, -1,
+ -1, -1, -1, 335, 6044, -1, -1, 339, 114, -1,
+ 6050, -1, -1, 6053, -1, 121, 6056, 349, -1, -1,
+ -1, -1, -1, -1, -1, -1, 358, 6067, -1, -1,
+ -1, -1, -1, -1, 6074, -1, -1, 369, 370, -1,
+ -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6092, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1988, -1, -1, -1, -1, -1, -1, -1,
+ 6110, -1, -1, -1, -1, -1, 408, -1, -1, 411,
+ 412, 413, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 905, 906, 907, -1, 6135, 910, -1, -1, 2025,
+ 914, -1, 916, -1, 436, 919, -1, -1, 922, -1,
+ 442, 925, -1, -1, 928, -1, 930, -1, -1, 933,
+ -1, -1, -1, 937, 456, 939, -1, -1, -1, -1,
+ -1, -1, 2058, -1, -1, -1, 242, -1, -1, -1,
+ -1, -1, -1, -1, 958, -1, -1, -1, 3412, -1,
+ 964, 6191, 966, -1, 968, 261, -1, 971, -1, -1,
+ 266, -1, -1, -1, 978, -1, -1, -1, -1, 983,
+ -1, 985, -1, -1, -1, -1, -1, 991, 510, -1,
+ -1, -1, 288, 289, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6233, 6234, 6235, -1, 303, -1, -1,
+ -1, -1, 6242, 6243, -1, -1, 6246, -1, -1, -1,
+ -1, 6251, -1, 6253, 1028, 6255, -1, -1, -1, -1,
+ -1, -1, 3486, 1037, -1, -1, 3490, 1041, -1, -1,
+ 1044, -1, -1, 1047, -1, -1, 342, -1, 6278, -1,
+ -1, 2167, -1, -1, -1, -1, -1, -1, -1, 1063,
+ 356, -1, 2178, 359, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2194, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6332, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6342, -1, -1, -1, -1, 1121, -1, -1,
+ 6350, 6351, -1, -1, -1, -1, 6356, -1, -1, 6359,
+ -1, 2247, -1, -1, 1138, -1, -1, -1, -1, 6369,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6379,
+ -1, 447, 2268, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1166, 1167, -1, 2281, -1, -1, 1172, 3623,
+ -1, -1, -1, -1, -1, -1, -1, 2293, -1, -1,
+ -1, -1, -1, -1, 3638, -1, -1, 1191, -1, 3643,
+ -1, 1195, -1, -1, -1, -1, -1, 6427, -1, 1203,
+ -1, -1, -1, 6433, -1, -1, -1, -1, -1, -1,
+ 1214, -1, -1, -1, -1, -1, -1, 2333, 2334, -1,
+ 6450, -1, 1226, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6465, -1, -1, -1, -1,
+ 6470, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 547, -1, 6483, -1, -1, -1, -1, 6488, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6519,
+ -1, -1, -1, -1, -1, -1, -1, 1301, -1, -1,
+ 6530, -1, -1, -1, 6534, -1, -1, -1, 1312, -1,
+ -1, -1, -1, 1317, 1318, -1, 6546, -1, 80, -1,
+ -1, 83, -1, 6553, -1, 87, 88, 89, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 104, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 114, 6583, 6584, -1, -1, 6587, -1, 121,
+ -1, 6591, -1, -1, -1, 2481, -1, 6597, 6598, 1373,
+ 1374, -1, 6602, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1386, -1, 1388, 147, -1, -1, 1392, -1,
+ -1, 1395, 1396, -1, 1398, -1, -1, -1, -1, 1403,
+ 80, -1, -1, 83, -1, -1, -1, 87, 88, 89,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1426, -1, 104, -1, -1, -1, 1432, 1433,
+ 3884, -1, -1, 3887, 114, 3889, -1, -1, -1, -1,
+ 3894, 121, -1, -1, -1, -1, -1, -1, -1, 1453,
+ 1454, 1455, -1, 1457, -1, 1459, -1, 1461, 1462, -1,
+ -1, -1, -1, -1, 1468, -1, -1, 147, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 242, -1, -1, 80, -1, -1, 83, -1, 3942, -1,
+ 87, 88, 89, -1, -1, -1, 3950, -1, -1, 261,
+ -1, -1, -1, -1, 266, -1, -1, 104, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 114, -1, -1,
+ -1, 3975, -1, -1, 121, -1, 288, 289, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1541, -1, 1543,
+ 1544, 303, -1, -1, -1, -1, -1, -1, -1, -1,
+ 147, -1, -1, -1, -1, -1, -1, 237, -1, -1,
+ -1, 80, -1, -1, 83, -1, -1, -1, 87, 88,
+ 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 342, 261, -1, 1587, -1, 104, 266, -1, -1, -1,
+ 4044, -1, 4046, -1, 356, 114, -1, 359, -1, -1,
+ -1, -1, 121, -1, -1, -1, -1, -1, 288, 289,
+ -1, -1, -1, -1, -1, -1, -1, 1621, 1622, 216,
+ -1, -1, 1626, 303, 1628, -1, -1, -1, 147, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1647, -1, -1, -1, -1, -1, 1653,
+ -1, -1, 1656, -1, -1, 1659, -1, -1, -1, -1,
+ -1, -1, 342, -1, 261, -1, -1, -1, 1672, 266,
+ -1, -1, -1, -1, -1, -1, 356, -1, -1, 359,
+ -1, -1, -1, 4137, -1, 447, -1, -1, -1, -1,
+ -1, 288, 289, -1, -1, -1, -1, -1, 1702, -1,
+ -1, -1, -1, -1, -1, -1, 303, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 237, -1,
+ -1, -1, -1, -1, -1, 4179, 1730, 1731, 1732, -1,
+ 1734, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 261, -1, -1, 342, -1, 266, -1, -1,
+ 1754, -1, -1, 4207, -1, -1, -1, -1, -1, 356,
+ -1, -1, 359, -1, -1, -1, -1, 447, -1, 288,
+ 289, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 303, 547, -1, -1, -1, -1,
+ -1, -1, -1, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 1806, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 342, 4278, -1, -1, -1, 1832, -1,
+ -1, -1, 1836, 1837, -1, -1, -1, 356, -1, -1,
+ 359, -1, -1, 1847, 1848, 1849, 4300, 1851, -1, -1,
+ 447, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 547, -1, -1,
+ 4324, -1, -1, -1, -1, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 447, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 547, -1, -1, -1, -1, -1, -1, -1, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, -1, -1, 1973,
+ -1, 4425, -1, -1, -1, -1, -1, 1981, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3104, -1,
+ 1994, 1995, 3108, 3109, 4448, -1, -1, -1, -1, 2003,
+ -1, -1, 2006, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4473,
+ -1, -1, -1, -1, -1, 2029, -1, 2031, 547, -1,
+ -1, -1, -1, -1, -1, -1, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, -1, -1, -1, -1, -1,
+ 2054, 3167, -1, 2057, -1, -1, -1, 3173, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2079, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2096, -1, -1, -1, -1, -1, 3214, -1,
+ -1, -1, -1, -1, 2108, 2109, 2110, 2111, 2112, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2126, 80, -1, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, 2138, 2139, 2140, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
+ 2154, -1, -1, -1, -1, -1, -1, 114, -1, -1,
+ -1, 2165, -1, -1, 121, -1, -1, -1, -1, 2173,
+ 2174, -1, 4626, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2189, -1, -1, -1, -1,
+ 147, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2223,
+ 2224, 2225, 2226, -1, -1, -1, -1, -1, 2232, -1,
+ -1, -1, -1, -1, -1, 2239, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2262, -1,
+ -1, 2265, 4716, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2275, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4741, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3412, -1, -1, -1,
+ -1, -1, 2306, 2307, 261, -1, -1, -1, -1, 266,
+ -1, -1, -1, 2317, 2318, -1, -1, 2321, -1, -1,
+ 2324, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 288, 289, -1, -1, 2339, 2340, -1, -1, -1,
+ -1, -1, 2346, -1, -1, -1, 303, -1, -1, -1,
+ -1, -1, -1, 2357, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3486, -1, -1, -1, 3490, -1, -1, -1, -1, 2383,
+ -1, -1, -1, -1, -1, 342, 2390, -1, 2392, -1,
+ -1, 2395, 2396, -1, 2398, 2399, -1, 2401, -1, 356,
+ -1, -1, 359, -1, 2408, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2418, -1, -1, -1, -1, 92,
+ 2424, 2425, 4876, -1, 2428, -1, -1, -1, 2432, 2433,
+ -1, -1, -1, -1, 2438, 2439, -1, 110, -1, -1,
+ -1, 2445, 2446, 2447, -1, -1, 2450, -1, 2452, 2453,
+ 2454, 2455, 2456, 2457, 2458, 2459, -1, 2461, -1, 2463,
+ 2464, -1, 135, 2467, -1, -1, -1, -1, -1, -1,
+ 4924, -1, -1, 4927, -1, 148, -1, -1, 2482, 2483,
+ 2484, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 447, 164, -1, -1, -1, 2499, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3623, -1, 182,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 3638, -1, -1, -1, -1, 3643, -1, -1,
+ -1, -1, -1, 206, -1, 2539, -1, -1, -1, -1,
+ -1, -1, -1, -1, 217, -1, -1, -1, -1, -1,
+ -1, -1, -1, 226, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 239, -1, -1, -1,
+ -1, -1, -1, -1, 247, -1, -1, -1, 251, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 547, -1, -1, -1, -1, -1, -1, 270, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5073,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 307, -1, -1, -1, 2642, -1,
+ -1, -1, -1, 316, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 97, -1, -1, -1, 2682, -1,
+ -1, -1, -1, 356, -1, -1, 359, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 379, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 393, -1, -1, -1, -1, 148, -1, 400, -1, 2733,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 164, -1, -1, -1, -1, -1, 420, -1, -1,
+ -1, -1, -1, 5207, -1, -1, 429, -1, -1, 182,
+ -1, -1, -1, 436, -1, 188, 439, -1, 3884, -1,
+ -1, 3887, -1, 3889, -1, -1, -1, -1, 3894, -1,
+ -1, -1, -1, 206, -1, 458, -1, -1, -1, -1,
+ -1, 5245, 465, -1, 217, -1, -1, -1, 471, -1,
+ -1, 474, 475, 226, 477, 478, -1, -1, -1, -1,
+ -1, -1, -1, 5267, -1, -1, 239, -1, -1, -1,
+ 493, 244, -1, -1, -1, -1, 3942, 500, 251, -1,
+ 503, -1, -1, 506, 3950, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 519, 270, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3975,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 295, -1, -1, -1, -1, -1, -1, -1,
+ 5334, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 316, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2907, 2908, 2909, 2910, 2911, 2912, 2913,
+ 2914, 2915, -1, 2917, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2926, 2927, -1, -1, 2930, -1, 4044, -1,
+ 4046, -1, -1, 356, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2952, -1,
+ -1, -1, -1, -1, -1, -1, 379, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 389, 390, -1, -1,
+ 393, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2984, -1, 2986, -1, -1, 2989, 2990, -1, -1, 2993,
+ -1, 2995, -1, -1, 2998, -1, -1, 420, 3002, 3003,
+ 423, -1, 5456, -1, 427, -1, 429, -1, -1, 3013,
+ -1, -1, -1, 436, -1, -1, 439, -1, 3022, 3023,
+ -1, 4137, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3036, -1, -1, 458, -1, -1, -1, 3043,
+ -1, 3045, 465, -1, -1, -1, -1, 470, 471, -1,
+ -1, 474, -1, -1, -1, 478, -1, -1, -1, -1,
+ -1, -1, -1, 4179, -1, 488, -1, -1, -1, -1,
+ 493, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 506, -1, -1, -1, -1, -1, -1,
+ -1, 4207, -1, -1, -1, -1, 519, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3135, -1, 3137, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3154, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3165, 4278, -1, 3168, 3169, 3170, 3171, -1, -1,
+ 3174, -1, -1, 3177, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4300, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3209, -1, -1, 4324, -1,
+ 5664, -1, -1, 3217, 3218, -1, -1, -1, -1, -1,
+ 3224, -1, -1, -1, -1, -1, -1, -1, -1, 3233,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3252, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3272, 3273,
+ -1, -1, 3276, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3302, -1,
+ -1, 3305, -1, -1, -1, -1, -1, -1, -1, 4425,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3330, 3331, -1, -1,
+ 5784, -1, 4448, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3345, -1, 3347, 3348, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4473, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3378, 3379, 3380, -1, -1, -1,
+ 3384, -1, -1, -1, -1, -1, -1, -1, 3392, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3405, 5856, -1, -1, -1, -1, 3411, -1, 3413,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3426, -1, -1, -1, -1, 3431, -1, -1,
+ 3434, -1, -1, -1, 3438, -1, -1, 3441, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5902, 3453,
+ 3454, -1, -1, 5907, 5908, -1, -1, -1, -1, -1,
+ 3464, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3474, -1, 3476, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3500, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3512, -1,
+ 4626, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3526, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3536, -1, 3538, -1, 3540, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6019, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3586, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4716, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4741, -1, -1, -1, -1,
+ -1, -1, 3636, 3637, -1, 3639, -1, 3641, 3642, -1,
+ 3644, -1, -1, -1, -1, -1, -1, 3651, -1, -1,
+ -1, -1, 3656, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3682, 3683,
+ 3684, -1, -1, 3687, -1, -1, -1, -1, -1, -1,
+ -1, 3695, 3696, 3697, 3698, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3708, -1, -1, 3711, -1, 3713,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3724, 3725, -1, -1, 3728, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3745, -1, 3747, -1, 3749, -1, 3751, -1, 1033,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4876, -1, -1, -1, -1, -1, -1, 3771, -1, -1,
+ -1, 3775, -1, -1, -1, 1059, -1, -1, 3782, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6246, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3805, -1, -1, -1, -1, -1, -1, 4924, 3813,
+ -1, 4927, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3828, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3842, -1,
+ -1, -1, 3846, -1, -1, 3849, -1, 3851, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, -1, -1, -1, -1, 8, -1, -1, -1,
+ 12, -1, 14, -1, 16, 17, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 27, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, 44, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3915, -1, -1, -1, -1, -1, -1, 3922, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3945, 3946, -1, -1, -1, -1, -1, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5073, 100, -1,
+ 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 130, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 142, -1, 144, 145, -1, -1, -1, -1, -1, 151,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 165, -1, 167, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 182, -1, 184, -1, -1, 187, -1, -1, 4052, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 202, -1, 204, -1, -1, -1, 208, -1, -1, -1,
+ -1, -1, 214, -1, -1, -1, -1, -1, -1, -1,
+ 222, -1, 224, -1, -1, -1, -1, -1, -1, 231,
+ -1, 5207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 248, 1391, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1402, -1,
+ -1, -1, -1, 265, -1, -1, -1, -1, -1, 5245,
+ -1, -1, -1, 1417, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5267, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4164, -1, -1, 305, 306, -1, 4170, -1, -1, 311,
+ -1, -1, -1, -1, -1, -1, -1, 4181, -1, -1,
+ -1, 323, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 341,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4218, 4219, 4220, -1, 5334, -1,
+ -1, -1, -1, -1, 1508, -1, -1, -1, -1, -1,
+ -1, 4235, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 384, -1, -1, -1, 4250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 398, -1, -1, -1,
+ -1, -1, 404, 405, -1, 407, 4270, 4271, 4272, -1,
+ 412, -1, 4276, -1, -1, -1, 418, -1, -1, 421,
+ -1, -1, -1, -1, 4288, -1, 428, -1, -1, -1,
+ -1, -1, 434, 435, -1, -1, -1, -1, -1, -1,
+ 442, -1, -1, -1, 446, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 456, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 471,
+ -1, -1, -1, -1, -1, -1, 4340, -1, -1, -1,
+ 5456, -1, -1, 1033, -1, -1, -1, -1, -1, 491,
+ -1, 493, -1, -1, -1, -1, -1, 1641, -1, 4363,
+ 502, -1, -1, -1, -1, -1, 508, -1, -1, 1059,
+ -1, 513, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4387, 526, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4400, -1, -1, 4403,
+ -1, -1, -1, -1, -1, -1, -1, 549, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4422, -1,
+ -1, -1, -1, -1, -1, 567, -1, 4431, -1, 571,
+ -1, -1, -1, -1, -1, 4439, -1, 4441, -1, -1,
+ 4444, -1, -1, -1, -1, 4449, 4450, 4451, 4452, -1,
+ -1, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463,
+ 4464, -1, -1, -1, 4468, 4469, 4470, -1, -1, -1,
+ -1, -1, -1, -1, 4478, -1, -1, -1, 4482, -1,
+ -1, -1, 4486, -1, -1, -1, -1, -1, -1, -1,
+ 4494, -1, -1, 4497, -1, 4499, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4509, -1, -1, 4512, 4513,
+ -1, -1, -1, 4517, 4518, 133, -1, -1, 4522, -1,
+ 4524, -1, -1, -1, -1, -1, -1, 4531, 4532, 4533,
+ 4534, -1, -1, 4537, 4538, -1, -1, -1, 4542, 4543,
+ 4544, -1, -1, 4547, -1, -1, -1, -1, 5664, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 205, -1, -1,
+ 4594, -1, -1, -1, -1, 213, -1, 215, -1, -1,
+ -1, -1, -1, -1, 4608, -1, 4610, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4638, 4639, 4640, 1921, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5784, -1,
+ -1, -1, -1, -1, 4678, 4679, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4697, -1, -1, -1, -1, -1, -1,
+ -1, 1391, -1, -1, 1988, -1, -1, -1, -1, -1,
+ -1, -1, 1402, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1417, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5856, 2025, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2058, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5902, -1, -1, -1,
+ -1, 5907, 5908, 4797, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1508, -1,
+ -1, -1, -1, -1, -1, -1, 4830, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4844, -1, 4846, -1, -1, -1, -1, -1, -1, 4853,
+ -1, -1, -1, -1, -1, 4859, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4870, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4884, -1, -1, 2167, -1, 4889, 4890, -1, -1, -1,
+ -1, -1, -1, 4897, 2178, -1, -1, -1, -1, -1,
+ -1, -1, 4906, 6019, -1, -1, -1, -1, -1, -1,
+ 2194, -1, 4916, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4928, 4929, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4939, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4950, 4951, -1, -1,
+ -1, 1641, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2247, 4968, 4969, 4970, 4971, 4972, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4983,
+ -1, -1, -1, -1, 2268, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2281, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2293,
+ -1, -1, -1, -1, -1, -1, 5020, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5031, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2333,
+ 2334, -1, -1, -1, -1, 5059, -1, -1, 5062, -1,
+ -1, -1, -1, -1, -1, -1, 5070, 5071, -1, -1,
+ -1, -1, -1, 5077, 5078, -1, -1, -1, 5082, -1,
+ -1, -1, 5086, -1, -1, 5089, 5090, -1, -1, -1,
+ 5094, 5095, -1, -1, -1, -1, 5100, 5101, 5102, 5103,
+ 5104, -1, -1, -1, 5108, 5109, 5110, -1, 5112, 5113,
+ -1, -1, 5116, -1, -1, -1, 5120, -1, -1, -1,
+ 5124, -1, -1, -1, -1, -1, 5130, -1, -1, -1,
+ 6246, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5148, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5157, -1, -1, -1, 5161, -1, -1,
+ -1, -1, 5166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5186, -1, -1, 5189, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2481, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5223,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1921, -1, -1, -1, 5239, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5290, 905, -1, -1,
+ -1, -1, -1, -1, -1, -1, 914, -1, 1988, -1,
+ -1, -1, -1, -1, 922, -1, -1, 925, -1, -1,
+ 5314, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5329, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2025, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5360, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2058, -1,
+ -1, -1, 5376, -1, -1, -1, -1, -1, -1, 5383,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5392, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5407, -1, -1, -1, -1, -1, -1,
+ 1028, -1, -1, -1, -1, 1033, 5420, -1, 5422, 1037,
+ -1, -1, -1, -1, -1, -1, 1044, -1, -1, 1047,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1059, -1, -1, -1, 5449, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5460, -1, -1, -1,
+ -1, -1, 5466, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2167, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2178, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2194, -1, -1, -1, -1, -1,
+ -1, 5515, -1, -1, 5518, -1, -1, 5521, 5522, 5523,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5546, 5547, -1, -1, 5550, -1, 1166, 1167,
+ -1, -1, -1, -1, -1, 1173, -1, 2247, -1, 1177,
+ -1, 5565, -1, -1, 5568, -1, -1, -1, 5572, -1,
+ -1, -1, -1, 5577, -1, -1, 5580, 5581, 2268, 5583,
+ -1, 5585, -1, -1, 5588, 1203, -1, -1, -1, -1,
+ -1, 2281, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2293, -1, 5609, -1, 5611, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5623,
+ 5624, 5625, -1, 5627, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2333, 2334, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5675, 5676, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5719, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5732, -1,
+ -1, 1349, 1350, 5737, -1, -1, -1, -1, 5742, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5751, -1, -1,
+ -1, -1, -1, -1, -1, 1373, 1374, 5761, -1, -1,
+ -1, 5765, -1, -1, 5768, -1, -1, -1, 1386, -1,
+ -1, -1, -1, 1391, 1392, 5779, 5780, 5781, 1396, -1,
+ 1398, -1, -1, -1, 1402, -1, -1, -1, -1, -1,
+ -1, 2481, -1, -1, -1, -1, -1, -1, -1, 1417,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5816, -1, -1, -1, 5820, -1, 5822, -1,
+ 3104, -1, -1, -1, 3108, 3109, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5840, -1, -1, -1,
+ -1, 1459, 5846, 1461, 1462, -1, 5850, -1, -1, -1,
+ 5854, -1, -1, 5857, -1, 5859, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5886, 3167, 5888, -1, -1, -1, -1, 3173,
+ 1508, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5912, -1,
+ -1, -1, -1, 5917, 5918, -1, -1, -1, 5922, 5923,
+ 5924, 5925, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3214, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5953,
+ -1, -1, -1, -1, -1, -1, 5960, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1587,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5985, -1, -1, 5988, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6014, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1641, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6044, -1, -1, -1, -1, -1, 6050, -1, -1, 6053,
+ -1, -1, 6056, -1, 1672, -1, 6060, -1, -1, -1,
+ -1, -1, -1, 6067, -1, -1, -1, -1, -1, -1,
+ 6074, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6087, 1702, -1, -1, -1, 6092, -1,
+ -1, -1, -1, -1, -1, -1, 6100, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6110, -1, -1, -1,
+ -1, -1, 1730, 1731, 1732, -1, 1734, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3412, -1,
+ -1, -1, -1, -1, -1, -1, 1754, -1, -1, -1,
+ -1, 6145, 6146, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6176, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6191, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3486, -1, -1, -1, 3490, -1, -1, -1,
+ -1, -1, -1, -1, 1832, -1, -1, -1, 1836, 1837,
+ -1, 6225, -1, -1, -1, -1, -1, -1, -1, 6233,
+ 6234, 6235, -1, 1851, -1, 6239, -1, -1, 6242, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6251, -1, 6253,
+ -1, 6255, 6256, -1, -1, -1, -1, -1, -1, -1,
+ 6264, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6278, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6293,
+ -1, -1, -1, -1, -1, -1, 6300, -1, -1, -1,
+ -1, -1, -1, 1921, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1937,
+ -1, 6325, -1, -1, -1, -1, -1, -1, 6332, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6342, 3623,
+ -1, -1, -1, -1, -1, -1, 6350, 6351, 6352, -1,
+ -1, -1, 6356, -1, 3638, 6359, -1, -1, -1, 3643,
+ 1978, -1, -1, -1, -1, 6369, -1, -1, -1, 6373,
+ 1988, -1, -1, -1, -1, 6379, -1, -1, -1, -1,
+ 6384, 6385, 6386, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6398, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2025, -1, -1,
+ -1, -1, -1, -1, 3104, -1, 2034, -1, 3108, 3109,
+ -1, -1, -1, 6427, 6428, 6429, -1, -1, -1, 6433,
+ -1, -1, -1, 2051, -1, -1, -1, -1, -1, -1,
+ 2058, -1, -1, -1, -1, -1, 6450, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6465, -1, -1, -1, -1, 6470, 6471, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3167, -1, 6483,
+ -1, -1, -1, 3173, 6488, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6519, -1, -1, -1, -1,
+ 2138, 2139, 2140, -1, 3214, -1, 6530, -1, 6532, 6533,
+ 6534, 6535, -1, -1, -1, -1, -1, -1, -1, 6543,
+ -1, -1, 6546, -1, -1, -1, -1, -1, -1, 2167,
+ -1, -1, -1, 6557, -1, -1, -1, -1, -1, -1,
+ 2178, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2194, -1, -1, 6583,
+ 6584, -1, -1, 6587, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6597, 6598, -1, -1, 6601, -1, -1,
+ 3884, -1, -1, 3887, -1, 3889, -1, -1, -1, -1,
+ 3894, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2247,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2262, -1, -1, 2265, -1, -1,
+ 2268, -1, -1, -1, -1, -1, -1, 2275, 3942, -1,
+ -1, -1, -1, 2281, -1, -1, 3950, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2293, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2306, 2307,
+ -1, 3975, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2321, -1, -1, 2324, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2333, 2334, -1, -1, -1,
+ -1, -1, 3412, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4044, -1, 4046, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2392, -1, -1, 2395, 2396, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3486, -1, -1, -1,
+ 3490, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2432, 2433, -1, -1, -1, -1,
+ 2438, 2439, -1, -1, -1, -1, -1, 2445, 2446, 2447,
+ -1, -1, 2450, -1, 2452, -1, 2454, 2455, 2456, 2457,
+ 2458, 2459, -1, 2461, -1, 2463, 2464, -1, -1, 2467,
+ -1, -1, -1, 4137, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2481, 2482, 2483, 2484, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2499, -1, -1, -1, -1, -1, -1, 6, 7,
+ -1, 9, 10, 11, -1, 4179, -1, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, -1,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, 4207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3623, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3638, -1,
+ -1, 69, -1, 3643, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4278, -1, -1, -1, -1, 117,
+ -1, -1, -1, 121, 122, 123, 124, 125, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4300, -1, -1, -1,
+ -1, 139, -1, -1, 2642, -1, -1, -1, 146, -1,
+ 148, -1, -1, -1, -1, -1, -1, -1, 156, -1,
+ 4324, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 168, -1, -1, -1, -1, -1, -1, 175, -1, -1,
+ -1, -1, -1, -1, 2682, -1, -1, 185, 186, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 223, -1, -1, -1, -1,
+ 228, -1, -1, -1, -1, 2733, -1, 235, -1, -1,
+ -1, -1, -1, 241, -1, 243, -1, -1, -1, -1,
+ -1, -1, 250, -1, 252, -1, -1, -1, -1, -1,
+ -1, 4425, -1, 261, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 276, 277,
+ -1, -1, -1, -1, 4448, 283, -1, 285, -1, -1,
+ 288, 289, -1, 291, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, -1, 303, -1, -1, -1, 4473,
+ -1, -1, -1, -1, 3884, -1, -1, 3887, -1, 3889,
+ -1, -1, -1, -1, 3894, -1, -1, -1, 326, 327,
+ 328, -1, -1, -1, -1, -1, -1, -1, 336, 337,
+ -1, -1, -1, -1, 342, -1, -1, 345, -1, 347,
+ -1, -1, -1, -1, -1, -1, -1, 1033, -1, -1,
+ -1, -1, -1, -1, -1, 363, 364, -1, 366, 367,
+ -1, -1, 3942, -1, -1, -1, -1, -1, -1, -1,
+ 3950, -1, 380, 1059, 382, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 397,
+ -1, -1, -1, -1, -1, 3975, -1, -1, -1, 2907,
+ 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, -1, 2917,
+ -1, 419, -1, -1, -1, -1, -1, 425, -1, 2927,
+ -1, -1, 2930, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 444, -1, -1, 447,
+ -1, -1, 450, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4626, -1, -1, -1, -1, -1, 466, -1,
+ -1, -1, -1, -1, 4044, 473, 4046, -1, -1, -1,
+ -1, -1, -1, 481, 482, -1, -1, -1, 2986, 487,
+ -1, 489, 2990, -1, -1, 2993, -1, 2995, -1, -1,
+ 2998, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3013, 514, -1, -1, 517,
+ -1, -1, -1, -1, 3022, 3023, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, -1, -1, -1, -1,
+ -1, -1, 4716, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4137, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4741, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3104, -1, -1, 4179,
+ 3108, 3109, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3154, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3165, -1, 3167,
+ 3168, -1, 3170, 3171, -1, 3173, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3198, -1, -1, -1, -1, -1, -1, -1, 4278, -1,
+ -1, -1, 4876, -1, -1, 1391, 3214, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1402, -1, -1, -1,
+ 4300, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1417, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4324, -1, -1, -1, -1, -1,
+ 4924, -1, -1, 4927, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1508, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4425, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4448, -1,
+ 3378, 3379, 3380, -1, -1, -1, 3384, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4473, -1, -1, -1, -1, -1, 5073,
+ -1, -1, -1, 3411, 3412, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3454, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1641, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3486, -1,
+ -1, -1, 3490, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3512, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4626, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5245, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5267, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3623, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3636, -1,
+ 3638, 3639, -1, 3641, 3642, 3643, 4716, -1, -1, -1,
+ -1, -1, -1, 3651, -1, -1, -1, -1, 3656, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5334, 4741, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3682, 3683, 3684, -1, -1, 3687,
+ -1, -1, -1, -1, -1, -1, -1, 3695, 3696, 3697,
+ 3698, -1, -1, -1, -1, 1033, -1, -1, -1, -1,
+ 3708, -1, -1, 3711, -1, 3713, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3724, 3725, -1, -1,
+ 3728, 1059, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1921, -1, -1, -1, 3747,
+ -1, 3749, -1, 3751, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3771, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3782, -1, -1, -1, -1, -1,
+ -1, -1, 5456, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4876, -1, -1, -1,
+ -1, -1, 1988, -1, -1, 3813, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3828, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3842, -1, -1, -1, -1, 2025,
+ -1, -1, -1, -1, 4924, -1, -1, 4927, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 133, -1, -1,
+ -1, -1, 2058, -1, -1, -1, 3884, -1, -1, 3887,
+ -1, 3889, -1, -1, -1, -1, 3894, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3915, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3942, -1, -1, -1, -1, -1,
+ -1, -1, 3950, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3975, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2167, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5664, -1, 2178, 5073, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2194, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4044, -1, 4046, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1391, -1, -1, -1, -1, -1, -1,
+ -1, 2247, -1, -1, 1402, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1417,
+ -1, -1, 2268, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2281, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2293, -1, -1,
+ 5784, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5207, -1, 4137,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2333, 2334, -1,
+ -1, -1, -1, -1, -1, -1, 4164, -1, -1, -1,
+ -1, -1, 4170, -1, -1, 5245, -1, -1, -1, -1,
+ 1508, 4179, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5856, -1, -1, -1, -1, 5267, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5902, -1,
+ -1, -1, -1, 5907, 5908, -1, -1, -1, -1, -1,
+ -1, -1, 4250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5334, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4278, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4300, -1, -1, 2481, -1, -1, -1, -1,
+ -1, -1, -1, 1641, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4324, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6019, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5456, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4422, -1, -1, 4425, -1, -1,
+ -1, -1, -1, 4431, -1, -1, -1, -1, -1, -1,
+ -1, 4439, -1, 4441, -1, -1, 4444, -1, -1, -1,
+ 4448, 4449, 4450, 4451, 4452, -1, -1, 4455, 4456, 4457,
+ 4458, 4459, 4460, 4461, 4462, 4463, 4464, -1, -1, -1,
+ 4468, 4469, 4470, -1, -1, 4473, -1, -1, -1, -1,
+ 4478, -1, -1, -1, 4482, -1, -1, -1, 4486, -1,
+ -1, -1, -1, -1, -1, -1, 4494, -1, -1, 4497,
+ -1, 4499, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4509, -1, -1, 4512, 4513, -1, -1, -1, 4517,
+ 4518, -1, -1, -1, -1, -1, 4524, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4534, -1, -1, 4537,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4547,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6246, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1921, 5664, -1, 4594, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4610, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4626, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4638, -1, -1, -1, -1, -1, -1, -1, -1, 905,
+ -1, -1, -1, -1, -1, -1, -1, -1, 914, -1,
+ 1988, -1, -1, -1, -1, -1, 922, -1, -1, 925,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2025, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5784, -1, -1, -1, 4716, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2058, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4741, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1028, -1, -1, -1, -1, 1033, -1, -1,
+ -1, 1037, -1, -1, -1, -1, 5856, -1, 1044, -1,
+ -1, 1047, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1059, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5902, -1, -1, -1, -1, 5907, 5908, 2167,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4846, -1,
+ 2178, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2194, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4876, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4889, 4890, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1166, 1167, -1, -1, -1, -1, -1, -1, -1, 2247,
+ -1, -1, -1, -1, -1, -1, 4924, -1, 3104, 4927,
+ 4928, 4929, 3108, 3109, -1, -1, -1, -1, -1, -1,
+ 2268, 4939, -1, -1, -1, -1, -1, 1203, -1, 6019,
+ -1, -1, -1, 2281, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2293, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3167, -1, -1, -1, -1, -1, 3173, -1, -1,
+ -1, -1, -1, -1, -1, 2333, 2334, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5020, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5031, -1, -1, -1, -1, 3214, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5059, -1, -1, 5062, -1, -1, -1, -1, -1,
+ -1, -1, 5070, 5071, -1, 5073, -1, -1, -1, 5077,
+ 5078, -1, -1, -1, 5082, -1, -1, -1, 5086, -1,
+ -1, 5089, 5090, -1, -1, -1, 5094, -1, -1, -1,
+ -1, -1, 5100, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5112, -1, -1, 1373, 1374, -1,
+ -1, -1, 5120, -1, -1, -1, 5124, -1, -1, -1,
+ 1386, -1, -1, -1, -1, 1391, 1392, -1, -1, -1,
+ 1396, -1, 1398, -1, -1, -1, 1402, -1, -1, -1,
+ -1, -1, -1, 2481, -1, -1, -1, -1, -1, 5157,
+ -1, 1417, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6246, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5189, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1459, -1, 1461, 1462, -1, -1, 5207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3412, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5245, -1, -1,
+ -1, -1, 1508, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5267,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5290, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3486, -1, -1, -1, 3490, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1587, -1, -1, -1, -1, 5334, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5360, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5376, -1,
+ -1, -1, -1, -1, -1, 1641, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5407,
+ -1, -1, -1, -1, -1, -1, 1672, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1702, 3623, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5454, -1, 5456, -1,
+ -1, -1, 3638, -1, -1, -1, -1, 3643, -1, -1,
+ -1, -1, -1, -1, 1730, 1731, 1732, -1, 1734, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1754, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5515, -1, -1,
+ 5518, -1, -1, 5521, 5522, 5523, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5546, 5547,
+ -1, -1, 5550, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5565, -1, -1,
+ -1, -1, -1, -1, 5572, -1, 1832, -1, -1, 5577,
+ 1836, 1837, 5580, 5581, -1, -1, -1, -1, -1, -1,
+ 5588, -1, -1, -1, -1, 1851, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5609, -1, 5611, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5623, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1921, 5664, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5675, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3884, -1,
+ -1, 3887, -1, 3889, -1, -1, -1, -1, 3894, -1,
+ -1, 5719, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1988, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3942, -1, -1, 2025,
+ -1, -1, -1, -1, 3950, -1, 3104, -1, -1, -1,
+ 3108, 3109, -1, 5781, -1, -1, 5784, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3975,
+ -1, -1, 2058, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5816, -1,
+ -1, -1, 5820, -1, 5822, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3167,
+ -1, -1, 5840, -1, -1, 3173, -1, -1, 5846, -1,
+ -1, -1, 5850, -1, -1, -1, -1, -1, 5856, 5857,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4044, -1,
+ 4046, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2138, 2139, 2140, -1, 3214, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5902, -1, -1, -1, -1, 5907,
+ 5908, 2167, -1, -1, 5912, -1, -1, -1, -1, 5917,
+ 5918, -1, 2178, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2194, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5953, -1, -1, -1, -1,
+ -1, 4137, 5960, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5988, 2247, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4179, -1, -1, 2262, -1, -1, 2265,
+ -1, -1, 2268, -1, -1, -1, -1, -1, -1, 2275,
+ 6018, 6019, -1, -1, -1, 2281, -1, -1, -1, -1,
+ -1, 4207, -1, -1, -1, -1, -1, 2293, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6044, -1, -1, -1,
+ 2306, 2307, 6050, -1, -1, 6053, -1, -1, 6056, -1,
+ -1, -1, -1, -1, -1, 2321, -1, -1, 2324, 6067,
+ -1, -1, -1, -1, -1, -1, 6074, 2333, 2334, -1,
+ -1, -1, -1, -1, 3412, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6092, -1, -1, -1, -1, -1,
+ -1, -1, 4278, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6110, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4300, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2392, -1, -1, 2395,
+ 2396, -1, -1, -1, -1, -1, -1, -1, 4324, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3486, -1,
+ -1, -1, 3490, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2432, 2433, -1, -1,
+ -1, -1, 2438, 2439, -1, -1, -1, -1, -1, 2445,
+ 2446, 2447, -1, 6191, 2450, -1, 2452, -1, 2454, 2455,
+ 2456, 2457, 2458, 2459, -1, 2461, -1, 2463, 2464, -1,
+ -1, 2467, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2481, 2482, 2483, 2484, -1,
+ -1, -1, -1, -1, -1, 6233, 6234, 6235, -1, -1,
+ -1, -1, -1, 2499, 6242, -1, -1, -1, 6246, 4425,
+ -1, -1, -1, 6251, -1, 6253, -1, 6255, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4448, -1, -1, -1, -1, -1, -1, -1,
+ 6278, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3623, -1, 4473, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3638, -1, -1, -1, -1, 3643, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6332, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6342, -1, -1, -1, -1, -1,
+ -1, -1, 6350, 6351, -1, -1, -1, -1, 6356, -1,
+ -1, 6359, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6369, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6379, -1, -1, -1, -1, 2642, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2682, -1, -1, 6427,
+ -1, -1, -1, -1, -1, 6433, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4626, -1, 6450, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6465, -1, -1,
+ -1, -1, 6470, -1, -1, -1, -1, 2733, -1, -1,
+ -1, -1, -1, -1, -1, 6483, -1, -1, -1, -1,
+ 6488, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6519, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6530, -1, -1, -1, 6534, -1, -1, -1,
+ 4716, -1, -1, -1, -1, -1, -1, -1, 6546, -1,
+ -1, -1, -1, -1, -1, -1, 3884, -1, -1, 3887,
+ -1, 3889, -1, -1, -1, 4741, 3894, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6583, 6584, -1, -1, 6587,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6597,
+ 6598, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3942, -1, -1, -1, -1, -1,
+ -1, -1, 3950, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3975, -1, -1,
+ -1, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915,
+ -1, 2917, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2927, -1, -1, 2930, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4876, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4044, -1, 4046, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2986, -1, -1, -1, 2990, -1, -1, 2993, -1, 2995,
+ -1, -1, 2998, -1, -1, -1, -1, -1, 4924, -1,
+ -1, 4927, -1, -1, -1, -1, -1, 3013, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3022, 3023, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, -1, -1, 4137,
+ -1, 8, -1, -1, -1, 12, -1, 14, -1, 16,
+ 17, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 27, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 43, 44, 3104, -1,
+ -1, 4179, 3108, 3109, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, -1, -1, -1, 5073, 3154, -1,
+ -1, -1, -1, 100, -1, 102, 103, -1, -1, 3165,
+ -1, 3167, 3168, -1, 3170, 3171, -1, 3173, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 130, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 142, -1, 144, 145, -1,
+ 4278, -1, -1, -1, 151, -1, 153, -1, 3214, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 165, -1,
+ 167, -1, 4300, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 182, -1, 184, -1, -1,
+ 187, -1, -1, -1, -1, -1, 4324, -1, -1, -1,
+ -1, -1, -1, -1, -1, 202, -1, 204, -1, -1,
+ -1, 208, -1, -1, -1, -1, -1, 214, -1, -1,
+ -1, -1, -1, -1, -1, 222, -1, 224, -1, -1,
+ -1, 5207, -1, -1, 231, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 248, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 265, 5245,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5267, -1, -1, -1, -1, -1, 4425, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 305, 306,
+ -1, -1, -1, -1, 311, -1, -1, -1, -1, -1,
+ 4448, -1, 3378, 3379, 3380, -1, 323, -1, 3384, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 341, 4473, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3411, 3412, -1, 5334, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 384, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3454, -1,
+ -1, 398, -1, -1, -1, -1, -1, 404, 405, -1,
+ 407, -1, -1, -1, -1, 412, -1, -1, 415, -1,
+ -1, 418, -1, -1, 421, -1, -1, -1, -1, -1,
+ 3486, 428, -1, -1, 3490, -1, -1, 434, 435, -1,
+ -1, -1, -1, -1, -1, 442, -1, -1, -1, 446,
+ -1, -1, -1, -1, -1, -1, 3512, -1, -1, 456,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 471, -1, -1, -1, -1, -1,
+ 5456, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 491, -1, 493, -1, 4626, -1,
+ -1, -1, -1, -1, -1, 502, -1, -1, -1, -1,
+ -1, 508, -1, -1, -1, -1, 513, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 526,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 549, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3623, -1, -1,
+ 567, -1, -1, -1, 571, -1, -1, -1, -1, -1,
+ 3636, -1, 3638, 3639, -1, 3641, 3642, 3643, 4716, -1,
+ -1, -1, -1, -1, -1, 3651, -1, -1, -1, -1,
+ 3656, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4741, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3682, 3683, 3684, -1,
+ -1, 3687, -1, -1, -1, -1, -1, -1, -1, 3695,
+ 3696, 3697, 3698, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3708, -1, -1, 3711, -1, 3713, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, -1, 3724, 3725,
+ -1, -1, 3728, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5664, -1,
+ -1, 3747, -1, 3749, -1, 3751, -1, 125, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3771, -1, -1, -1, 147,
+ 148, -1, -1, 151, -1, -1, 3782, -1, -1, 157,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4876, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3813, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 199, 3828, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3842, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4924, -1, -1, 4927,
+ -1, -1, -1, -1, -1, -1, 234, -1, 5784, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 246, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3884, -1,
+ -1, 3887, -1, 3889, -1, -1, -1, -1, 3894, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3915,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5856, -1, -1, -1, -1, -1, 3942, -1, -1, -1,
+ -1, -1, -1, -1, 3950, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3975,
+ -1, -1, -1, -1, -1, -1, 5902, -1, -1, -1,
+ -1, 5907, 5908, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5073, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4044, -1,
+ 4046, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 428, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6019, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5207,
+ -1, 4137, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4164, -1,
+ -1, -1, -1, -1, 4170, -1, -1, 5245, -1, -1,
+ -1, -1, -1, 4179, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5267,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5334, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4278, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4300, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 695, 4324, -1,
+ 6246, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 744, 745, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5456, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 791, -1, -1, 4422, -1, -1, 4425,
+ -1, -1, -1, -1, -1, 4431, -1, -1, -1, -1,
+ -1, -1, -1, 4439, -1, 4441, -1, -1, 4444, -1,
+ -1, -1, 4448, 4449, 4450, 4451, 4452, -1, -1, 4455,
+ 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, -1,
+ -1, -1, 4468, 4469, 4470, -1, -1, 4473, -1, -1,
+ -1, -1, 4478, -1, -1, -1, 4482, -1, -1, -1,
+ 4486, -1, -1, -1, -1, -1, -1, -1, 4494, -1,
+ -1, 4497, -1, 4499, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4509, -1, -1, 4512, 4513, -1, -1,
+ -1, 4517, 4518, -1, -1, -1, -1, -1, 4524, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4534, -1,
+ 908, 4537, -1, -1, 912, -1, -1, -1, -1, -1,
+ -1, 4547, 920, -1, -1, 923, -1, -1, 926, 927,
+ -1, 929, -1, 931, -1, -1, 934, -1, 936, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 958, -1, -1, -1, -1, -1, 5664, -1, 4594, -1,
+ -1, 969, -1, -1, -1, 973, -1, -1, -1, -1,
+ -1, -1, 980, 981, 4610, -1, 984, -1, 986, 987,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4626, -1, -1, -1, -1, -1, -1, -1, -1, 1007,
+ -1, 1009, 4638, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1032, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1053, -1, 1055, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1064, 1065, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1074, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5784, -1, -1, -1,
+ 4716, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4741, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5856, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1169, -1, 1171, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5902, -1, 1204, -1, -1, 5907,
+ 5908, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4846, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1033, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4876, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4889, 4890, -1, 1059, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1278, -1, -1, 1281, -1, 1283, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4924, -1,
+ 1298, 4927, 4928, 4929, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4939, -1, -1, -1, -1, -1, -1,
+ -1, 6019, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1364, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1389, -1, -1, 5020, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5031, 1404, -1, 1406, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1415, -1, -1,
+ -1, -1, -1, -1, 1422, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5059, -1, -1, 5062, -1, -1, -1,
+ -1, -1, -1, -1, 5070, 5071, -1, 5073, -1, -1,
+ -1, 5077, 5078, -1, -1, -1, 5082, -1, -1, -1,
+ 5086, -1, -1, 5089, 5090, 1463, -1, 1465, 5094, -1,
+ -1, -1, -1, -1, 5100, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5112, -1, -1, -1,
+ -1, -1, -1, -1, 5120, -1, -1, -1, 5124, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5157, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6246, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5189, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1391, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1402,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5245,
+ -1, -1, -1, -1, 1417, -1, -1, -1, -1, -1,
+ -1, -1, 1630, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5267, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1648, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5334, -1,
+ -1, -1, -1, -1, -1, 1508, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5360, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5376, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1777,
+ 1778, 5407, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1818, 1819, -1, -1, -1, -1, -1, -1, 5454, -1,
+ 5456, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1641, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 83, -1,
+ -1, -1, -1, 88, -1, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 100, -1, -1, 1876, -1,
+ -1, -1, -1, 1881, -1, -1, 1884, -1, -1, 5515,
+ -1, -1, 5518, -1, 1892, 5521, 5522, 5523, -1, -1,
+ 125, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1908, 136, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5546, 5547, 147, 148, 5550, -1, 151, -1, -1, -1,
+ -1, -1, 157, -1, -1, -1, 161, -1, -1, 5565,
+ -1, -1, -1, -1, -1, -1, 5572, -1, -1, -1,
+ -1, 5577, -1, -1, 5580, 5581, -1, -1, 183, -1,
+ -1, -1, 5588, -1, 1962, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 199, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5609, -1, 5611, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5623, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2030, -1, -1, -1, -1, -1, 5664, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5675,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5719, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1921, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5781, -1, -1, 5784, -1,
+ -1, -1, -1, -1, -1, 2163, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5816, -1, -1, -1, 5820, 1988, 5822, -1, -1, -1,
+ 2198, -1, -1, 428, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5840, -1, -1, -1, -1, -1,
+ 5846, -1, -1, -1, 5850, -1, -1, -1, -1, -1,
+ 5856, 5857, 2025, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2241, -1, 2243, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2058, -1, -1, -1, -1,
+ -1, 2269, -1, -1, -1, -1, 5902, -1, -1, -1,
+ -1, 5907, 5908, -1, -1, -1, 5912, -1, -1, -1,
+ -1, 5917, 5918, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5953, 2326, -1,
+ 2328, -1, -1, -1, 5960, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2342, 2343, -1, 2345, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5988, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2167, -1, -1, -1, -1, 2377,
+ -1, -1, -1, -1, -1, 2178, -1, -1, -1, -1,
+ -1, 2389, 6018, 6019, -1, 2393, -1, -1, -1, 2397,
+ -1, 2194, 2400, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6044, -1,
+ -1, -1, -1, -1, 6050, -1, -1, 6053, -1, -1,
+ 6056, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6067, -1, -1, -1, -1, -1, -1, 6074, -1,
+ -1, -1, -1, -1, 2247, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6092, -1, -1, -1,
+ 695, -1, -1, -1, -1, 2268, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6110, -1, -1, -1, 2281, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2293, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 744,
+ 745, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2333, 2334, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6191, 791, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6233, 6234, 6235,
+ -1, -1, -1, -1, -1, -1, 6242, -1, -1, -1,
+ 6246, -1, -1, -1, -1, 6251, -1, 6253, -1, 6255,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6278, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2481, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6332, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6342, -1, -1, -1,
+ -1, -1, -1, -1, 6350, 6351, -1, -1, -1, -1,
+ 6356, -1, -1, 6359, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6369, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6379, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1006, 1007, -1, 1009, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6427, -1, -1, -1, -1, -1, 6433, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6450, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6465,
+ -1, -1, -1, -1, 6470, 1070, -1, -1, 1073, 1074,
+ -1, -1, -1, -1, -1, -1, -1, 6483, -1, -1,
+ -1, -1, 6488, 1088, -1, 1090, -1, 1092, -1, -1,
+ -1, -1, -1, 1098, -1, -1, -1, 1102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6519, -1, -1, -1, 1122, 1123, -1,
+ -1, -1, -1, -1, 6530, -1, -1, -1, 6534, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6546, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2933, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1169, -1, 1171, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6583, 6584, -1,
+ -1, 6587, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6597, 6598, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1264,
+ 1265, -1, -1, 1268, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1166, 1167, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1311, 3085, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3098, 3099, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3117,
+ 3118, -1, -1, -1, 3122, 3123, -1, -1, 3126, 3127,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3141, -1, -1, -1, -1, -1, -1,
+ 3148, -1, -1, -1, 3152, 3153, 1381, -1, 3156, 3157,
+ -1, -1, -1, -1, -1, 3163, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3175, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3187,
+ -1, -1, -1, -1, 3192, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3207,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3216, -1,
+ -1, 3219, -1, 3221, 3222, 3223, -1, -1, -1, -1,
+ 3228, 3229, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3238, -1, -1, -1, -1, 3243, -1, -1, -1, 3247,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3257,
+ 3258, -1, -1, -1, 3262, -1, -1, -1, -1, -1,
+ 3268, 3269, -1, -1, -1, -1, -1, 3275, -1, -1,
+ 3278, 1373, 1374, -1, -1, -1, -1, 3285, 3286, -1,
+ -1, -1, -1, 3291, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3303, -1, -1, 3306, -1,
+ -1, 3104, -1, 3311, -1, 3108, 3109, -1, -1, 3317,
+ 3318, -1, 3320, -1, 3322, -1, -1, 3325, 3326, -1,
+ 3328, -1, -1, -1, 3332, 3333, 3334, 3335, -1, 3337,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3350, 3351, -1, 3353, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3364, 3365, 3366, -1,
+ -1, 1596, -1, 1598, 3167, -1, 1601, -1, 1603, -1,
+ 3173, 1606, 1607, 1608, -1, -1, -1, 1612, -1, -1,
+ -1, -1, -1, -1, 1619, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1633, -1,
+ 1635, -1, -1, -1, -1, 1640, -1, -1, -1, -1,
+ -1, 3214, -1, 3421, -1, -1, -1, -1, -1, -1,
+ -1, 3429, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3449, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3499, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1765, 3539, -1, 3541, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1777, 1778, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1794,
+ -1, -1, -1, -1, 1799, 1800, -1, -1, -1, -1,
+ 1672, -1, -1, 3581, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3596, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1702, -1, -1, -1, -1, -1, -1, -1, -1, 3412,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1730, 1731,
+ 1732, -1, 1734, -1, -1, -1, -1, 3645, -1, -1,
+ -1, 1876, -1, 1878, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1754, 1888, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3486, -1, -1, -1, 3490, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1832, 1966, -1, -1, 1836, 1837, -1, -1, -1, -1,
+ -1, 1976, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3623, -1, -1, -1, 2059, -1, -1, 2062, 2063, -1,
+ -1, -1, -1, -1, -1, 3638, -1, -1, -1, -1,
+ 3643, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3912, -1, -1, -1, -1, 3917,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3937,
+ -1, -1, -1, -1, -1, -1, -1, 2172, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3954, -1, -1, -1,
+ 3958, -1, -1, -1, -1, 3963, 3964, 3965, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3999, 4000, 4001, 4002, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4036, -1,
+ 4038, 4039, 4040, -1, -1, -1, 2138, 2139, 2140, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3884, -1, -1, 3887, -1, 3889, -1, -1, -1,
+ -1, 3894, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2361, -1, 2363, -1,
+ -1, -1, 2367, -1, 2369, -1, -1, 2372, -1, 3942,
+ -1, 2376, -1, 4151, -1, -1, 2381, 3950, -1, -1,
+ -1, -1, 4160, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3975, -1, -1, -1, -1, -1, 4186, 4187,
+ -1, -1, -1, 4191, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4213, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4044, -1, 4046, -1, -1, -1, -1, -1, 4257,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4268, -1, -1, -1, -1, 4273, -1, -1, -1, -1,
+ -1, 4279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4309, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4319, -1, -1, 4322, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4137, -1, 2438, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2450, 4357,
+ 2452, 4359, 2454, -1, -1, 2457, 2458, 2459, -1, -1,
+ -1, -1, 2464, -1, -1, 2467, -1, -1, 4376, -1,
+ -1, -1, -1, -1, -1, -1, 4179, -1, -1, -1,
+ 2482, 2483, 2484, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4401, -1, -1, -1, 2499, -1, -1,
+ -1, -1, -1, -1, 4207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4278, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4300, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4324, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2642, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2682, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1746, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4425, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2733, -1, -1, 4642, -1, -1, 4645, -1, 4647,
+ -1, -1, -1, -1, -1, 4448, -1, -1, -1, -1,
+ -1, -1, 4660, -1, -1, -1, -1, -1, -1, 1815,
+ -1, -1, -1, -1, 4672, -1, -1, -1, 4676, -1,
+ 4473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4695, -1, -1,
+ -1, 2926, -1, -1, -1, -1, -1, -1, 2933, -1,
+ -1, -1, -1, -1, -1, 4713, -1, -1, 2943, -1,
+ 4718, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4743, -1, -1, -1, 4747,
+ -1, -1, -1, -1, -1, -1, -1, 4755, 4756, 4757,
+ 4758, -1, -1, -1, -1, -1, -1, 4765, 4766, 4767,
+ 4768, -1, -1, -1, -1, -1, 4774, 4775, -1, -1,
+ -1, -1, 4780, 4781, -1, 4783, 4784, 4785, 4786, 4787,
+ 4788, 4789, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4799, -1, -1, -1, 4803, 4804, 4805, 4806, -1,
+ -1, -1, -1, -1, -1, 2907, 2908, 2909, 2910, 2911,
+ 2912, 2913, 2914, 2915, -1, 2917, -1, -1, -1, 4827,
+ -1, -1, -1, 4626, -1, 2927, -1, -1, 2930, -1,
+ -1, -1, -1, -1, -1, 3070, -1, 4845, -1, 3074,
+ -1, -1, -1, -1, -1, 3080, -1, 3082, -1, -1,
+ 3085, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2986, -1, -1, -1, 2990, -1,
+ -1, 2993, -1, 2995, -1, -1, 2998, -1, 3133, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4920, 4716, -1, -1, -1, -1, -1, -1,
+ 3022, 3023, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4741, -1,
+ -1, -1, -1, -1, -1, 4953, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4975, -1, 4977,
+ -1, -1, -1, -1, -1, -1, -1, 4985, 4986, 4987,
+ 4988, 4989, -1, -1, -1, -1, -1, -1, 2144, -1,
+ 4998, -1, 2148, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3154, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3296, -1, -1, -1, -1, -1, -1, -1, 3304,
+ -1, -1, 3307, 4876, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3319, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4924, -1, -1, 4927, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5208, 5209, 5210, -1, -1, -1, 5214, 5215, 5216, 5217,
+ -1, -1, -1, 5221, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5257,
+ 5258, 5259, 5260, 5261, -1, 5263, 5264, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5275, 5276, -1,
+ 5073, -1, -1, -1, -1, -1, 3378, 3379, 3380, -1,
+ 2436, -1, 3384, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2451, 5304, -1, -1, 2455,
+ -1, -1, -1, -1, 5312, 5313, -1, 5315, -1, 3411,
+ -1, -1, -1, 2469, 2470, 2471, -1, -1, 2474, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3581, 3582, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3599, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5406, -1,
+ -1, -1, -1, -1, 5207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5245, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5267, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5482, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5334, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3651,
+ -1, -1, -1, -1, 3656, -1, 3791, -1, -1, -1,
+ -1, 3796, 5570, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5585, -1, -1,
+ -1, -1, 3684, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3695, -1, 3697, 3698, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3708, -1, -1, 3711,
+ -1, 3713, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3747, -1, 3749, -1, 3751,
+ -1, -1, -1, 5456, -1, -1, -1, -1, 5666, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5685, -1, -1,
+ -1, -1, 5690, 5691, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5700, -1, -1, -1, -1, -1, -1, 5707,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3813, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3828, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5743, 5744, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5756, -1,
+ 5758, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5773, -1, -1, -1, 2925,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5798, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5809, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3915, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5843, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5854, -1, -1, -1,
+ -1, -1, -1, 3009, -1, -1, -1, -1, -1, -1,
+ -1, 5664, 5870, -1, -1, 3021, -1, -1, -1, -1,
+ 3026, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5891, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5901, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5926, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5966, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4207, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5784, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6037,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4273, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5856, -1, -1, 6064, -1, -1, -1,
+ -1, -1, 4164, -1, -1, -1, -1, -1, 4170, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4322, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5902,
+ 6108, -1, -1, -1, 5907, 5908, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6122, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4250, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6165, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6181, -1, -1, 4411, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6019, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6277,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6320, -1, -1, -1, -1, -1, -1, -1,
+ 4422, -1, -1, -1, -1, -1, -1, -1, -1, 4431,
+ -1, -1, -1, -1, -1, -1, -1, 4439, -1, 4441,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4468, 4469, 4470, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4615, -1, -1, -1, 4486, -1, -1, -1, -1, -1,
+ -1, -1, 4494, -1, -1, 4497, -1, 4499, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4509, 6416, -1,
+ -1, -1, -1, -1, -1, 4517, 4518, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6246, -1, 4547, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4716, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4594, -1, -1, -1, -1, -1, 3654, -1,
+ -1, -1, -1, -1, -1, -1, 4741, -1, 4610, -1,
+ -1, -1, -1, 4748, -1, -1, -1, -1, 3674, 3675,
+ -1, 3677, -1, -1, 4759, -1, 3682, 3683, -1, 3685,
+ -1, 3687, -1, -1, -1, 3691, -1, -1, 3694, -1,
+ -1, -1, -1, 3699, -1, -1, -1, -1, -1, 3705,
+ -1, -1, -1, -1, 3710, -1, -1, -1, -1, -1,
+ -1, 3717, 3718, 3719, 3720, -1, -1, -1, 3724, 3725,
+ -1, 3727, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3744, -1,
+ 3746, -1, -1, -1, -1, -1, -1, 3753, 3754, 3755,
+ 3756, 3757, 3758, 3759, 3760, 3761, 3762, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3806, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4924,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4991, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3930, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4928, 4929, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4939, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5144,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5020, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5031,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5070, 5071,
+ -1, -1, -1, -1, -1, 5077, 5078, -1, -1, -1,
+ 5082, -1, -1, -1, 5086, -1, -1, 5089, 5090, -1,
+ -1, -1, 5094, 5228, -1, -1, -1, -1, 5100, 5234,
+ -1, -1, -1, 5238, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4168, 4169, -1, -1, -1, 4173, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4202, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5157, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5189, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5360, -1,
+ -1, -1, -1, -1, -1, 4421, -1, -1, -1, -1,
+ -1, 4427, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4445,
+ 4446, -1, -1, 4449, 4450, 4451, 4452, -1, -1, 4455,
+ 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4487, -1, -1, 4490, -1, 4492, -1, -1, 4495,
+ 4496, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4511, 4512, 4513, 4514, -1,
+ 4516, -1, -1, -1, -1, -1, -1, 5602, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5515, -1, -1, -1, -1, -1, 5521,
+ 5522, 5523, -1, -1, -1, -1, -1, -1, -1, 5664,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5546, 5547, -1, -1, 5550, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4635,
+ -1, -1, -1, -1, -1, -1, 5588, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5611,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5758, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4846, -1, -1, -1, -1, -1, -1, -1, 5933, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5820, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4888, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5846, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5857, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6040, -1, -1, -1, -1,
+ 5912, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5953, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5021, -1, -1, -1, 5025,
+ -1, 5027, 5028, -1, -1, -1, -1, 5033, 5034, 5035,
+ 5036, -1, -1, -1, 5040, 5041, 5042, 5043, 5044, 5045,
+ 5046, 5047, 5048, 5049, 5050, 5051, 5052, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5076, -1, -1, 5079, -1, 5081, -1, -1, 5084, -1,
+ -1, 5087, 5088, -1, -1, 5091, 5092, -1, -1, -1,
+ -1, -1, 6044, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6074, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5138, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5156, -1, -1, -1, -1, -1, -1, -1, 6110, -1,
+ -1, -1, -1, 5169, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6233, 6234, 6235, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6255, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5363, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6332, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6356, -1, -1, 6359, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6379, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5451, 5452, -1, -1, -1,
+ -1, -1, -1, 5459, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5511, -1, -1, -1, -1,
+ -1, 5517, 5518, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5536, 6483, 5538, -1, -1, -1, 5542, 5543, 5544, 5545,
+ -1, -1, 5548, 5549, -1, -1, -1, 5553, -1, -1,
+ -1, 5557, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6519, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6530, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5621, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6583, -1, -1, -1, -1, 6, 7, -1, 9,
+ 10, 11, -1, -1, -1, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, -1, -1, -1,
+ 30, 31, 32, 33, -1, 35, 36, 37, 38, -1,
+ 40, 41, 42, -1, -1, -1, -1, -1, 48, 49,
+ 5686, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, -1, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5722, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 117, -1, -1,
+ -1, 121, 122, 123, 124, 125, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
+ -1, -1, -1, -1, -1, -1, 146, -1, 148, -1,
+ -1, -1, -1, -1, -1, -1, 156, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 168, -1,
+ -1, -1, -1, -1, -1, 175, -1, 5813, -1, 5815,
+ 5816, 5817, 5818, 5819, -1, 185, 186, -1, -1, -1,
+ -1, -1, -1, -1, 5830, 5831, 5832, -1, -1, -1,
+ -1, -1, -1, -1, 5840, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 215, -1, -1, -1, -1,
+ -1, -1, 5858, 223, -1, -1, -1, -1, 228, -1,
+ -1, -1, -1, -1, -1, 235, -1, -1, 5874, -1,
+ -1, 241, -1, 243, -1, -1, -1, -1, -1, -1,
+ 250, -1, 252, -1, -1, -1, -1, -1, -1, -1,
+ -1, 261, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 276, 277, -1, -1,
+ -1, -1, -1, 283, -1, 285, -1, -1, 288, 289,
+ -1, 291, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, -1, 303, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 326, 327, 328, -1,
+ -1, -1, -1, -1, -1, -1, 336, 337, -1, -1,
+ -1, -1, 342, -1, -1, 345, -1, 347, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 363, 364, -1, 366, 367, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 380, -1, 382, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 397, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6045,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 419,
+ 6056, -1, -1, 6059, -1, 425, -1, 6063, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 444, 6081, -1, 447, -1, -1,
+ 450, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 466, -1, -1, -1,
+ -1, -1, -1, 473, -1, -1, -1, -1, -1, -1,
+ -1, 481, 482, -1, -1, 6121, -1, 487, -1, 489,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 499,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 514, -1, -1, 517, -1, -1,
+ -1, 6157, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 574, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6228, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6240, -1, 6242, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6276, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6362, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6425,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6449, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6465,
+ -1, -1, -1, -1, 6470, -1, -1, -1, -1, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, 6525,
+ -1, -1, 6528, -1, -1, -1, -1, 63, -1, 65,
+ 6536, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6558, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 3, -1, -1, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, 573, 30, 31,
+ 32, 33, -1, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 100, -1,
+ 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 114, -1, -1, 117, -1, -1, 120, 121,
+ 122, 123, 124, 125, -1, -1, -1, -1, 130, -1,
+ -1, -1, -1, -1, -1, -1, -1, 139, -1, -1,
+ 142, -1, 144, 145, 146, -1, 148, -1, -1, 151,
+ -1, 153, -1, -1, 156, -1, -1, -1, -1, -1,
+ -1, -1, -1, 165, -1, 167, 168, -1, -1, -1,
+ -1, -1, -1, 175, -1, -1, -1, -1, -1, -1,
+ 182, -1, 184, 185, 186, 187, -1, -1, -1, -1,
+ -1, 193, -1, -1, -1, -1, -1, -1, -1, -1,
+ 202, -1, 204, -1, -1, -1, 208, -1, -1, -1,
+ -1, -1, 214, 215, -1, -1, -1, -1, -1, -1,
+ 222, 223, 224, -1, -1, -1, 228, -1, -1, 231,
+ -1, -1, -1, 235, -1, -1, -1, -1, -1, 241,
+ -1, 243, -1, -1, -1, -1, 248, -1, 250, -1,
+ 252, -1, -1, -1, -1, -1, -1, -1, -1, 261,
+ -1, -1, -1, 265, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 276, 277, -1, -1, 280, -1,
+ -1, 283, -1, 285, -1, -1, 288, 289, -1, 291,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ -1, 303, -1, 305, 306, -1, -1, -1, -1, 311,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 323, -1, -1, 326, 327, 328, -1, -1, -1,
+ -1, -1, -1, -1, 336, 337, -1, -1, -1, 341,
+ 342, -1, -1, 345, -1, 347, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 363, 364, -1, 366, 367, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 380, -1,
+ 382, -1, 384, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 397, 398, -1, -1, -1,
+ -1, -1, 404, 405, -1, 407, -1, -1, -1, -1,
+ 412, -1, -1, -1, -1, -1, 418, 419, -1, 421,
+ -1, -1, -1, 425, -1, -1, 428, -1, -1, -1,
+ -1, -1, 434, 435, -1, -1, -1, -1, -1, -1,
+ 442, -1, 444, -1, 446, 447, -1, -1, 450, -1,
+ -1, -1, -1, -1, 456, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 466, -1, -1, -1, -1, 471,
+ -1, 473, -1, -1, -1, -1, -1, -1, -1, 481,
+ 482, -1, -1, -1, -1, 487, -1, 489, -1, 491,
+ -1, 493, -1, -1, -1, -1, -1, 499, -1, -1,
+ 502, -1, -1, 505, -1, -1, 508, -1, -1, -1,
+ -1, 513, 514, -1, -1, 517, -1, -1, -1, -1,
+ -1, -1, -1, -1, 526, -1, -1, -1, -1, -1,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, -1, -1, -1, -1, -1, 549, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6, 7,
+ -1, 9, 10, 11, -1, 567, -1, 15, -1, 571,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, -1,
+ -1, -1, 30, 31, 32, 33, -1, 35, 36, 37,
+ 38, -1, 40, 41, 42, -1, -1, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ -1, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 117,
+ -1, -1, -1, 121, 122, 123, 124, 125, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 139, -1, -1, -1, -1, -1, -1, 146, -1,
+ 148, -1, -1, -1, -1, -1, -1, -1, 156, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 168, -1, -1, -1, -1, -1, -1, 175, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 215, -1, -1,
+ -1, -1, -1, -1, -1, 223, -1, -1, -1, -1,
+ 228, -1, -1, -1, -1, -1, -1, 235, -1, -1,
+ -1, -1, -1, 241, -1, 243, -1, -1, -1, -1,
+ -1, -1, 250, -1, 252, -1, -1, -1, -1, -1,
+ -1, -1, -1, 261, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 276, 277,
+ -1, -1, -1, -1, -1, 283, -1, 285, -1, -1,
+ 288, 289, -1, 291, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, -1, 303, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 326, 327,
+ 328, -1, -1, -1, -1, -1, -1, -1, 336, 337,
+ -1, -1, -1, -1, 342, -1, -1, 345, -1, 347,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 363, 364, -1, 366, 367,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 380, -1, 382, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 397,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 419, -1, -1, -1, -1, -1, 425, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 444, -1, -1, 447,
+ -1, -1, 450, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 466, -1,
+ -1, -1, -1, -1, -1, 473, -1, -1, -1, -1,
+ -1, -1, -1, 481, 482, -1, -1, -1, -1, 487,
+ -1, 489, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 499, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 514, -1, -1, 517,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, -1, -1, -1, -1,
+ -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 574, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, -1, 40, 41, 42,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, 70, -1, -1,
+ 73, -1, 75, 76, -1, 78, 79, 80, 81, 82,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, -1,
+ -1, -1, -1, 106, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, 148, -1, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, -1, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ 203, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, 276, 277, -1, 279, 280, 281, 282,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, 301, 302,
+ 303, -1, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ 473, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, 500, 501, 502,
+ 503, 504, 505, 506, -1, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 558, 559, 560, -1, -1,
+ -1, -1, -1, -1, 567, 568, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ -1, 40, 41, 42, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, 70, -1, -1, 73, -1, 75, 76, -1, 78,
+ 79, 80, 81, 82, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, 106, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, 148,
+ -1, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, 168,
+ 169, 170, -1, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, 241, -1, 243, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, 276, 277, -1,
+ 279, 280, 281, 282, 283, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, 301, 302, 303, -1, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, 500, 501, 502, 503, 504, 505, 506, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, 517, 518,
+ 519, 520, 521, -1, -1, 524, -1, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, -1,
+ 549, -1, -1, -1, -1, -1, -1, -1, -1, 558,
+ 559, -1, -1, -1, -1, -1, -1, -1, 567, 568,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, 500, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 558, 559, -1, -1, -1, -1, -1,
+ -1, -1, 567, 568, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, -1, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, -1, 40,
+ 41, 42, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, 75, 76, -1, 78, 79, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, 106, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, 148, -1, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, 168, 169, 170,
+ -1, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ 241, -1, 243, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, 276, 277, -1, 279, 280,
+ 281, 282, 283, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ 301, 302, 303, -1, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, 473, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, 500,
+ 501, 502, 503, 504, 505, 506, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, 517, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 558, 559, -1,
+ -1, -1, -1, -1, -1, -1, 567, 568, 5, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, -1, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, 70, -1, -1, 73, -1, 75, 76,
+ -1, 78, 79, 80, 81, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, 106,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, 148, -1, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, 168, 169, 170, -1, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, 241, -1, 243, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, 276,
+ 277, -1, 279, 280, 281, 282, 283, -1, 285, -1,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, 301, 302, 303, -1, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, 473, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, 500, 501, 502, 503, 504, 505, 506,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ 517, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 558, 559, -1, -1, -1, -1, -1, -1, -1,
+ 567, 568, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, -1, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, -1, 40, 41, 42,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, 117, 118, 119, 120, -1, 122,
+ 123, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, -1, -1, 148, -1, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, -1, -1,
+ -1, -1, 175, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ -1, 224, 225, 226, 227, -1, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, -1, -1, -1,
+ 253, 254, -1, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, 276, 277, -1, 279, 280, 281, 282,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, -1, -1, 299, -1, 301, 302,
+ 303, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, -1, -1, 338, -1, 340, 341, 342,
+ 343, -1, -1, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, 366, -1, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, -1, 381, -1,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, -1, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, -1, 467, -1, 469, 470, -1, 472,
+ 473, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, -1, 488, -1, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ -1, 514, 515, 516, 517, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 544, 545, 546, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, 568, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, -1,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, -1, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, 175, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, 224, 225, 226, 227, -1, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, -1, -1,
+ -1, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ 282, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, -1, 301,
+ 302, 303, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, -1, -1, 338, -1, 340, 341,
+ 342, 343, -1, -1, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, -1, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, -1, 381,
+ -1, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, -1, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, -1, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, -1, 488, -1, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, -1, 514, 515, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 544, 545, 546, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, 568, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, -1, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, -1, 40,
+ 41, 42, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, 75, 76, -1, 78, 79, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, 106, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, 148, -1, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, 168, 169, 170,
+ -1, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ 241, -1, 243, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, 276, 277, -1, 279, 280,
+ 281, 282, 283, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ 301, 302, 303, -1, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, 500,
+ 501, 502, 503, 504, 505, 506, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, 517, 518, 519, 520,
+ 521, -1, -1, 524, -1, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, -1, 549, -1,
+ -1, -1, -1, -1, -1, -1, -1, 558, 559, -1,
+ -1, -1, -1, -1, -1, -1, 567, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, 75, 76, -1,
+ 78, 79, 80, 81, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, 106, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, 242, 243, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, 282, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ 298, 299, 300, 301, 302, 303, -1, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, 500, 501, 502, 503, 504, 505, 506, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 558, 559, -1, -1, -1, -1, -1, -1, -1, 567,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, -1, -1, -1,
+ 105, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, 500, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 558, 559, -1, -1, -1, -1, -1,
+ -1, -1, 567, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, 70, -1,
+ -1, 73, -1, 75, 76, -1, 78, 79, 80, 81,
+ 82, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ -1, -1, -1, 105, 106, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ 282, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, 303, -1, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, 500, 501,
+ 502, 503, 504, 505, 506, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 558, 559, -1, -1,
+ -1, -1, -1, -1, -1, 567, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ -1, 40, 41, 42, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, 70, -1, -1, 73, -1, 75, 76, -1, 78,
+ 79, 80, 81, 82, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, 106, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, 148,
+ -1, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, 168,
+ 169, 170, -1, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, 241, -1, 243, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, 276, 277, -1,
+ 279, 280, 281, 282, 283, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, 301, 302, 303, -1, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, 473, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, 500, 501, 502, 503, 504, 505, 506, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, 517, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 558,
+ 559, -1, -1, -1, -1, -1, 565, 566, 567, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, 70, -1, -1, 73, -1, 75,
+ 76, -1, 78, 79, 80, 81, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ 106, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, 148, -1, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, 168, 169, 170, -1, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, 241, -1, 243, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ 276, 277, -1, 279, 280, 281, 282, 283, -1, 285,
+ -1, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, 301, 302, 303, -1, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, 473, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, 500, 501, 502, 503, 504, 505,
+ 506, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, 517, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 558, 559, 560, -1, -1, -1, -1, -1,
+ -1, 567, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, -1, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, -1, 40, 41, 42,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, 70, -1, -1,
+ 73, -1, 75, 76, -1, 78, 79, 80, 81, 82,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, -1,
+ -1, -1, -1, 106, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, 148, -1, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, -1, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, 276, 277, -1, 279, 280, 281, 282,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, 301, 302,
+ 303, -1, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ 473, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, 500, 501, 502,
+ 503, 504, 505, 506, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, 517, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 558, 559, -1, -1, -1,
+ -1, -1, -1, -1, 567, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ 70, -1, -1, 73, -1, 75, 76, -1, 78, 79,
+ 80, 81, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, 106, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, 282, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ 500, 501, 502, 503, 504, 505, 506, -1, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 558, 559,
+ -1, -1, -1, -1, -1, -1, -1, 567, 5, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, -1, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, 70, -1, -1, 73, -1, 75, 76,
+ -1, 78, 79, 80, 81, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, 106,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, 148, -1, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, 168, 169, 170, -1, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, 241, 242, 243, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, 276,
+ 277, -1, 279, 280, 281, 282, 283, -1, 285, -1,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, 301, 302, 303, -1, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, 473, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, 500, 501, 502, 503, 504, 505, 506,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ 517, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 558, 559, -1, -1, -1, -1, -1, -1, -1,
+ 567, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, 70, -1, -1, 73,
+ -1, 75, 76, -1, 78, 79, 80, 81, 82, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, 106, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, 277, -1, 279, 280, 281, 282, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, 301, 302, 303,
+ -1, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, 483,
+ -1, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, 500, 501, 502, 503,
+ 504, 505, 506, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 558, 559, -1, -1, -1, -1,
+ -1, -1, -1, 567, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, -1, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, -1, 40,
+ 41, 42, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, 75, 76, -1, 78, 79, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, 106, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, 148, -1, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ 241, -1, 243, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, 276, 277, -1, 279, 280,
+ 281, 282, 283, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ 301, 302, 303, -1, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, 473, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, 500,
+ 501, 502, 503, 504, 505, 506, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, 517, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 558, 559, -1,
+ -1, -1, -1, -1, -1, -1, 567, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, 75, 76, -1,
+ 78, 79, 80, 81, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, 106, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, 282, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, 301, 302, 303, -1, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, 500, 501, 502, 503, 504, 505, 506, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 558, 559, -1, -1, -1, -1, -1, -1, -1, 567,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, 500, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 558, 559, -1, -1, -1, -1, -1,
+ -1, -1, 567, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, 70, -1,
+ -1, 73, -1, 75, 76, -1, 78, 79, 80, 81,
+ 82, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, 106, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ 282, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, 303, -1, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, 500, 501,
+ 502, 503, 504, 505, 506, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 558, 559, -1, -1,
+ -1, -1, -1, -1, -1, 567, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ -1, 40, 41, 42, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, 70, -1, -1, 73, -1, 75, 76, -1, 78,
+ 79, 80, 81, 82, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, 106, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, 148,
+ -1, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, 168,
+ 169, 170, -1, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, 241, -1, 243, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, 276, 277, -1,
+ 279, 280, 281, 282, 283, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, 301, 302, 303, -1, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, 473, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, 500, 501, 502, 503, 504, 505, 506, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, 517, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 558,
+ 559, -1, -1, -1, -1, -1, -1, -1, 567, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, 70, -1, -1, 73, -1, 75,
+ 76, -1, 78, 79, 80, 81, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ 106, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, 148, -1, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, 168, 169, 170, -1, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, 241, -1, 243, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ 276, 277, -1, 279, 280, 281, 282, 283, -1, 285,
+ -1, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, 301, 302, 303, -1, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, 473, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, 500, 501, 502, 503, 504, 505,
+ 506, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, 517, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 558, 559, -1, -1, -1, -1, -1, -1,
+ -1, 567, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, -1, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, -1, 40, 41, 42,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, 70, -1, -1,
+ 73, -1, 75, 76, -1, 78, 79, 80, 81, 82,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, 106, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, 148, -1, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, -1, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, 276, 277, -1, 279, 280, 281, 282,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, 301, 302,
+ 303, -1, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ 473, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, 500, 501, 502,
+ 503, 504, 505, 506, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, 517, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 558, 559, -1, -1, -1,
+ -1, -1, -1, -1, 567, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ 70, -1, -1, 73, -1, 75, 76, -1, 78, 79,
+ 80, 81, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, 106, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, 282, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ 500, 501, 502, 503, 504, 505, 506, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 558, 559,
+ -1, -1, -1, -1, -1, -1, -1, 567, 5, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, -1, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, 70, -1, -1, 73, -1, 75, 76,
+ -1, 78, 79, 80, 81, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, 106,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, 148, -1, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, 241, -1, 243, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, 276,
+ 277, -1, 279, 280, 281, 282, 283, -1, 285, -1,
+ 287, -1, -1, 290, 291, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, 301, 302, 303, -1, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, -1, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, 473, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, 500, 501, 502, 503, 504, 505, 506,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ 517, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 558, 559, -1, -1, -1, -1, -1, -1, -1,
+ 567, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, 70, -1, -1, 73,
+ -1, 75, 76, -1, 78, 79, 80, 81, 82, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, 106, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, 277, -1, 279, 280, 281, 282, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, 301, 302, 303,
+ -1, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 558, 559, -1, -1, -1, -1,
+ -1, -1, -1, 567, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, -1, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, -1, 40,
+ 41, 42, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, 75, 76, -1, 78, 79, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, 106, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, 148, -1, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, 168, 169, 170,
+ -1, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ 241, -1, 243, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, 276, 277, -1, 279, 280,
+ 281, 282, 283, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ 301, 302, 303, -1, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, 473, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, 506, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, 517, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 558, 559, -1,
+ -1, -1, -1, -1, -1, -1, 567, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, 75, 76, -1,
+ 78, 79, -1, 81, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, 106, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, 282, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, 301, 302, 303, -1, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 558, 559, -1, -1, -1, -1, -1, -1, -1, 567,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, -1, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, -1, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ 75, 76, -1, 78, 79, -1, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, 106, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, 282, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ 355, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, 549, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ 355, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ 135, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 567, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, -1, 40, 41, 42, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, -1,
+ 175, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 567, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, 107, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, -1, -1, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 568, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, 471, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ -1, 549, -1, -1, -1, -1, -1, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, 567,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, 471, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ -1, 549, -1, -1, -1, -1, -1, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, 567,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, 76, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, 566, 567,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, 76, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ -1, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, 567,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 567, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, -1, -1, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, 567, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, -1, -1,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 567, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, -1, -1, -1, -1, -1, -1, -1, -1, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, 567, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, 70, -1, -1, 73, -1, 75,
+ 76, -1, -1, -1, 80, 81, -1, -1, -1, -1,
+ -1, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, -1, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, -1, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, -1, 224, 225,
+ 226, 227, -1, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, -1, 251, -1, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, -1, -1, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, -1, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, -1, 338, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, -1, 364, 365,
+ 366, -1, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, -1, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, -1,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ -1, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, -1, 488, -1, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, -1, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 544, 545,
+ 546, -1, -1, -1, -1, -1, -1, -1, -1, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 5, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, -1, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, 70, -1, -1, 73, -1, 75, 76,
+ -1, -1, -1, 80, 81, -1, -1, -1, -1, -1,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, -1, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, -1, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, -1, 224, 225, 226,
+ 227, -1, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, -1, 251, -1, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ -1, -1, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, -1, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ -1, 338, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, -1, 364, 365, 366,
+ -1, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, -1, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, -1, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, -1,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ -1, 488, -1, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, -1, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 544, 545, 546,
+ -1, -1, -1, -1, -1, -1, -1, -1, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, 80, -1, -1, -1, -1, -1, -1, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, -1, -1,
+ -1, -1, -1, -1, -1, -1, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, 80,
+ -1, -1, -1, -1, -1, -1, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, -1, -1, -1, -1,
+ -1, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, 80, -1, -1,
+ -1, -1, -1, -1, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, -1, -1, -1, -1, -1, -1,
+ -1, -1, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, 80, -1, -1, -1, -1,
+ -1, -1, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, -1, -1, -1, -1, -1, -1, -1, -1,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, 80, -1, -1, -1, -1, -1, -1,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ -1, -1, -1, -1, -1, -1, -1, -1, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, 80, -1, -1, -1, -1, -1, -1, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, -1, -1,
+ -1, -1, -1, -1, -1, -1, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, 80,
+ -1, -1, -1, -1, -1, -1, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, -1, -1, -1, -1,
+ -1, -1, -1, -1, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, -1, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, 560, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ -1, 40, 41, 42, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, 117, 118,
+ 119, 120, -1, 122, 123, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, -1, -1, 148,
+ -1, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, 168,
+ 169, 170, -1, -1, -1, -1, 175, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, -1, 224, 225, 226, 227, -1,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, 241, -1, 243, 244, 245, 246, 247, -1,
+ 249, -1, -1, -1, 253, 254, -1, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, 276, 277, -1,
+ 279, 280, 281, 282, 283, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, -1, -1,
+ 299, -1, 301, 302, 303, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, -1, -1, 338,
+ -1, 340, 341, 342, 343, -1, -1, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, 360, 361, 362, 363, 364, 365, 366, -1, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, -1, 381, -1, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ 419, 420, 421, 422, 423, 424, -1, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, -1, 467, -1,
+ 469, 470, -1, 472, 473, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, -1, 488,
+ -1, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, -1, 514, 515, 516, 517, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 544, 545, 546, -1, -1,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, 560, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, -1, -1, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, 560, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, -1, -1, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, 560, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ 70, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, 81, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, 242, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, 558, 559,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, 242, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, -1,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ 558, 559, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, 70, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, 81, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, 242, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, -1, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, 558, 559, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, 70, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, 81, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, 242, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, -1, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, 558, 559, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, 70, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, 483, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 557, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, 75, 76, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, 135, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, 303, -1, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ 342, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ 70, -1, -1, 73, -1, 75, 76, -1, 78, 79,
+ -1, 81, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, 282, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, -1, -1, -1, 175, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, 301, 302, 303, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, 342, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, 148, -1, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, 168, 169, 170, -1, -1, -1, -1, 175,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, 241, -1, 243, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ 276, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, 301, 302, 303, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, 342, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, 473, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, 517, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, -1, -1,
+ -1, 175, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, 301, 302, 303,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, 342, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, 175, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, 303, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ 342, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, -1, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, -1, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, -1, -1, -1, 175, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, -1, 224, 225, 226, 227,
+ -1, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, -1, -1, -1, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, 282, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, -1, 301, 302, 303, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, -1, -1,
+ 338, -1, 340, 341, 342, 343, -1, -1, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, -1,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, -1, 381, -1, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, -1, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, -1, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, -1,
+ 488, -1, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, -1, 514, 515, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 544, 545, 546, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, 117, 118, 119, 120, -1, 122, 123, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ -1, -1, 148, -1, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, 168, 169, 170, -1, -1, -1, -1, 175,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, -1, 224, 225,
+ 226, 227, -1, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, 241, -1, 243, 244, 245,
+ 246, 247, -1, 249, -1, -1, -1, 253, 254, -1,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ 276, -1, -1, 279, 280, 281, 282, 283, -1, 285,
+ -1, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, -1, -1, 299, -1, 301, 302, 303, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ -1, -1, 338, -1, 340, 341, 342, 343, 344, -1,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, -1, 364, 365,
+ 366, -1, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, -1, 381, -1, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, 419, 420, 421, 422, 423, 424, -1,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ -1, 467, -1, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, -1, 488, -1, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, -1, 514, -1,
+ 516, 517, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 544, 545,
+ 546, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, -1, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, -1, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, -1, -1,
+ -1, 175, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, -1,
+ 224, 225, 226, 227, -1, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, -1, -1, -1, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, -1, -1, 279, 280, 281, 282, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, -1, 301, 302, 303,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, -1, 338, -1, 340, 341, 342, 343,
+ -1, -1, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, -1,
+ 364, 365, 366, -1, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, -1, 381, -1, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, -1, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, -1, 467, -1, 469, 470, -1, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, -1, 488, -1, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, -1,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 544, 545, 546, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, -1,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, -1, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, 175, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, 224, 225, 226, 227, -1, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, -1, -1,
+ -1, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, -1, -1, 279, 280, 281,
+ 282, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, -1, 301,
+ 302, 303, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, -1, 338, -1, 340, 341,
+ 342, 343, -1, -1, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, -1, 364, 365, 366, -1, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, -1, 381,
+ -1, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, -1, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, -1, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, -1, 488, -1, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, -1, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 544, 545, 546, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, -1, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, -1, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, -1, 224, 225, 226, 227, -1, -1,
+ 230, -1, 232, 233, 234, 235, 236, 237, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ -1, -1, -1, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, -1, -1, 279,
+ 280, 281, 282, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ -1, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, -1, -1, 338, -1,
+ 340, 341, 342, 343, -1, -1, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, -1, 364, 365, 366, -1, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ -1, 381, -1, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, -1, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, -1, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, -1, 488, -1,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 544, 545, 546, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, -1, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, -1, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, -1, -1, -1, 175, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, -1, 224, 225, 226, 227,
+ -1, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, -1, -1, -1, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, -1,
+ -1, 279, 280, 281, 282, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, -1, 301, 302, 303, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, -1, -1,
+ 338, -1, 340, 341, 342, 343, -1, -1, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, -1, 364, 365, 366, -1,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, -1, 381, -1, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, -1, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, -1, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, -1,
+ 488, -1, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, -1, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 544, 545, 546, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, -1, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, 117, 118, 119, 120, -1, 122, 123, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ -1, -1, 148, -1, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, 168, 169, 170, -1, -1, -1, -1, 175,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, -1, 224, 225,
+ 226, 227, -1, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, 241, -1, 243, 244, 245,
+ 246, 247, -1, 249, -1, -1, -1, 253, 254, -1,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ 276, -1, -1, 279, 280, 281, 282, 283, -1, 285,
+ -1, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, -1, -1, 299, -1, 301, 302, 303, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ -1, -1, 338, -1, 340, 341, 342, 343, -1, -1,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, -1, 364, 365,
+ 366, -1, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, -1, 381, -1, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, 419, 420, 421, 422, 423, 424, -1,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ -1, 467, -1, 469, 470, -1, 472, 473, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, -1, 488, -1, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, -1, 514, -1,
+ 516, 517, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 544, 545,
+ 546, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, -1, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, -1, 40, 41, 42, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, -1, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, -1, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, -1, -1,
+ -1, 175, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, -1,
+ 224, 225, 226, 227, -1, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, -1, -1, -1, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, -1, -1, 279, 280, 281, 282, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, -1, 301, 302, 303,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, -1, -1, 338, -1, 340, 341, 342, 343,
+ -1, -1, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, -1,
+ 364, 365, 366, -1, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, -1, 381, -1, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, -1, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, -1, 467, -1, 469, 470, -1, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, -1, 488, -1, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, -1,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 544, 545, 546, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, -1, 40, 41,
+ 42, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, -1,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, -1, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, 175, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, 224, 225, 226, 227, -1, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, -1, -1,
+ -1, 253, 254, -1, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, -1, -1, 279, 280, 281,
+ 282, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, -1, 301,
+ 302, 303, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, -1, -1, 338, -1, 340, 341,
+ 342, 343, -1, -1, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, -1, 364, 365, 366, -1, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, -1, 381,
+ -1, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, -1, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, -1, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, -1, 488, -1, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, -1, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 544, 545, 546, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, -1, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, -1, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, -1, 224, 225, 226, 227, -1, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ -1, -1, -1, 253, 254, -1, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, -1, -1, 279,
+ 280, 281, 282, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ -1, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, -1, -1, 338, -1,
+ 340, 341, 342, 343, -1, -1, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, -1, 364, 365, 366, -1, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ -1, 381, -1, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, -1, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, -1, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, -1, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, -1, 488, -1,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 544, 545, 546, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, -1, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, -1, -1, 123, -1, -1, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ -1, -1, 140, -1, 142, 143, 144, 145, -1, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, -1, -1, -1, 175, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, -1, -1, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, -1, 224, 225, 226, 227,
+ -1, -1, 230, -1, 232, 233, 234, -1, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, -1, -1, -1, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, -1,
+ -1, 279, 280, 281, -1, -1, -1, -1, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, -1, 301, 302, 303, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, -1, 327,
+ -1, 329, 330, 331, 332, 333, 334, 335, -1, -1,
+ 338, -1, 340, 341, 342, 343, -1, -1, 346, -1,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, -1, 364, 365, 366, -1,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, -1, 381, -1, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, -1,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, -1, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, -1, 445, 446, 447,
+ 448, 449, -1, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, -1, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, -1, -1, -1, -1, 485, 486, -1,
+ 488, -1, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, -1, -1, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, -1, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, -1, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, -1, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, -1, 279, 280, 281, -1, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, -1, 320, 321, -1, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, -1, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, -1, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, -1, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, -1, -1, 149, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, 239, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, 500, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, 239, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, 500, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, 167, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, 248, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, 167, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, 248, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, 239, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, 500, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ 171, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, 167, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, 70, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, 70, -1, -1, 73, -1, -1, 76, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, 239, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, 471, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, 167, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, 471, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, 70, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, 70, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, 70, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, 70,
+ -1, -1, 73, -1, -1, 76, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, 355, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, 70, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, 70, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, 70, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, 70, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, 70, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, 355, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, 355, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, 72, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, 76, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, 81, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, 107, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, 107, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, -1, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, -1, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, -1, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, 107, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, -1, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, 159, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, 27, -1, -1, 30,
+ 31, 32, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, -1, 43, 44, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ -1, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, -1, 118, 119, 120,
+ 121, 122, -1, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, 138, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, -1, -1, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, -1,
+ 161, 162, 163, 164, 165, 166, -1, -1, 169, 170,
+ -1, -1, -1, -1, -1, -1, -1, -1, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, -1, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, -1, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ -1, -1, -1, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ -1, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, -1, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, -1, -1, 290,
+ -1, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ -1, 302, -1, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, -1, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, -1, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, -1, 365, -1, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, -1, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, -1, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, -1, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, -1,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, 513, 514, -1, 516, -1, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, -1, 18, 19,
+ 20, 21, 22, 23, -1, 25, 26, 27, -1, -1,
+ 30, 31, 32, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, -1, 43, 44, -1, -1, -1, 48, 49,
+ -1, -1, -1, -1, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, -1, 65, -1, 67, 68, 69,
+ -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, -1, 118, 119,
+ 120, 121, 122, -1, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, 138, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, -1, -1,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ -1, 161, 162, 163, 164, 165, 166, -1, -1, 169,
+ 170, -1, -1, -1, -1, -1, -1, -1, -1, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, -1, -1, -1, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, 258, 259,
+ 260, -1, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, -1, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, -1, -1,
+ 290, -1, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, -1, 302, -1, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, -1, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, -1, 365, -1, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, -1,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, -1, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, -1, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, 513, 514, -1, 516, -1, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, -1, 18,
+ 19, 20, 21, 22, 23, -1, 25, 26, 27, -1,
+ -1, 30, 31, 32, 33, -1, -1, 36, 37, 38,
+ -1, 40, -1, -1, 43, 44, -1, -1, -1, 48,
+ 49, -1, -1, -1, -1, 54, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, 65, -1, 67, 68,
+ 69, -1, -1, -1, 73, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, -1, 118,
+ 119, 120, 121, 122, -1, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, 138,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, -1,
+ -1, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ -1, -1, 161, 162, 163, 164, 165, 166, -1, -1,
+ 169, 170, -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, -1,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ -1, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, -1, -1, -1, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, 258,
+ 259, 260, -1, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, -1, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, -1,
+ -1, 290, -1, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, -1, 302, -1, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, -1, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, -1, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, -1, 365, -1, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ -1, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, -1, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, -1, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, -1, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, 513, 514, -1, 516, -1, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, -1,
+ 18, 19, 20, 21, 22, 23, -1, 25, 26, 27,
+ -1, -1, 30, 31, 32, 33, -1, -1, 36, 37,
+ 38, -1, 40, -1, -1, 43, 44, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, 54, -1, -1, -1,
+ -1, -1, -1, -1, -1, 63, -1, 65, -1, 67,
+ 68, 69, -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, -1,
+ 118, 119, 120, 121, 122, -1, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ 138, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ -1, -1, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, -1, -1, 161, 162, 163, 164, 165, 166, -1,
+ -1, 169, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ -1, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, -1, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, -1, -1, -1, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, -1, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, -1, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ -1, -1, 290, -1, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, -1, 302, -1, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, -1, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, -1, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, -1, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, -1, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, -1,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, -1, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, -1, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, 513, 514, -1, 516, -1,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ 27, -1, -1, 30, 31, 32, 33, -1, -1, 36,
+ 37, 38, -1, 40, -1, -1, 43, 44, -1, -1,
+ -1, 48, 49, -1, -1, -1, -1, 54, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ 67, 68, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, 92, 93, 94, 95, 96,
+ 97, -1, 99, 100, 101, -1, -1, -1, -1, -1,
+ -1, -1, 109, 110, 111, -1, 113, 114, 115, 116,
+ -1, 118, 119, 120, 121, 122, -1, 124, 125, -1,
+ 127, 128, 129, 130, 131, 132, 133, -1, -1, 136,
+ 137, 138, 139, 140, -1, 142, 143, 144, 145, 146,
+ -1, -1, -1, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, -1, -1, 161, 162, 163, 164, 165, 166,
+ -1, -1, 169, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, -1, 189, -1, 191, 192, 193, 194, 195, 196,
+ 197, -1, 199, 200, 201, 202, -1, -1, 205, 206,
+ 207, 208, 209, -1, 211, 212, 213, -1, 215, 216,
+ 217, -1, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, -1, 230, -1, 232, 233, 234, 235, 236,
+ -1, 238, -1, 240, -1, -1, -1, 244, 245, 246,
+ 247, -1, 249, 250, -1, 252, 253, 254, -1, 256,
+ 257, 258, 259, 260, -1, 262, 263, 264, 265, -1,
+ 267, 268, 269, 270, 271, 272, 273, -1, 275, -1,
+ 277, -1, 279, 280, 281, -1, 283, -1, 285, -1,
+ 287, -1, -1, 290, -1, 292, 293, 294, 295, 296,
+ -1, -1, 299, 300, -1, 302, -1, -1, 305, 306,
+ 307, -1, -1, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, -1, 340, 341, -1, 343, -1, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, -1, -1, 356,
+ 357, 358, -1, -1, 361, 362, 363, -1, 365, -1,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, 380, 381, 382, 383, 384, 385, -1,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, -1,
+ 417, 418, -1, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, -1, 436,
+ 437, 438, 439, 440, -1, 442, 443, 444, 445, 446,
+ -1, 448, 449, 450, 451, -1, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, -1, 469, 470, -1, 472, -1, 474, 475, 476,
+ 477, 478, -1, 480, 481, 482, -1, -1, 485, 486,
+ 487, 488, 489, -1, 491, 492, 493, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ -1, 508, 509, 510, 511, 512, 513, 514, -1, 516,
+ -1, 518, 519, 520, 521, -1, -1, 524, -1, -1,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, -1, 18, 19, 20, 21, 22, 23, -1, 25,
+ 26, 27, -1, -1, 30, 31, 32, 33, -1, -1,
+ 36, 37, 38, -1, 40, -1, -1, 43, 44, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63, -1, 65,
+ -1, 67, 68, 69, -1, -1, -1, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, 92, 93, 94, 95,
+ 96, 97, -1, 99, 100, 101, -1, -1, -1, -1,
+ -1, -1, -1, 109, 110, 111, -1, 113, 114, 115,
+ 116, -1, 118, 119, 120, 121, 122, -1, 124, 125,
+ -1, 127, 128, 129, 130, 131, 132, 133, -1, -1,
+ 136, 137, 138, 139, 140, -1, 142, 143, 144, 145,
+ 146, -1, -1, -1, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, -1, -1, 161, 162, 163, 164, 165,
+ 166, -1, -1, 169, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, -1, 189, -1, 191, 192, 193, 194, 195,
+ 196, 197, -1, 199, 200, 201, 202, -1, -1, 205,
+ 206, 207, 208, 209, -1, 211, 212, 213, -1, 215,
+ 216, 217, -1, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, -1, 230, -1, 232, 233, 234, 235,
+ 236, -1, 238, -1, 240, -1, -1, -1, 244, 245,
+ 246, 247, -1, 249, 250, -1, 252, 253, 254, -1,
+ 256, 257, 258, 259, 260, -1, 262, 263, 264, 265,
+ -1, 267, 268, 269, 270, 271, 272, 273, -1, 275,
+ -1, 277, -1, 279, 280, 281, -1, 283, -1, 285,
+ -1, 287, -1, -1, 290, -1, 292, 293, 294, 295,
+ 296, -1, -1, 299, 300, -1, 302, -1, -1, 305,
+ 306, 307, -1, -1, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, -1, 340, 341, -1, 343, -1, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, -1, -1,
+ 356, 357, 358, -1, -1, 361, 362, 363, -1, 365,
+ -1, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, -1, 378, 379, 380, 381, 382, 383, 384, 385,
+ -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, -1, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ -1, 417, 418, -1, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, -1,
+ 436, 437, 438, 439, 440, -1, 442, 443, 444, 445,
+ 446, -1, 448, 449, 450, 451, -1, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, -1, 469, 470, -1, 472, -1, 474, 475,
+ 476, 477, 478, -1, 480, 481, 482, -1, -1, 485,
+ 486, 487, 488, 489, -1, 491, 492, 493, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, -1, 508, 509, 510, 511, 512, 513, 514, -1,
+ 516, -1, 518, 519, 520, 521, -1, -1, 524, -1,
+ -1, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, 27, -1, -1, 30, 31, 32, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, -1, 43, 44,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, 68, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, -1, 118, 119, 120, 121, 122, -1, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, 138, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, -1, -1, 150, 151, 152, 153, 154,
+ 155, -1, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, -1, 169, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, -1, -1, -1, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, -1, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, -1, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, -1, -1, 290, -1, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, -1, 302, -1, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, -1, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, -1,
+ 365, -1, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, -1, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, -1, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, -1, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, 513, 514,
+ -1, 516, -1, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, -1, 18, 19, 20, 21, 22, 23,
+ -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
+ -1, -1, 36, 37, 38, -1, 40, -1, -1, 43,
+ 44, -1, -1, -1, 48, 49, -1, -1, -1, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, 65, -1, 67, 68, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, -1, -1,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, -1, 118, 119, 120, 121, 122, -1,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, 138, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, -1, -1, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, -1, -1, 161, 162, 163,
+ 164, 165, 166, -1, -1, 169, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, -1, -1, -1,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, -1, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, -1, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, -1, -1, 290, -1, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, -1, 302, -1,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, -1, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ -1, 365, -1, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, -1, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, -1, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, -1, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, -1, 472, -1,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, -1, 518, 519, 520, 521, -1, -1,
+ 524, -1, -1, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, 27, -1, -1, 30, 31, 32,
+ 33, -1, -1, 36, 37, 38, -1, 40, -1, -1,
+ 43, 44, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, -1, 118, 119, 120, 121, 122,
+ -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, 138, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, -1, -1, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, -1, -1, 161, 162,
+ 163, 164, 165, 166, -1, -1, 169, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, -1, -1,
+ -1, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, 258, 259, 260, -1, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, -1, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, -1, -1, 290, -1, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, -1, 302,
+ -1, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, -1,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, -1, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, -1, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, -1, 436, 437, 438, 439, 440, -1, 442,
+ 443, 444, 445, 446, -1, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ -1, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ -1, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ 513, 514, -1, 516, -1, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, -1, 18, 19, 20, 21,
+ 22, 23, -1, 25, 26, 27, -1, -1, 30, 31,
+ 32, 33, -1, -1, 36, 37, 38, -1, 40, -1,
+ -1, 43, 44, -1, -1, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, 63, -1, 65, -1, 67, 68, 69, -1, -1,
+ -1, 73, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, -1, 118, 119, 120, 121,
+ 122, -1, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, 138, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, -1, -1, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, -1, 161,
+ 162, 163, 164, 165, 166, -1, -1, 169, 170, -1,
+ -1, -1, -1, -1, -1, -1, -1, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, -1, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, -1,
+ -1, -1, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, -1, 254, -1, 256, 257, 258, 259, 260, -1,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, -1, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, -1, -1, 290, -1,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, -1,
+ 302, -1, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ -1, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, -1, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, -1, 365, -1, 367, 368, 369, 370, 371,
+ 372, 373, -1, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, -1, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, -1, 427, 428, 429, 430, 431,
+ 432, 433, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, -1, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, -1, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, -1, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, 513, 514, -1, 516, -1, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 6, 7, -1, 9, 10,
+ 11, -1, -1, -1, 15, -1, -1, 18, 19, 20,
+ 21, 22, 23, -1, 25, 26, -1, -1, -1, 30,
+ 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
+ 41, 42, -1, -1, -1, -1, -1, 48, 49, -1,
+ -1, -1, -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 63, -1, 65, -1, 67, 68, 69, -1,
+ 71, -1, 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 117, -1, -1, -1,
+ 121, 122, 123, 124, 125, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 139, -1,
+ -1, -1, -1, -1, -1, 146, -1, 148, -1, -1,
+ -1, -1, -1, -1, -1, 156, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 168, -1, -1,
+ -1, -1, -1, -1, 175, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 185, 186, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 215, -1, -1, -1, -1, -1,
+ -1, -1, 223, -1, -1, -1, -1, 228, -1, -1,
+ -1, -1, -1, -1, 235, -1, -1, -1, -1, -1,
+ 241, -1, 243, -1, -1, -1, -1, -1, -1, 250,
+ -1, 252, -1, -1, -1, -1, -1, -1, -1, -1,
+ 261, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 276, 277, -1, -1, -1,
+ -1, -1, 283, -1, 285, -1, -1, 288, 289, -1,
+ 291, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, -1, 303, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 326, 327, 328, -1, -1,
+ -1, -1, -1, -1, -1, 336, 337, -1, -1, -1,
+ -1, 342, -1, -1, 345, -1, 347, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 363, 364, -1, 366, 367, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 380,
+ -1, 382, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 397, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 419, -1,
+ -1, -1, -1, -1, 425, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 444, -1, -1, 447, -1, -1, 450,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 466, -1, -1, -1, -1,
+ -1, -1, 473, -1, -1, -1, -1, -1, -1, -1,
+ 481, 482, -1, -1, -1, -1, 487, -1, 489, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 499, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 514, -1, -1, 517, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 6, 7, -1, 9, 10, 11, -1,
+ -1, -1, 15, -1, -1, 18, 19, 20, 21, 22,
+ 23, -1, 25, 26, -1, -1, -1, 30, 31, 32,
+ 33, -1, 35, 36, 37, 38, 39, 40, 41, 42,
+ -1, -1, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1, -1, -1,
+ 63, -1, 65, -1, 67, 68, 69, -1, 71, -1,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 117, -1, -1, -1, 121, 122,
+ 123, 124, 125, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 139, -1, -1, -1,
+ -1, -1, -1, 146, -1, 148, -1, -1, -1, -1,
+ -1, -1, -1, 156, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 168, -1, -1, -1, -1,
+ -1, -1, 175, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 185, 186, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 215, -1, -1, -1, -1, -1, -1, -1,
+ 223, -1, -1, -1, -1, 228, -1, -1, -1, -1,
+ -1, -1, 235, -1, -1, -1, -1, -1, 241, -1,
+ 243, -1, -1, -1, -1, -1, -1, 250, -1, 252,
+ -1, -1, -1, -1, -1, -1, -1, -1, 261, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 276, 277, -1, -1, -1, -1, -1,
+ 283, -1, 285, -1, -1, 288, 289, -1, 291, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300, 301, -1,
+ 303, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 326, 327, 328, -1, -1, -1, -1,
+ -1, -1, -1, 336, 337, -1, -1, -1, -1, 342,
+ -1, -1, 345, -1, 347, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 363, 364, -1, 366, 367, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 380, -1, 382,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 397, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 419, -1, -1, -1,
+ -1, -1, 425, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 444, -1, -1, 447, -1, -1, 450, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 466, -1, -1, -1, -1, -1, -1,
+ 473, -1, -1, -1, -1, -1, -1, -1, 481, 482,
+ -1, -1, -1, -1, 487, -1, 489, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 499, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 514, -1, -1, 517, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 6, 7, -1, 9, 10, 11, -1, -1, -1,
+ 15, -1, -1, 18, 19, 20, 21, 22, 23, -1,
+ 25, 26, -1, -1, -1, 30, 31, 32, 33, -1,
+ 35, 36, 37, 38, -1, 40, 41, 42, -1, -1,
+ -1, -1, -1, 48, 49, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 65, -1, 67, -1, 69, -1, -1, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 117, -1, -1, -1, 121, 122, 123, 124,
+ 125, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 139, -1, -1, -1, -1, -1,
+ -1, 146, -1, 148, -1, -1, -1, -1, -1, -1,
+ -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 168, -1, -1, -1, -1, -1, -1,
+ 175, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 185, 186, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 215, -1, -1, -1, -1, -1, -1, -1, 223, -1,
+ -1, -1, -1, 228, -1, -1, -1, -1, -1, -1,
+ 235, -1, -1, -1, -1, -1, 241, -1, 243, -1,
+ -1, -1, -1, -1, -1, 250, -1, 252, -1, -1,
+ -1, -1, -1, -1, -1, -1, 261, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 276, 277, -1, -1, -1, -1, -1, 283, -1,
+ 285, -1, -1, 288, 289, -1, 291, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, -1, 303, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 326, 327, 328, -1, -1, -1, -1, -1, -1,
+ -1, 336, 337, -1, -1, -1, -1, 342, -1, -1,
+ 345, -1, 347, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 363, 364,
+ -1, 366, 367, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 380, -1, 382, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 397, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 419, -1, -1, -1, -1, -1,
+ 425, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 444,
+ -1, -1, 447, -1, -1, 450, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 466, -1, -1, -1, -1, -1, -1, 473, -1,
+ -1, -1, -1, -1, -1, -1, 481, 482, -1, -1,
+ -1, -1, 487, -1, 489, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 499, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 514,
+ -1, -1, 517, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 6,
+ 7, -1, 9, 10, 11, -1, -1, -1, 15, -1,
+ -1, 18, 19, 20, 21, 22, 23, -1, 25, 26,
+ -1, -1, -1, 30, 31, 32, 33, -1, 35, 36,
+ 37, 38, -1, 40, 41, 42, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 69, -1, -1, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 117, -1, -1, -1, 121, 122, 123, 124, 125, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 139, -1, -1, -1, -1, -1, -1, 146,
+ -1, 148, -1, -1, -1, -1, -1, -1, -1, 156,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 168, -1, -1, -1, -1, -1, -1, 175, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 185, 186,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 215, -1,
+ -1, -1, -1, -1, -1, -1, 223, -1, -1, -1,
+ -1, 228, -1, -1, -1, -1, -1, -1, 235, -1,
+ -1, -1, -1, -1, 241, -1, 243, -1, -1, -1,
+ -1, -1, -1, 250, -1, 252, -1, -1, -1, -1,
+ -1, -1, -1, -1, 261, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 276,
+ 277, -1, -1, -1, -1, -1, 283, -1, 285, -1,
+ -1, 288, 289, -1, 291, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, -1, 303, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 326,
+ 327, 328, -1, -1, -1, -1, -1, -1, -1, 336,
+ 337, -1, -1, -1, -1, 342, -1, -1, 345, -1,
+ 347, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 363, 364, -1, 366,
+ 367, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 380, -1, 382, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 397, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 419, -1, -1, -1, -1, -1, 425, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 444, -1, -1,
+ 447, -1, -1, 450, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 466,
+ -1, -1, -1, -1, -1, -1, 473, -1, -1, -1,
+ -1, -1, -1, -1, 481, 482, -1, -1, -1, -1,
+ 487, -1, 489, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 499, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 514, -1, -1,
+ 517, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 69, 70, -1,
+ -1, 73, -1, 75, 76, -1, -1, -1, -1, 81,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, 93, 94, 95, 96, 97, -1, 99, 100, 101,
+ -1, -1, -1, -1, -1, -1, -1, 109, 110, 111,
+ -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, -1, 127, 128, 129, 130, 131,
+ 132, 133, -1, -1, 136, 137, -1, 139, 140, -1,
+ 142, 143, 144, 145, 146, -1, 148, -1, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, -1, -1, 161,
+ 162, 163, 164, 165, 166, -1, 168, 169, 170, -1,
+ -1, -1, -1, 175, -1, -1, -1, 179, 180, 181,
+ 182, -1, 184, 185, 186, 187, -1, 189, -1, 191,
+ 192, 193, 194, 195, 196, 197, -1, 199, 200, 201,
+ 202, -1, -1, 205, 206, 207, 208, 209, -1, 211,
+ 212, 213, -1, 215, 216, 217, -1, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, -1,
+ 232, 233, 234, 235, 236, -1, 238, -1, 240, 241,
+ -1, 243, 244, 245, 246, 247, -1, 249, 250, -1,
+ 252, 253, 254, -1, 256, 257, -1, 259, 260, 261,
+ 262, 263, 264, 265, -1, 267, 268, 269, 270, 271,
+ 272, 273, -1, 275, 276, 277, -1, 279, 280, 281,
+ -1, 283, -1, 285, -1, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, -1, -1, 299, 300, 301,
+ 302, 303, -1, 305, 306, 307, -1, -1, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, -1, 320, 321,
+ -1, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, -1, 340, 341,
+ 342, 343, -1, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, -1, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, -1, 378, 379, 380, 381,
+ 382, 383, 384, 385, -1, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ -1, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, -1, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, -1, 434, -1, 436, 437, 438, 439, 440, -1,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ -1, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, -1,
+ 472, 473, 474, 475, 476, 477, 478, -1, 480, 481,
+ 482, -1, -1, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, 508, 509, 510, 511,
+ 512, -1, 514, -1, 516, 517, 518, 519, 520, 521,
+ -1, -1, 524, -1, -1, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, -1, 545, 546, 69, -1, -1, -1, 73,
+ -1, -1, -1, -1, -1, -1, 558, 559, 560, -1,
+ -1, -1, -1, -1, -1, 567, 90, 91, 92, 93,
+ 94, 95, 96, 97, -1, 99, 100, 101, 102, 103,
+ -1, -1, -1, -1, -1, 109, 110, 111, -1, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, -1, 127, 128, 129, 130, 131, 132, 133,
+ -1, -1, 136, 137, -1, 139, 140, -1, 142, 143,
+ 144, 145, 146, -1, 148, -1, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, -1, -1, 161, 162, 163,
+ 164, 165, 166, -1, 168, 169, 170, -1, -1, -1,
+ -1, 175, -1, -1, -1, 179, 180, 181, 182, -1,
+ 184, 185, 186, 187, -1, 189, -1, 191, 192, 193,
+ 194, 195, 196, 197, -1, 199, 200, 201, 202, -1,
+ -1, 205, 206, 207, 208, 209, -1, 211, 212, 213,
+ -1, 215, 216, 217, -1, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, -1, 230, -1, 232, 233,
+ 234, 235, 236, -1, 238, -1, 240, 241, -1, 243,
+ 244, 245, 246, 247, -1, 249, 250, -1, 252, 253,
+ 254, -1, 256, 257, -1, 259, 260, 261, 262, 263,
+ 264, 265, -1, 267, 268, 269, 270, 271, 272, 273,
+ -1, 275, 276, 277, -1, 279, 280, 281, -1, 283,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, -1, -1, 299, 300, 301, 302, 303,
+ -1, 305, 306, 307, -1, -1, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, -1, 320, 321, -1, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, -1, 340, 341, 342, 343,
+ -1, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, -1, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, -1, 378, 379, 380, 381, 382, 383,
+ 384, 385, -1, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, -1, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, -1, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, -1,
+ 434, 435, 436, 437, 438, 439, 440, -1, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, -1, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, -1, 480, 481, 482, -1,
+ -1, 485, 486, 487, 488, 489, -1, 491, 492, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, -1, 508, 509, 510, 511, 512, 513,
+ 514, -1, 516, 517, 518, 519, 520, 521, -1, -1,
+ 524, -1, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ -1, 545, 546, -1, -1, 549, 69, -1, -1, -1,
+ 73, -1, -1, -1, -1, -1, -1, 80, -1, -1,
+ 83, -1, -1, 567, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, -1, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, -1, -1, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ -1, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, -1, -1,
+ 233, 234, 235, 236, -1, 238, 239, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, -1, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, -1, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, -1, 320, 321, -1,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, 355, 356, 357, 358, 359, -1, 361, 362,
+ 363, 364, -1, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, -1,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ -1, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ -1, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, -1, 517, 518, 519, 520, 521, 522,
+ -1, 524, -1, -1, -1, -1, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, -1, 545, 546, 547, -1, -1, -1, -1, -1,
+ -1, -1, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 69, 70, -1, -1, 73, -1, 75, 76, -1,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, -1, -1, -1, -1, -1, -1,
+ -1, 109, 110, 111, -1, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, -1, 127,
+ 128, 129, 130, 131, 132, 133, -1, -1, 136, 137,
+ -1, 139, 140, -1, 142, 143, 144, 145, 146, -1,
+ 148, -1, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, -1, -1, 161, 162, 163, 164, 165, 166, -1,
+ 168, 169, 170, -1, -1, -1, -1, 175, -1, -1,
+ -1, 179, 180, 181, 182, -1, 184, 185, 186, 187,
+ 188, 189, -1, 191, 192, 193, 194, 195, 196, 197,
+ -1, 199, 200, 201, 202, -1, -1, 205, 206, 207,
+ 208, 209, -1, 211, 212, 213, -1, 215, 216, 217,
+ -1, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, -1, 232, 233, 234, 235, 236, -1,
+ 238, -1, 240, 241, -1, 243, 244, 245, 246, 247,
+ -1, 249, 250, -1, 252, 253, 254, -1, 256, 257,
+ -1, 259, 260, 261, 262, 263, 264, 265, -1, 267,
+ 268, 269, 270, 271, 272, 273, -1, 275, 276, 277,
+ -1, 279, 280, 281, -1, 283, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, -1,
+ -1, 299, 300, 301, 302, 303, -1, 305, 306, 307,
+ -1, -1, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, -1, 320, 321, -1, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, -1, 340, 341, 342, 343, -1, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, -1, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
+ 378, 379, 380, 381, 382, 383, 384, 385, -1, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, -1, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, -1, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, -1, 434, -1, 436, 437,
+ 438, 439, 440, -1, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, -1, 472, 473, 474, 475, 476, 477,
+ 478, -1, 480, 481, 482, -1, -1, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, -1,
+ 508, 509, 510, 511, 512, -1, 514, -1, 516, 517,
+ 518, 519, 520, 521, -1, -1, 524, -1, -1, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, -1, 545, 546, -1,
+ 69, 70, -1, -1, 73, -1, 75, 76, -1, -1,
+ 558, 559, 81, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, 92, 93, 94, 95, 96, 97, -1,
+ 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
+ 109, 110, 111, -1, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, -1, 127, 128,
+ 129, 130, 131, 132, 133, -1, -1, 136, 137, -1,
+ 139, 140, -1, 142, 143, 144, 145, 146, -1, 148,
+ -1, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ -1, -1, 161, 162, 163, 164, 165, 166, -1, 168,
+ 169, 170, -1, -1, -1, -1, 175, -1, -1, -1,
+ 179, 180, 181, 182, -1, 184, 185, 186, 187, 188,
+ 189, -1, 191, 192, 193, 194, 195, 196, 197, -1,
+ 199, 200, 201, 202, -1, -1, 205, 206, 207, 208,
+ 209, -1, 211, 212, 213, -1, 215, 216, 217, -1,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, -1, 232, 233, 234, 235, 236, -1, 238,
+ -1, 240, 241, -1, 243, 244, 245, 246, 247, -1,
+ 249, 250, -1, 252, 253, 254, -1, 256, 257, -1,
+ 259, 260, 261, 262, 263, 264, 265, -1, 267, 268,
+ 269, 270, 271, 272, 273, -1, 275, 276, 277, -1,
+ 279, 280, 281, -1, 283, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, -1, -1,
+ 299, 300, 301, 302, 303, -1, 305, 306, 307, -1,
+ -1, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ -1, 320, 321, -1, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ -1, 340, 341, 342, 343, -1, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, -1, 356, 357, 358,
+ -1, -1, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
+ 379, 380, 381, 382, 383, 384, 385, -1, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, -1, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, -1, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, -1, 434, -1, 436, 437, 438,
+ 439, 440, -1, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, -1, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, -1,
+ 469, 470, -1, 472, 473, 474, 475, 476, 477, 478,
+ -1, 480, 481, 482, -1, -1, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, -1, 508,
+ 509, 510, 511, 512, -1, 514, -1, 516, 517, 518,
+ 519, 520, 521, -1, -1, 524, -1, -1, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, -1, 545, 546, -1, 69,
+ 70, -1, -1, 73, -1, 75, 76, -1, -1, 558,
+ 559, 81, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, -1, 545, 546, -1, 69, 70,
+ -1, -1, 73, -1, -1, 76, -1, -1, 558, 559,
+ 81, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, 93, 94, 95, 96, 97, -1, 99, 100,
+ 101, -1, -1, -1, -1, -1, -1, -1, 109, 110,
+ 111, -1, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, -1, 127, 128, 129, 130,
+ 131, 132, 133, -1, -1, 136, 137, -1, 139, 140,
+ -1, 142, 143, 144, 145, 146, -1, 148, -1, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, -1, -1,
+ 161, 162, 163, 164, 165, 166, -1, 168, 169, 170,
+ -1, -1, -1, -1, 175, -1, -1, -1, 179, 180,
+ 181, 182, -1, 184, 185, 186, 187, 188, 189, -1,
+ 191, 192, 193, 194, 195, 196, 197, -1, 199, 200,
+ 201, 202, -1, -1, 205, 206, 207, 208, 209, -1,
+ 211, 212, 213, -1, 215, 216, 217, -1, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ -1, 232, 233, 234, 235, 236, -1, 238, -1, 240,
+ 241, -1, 243, 244, 245, 246, 247, -1, 249, 250,
+ -1, 252, 253, 254, -1, 256, 257, -1, 259, 260,
+ 261, 262, 263, 264, 265, -1, 267, 268, 269, 270,
+ 271, 272, 273, -1, 275, 276, 277, -1, 279, 280,
+ 281, -1, 283, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, -1, -1, 299, 300,
+ 301, 302, 303, -1, 305, 306, 307, -1, -1, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, -1, 320,
+ 321, -1, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, -1, 340,
+ 341, 342, 343, -1, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, -1, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, -1, 378, 379, 380,
+ 381, 382, 383, 384, 385, -1, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, -1, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, -1, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, -1, 434, -1, 436, 437, 438, 439, 440,
+ -1, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, -1, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, -1, 469, 470,
+ -1, 472, 473, 474, 475, 476, 477, 478, -1, 480,
+ 481, 482, -1, -1, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, -1, 508, 509, 510,
+ 511, 512, -1, 514, -1, 516, 517, 518, 519, 520,
+ 521, -1, -1, 524, -1, -1, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, -1, 545, 546, 69, 70, -1, -1,
+ 73, -1, -1, 76, -1, -1, -1, 558, 559, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ 93, 94, 95, 96, 97, -1, 99, 100, 101, -1,
+ -1, -1, -1, -1, -1, -1, 109, 110, 111, -1,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, -1, 127, 128, 129, 130, 131, 132,
+ 133, -1, -1, 136, 137, -1, 139, 140, -1, 142,
+ 143, 144, 145, 146, -1, 148, -1, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, -1, -1, 161, 162,
+ 163, 164, 165, 166, -1, 168, 169, 170, -1, -1,
+ -1, 174, 175, -1, -1, 178, 179, 180, 181, 182,
+ -1, 184, 185, 186, 187, -1, 189, -1, 191, 192,
+ 193, 194, 195, 196, 197, -1, 199, 200, 201, 202,
+ -1, -1, 205, 206, 207, 208, 209, -1, 211, 212,
+ 213, -1, 215, 216, 217, -1, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, -1, 230, -1, 232,
+ 233, 234, 235, 236, -1, 238, -1, 240, 241, -1,
+ 243, 244, 245, 246, 247, -1, 249, 250, -1, 252,
+ 253, 254, -1, 256, 257, -1, 259, 260, 261, 262,
+ 263, 264, 265, -1, 267, 268, 269, 270, 271, 272,
+ 273, -1, 275, 276, 277, -1, 279, 280, 281, -1,
+ 283, -1, 285, -1, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, -1, -1, 299, 300, 301, 302,
+ 303, -1, 305, 306, 307, -1, -1, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, -1, 320, 321, -1,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, 342,
+ 343, -1, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, -1, -1, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, 380, 381, 382,
+ 383, 384, 385, -1, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, -1, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ -1, 434, -1, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, -1,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, -1, 469, 470, -1, 472,
+ 473, 474, 475, 476, 477, 478, -1, 480, 481, 482,
+ 483, -1, 485, 486, 487, 488, 489, -1, 491, 492,
+ 493, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, -1, -1, 508, 509, 510, 511, 512,
+ -1, 514, -1, 516, 517, 518, 519, 520, 521, -1,
+ -1, 524, -1, -1, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, -1, 545, 546, 69, 70, -1, -1, 73, -1,
+ -1, 76, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, 174, 175, -1, -1, 178, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, 174, 175, -1, -1, 178, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, 251, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, 76, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, 174, 175, -1, -1, 178, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, 174, 175, -1, -1, 178, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, 174,
+ 175, -1, -1, 178, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, 102, 103, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, 76, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, -1,
+ 175, -1, -1, -1, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, 188, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 69,
+ 545, 546, -1, 73, -1, -1, 76, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, 92, 93, 94, 95, 96, 97, -1, 99,
+ 100, 101, -1, -1, -1, -1, -1, -1, -1, 109,
+ 110, 111, -1, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, -1, 127, 128, 129,
+ 130, 131, 132, 133, -1, -1, 136, 137, -1, 139,
+ 140, -1, 142, 143, 144, 145, 146, -1, 148, -1,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, -1,
+ -1, 161, 162, 163, 164, 165, 166, -1, 168, 169,
+ 170, -1, -1, -1, -1, 175, -1, -1, -1, 179,
+ 180, 181, 182, -1, 184, 185, 186, 187, -1, 189,
+ -1, 191, 192, 193, 194, 195, 196, 197, -1, 199,
+ 200, 201, 202, -1, -1, 205, 206, 207, 208, 209,
+ -1, 211, 212, 213, -1, 215, 216, 217, -1, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, -1,
+ 230, -1, 232, 233, 234, 235, 236, -1, 238, -1,
+ 240, 241, -1, 243, 244, 245, 246, 247, -1, 249,
+ 250, -1, 252, 253, 254, -1, 256, 257, -1, 259,
+ 260, 261, 262, 263, 264, 265, -1, 267, 268, 269,
+ 270, 271, 272, 273, -1, 275, 276, 277, -1, 279,
+ 280, 281, -1, 283, -1, 285, -1, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, -1, -1, 299,
+ 300, 301, 302, 303, -1, 305, 306, 307, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, -1,
+ 320, 321, -1, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, -1,
+ 340, 341, 342, 343, -1, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, -1, -1, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, -1, 378, 379,
+ 380, 381, 382, 383, 384, 385, -1, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, -1, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, -1, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, -1, 434, -1, 436, 437, 438, 439,
+ 440, -1, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, -1, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, -1, 472, 473, 474, 475, 476, 477, 478, -1,
+ 480, 481, 482, -1, -1, 485, 486, 487, 488, 489,
+ -1, 491, 492, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, -1, 508, 509,
+ 510, 511, 512, -1, 514, -1, 516, 517, 518, 519,
+ 520, 521, -1, -1, 524, -1, -1, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 69, 545, 546, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,
+ 95, 96, 97, -1, 99, 100, 101, -1, -1, -1,
+ -1, -1, -1, -1, 109, 110, 111, -1, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, -1, 127, 128, 129, 130, 131, 132, 133, -1,
+ -1, 136, 137, -1, 139, 140, -1, 142, 143, 144,
+ 145, 146, -1, 148, -1, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, -1, -1, 161, 162, 163, 164,
+ 165, 166, -1, 168, 169, 170, -1, -1, -1, -1,
+ 175, -1, -1, -1, 179, 180, 181, 182, -1, 184,
+ 185, 186, 187, -1, 189, -1, 191, 192, 193, 194,
+ 195, 196, 197, -1, 199, 200, 201, 202, -1, -1,
+ 205, 206, 207, 208, 209, -1, 211, 212, 213, -1,
+ 215, 216, 217, -1, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, -1, 230, -1, 232, 233, 234,
+ 235, 236, -1, 238, -1, 240, 241, -1, 243, 244,
+ 245, 246, 247, -1, 249, 250, -1, 252, 253, 254,
+ -1, 256, 257, -1, 259, 260, 261, 262, 263, 264,
+ 265, -1, 267, 268, 269, 270, 271, 272, 273, -1,
+ 275, 276, 277, -1, 279, 280, 281, -1, 283, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, 302, 303, -1,
+ 305, 306, 307, -1, -1, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, -1, 320, 321, -1, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, -1,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, -1,
+ -1, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, -1, 378, 379, 380, 381, 382, 383, 384,
+ 385, -1, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, -1, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, -1, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, -1, 434,
+ -1, 436, 437, 438, 439, 440, -1, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, -1, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, -1, 469, 470, -1, 472, 473, 474,
+ 475, 476, 477, 478, -1, 480, 481, 482, -1, -1,
+ 485, 486, 487, 488, 489, -1, 491, 492, 493, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, -1, 508, 509, 510, 511, 512, -1, 514,
+ -1, 516, 517, 518, 519, 520, 521, -1, -1, 524,
+ -1, -1, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, -1,
+ 545, 546
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_int16 yystos[] =
+{
+ 0, 576, 1239, 0, 5, 24, 34, 35, 39, 41,
+ 42, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 71, 73, 75, 76,
+ 81, 138, 215, 235, 258, 282, 319, 322, 344, 433,
+ 483, 499, 514, 544, 557, 558, 559, 560, 561, 562,
+ 565, 566, 567, 568, 570, 571, 572, 573, 574, 1227,
+ 1240, 1270, 1272, 1363, 1373, 1374, 1376, 1382, 1383, 1271,
+ 3, 6, 7, 8, 9, 10, 11, 12, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 25, 26,
+ 27, 30, 31, 32, 33, 35, 36, 37, 38, 40,
+ 41, 42, 43, 44, 48, 49, 54, 63, 65, 67,
+ 68, 90, 100, 102, 103, 114, 117, 120, 121, 122,
+ 123, 124, 125, 130, 139, 142, 144, 145, 146, 148,
+ 151, 153, 156, 165, 167, 168, 175, 182, 184, 185,
+ 186, 187, 202, 204, 208, 214, 215, 222, 223, 224,
+ 228, 231, 235, 241, 243, 248, 250, 252, 261, 265,
+ 276, 277, 283, 285, 288, 289, 291, 300, 301, 303,
+ 305, 306, 311, 323, 326, 327, 328, 336, 337, 341,
+ 342, 345, 347, 363, 364, 366, 367, 380, 382, 384,
+ 397, 398, 404, 405, 407, 412, 418, 419, 421, 425,
+ 428, 434, 435, 442, 444, 446, 447, 450, 456, 466,
+ 471, 473, 481, 482, 487, 489, 491, 493, 499, 502,
+ 508, 513, 514, 517, 526, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 549, 567, 577, 578,
+ 579, 580, 586, 587, 589, 590, 591, 592, 594, 598,
+ 610, 615, 616, 619, 620, 621, 640, 643, 644, 659,
+ 705, 708, 711, 714, 715, 716, 724, 731, 733, 734,
+ 737, 740, 741, 745, 754, 758, 759, 760, 763, 765,
+ 766, 767, 768, 776, 778, 798, 802, 804, 805, 815,
+ 817, 824, 825, 828, 829, 830, 831, 832, 841, 843,
+ 845, 848, 852, 853, 861, 862, 865, 870, 884, 916,
+ 919, 920, 921, 926, 929, 931, 933, 935, 936, 939,
+ 940, 943, 945, 946, 950, 951, 952, 955, 956, 957,
+ 958, 959, 966, 968, 969, 970, 971, 977, 979, 980,
+ 986, 987, 988, 991, 992, 993, 994, 996, 997, 999,
+ 1000, 1002, 1003, 1005, 1017, 1019, 1022, 1024, 1033, 1035,
+ 1040, 1045, 1049, 1050, 1051, 1052, 1053, 1054, 1060, 1095,
+ 1235, 1236, 1241, 1244, 1245, 1262, 1263, 1264, 1265, 1266,
+ 1277, 1279, 1283, 1284, 1285, 1286, 1287, 1289, 1291, 1293,
+ 1294, 1295, 1296, 1298, 1303, 1304, 1308, 1309, 1318, 1320,
+ 1321, 1322, 1325, 1330, 1333, 1338, 1340, 1341, 1344, 1346,
+ 1349, 1358, 1376, 1384, 71, 1266, 1274, 1275, 13, 70,
+ 90, 91, 92, 93, 94, 95, 96, 97, 99, 100,
+ 101, 109, 110, 111, 113, 114, 115, 116, 118, 119,
+ 120, 127, 128, 129, 130, 131, 132, 133, 136, 137,
+ 140, 142, 143, 144, 145, 150, 151, 152, 153, 154,
+ 155, 157, 158, 161, 162, 163, 164, 165, 166, 169,
+ 170, 174, 178, 179, 180, 181, 182, 184, 187, 189,
+ 191, 192, 193, 194, 195, 196, 197, 199, 200, 201,
+ 202, 205, 206, 207, 208, 209, 211, 212, 213, 215,
+ 216, 217, 219, 220, 221, 222, 224, 225, 226, 227,
+ 230, 232, 233, 234, 236, 238, 240, 244, 245, 246,
+ 247, 249, 253, 254, 256, 257, 259, 260, 262, 263,
+ 264, 265, 267, 268, 269, 270, 271, 272, 273, 275,
+ 279, 280, 281, 287, 290, 292, 293, 294, 295, 296,
+ 299, 302, 305, 306, 307, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 320, 321, 323, 324, 325, 329,
+ 330, 331, 332, 333, 334, 335, 338, 340, 341, 343,
+ 346, 348, 349, 350, 352, 353, 356, 357, 358, 361,
+ 362, 365, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 378, 379, 381, 383, 384, 385, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 398, 399, 400,
+ 401, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 417, 418, 420, 421, 422, 423,
+ 424, 426, 427, 428, 429, 430, 431, 432, 434, 436,
+ 437, 438, 439, 440, 441, 442, 443, 445, 446, 448,
+ 449, 451, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 467, 469, 470, 472, 474,
+ 475, 476, 477, 478, 480, 483, 485, 486, 488, 491,
+ 492, 493, 494, 495, 496, 497, 498, 501, 502, 503,
+ 504, 505, 508, 509, 510, 511, 512, 516, 518, 519,
+ 520, 521, 524, 527, 528, 529, 530, 531, 532, 545,
+ 546, 1229, 1230, 1232, 1234, 1235, 1236, 1255, 1256, 1368,
+ 1370, 1374, 1376, 28, 278, 1319, 8, 12, 14, 27,
+ 43, 44, 48, 49, 54, 63, 65, 67, 68, 98,
+ 138, 159, 171, 183, 188, 258, 319, 322, 433, 513,
+ 544, 1222, 1234, 1235, 1257, 1305, 1306, 1348, 1349, 1350,
+ 1354, 1359, 1360, 1361, 1370, 1376, 98, 1046, 1222, 1257,
+ 1367, 13, 1046, 5, 24, 28, 34, 35, 41, 42,
+ 98, 102, 103, 104, 105, 106, 107, 108, 112, 126,
+ 134, 135, 138, 141, 147, 149, 159, 160, 167, 171,
+ 172, 173, 174, 176, 177, 178, 188, 190, 198, 203,
+ 204, 210, 214, 218, 229, 231, 237, 239, 242, 248,
+ 251, 255, 266, 274, 278, 282, 284, 286, 297, 298,
+ 304, 308, 309, 339, 344, 351, 354, 355, 359, 360,
+ 377, 386, 402, 416, 435, 441, 452, 468, 471, 479,
+ 483, 484, 490, 499, 500, 506, 507, 513, 515, 522,
+ 523, 525, 526, 1234, 1237, 1350, 1351, 1352, 1356, 1357,
+ 1358, 1359, 1361, 24, 34, 138, 282, 1345, 36, 38,
+ 339, 1278, 485, 529, 972, 97, 148, 164, 182, 188,
+ 206, 217, 226, 239, 244, 251, 270, 295, 316, 356,
+ 379, 389, 390, 393, 420, 423, 427, 429, 436, 439,
+ 458, 465, 470, 471, 474, 478, 488, 493, 506, 519,
+ 730, 1306, 187, 972, 1155, 1225, 1236, 1348, 1351, 1354,
+ 1355, 1359, 1360, 1376, 98, 1046, 517, 567, 1010, 354,
+ 385, 972, 123, 567, 651, 92, 110, 135, 148, 182,
+ 188, 206, 217, 226, 239, 247, 251, 307, 356, 359,
+ 379, 393, 420, 429, 439, 458, 465, 474, 475, 477,
+ 478, 493, 500, 503, 506, 660, 713, 820, 871, 885,
+ 1222, 1246, 1247, 1248, 1257, 1374, 1376, 13, 98, 384,
+ 1222, 1257, 1261, 457, 1046, 1222, 1257, 1261, 98, 378,
+ 437, 475, 477, 294, 927, 928, 1374, 92, 97, 135,
+ 148, 164, 182, 206, 217, 226, 239, 244, 251, 270,
+ 316, 356, 369, 379, 390, 393, 420, 423, 427, 429,
+ 436, 439, 458, 465, 471, 474, 478, 486, 488, 493,
+ 506, 519, 730, 833, 835, 836, 972, 573, 1288, 1352,
+ 262, 1261, 167, 187, 222, 517, 567, 711, 714, 1005,
+ 1018, 1022, 1024, 1033, 1040, 1045, 1049, 1241, 91, 98,
+ 118, 234, 240, 242, 266, 296, 330, 387, 406, 558,
+ 559, 849, 850, 1046, 1227, 1228, 1368, 1370, 98, 167,
+ 402, 435, 854, 855, 856, 1354, 239, 1354, 1224, 1374,
+ 471, 1063, 118, 240, 849, 1354, 485, 1261, 369, 316,
+ 182, 270, 429, 470, 471, 567, 937, 938, 428, 1354,
+ 98, 138, 440, 481, 485, 513, 602, 611, 612, 1234,
+ 1235, 1348, 1353, 1359, 1361, 1376, 95, 248, 854, 855,
+ 385, 972, 1354, 293, 98, 203, 1065, 1066, 4, 13,
+ 136, 159, 161, 307, 325, 420, 429, 440, 481, 485,
+ 532, 599, 600, 601, 602, 98, 440, 481, 485, 602,
+ 485, 355, 1107, 1220, 1354, 1063, 1342, 1352, 560, 1354,
+ 243, 567, 1011, 567, 400, 1055, 1056, 1222, 1055, 1050,
+ 1051, 1054, 571, 567, 1010, 218, 284, 360, 499, 1067,
+ 1068, 1050, 1052, 1053, 193, 280, 505, 570, 120, 577,
+ 1286, 1289, 1285, 1281, 571, 1290, 1292, 5, 24, 34,
+ 138, 207, 282, 1297, 183, 258, 319, 322, 433, 544,
+ 567, 1150, 1151, 1269, 1273, 1363, 71, 1266, 1222, 1257,
+ 1377, 188, 1246, 20, 507, 561, 1261, 1261, 1377, 507,
+ 1310, 1311, 1312, 24, 282, 282, 1356, 18, 19, 37,
+ 40, 130, 163, 204, 1347, 1347, 15, 1286, 104, 976,
+ 901, 1225, 838, 1354, 838, 1222, 388, 838, 488, 1222,
+ 181, 471, 889, 1225, 1236, 1354, 1229, 1230, 98, 260,
+ 1220, 348, 519, 80, 87, 88, 89, 143, 230, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 923, 925,
+ 1185, 1186, 1354, 260, 1222, 889, 1222, 98, 1229, 1230,
+ 889, 1222, 1222, 260, 1220, 1222, 260, 838, 1222, 412,
+ 442, 98, 260, 1107, 1222, 432, 1222, 838, 98, 314,
+ 1229, 1230, 260, 1220, 294, 33, 190, 290, 339, 396,
+ 973, 974, 975, 567, 565, 569, 1211, 1213, 1004, 1005,
+ 1006, 1007, 1232, 1220, 1222, 1354, 97, 135, 149, 160,
+ 182, 206, 244, 270, 295, 356, 390, 420, 423, 465,
+ 474, 486, 493, 833, 834, 835, 836, 1374, 976, 1021,
+ 1024, 1033, 1040, 1049, 1220, 318, 838, 567, 260, 838,
+ 1222, 838, 488, 260, 1222, 181, 471, 475, 477, 1229,
+ 475, 477, 143, 230, 923, 410, 1222, 1222, 1229, 260,
+ 595, 1354, 260, 1222, 260, 838, 1222, 1222, 432, 838,
+ 314, 1229, 400, 436, 471, 519, 316, 164, 270, 97,
+ 160, 244, 390, 427, 486, 488, 492, 725, 80, 1249,
+ 1250, 572, 1370, 1377, 98, 1261, 1376, 1047, 457, 609,
+ 1232, 1374, 928, 318, 260, 901, 902, 260, 932, 260,
+ 1222, 122, 124, 125, 138, 139, 185, 186, 207, 235,
+ 260, 282, 283, 285, 326, 328, 347, 397, 444, 450,
+ 481, 482, 514, 840, 1129, 1131, 1133, 1135, 1137, 1139,
+ 1140, 1141, 1143, 1144, 1145, 1147, 1148, 1348, 1355, 1359,
+ 1360, 1376, 488, 181, 471, 260, 888, 889, 260, 1230,
+ 1231, 156, 519, 143, 230, 260, 924, 925, 128, 260,
+ 888, 260, 1231, 260, 888, 260, 1222, 260, 1222, 432,
+ 932, 260, 840, 260, 314, 1231, 294, 260, 837, 838,
+ 260, 1221, 1222, 260, 1222, 976, 567, 573, 1378, 1379,
+ 1380, 1381, 1383, 1288, 69, 1257, 1307, 567, 1023, 660,
+ 1046, 1018, 1004, 1010, 1228, 850, 851, 98, 850, 1046,
+ 1228, 851, 98, 850, 1046, 1228, 851, 851, 851, 1228,
+ 1227, 1227, 286, 507, 1312, 1313, 1387, 1389, 1046, 851,
+ 388, 567, 567, 682, 682, 682, 354, 483, 570, 682,
+ 429, 1107, 1108, 850, 1046, 850, 1046, 570, 967, 1374,
+ 242, 567, 1020, 128, 519, 1004, 156, 872, 872, 1354,
+ 117, 546, 290, 569, 357, 357, 354, 242, 1374, 483,
+ 976, 237, 846, 354, 78, 79, 80, 82, 106, 122,
+ 124, 125, 134, 135, 138, 139, 146, 148, 172, 173,
+ 174, 175, 176, 177, 178, 185, 186, 188, 223, 228,
+ 229, 235, 250, 252, 283, 285, 300, 308, 309, 326,
+ 328, 337, 339, 344, 345, 347, 356, 367, 380, 397,
+ 425, 441, 450, 466, 481, 482, 487, 489, 490, 500,
+ 506, 514, 534, 535, 536, 537, 539, 540, 541, 542,
+ 547, 558, 559, 560, 567, 1050, 1132, 1135, 1138, 1139,
+ 1140, 1142, 1143, 1144, 1147, 1148, 1152, 1154, 1155, 1156,
+ 1158, 1181, 1182, 1183, 1187, 1205, 1210, 1217, 1218, 1225,
+ 1226, 1227, 1354, 1366, 1368, 1370, 1371, 1372, 1373, 1374,
+ 1375, 1216, 1217, 483, 557, 1377, 1374, 483, 557, 1306,
+ 98, 617, 1219, 1220, 440, 599, 188, 608, 1374, 609,
+ 1374, 117, 140, 599, 546, 451, 974, 357, 242, 483,
+ 557, 117, 546, 290, 1387, 975, 567, 1220, 560, 1213,
+ 1108, 1358, 1004, 241, 1012, 1152, 1190, 1055, 570, 567,
+ 1013, 568, 568, 1004, 1014, 1015, 1016, 1220, 98, 203,
+ 1064, 1064, 128, 1064, 231, 237, 304, 351, 1071, 1073,
+ 1074, 1089, 1091, 1092, 1093, 1067, 1068, 242, 286, 1107,
+ 1109, 567, 571, 1280, 560, 1299, 1300, 1302, 573, 573,
+ 24, 282, 282, 483, 483, 483, 483, 567, 483, 558,
+ 559, 722, 1228, 1267, 1373, 214, 107, 1253, 128, 1256,
+ 1256, 286, 1312, 1314, 286, 1312, 1313, 1314, 512, 1323,
+ 1324, 1370, 13, 453, 558, 559, 1227, 1315, 1316, 1317,
+ 1366, 1368, 1372, 1373, 1374, 1375, 282, 288, 483, 1222,
+ 1222, 6, 163, 1222, 1347, 1302, 137, 335, 370, 408,
+ 442, 567, 899, 370, 404, 408, 442, 569, 839, 370,
+ 408, 442, 159, 212, 310, 370, 408, 442, 474, 476,
+ 526, 610, 613, 981, 982, 983, 984, 1376, 866, 94,
+ 208, 370, 408, 442, 510, 626, 1222, 94, 208, 442,
+ 505, 593, 530, 260, 1107, 131, 166, 227, 263, 299,
+ 335, 339, 370, 371, 408, 417, 426, 434, 442, 454,
+ 463, 467, 521, 610, 614, 905, 917, 944, 567, 886,
+ 1213, 408, 593, 266, 223, 94, 100, 115, 145, 201,
+ 208, 211, 238, 272, 335, 339, 349, 358, 370, 408,
+ 411, 412, 442, 510, 622, 624, 625, 748, 944, 722,
+ 98, 260, 1220, 838, 838, 567, 922, 370, 442, 569,
+ 223, 354, 370, 408, 442, 917, 944, 94, 208, 370,
+ 408, 442, 266, 588, 408, 526, 549, 581, 588, 370,
+ 408, 442, 917, 944, 354, 370, 408, 223, 107, 129,
+ 180, 269, 317, 320, 335, 369, 408, 413, 436, 442,
+ 456, 622, 719, 720, 370, 408, 518, 748, 756, 223,
+ 370, 408, 442, 94, 159, 201, 208, 211, 370, 404,
+ 408, 442, 612, 600, 602, 266, 223, 115, 199, 335,
+ 408, 442, 622, 623, 370, 408, 412, 442, 157, 200,
+ 372, 476, 354, 94, 100, 208, 370, 408, 442, 641,
+ 642, 588, 237, 408, 581, 588, 223, 408, 442, 622,
+ 1222, 571, 302, 190, 355, 531, 570, 973, 98, 203,
+ 515, 560, 568, 894, 1152, 1191, 1192, 1355, 1152, 1212,
+ 560, 1223, 1356, 1211, 568, 570, 229, 354, 490, 606,
+ 609, 722, 1008, 507, 1001, 354, 901, 567, 838, 1222,
+ 1129, 889, 348, 143, 230, 925, 889, 889, 237, 1129,
+ 838, 1222, 1222, 568, 682, 1222, 141, 1129, 339, 242,
+ 567, 806, 581, 107, 995, 1222, 339, 581, 530, 260,
+ 1220, 581, 838, 838, 806, 503, 660, 354, 237, 953,
+ 954, 581, 339, 117, 596, 339, 493, 755, 339, 1013,
+ 159, 370, 732, 157, 200, 372, 476, 107, 806, 237,
+ 260, 581, 519, 260, 1220, 260, 709, 1220, 1220, 519,
+ 838, 872, 1225, 488, 1225, 1225, 1222, 237, 1222, 730,
+ 72, 1251, 1354, 572, 1252, 1249, 109, 123, 179, 279,
+ 335, 431, 223, 132, 414, 570, 627, 223, 567, 223,
+ 581, 516, 1146, 1146, 1146, 567, 1134, 1134, 382, 567,
+ 1136, 223, 138, 139, 1146, 1134, 1131, 528, 549, 567,
+ 1149, 567, 1149, 570, 627, 106, 1130, 567, 183, 322,
+ 544, 567, 1150, 839, 1134, 530, 223, 570, 627, 223,
+ 570, 260, 837, 260, 838, 260, 838, 223, 570, 627,
+ 1231, 223, 627, 223, 223, 627, 223, 627, 223, 157,
+ 200, 372, 476, 237, 223, 627, 223, 237, 260, 223,
+ 570, 627, 223, 570, 627, 223, 354, 568, 1379, 1380,
+ 1378, 570, 574, 1190, 1311, 1386, 1387, 471, 1047, 568,
+ 1018, 851, 1046, 851, 1046, 1389, 1390, 851, 1046, 851,
+ 1046, 1390, 851, 1046, 1046, 1046, 851, 13, 453, 1362,
+ 1365, 1370, 1046, 567, 683, 684, 1354, 683, 98, 182,
+ 206, 239, 244, 294, 295, 390, 423, 429, 436, 471,
+ 474, 493, 857, 1219, 1231, 856, 1222, 266, 570, 1036,
+ 1046, 1046, 1374, 1307, 1129, 1194, 107, 1231, 872, 568,
+ 1220, 1222, 302, 1354, 237, 237, 857, 1231, 428, 1354,
+ 609, 354, 567, 565, 1050, 1195, 1152, 1209, 567, 567,
+ 237, 567, 567, 1050, 567, 567, 567, 567, 567, 567,
+ 567, 1152, 567, 567, 567, 567, 567, 567, 567, 567,
+ 1050, 567, 567, 567, 567, 567, 567, 567, 567, 1152,
+ 1152, 1152, 513, 1050, 1152, 1190, 1213, 1374, 567, 1374,
+ 80, 83, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 233, 234, 235, 236, 238, 239, 240, 241, 243, 244,
+ 245, 246, 247, 249, 250, 252, 253, 254, 256, 257,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 285, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 320, 321, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 352, 353, 355,
+ 356, 357, 358, 359, 361, 362, 363, 364, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 517, 518, 519, 520, 521, 522, 524, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 545, 546, 547, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 1185, 1187, 1189, 1233,
+ 1238, 1376, 527, 1168, 366, 1152, 286, 570, 1061, 1387,
+ 567, 1374, 1213, 21, 1369, 1370, 1214, 1061, 350, 354,
+ 1339, 1339, 9, 512, 1326, 1327, 1329, 1306, 1306, 191,
+ 262, 618, 570, 140, 188, 609, 107, 188, 307, 607,
+ 722, 1148, 1374, 1376, 1374, 162, 205, 1164, 171, 188,
+ 603, 604, 606, 722, 188, 603, 1387, 1387, 302, 1220,
+ 163, 413, 842, 288, 568, 1010, 104, 114, 121, 147,
+ 261, 266, 288, 303, 356, 359, 447, 568, 570, 1056,
+ 1221, 107, 568, 570, 1013, 1052, 1052, 1069, 1070, 1152,
+ 1052, 234, 330, 1080, 292, 335, 396, 445, 505, 98,
+ 1075, 1152, 558, 559, 1076, 1077, 1152, 1154, 1089, 1090,
+ 1074, 1073, 1071, 1072, 237, 1092, 349, 1094, 1071, 1089,
+ 1109, 1025, 1220, 107, 1354, 442, 1190, 1299, 560, 570,
+ 571, 1357, 1276, 1279, 1276, 282, 183, 258, 319, 1151,
+ 319, 1151, 1151, 322, 1227, 319, 322, 433, 1373, 1373,
+ 570, 1268, 187, 1306, 506, 1254, 1256, 1222, 453, 1227,
+ 1328, 1370, 570, 557, 1222, 13, 1227, 1373, 1227, 1373,
+ 570, 1286, 1222, 567, 567, 1358, 137, 483, 483, 429,
+ 266, 277, 360, 363, 444, 515, 560, 892, 893, 894,
+ 896, 898, 900, 1129, 1355, 483, 518, 483, 429, 1223,
+ 569, 483, 483, 429, 304, 483, 483, 474, 599, 370,
+ 981, 983, 557, 985, 237, 248, 266, 418, 867, 868,
+ 141, 160, 219, 239, 386, 500, 679, 680, 160, 188,
+ 339, 483, 160, 483, 188, 339, 429, 160, 201, 211,
+ 370, 408, 803, 429, 738, 97, 135, 206, 244, 356,
+ 390, 423, 486, 493, 833, 834, 1222, 223, 408, 442,
+ 622, 354, 722, 434, 299, 483, 1354, 483, 344, 722,
+ 192, 287, 429, 440, 485, 601, 838, 414, 442, 905,
+ 918, 196, 568, 887, 892, 483, 506, 474, 1220, 149,
+ 219, 260, 667, 679, 1354, 149, 160, 941, 374, 354,
+ 425, 427, 488, 160, 941, 101, 411, 425, 427, 488,
+ 425, 1220, 238, 272, 349, 838, 567, 483, 483, 259,
+ 567, 631, 313, 474, 503, 528, 631, 160, 570, 196,
+ 370, 266, 223, 408, 442, 622, 944, 507, 507, 336,
+ 1129, 483, 429, 567, 923, 1222, 1220, 483, 483, 429,
+ 918, 196, 471, 471, 483, 483, 471, 806, 182, 442,
+ 613, 483, 583, 613, 483, 483, 429, 918, 196, 1220,
+ 483, 483, 1220, 1131, 722, 128, 721, 722, 722, 180,
+ 317, 320, 128, 483, 581, 324, 429, 581, 335, 720,
+ 483, 483, 344, 1374, 748, 838, 483, 483, 429, 458,
+ 393, 1374, 393, 483, 393, 483, 393, 806, 474, 1107,
+ 374, 374, 160, 483, 941, 429, 483, 483, 631, 631,
+ 838, 838, 838, 838, 1220, 116, 512, 116, 116, 483,
+ 116, 483, 512, 429, 567, 570, 613, 506, 764, 1230,
+ 483, 583, 613, 1220, 483, 941, 429, 370, 408, 396,
+ 409, 438, 605, 973, 1191, 1191, 1192, 568, 85, 86,
+ 570, 1067, 1068, 566, 572, 1220, 1006, 1222, 1220, 288,
+ 1129, 288, 354, 288, 288, 722, 838, 838, 288, 288,
+ 288, 1129, 288, 288, 288, 354, 483, 242, 483, 645,
+ 493, 567, 107, 223, 838, 807, 808, 1356, 981, 1129,
+ 354, 223, 735, 1222, 339, 374, 567, 582, 820, 507,
+ 400, 519, 1220, 98, 471, 526, 913, 582, 223, 1230,
+ 167, 248, 597, 659, 715, 778, 852, 870, 977, 223,
+ 1374, 756, 757, 223, 354, 1374, 1230, 310, 838, 838,
+ 838, 838, 215, 395, 567, 764, 339, 582, 1220, 339,
+ 717, 719, 339, 107, 349, 374, 567, 682, 682, 260,
+ 712, 1220, 237, 260, 873, 1222, 567, 810, 899, 1222,
+ 567, 890, 890, 107, 1129, 96, 119, 281, 779, 294,
+ 569, 1227, 1252, 526, 528, 1048, 431, 902, 901, 1129,
+ 1222, 567, 567, 1190, 1227, 840, 1146, 1146, 106, 1130,
+ 481, 481, 1227, 1227, 1129, 565, 565, 1227, 483, 483,
+ 1227, 1134, 888, 889, 1231, 1230, 223, 627, 223, 507,
+ 223, 507, 924, 925, 627, 888, 1231, 888, 1222, 1222,
+ 1129, 840, 1231, 764, 223, 837, 838, 1221, 1222, 1222,
+ 838, 568, 574, 1381, 568, 1387, 1388, 1311, 260, 1220,
+ 179, 1018, 1046, 1046, 1390, 1046, 1046, 1390, 1046, 1046,
+ 1222, 13, 570, 1369, 683, 568, 570, 568, 245, 391,
+ 424, 437, 472, 1221, 837, 181, 439, 888, 1221, 348,
+ 888, 888, 1221, 1219, 1219, 1221, 837, 483, 526, 863,
+ 218, 304, 761, 762, 92, 221, 425, 445, 1037, 1107,
+ 343, 1038, 568, 570, 1021, 483, 1220, 937, 938, 855,
+ 854, 855, 242, 249, 864, 1354, 97, 149, 206, 244,
+ 295, 390, 423, 493, 833, 834, 1190, 566, 1190, 1195,
+ 1196, 522, 1206, 1207, 1152, 1190, 567, 1227, 1227, 183,
+ 258, 319, 322, 433, 544, 1197, 1198, 1374, 1376, 1190,
+ 1190, 1190, 1227, 1227, 1152, 1152, 923, 1152, 1191, 1193,
+ 1200, 425, 558, 559, 567, 1153, 1154, 1187, 1201, 568,
+ 1190, 1152, 1193, 1202, 1152, 126, 242, 298, 484, 1152,
+ 1190, 1203, 1190, 324, 1154, 1152, 1162, 1163, 1164, 324,
+ 1152, 1164, 568, 570, 1227, 1150, 1129, 1152, 1152, 1152,
+ 1152, 1356, 481, 112, 468, 1215, 838, 1152, 567, 1050,
+ 1204, 203, 205, 229, 331, 332, 333, 334, 338, 339,
+ 344, 490, 501, 1199, 1152, 567, 1152, 483, 121, 261,
+ 266, 303, 447, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 98, 105, 452, 1184, 251, 232, 1169,
+ 425, 567, 1181, 247, 307, 471, 475, 477, 503, 1062,
+ 1220, 1218, 242, 1096, 1191, 1222, 1370, 1211, 1096, 1328,
+ 570, 557, 1220, 485, 567, 1374, 570, 1387, 568, 259,
+ 259, 627, 1286, 1016, 1005, 1009, 1152, 568, 316, 339,
+ 1057, 1016, 1014, 570, 108, 198, 507, 882, 425, 426,
+ 558, 559, 1077, 1079, 1154, 445, 292, 355, 570, 1078,
+ 1227, 1373, 1078, 425, 426, 1079, 1219, 343, 449, 1039,
+ 1090, 1072, 507, 1034, 188, 368, 567, 1026, 1049, 107,
+ 1354, 567, 1041, 1042, 1043, 1354, 568, 571, 1300, 1130,
+ 574, 1279, 574, 568, 722, 568, 33, 1255, 1331, 1332,
+ 1370, 1324, 1329, 1377, 1315, 1130, 1364, 1380, 1364, 1130,
+ 1230, 1222, 1222, 363, 128, 1355, 568, 894, 896, 893,
+ 896, 1355, 360, 568, 570, 839, 1230, 1222, 1222, 1223,
+ 1230, 1222, 1222, 1230, 1222, 1222, 188, 606, 1228, 420,
+ 506, 854, 429, 248, 854, 567, 1222, 507, 874, 292,
+ 292, 507, 567, 704, 260, 1222, 344, 1230, 1222, 1222,
+ 1152, 344, 1222, 1222, 101, 411, 483, 483, 1222, 483,
+ 739, 901, 567, 1129, 889, 143, 230, 925, 889, 889,
+ 237, 1129, 838, 1222, 254, 335, 370, 408, 511, 742,
+ 743, 744, 1107, 483, 941, 429, 344, 192, 287, 1230,
+ 1222, 354, 1222, 354, 568, 570, 1229, 1231, 1222, 408,
+ 622, 260, 667, 339, 1129, 1222, 1227, 1354, 1220, 1222,
+ 302, 1222, 98, 506, 1222, 260, 1222, 260, 1354, 427,
+ 488, 427, 488, 302, 1222, 98, 506, 1222, 302, 425,
+ 1220, 94, 208, 442, 749, 750, 751, 752, 1356, 1230,
+ 1222, 188, 243, 340, 507, 630, 633, 634, 1356, 1222,
+ 145, 352, 1222, 625, 354, 483, 474, 1220, 483, 941,
+ 429, 196, 1222, 1222, 570, 568, 570, 1230, 1222, 947,
+ 948, 1356, 354, 408, 483, 772, 1230, 1222, 1222, 354,
+ 1108, 1108, 1230, 1222, 1108, 1222, 1229, 159, 213, 272,
+ 376, 498, 506, 509, 584, 1376, 1230, 1222, 1222, 354,
+ 408, 1230, 1222, 408, 442, 622, 719, 722, 838, 1222,
+ 722, 838, 1222, 722, 1230, 1222, 442, 1230, 1222, 1222,
+ 1228, 1221, 1221, 1230, 913, 1222, 1221, 1222, 408, 442,
+ 622, 623, 1220, 1220, 1222, 1222, 1222, 1222, 1230, 1222,
+ 94, 100, 208, 370, 408, 442, 370, 408, 442, 806,
+ 408, 442, 408, 442, 408, 944, 1121, 1354, 260, 816,
+ 1354, 260, 1354, 1230, 1222, 1222, 1374, 1222, 947, 94,
+ 642, 439, 1229, 408, 442, 622, 1222, 1222, 1222, 483,
+ 483, 154, 497, 396, 570, 1067, 1067, 1067, 1152, 1152,
+ 515, 1192, 568, 1152, 1212, 1001, 344, 844, 1374, 107,
+ 844, 206, 838, 844, 844, 288, 507, 507, 844, 844,
+ 844, 294, 844, 844, 844, 838, 392, 646, 646, 270,
+ 471, 777, 1152, 1129, 838, 568, 570, 557, 671, 1356,
+ 1222, 132, 242, 429, 518, 736, 743, 744, 223, 349,
+ 303, 661, 663, 665, 667, 676, 679, 95, 266, 420,
+ 469, 584, 585, 237, 1222, 519, 1220, 107, 773, 472,
+ 1108, 806, 595, 1354, 596, 660, 885, 1222, 239, 838,
+ 567, 706, 707, 1155, 1157, 1158, 1354, 393, 1374, 806,
+ 806, 806, 806, 567, 806, 1119, 1120, 1121, 439, 223,
+ 567, 223, 223, 222, 1242, 838, 349, 661, 1354, 507,
+ 699, 526, 632, 339, 107, 682, 1374, 339, 354, 811,
+ 812, 1376, 806, 96, 568, 891, 892, 897, 107, 294,
+ 417, 486, 525, 903, 904, 905, 906, 903, 354, 294,
+ 349, 193, 280, 491, 505, 780, 781, 1222, 1251, 561,
+ 257, 257, 237, 627, 107, 581, 238, 989, 990, 1190,
+ 568, 568, 627, 565, 546, 546, 568, 568, 1227, 566,
+ 567, 1227, 1354, 1374, 1385, 568, 568, 627, 837, 838,
+ 1222, 838, 1222, 627, 627, 627, 627, 294, 627, 439,
+ 237, 627, 627, 354, 627, 339, 1048, 1377, 1365, 568,
+ 684, 266, 266, 266, 266, 266, 530, 1221, 722, 723,
+ 251, 858, 859, 1230, 95, 864, 483, 567, 242, 221,
+ 445, 221, 445, 425, 505, 321, 1129, 1230, 526, 710,
+ 872, 872, 242, 354, 858, 128, 627, 901, 838, 1129,
+ 889, 348, 889, 889, 1129, 838, 1222, 568, 566, 566,
+ 570, 1152, 210, 1207, 1208, 107, 568, 1152, 568, 568,
+ 568, 242, 568, 568, 568, 568, 568, 568, 570, 570,
+ 568, 377, 568, 568, 567, 1153, 1153, 1190, 83, 87,
+ 88, 89, 266, 288, 356, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 1187, 1153, 568, 568, 237, 242,
+ 447, 568, 568, 107, 1203, 1190, 1203, 1203, 242, 568,
+ 568, 1356, 375, 1166, 107, 568, 570, 1152, 1356, 570,
+ 1152, 1214, 1152, 568, 546, 1153, 1153, 216, 1190, 242,
+ 203, 205, 229, 338, 344, 490, 501, 1199, 338, 216,
+ 923, 1152, 468, 1215, 1152, 1204, 1152, 483, 567, 1050,
+ 567, 567, 365, 1173, 567, 1190, 475, 477, 475, 477,
+ 1220, 1063, 1063, 1063, 297, 426, 543, 567, 1050, 1097,
+ 1098, 1099, 1107, 1112, 1122, 1157, 1354, 523, 1117, 1067,
+ 1117, 7, 10, 11, 21, 22, 23, 25, 26, 30,
+ 31, 32, 181, 324, 382, 493, 1334, 1335, 1337, 1327,
+ 1328, 974, 1227, 1150, 604, 1130, 1016, 316, 567, 1070,
+ 356, 1185, 1188, 548, 883, 1227, 1373, 1079, 355, 526,
+ 505, 1076, 312, 1097, 523, 1118, 513, 470, 506, 1027,
+ 1028, 1029, 1354, 354, 1030, 1354, 1043, 1044, 570, 1096,
+ 557, 1214, 572, 1282, 571, 570, 557, 29, 1343, 568,
+ 568, 571, 900, 839, 896, 896, 128, 898, 562, 1231,
+ 1231, 354, 1221, 357, 354, 1152, 680, 1222, 567, 567,
+ 567, 704, 270, 683, 796, 223, 627, 483, 1230, 1222,
+ 609, 1129, 838, 838, 1129, 726, 1222, 254, 511, 483,
+ 483, 726, 742, 748, 408, 442, 622, 1222, 1222, 1222,
+ 278, 344, 226, 892, 369, 442, 483, 339, 223, 155,
+ 669, 670, 796, 442, 94, 208, 412, 413, 442, 626,
+ 635, 636, 748, 942, 434, 223, 627, 223, 627, 1222,
+ 1222, 1222, 1222, 434, 434, 302, 751, 752, 751, 568,
+ 570, 753, 1374, 270, 568, 570, 557, 569, 226, 1230,
+ 1222, 408, 442, 622, 1222, 1222, 1222, 354, 370, 408,
+ 442, 94, 208, 370, 408, 442, 1129, 336, 1129, 568,
+ 570, 557, 1220, 483, 1231, 507, 769, 226, 304, 376,
+ 344, 1374, 376, 1231, 504, 226, 483, 483, 429, 458,
+ 913, 913, 913, 369, 442, 160, 483, 941, 429, 188,
+ 237, 637, 233, 872, 483, 483, 314, 314, 314, 483,
+ 483, 429, 483, 483, 429, 483, 429, 483, 429, 483,
+ 196, 627, 1129, 339, 1374, 442, 942, 223, 627, 483,
+ 483, 568, 1222, 483, 941, 429, 483, 1230, 1222, 568,
+ 568, 568, 1192, 566, 1129, 838, 288, 844, 1222, 1222,
+ 1222, 288, 459, 460, 647, 1374, 647, 254, 568, 568,
+ 242, 806, 808, 336, 356, 558, 559, 722, 809, 896,
+ 1188, 1237, 1374, 141, 147, 160, 188, 190, 246, 274,
+ 339, 344, 386, 402, 500, 672, 673, 675, 222, 522,
+ 581, 609, 1222, 609, 358, 746, 1220, 1220, 1220, 568,
+ 570, 1231, 251, 420, 1231, 1227, 493, 1220, 682, 1376,
+ 237, 774, 117, 596, 471, 755, 181, 1013, 1152, 242,
+ 570, 1221, 632, 813, 814, 1374, 568, 570, 1222, 237,
+ 683, 1220, 709, 1220, 1261, 1049, 567, 662, 1220, 568,
+ 1222, 526, 528, 700, 631, 107, 223, 1049, 699, 483,
+ 223, 1107, 568, 570, 557, 780, 568, 570, 188, 557,
+ 907, 1374, 609, 471, 895, 896, 237, 912, 120, 415,
+ 908, 909, 906, 909, 193, 280, 435, 505, 964, 1222,
+ 349, 354, 359, 254, 1247, 1049, 1261, 1129, 567, 568,
+ 570, 568, 1227, 1149, 1149, 566, 1385, 567, 558, 559,
+ 560, 561, 562, 566, 627, 507, 627, 507, 627, 1222,
+ 1222, 764, 838, 223, 237, 429, 429, 429, 429, 429,
+ 1221, 570, 1230, 526, 570, 860, 357, 1108, 439, 221,
+ 221, 181, 335, 1220, 1222, 1231, 857, 864, 1230, 288,
+ 288, 288, 288, 722, 288, 288, 288, 288, 288, 1195,
+ 479, 1152, 214, 1129, 568, 1152, 1199, 1152, 1152, 568,
+ 1190, 570, 1129, 1153, 1153, 1153, 1153, 203, 205, 339,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1152, 1152, 1152, 1129, 568, 568, 568, 1190, 568, 570,
+ 128, 1154, 1167, 568, 1356, 1163, 383, 464, 1165, 568,
+ 570, 518, 1159, 107, 568, 1374, 1152, 104, 104, 1152,
+ 568, 1152, 242, 338, 1152, 568, 216, 1153, 1153, 216,
+ 216, 1152, 1152, 1068, 523, 567, 1174, 1354, 568, 1190,
+ 570, 1063, 1063, 1063, 1063, 1220, 1220, 1220, 1050, 1112,
+ 1122, 242, 567, 1050, 1098, 1099, 107, 1100, 1101, 1354,
+ 570, 168, 243, 276, 291, 301, 327, 419, 1104, 1101,
+ 107, 1100, 1103, 1354, 1101, 549, 1116, 1213, 1152, 251,
+ 1081, 568, 1081, 570, 557, 568, 1343, 1021, 567, 883,
+ 234, 296, 355, 526, 480, 171, 1152, 416, 1032, 512,
+ 568, 570, 1214, 158, 1032, 568, 570, 1042, 1118, 1152,
+ 1227, 557, 1301, 1332, 1337, 568, 562, 900, 493, 245,
+ 424, 430, 437, 472, 494, 869, 237, 869, 568, 567,
+ 687, 688, 877, 1157, 1354, 683, 683, 796, 1222, 568,
+ 190, 274, 335, 339, 797, 1222, 1222, 107, 507, 507,
+ 294, 839, 1230, 1222, 483, 941, 429, 483, 278, 1222,
+ 128, 474, 1222, 223, 667, 188, 1354, 746, 458, 246,
+ 225, 259, 339, 631, 581, 181, 246, 339, 458, 461,
+ 631, 669, 720, 442, 636, 493, 1222, 1354, 434, 750,
+ 1222, 634, 809, 1356, 1222, 369, 442, 483, 941, 429,
+ 483, 226, 483, 483, 429, 244, 356, 461, 818, 819,
+ 244, 356, 826, 827, 483, 483, 429, 568, 568, 568,
+ 948, 336, 722, 896, 949, 1188, 1237, 1374, 408, 1222,
+ 567, 526, 770, 1222, 1228, 1374, 1374, 1374, 1222, 1222,
+ 1222, 1222, 1228, 128, 474, 1222, 1222, 1222, 1222, 513,
+ 1222, 1222, 237, 237, 410, 237, 260, 1230, 1222, 1222,
+ 1230, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 354, 147,
+ 628, 223, 96, 119, 493, 1354, 1222, 1374, 748, 1222,
+ 1222, 1222, 1222, 1067, 568, 288, 844, 288, 288, 288,
+ 844, 581, 507, 652, 653, 726, 796, 526, 528, 838,
+ 567, 838, 1222, 1153, 101, 128, 674, 191, 262, 190,
+ 344, 292, 1220, 913, 244, 390, 792, 799, 800, 1354,
+ 735, 567, 374, 567, 662, 677, 273, 694, 665, 1231,
+ 1231, 1129, 567, 632, 98, 193, 280, 435, 505, 775,
+ 483, 771, 1230, 260, 1220, 757, 530, 354, 568, 1097,
+ 707, 913, 568, 570, 1121, 746, 764, 568, 717, 107,
+ 349, 374, 567, 1023, 710, 664, 666, 668, 679, 1354,
+ 374, 695, 696, 662, 694, 631, 352, 354, 701, 1049,
+ 712, 710, 632, 1374, 1222, 874, 812, 1376, 809, 354,
+ 897, 1152, 1152, 570, 567, 903, 493, 570, 113, 1152,
+ 483, 567, 683, 1220, 781, 726, 80, 1258, 568, 989,
+ 990, 566, 568, 1286, 1385, 1385, 1385, 1385, 1385, 1222,
+ 1222, 627, 439, 627, 1221, 1221, 1221, 1221, 1221, 722,
+ 248, 859, 864, 568, 1222, 181, 864, 242, 627, 344,
+ 847, 1374, 847, 847, 847, 288, 847, 847, 847, 847,
+ 847, 1152, 568, 568, 568, 242, 568, 1152, 242, 203,
+ 205, 242, 237, 216, 568, 533, 1161, 1190, 401, 512,
+ 128, 1167, 1154, 524, 524, 568, 1152, 335, 1152, 570,
+ 1160, 1131, 1152, 1152, 1152, 1152, 104, 104, 1152, 1152,
+ 216, 568, 568, 1152, 1175, 1354, 568, 1152, 1220, 1220,
+ 1220, 1220, 1101, 1103, 1101, 567, 538, 1154, 568, 1354,
+ 567, 1098, 291, 364, 1105, 1098, 1105, 291, 1104, 1105,
+ 291, 473, 1110, 567, 1354, 567, 361, 128, 255, 1088,
+ 1374, 1088, 1335, 559, 1328, 1336, 1373, 1374, 1374, 568,
+ 923, 480, 349, 1217, 1049, 368, 1049, 1029, 354, 567,
+ 1031, 557, 1043, 1032, 1381, 493, 568, 483, 854, 242,
+ 796, 1152, 568, 570, 526, 147, 876, 880, 876, 568,
+ 568, 267, 685, 191, 262, 272, 190, 509, 627, 1129,
+ 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1231, 1222, 667,
+ 671, 1228, 674, 260, 260, 344, 722, 674, 344, 1228,
+ 1354, 1129, 627, 627, 557, 128, 474, 1222, 1222, 1222,
+ 1222, 1222, 1230, 1222, 1222, 1227, 1227, 1129, 570, 1227,
+ 1227, 570, 1230, 1222, 1222, 483, 1152, 141, 1231, 1222,
+ 483, 483, 242, 266, 526, 1221, 1221, 838, 1221, 223,
+ 226, 838, 1374, 1374, 1129, 627, 627, 483, 568, 288,
+ 844, 844, 844, 844, 567, 648, 649, 581, 195, 244,
+ 277, 244, 1152, 339, 673, 188, 107, 913, 682, 507,
+ 703, 1225, 104, 222, 266, 747, 751, 349, 661, 637,
+ 220, 268, 567, 439, 507, 683, 107, 1231, 769, 596,
+ 339, 567, 239, 1222, 706, 1374, 439, 632, 222, 1243,
+ 838, 349, 661, 710, 568, 570, 526, 671, 128, 699,
+ 637, 695, 153, 474, 702, 526, 978, 107, 702, 242,
+ 354, 567, 1220, 1374, 894, 914, 915, 1355, 909, 1129,
+ 237, 910, 1220, 242, 483, 934, 403, 782, 275, 727,
+ 1259, 1354, 627, 568, 568, 627, 627, 1222, 357, 286,
+ 627, 858, 847, 1152, 568, 1153, 242, 1152, 1152, 1152,
+ 567, 568, 570, 568, 1167, 568, 512, 455, 568, 568,
+ 1152, 1152, 1152, 568, 374, 1176, 568, 1113, 1114, 1157,
+ 567, 1166, 1100, 567, 1221, 1098, 354, 507, 1106, 1098,
+ 291, 1098, 1225, 1120, 567, 1120, 1354, 1064, 1152, 525,
+ 1170, 1170, 1227, 1373, 432, 1058, 568, 1046, 1388, 1027,
+ 160, 875, 877, 204, 1152, 858, 354, 858, 568, 685,
+ 688, 356, 923, 838, 838, 881, 402, 685, 567, 913,
+ 568, 483, 442, 1038, 107, 223, 223, 628, 809, 1231,
+ 1222, 483, 567, 889, 923, 925, 819, 567, 567, 827,
+ 1222, 568, 567, 442, 1038, 1222, 1222, 567, 567, 567,
+ 526, 549, 998, 410, 998, 998, 237, 1222, 628, 1222,
+ 844, 654, 655, 1356, 123, 169, 194, 212, 216, 238,
+ 241, 256, 344, 394, 650, 648, 1374, 889, 107, 930,
+ 930, 568, 259, 567, 703, 315, 686, 270, 567, 800,
+ 792, 567, 568, 570, 1220, 568, 439, 98, 152, 155,
+ 161, 189, 246, 259, 271, 458, 461, 678, 678, 1219,
+ 1222, 1222, 568, 1049, 770, 223, 181, 746, 242, 1222,
+ 107, 1261, 1049, 662, 1220, 568, 1386, 666, 358, 1354,
+ 700, 695, 699, 193, 208, 383, 1222, 133, 141, 307,
+ 1049, 838, 1107, 875, 242, 795, 896, 568, 570, 493,
+ 214, 578, 908, 911, 1117, 453, 453, 568, 329, 353,
+ 783, 784, 785, 237, 788, 726, 335, 511, 728, 729,
+ 557, 1260, 1222, 864, 237, 1153, 1162, 1190, 335, 545,
+ 128, 1067, 568, 570, 107, 1115, 188, 1127, 1128, 1153,
+ 150, 1221, 568, 1152, 567, 1098, 1106, 567, 568, 1120,
+ 568, 170, 252, 422, 567, 1082, 1083, 1084, 1085, 1086,
+ 1087, 1152, 1171, 1172, 1354, 127, 197, 180, 1059, 512,
+ 1222, 568, 570, 340, 505, 860, 869, 627, 876, 913,
+ 567, 631, 882, 1220, 913, 683, 703, 1222, 474, 259,
+ 507, 629, 442, 1038, 1222, 1194, 237, 822, 822, 1194,
+ 1194, 1152, 474, 1190, 1190, 638, 639, 1232, 837, 838,
+ 837, 838, 1221, 627, 568, 570, 560, 567, 606, 656,
+ 722, 995, 1374, 995, 339, 344, 394, 995, 995, 1117,
+ 930, 111, 264, 335, 681, 567, 718, 1152, 243, 373,
+ 448, 354, 690, 691, 692, 474, 568, 1225, 76, 801,
+ 751, 662, 694, 1222, 568, 746, 230, 821, 632, 978,
+ 1220, 530, 1097, 746, 1049, 1023, 710, 695, 662, 694,
+ 671, 567, 701, 699, 700, 426, 426, 141, 357, 141,
+ 710, 874, 568, 1220, 796, 903, 914, 1129, 571, 204,
+ 526, 526, 784, 425, 471, 786, 209, 789, 522, 791,
+ 511, 726, 1227, 1368, 1376, 80, 746, 627, 1152, 568,
+ 568, 512, 1190, 253, 395, 426, 1177, 1116, 1113, 567,
+ 1153, 568, 570, 107, 1123, 1124, 1354, 568, 1221, 1190,
+ 568, 567, 443, 567, 568, 570, 570, 107, 234, 234,
+ 683, 1049, 1117, 877, 442, 242, 703, 923, 882, 883,
+ 682, 703, 568, 796, 1222, 718, 1152, 474, 568, 360,
+ 432, 399, 823, 823, 568, 568, 568, 1222, 568, 568,
+ 568, 570, 1227, 998, 655, 606, 657, 658, 1374, 1374,
+ 344, 683, 560, 683, 1374, 1374, 272, 719, 568, 193,
+ 505, 354, 692, 354, 691, 1222, 567, 568, 570, 637,
+ 439, 746, 838, 107, 107, 567, 1222, 978, 710, 699,
+ 637, 695, 567, 697, 698, 1157, 1354, 702, 700, 701,
+ 357, 357, 567, 267, 878, 237, 909, 99, 281, 965,
+ 244, 244, 995, 425, 457, 790, 567, 222, 1259, 121,
+ 171, 496, 1152, 1178, 1179, 1178, 1178, 568, 1120, 570,
+ 1128, 1356, 568, 570, 237, 1129, 568, 568, 1190, 567,
+ 1190, 1083, 1172, 1174, 128, 128, 442, 1041, 858, 523,
+ 689, 568, 883, 686, 796, 1038, 1222, 889, 128, 1038,
+ 483, 638, 838, 568, 570, 683, 568, 462, 132, 335,
+ 414, 442, 693, 693, 568, 76, 439, 1222, 818, 1049,
+ 746, 1386, 700, 695, 699, 1152, 568, 570, 880, 880,
+ 701, 702, 875, 567, 632, 209, 340, 567, 960, 962,
+ 966, 1024, 1033, 1040, 1049, 889, 889, 787, 1354, 1152,
+ 792, 1179, 425, 236, 381, 236, 381, 219, 1180, 1180,
+ 1180, 568, 1154, 1124, 361, 188, 339, 344, 1125, 1126,
+ 1376, 107, 1102, 409, 1111, 568, 1082, 568, 683, 683,
+ 1354, 1117, 627, 567, 796, 690, 1038, 838, 567, 658,
+ 93, 188, 344, 1222, 746, 978, 701, 699, 700, 568,
+ 698, 838, 881, 881, 702, 568, 877, 879, 702, 425,
+ 961, 962, 963, 1050, 1051, 570, 570, 568, 1225, 104,
+ 171, 251, 335, 480, 1166, 1153, 344, 1126, 1153, 1354,
+ 567, 568, 442, 442, 483, 507, 1152, 796, 1190, 746,
+ 702, 700, 701, 880, 878, 568, 570, 1117, 791, 568,
+ 571, 483, 242, 567, 1179, 425, 362, 150, 1152, 1354,
+ 1354, 1225, 1226, 1354, 568, 568, 701, 702, 881, 632,
+ 877, 222, 963, 453, 453, 793, 794, 1227, 1356, 1373,
+ 1374, 1123, 568, 567, 188, 702, 702, 792, 526, 526,
+ 568, 570, 568, 1191, 1226, 1117, 1225, 244, 244, 794,
+ 1067, 507, 567, 889, 889, 568, 1354, 793, 568
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_int16 yyr1[] =
+{
+ 0, 575, 576, 577, 577, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
+ 578, 578, 578, 578, 578, 578, 578, 578, 578, 579,
+ 580, 581, 581, 581, 582, 582, 583, 583, 584, 584,
+ 584, 584, 584, 584, 584, 584, 584, 585, 585, 585,
+ 585, 585, 585, 586, 587, 587, 588, 588, 589, 589,
+ 589, 589, 590, 590, 590, 590, 590, 590, 591, 592,
+ 593, 593, 594, 594, 594, 594, 595, 595, 596, 596,
+ 597, 597, 597, 597, 597, 597, 598, 598, 598, 599,
+ 599, 599, 600, 600, 600, 600, 601, 601, 601, 601,
+ 601, 601, 601, 601, 601, 601, 601, 602, 602, 603,
+ 603, 604, 604, 605, 605, 605, 605, 606, 606, 606,
+ 606, 607, 607, 607, 607, 607, 607, 607, 608, 608,
+ 608, 609, 609, 610, 611, 611, 611, 611, 612, 612,
+ 613, 613, 614, 614, 615, 615, 615, 615, 615, 616,
+ 617, 617, 618, 618, 619, 620, 620, 620, 620, 620,
+ 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
+ 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
+ 621, 622, 622, 623, 623, 623, 624, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
+ 625, 625, 625, 625, 625, 625, 626, 626, 627, 627,
+ 627, 628, 628, 629, 629, 630, 630, 630, 630, 631,
+ 632, 632, 633, 633, 634, 634, 634, 634, 635, 635,
+ 636, 636, 636, 636, 637, 637, 637, 637, 638, 639,
+ 639, 640, 641, 641, 642, 642, 642, 642, 643, 643,
+ 644, 644, 645, 645, 646, 646, 647, 647, 647, 648,
+ 648, 649, 649, 650, 650, 650, 650, 650, 650, 650,
+ 650, 650, 650, 650, 650, 650, 651, 651, 652, 652,
+ 653, 653, 654, 654, 655, 656, 656, 656, 656, 656,
+ 657, 657, 658, 659, 659, 659, 659, 659, 659, 660,
+ 660, 660, 660, 660, 660, 660, 660, 661, 661, 662,
+ 662, 663, 663, 664, 664, 665, 665, 665, 666, 666,
+ 667, 668, 668, 669, 669, 670, 670, 671, 671, 672,
+ 672, 672, 672, 673, 673, 673, 673, 673, 673, 673,
+ 673, 673, 674, 674, 675, 675, 675, 675, 676, 677,
+ 677, 677, 678, 678, 678, 678, 678, 678, 678, 678,
+ 678, 678, 679, 679, 680, 680, 680, 680, 680, 680,
+ 680, 681, 681, 682, 682, 683, 683, 684, 685, 685,
+ 686, 686, 686, 686, 687, 687, 688, 688, 689, 689,
+ 690, 690, 690, 690, 690, 691, 692, 693, 693, 693,
+ 693, 693, 694, 694, 695, 695, 696, 697, 697, 698,
+ 698, 698, 699, 699, 700, 700, 700, 701, 701, 701,
+ 701, 702, 702, 703, 703, 704, 705, 705, 706, 706,
+ 707, 707, 707, 708, 708, 709, 710, 710, 710, 711,
+ 711, 712, 713, 713, 714, 715, 715, 716, 716, 717,
+ 717, 718, 718, 719, 719, 720, 720, 720, 720, 720,
+ 720, 720, 720, 720, 720, 720, 720, 720, 720, 721,
+ 721, 722, 722, 722, 722, 723, 723, 724, 724, 725,
+ 725, 726, 726, 727, 727, 728, 728, 729, 729, 730,
+ 730, 731, 732, 732, 733, 733, 734, 734, 735, 735,
+ 736, 736, 736, 736, 737, 738, 738, 739, 740, 740,
+ 740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, 741, 742, 742, 742, 742, 743, 743, 744, 744,
+ 745, 745, 746, 746, 747, 747, 748, 749, 749, 750,
+ 750, 750, 750, 751, 752, 753, 754, 754, 755, 755,
+ 756, 756, 757, 757, 758, 758, 758, 759, 759, 759,
+ 759, 760, 761, 761, 762, 762, 763, 763, 764, 764,
+ 765, 765, 766, 767, 768, 769, 769, 770, 770, 771,
+ 771, 772, 772, 773, 773, 774, 774, 775, 775, 775,
+ 775, 775, 776, 777, 777, 778, 778, 779, 779, 779,
+ 780, 780, 781, 781, 781, 781, 781, 782, 782, 783,
+ 783, 784, 785, 785, 786, 786, 787, 788, 788, 789,
+ 789, 790, 790, 791, 791, 792, 792, 793, 793, 793,
+ 794, 794, 794, 794, 795, 795, 796, 796, 797, 797,
+ 797, 797, 797, 797, 798, 798, 799, 799, 800, 801,
+ 801, 802, 803, 803, 803, 803, 804, 805, 805, 805,
+ 805, 805, 805, 805, 805, 805, 805, 805, 805, 805,
+ 805, 805, 805, 806, 807, 807, 808, 808, 809, 809,
+ 809, 809, 809, 809, 810, 811, 811, 812, 813, 813,
+ 814, 814, 815, 815, 815, 815, 816, 816, 817, 818,
+ 818, 819, 819, 819, 819, 819, 820, 820, 821, 821,
+ 822, 822, 822, 823, 823, 824, 825, 825, 826, 826,
+ 827, 827, 828, 828, 829, 829, 830, 831, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
+ 833, 833, 833, 833, 833, 833, 833, 833, 833, 833,
+ 833, 833, 833, 834, 834, 834, 834, 834, 835, 835,
+ 835, 835, 835, 835, 835, 835, 836, 836, 836, 837,
+ 837, 838, 838, 839, 839, 840, 840, 841, 842, 842,
+ 842, 843, 843, 843, 843, 843, 843, 843, 843, 843,
+ 843, 843, 843, 843, 843, 843, 843, 843, 843, 844,
+ 844, 845, 845, 845, 845, 845, 845, 845, 845, 845,
+ 845, 846, 846, 847, 847, 848, 848, 848, 848, 848,
+ 848, 848, 848, 848, 848, 848, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849, 849, 849,
+ 850, 850, 851, 851, 852, 853, 853, 854, 854, 854,
+ 854, 854, 855, 855, 856, 856, 856, 856, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857, 858, 858,
+ 859, 859, 860, 860, 861, 862, 862, 863, 863, 864,
+ 864, 865, 866, 866, 867, 867, 867, 868, 868, 868,
+ 869, 869, 869, 869, 869, 869, 870, 870, 871, 871,
+ 872, 872, 873, 873, 874, 874, 875, 875, 876, 876,
+ 877, 877, 877, 878, 878, 879, 879, 880, 880, 881,
+ 881, 882, 882, 882, 883, 883, 883, 884, 884, 884,
+ 884, 885, 885, 886, 886, 887, 887, 888, 888, 889,
+ 889, 889, 889, 890, 890, 891, 891, 892, 892, 892,
+ 892, 892, 893, 893, 893, 893, 893, 894, 895, 896,
+ 896, 896, 897, 897, 897, 898, 899, 899, 899, 899,
+ 900, 900, 901, 902, 902, 903, 903, 904, 904, 905,
+ 905, 905, 905, 905, 905, 905, 905, 905, 905, 905,
+ 905, 905, 905, 905, 905, 905, 906, 906, 906, 906,
+ 906, 907, 907, 908, 909, 909, 909, 910, 910, 911,
+ 911, 912, 912, 913, 913, 914, 915, 915, 916, 916,
+ 916, 917, 917, 918, 918, 919, 919, 919, 919, 919,
+ 919, 920, 920, 921, 921, 922, 922, 922, 922, 923,
+ 923, 924, 924, 925, 926, 927, 927, 928, 928, 929,
+ 929, 929, 930, 930, 930, 931, 932, 932, 933, 934,
+ 934, 934, 934, 935, 936, 936, 936, 936, 937, 937,
+ 938, 938, 938, 939, 939, 940, 940, 940, 940, 940,
+ 940, 940, 940, 940, 940, 940, 940, 940, 940, 940,
+ 940, 940, 940, 940, 940, 940, 940, 940, 940, 940,
+ 940, 940, 940, 940, 940, 940, 940, 940, 940, 940,
+ 940, 940, 940, 940, 940, 940, 940, 940, 940, 940,
+ 940, 940, 940, 940, 940, 940, 940, 940, 940, 940,
+ 941, 941, 942, 942, 943, 943, 943, 943, 943, 943,
+ 944, 944, 945, 945, 945, 945, 945, 945, 945, 945,
+ 945, 945, 945, 945, 945, 945, 945, 945, 945, 945,
+ 945, 945, 945, 945, 945, 945, 945, 945, 945, 946,
+ 947, 947, 948, 948, 949, 949, 949, 949, 949, 950,
+ 951, 951, 951, 951, 951, 951, 951, 951, 951, 951,
+ 951, 951, 951, 951, 951, 951, 951, 951, 951, 951,
+ 951, 951, 951, 951, 952, 953, 953, 954, 954, 955,
+ 955, 955, 955, 956, 957, 957, 957, 957, 957, 957,
+ 957, 957, 958, 958, 959, 960, 960, 960, 961, 961,
+ 962, 962, 962, 962, 962, 963, 963, 964, 964, 964,
+ 964, 965, 965, 965, 966, 967, 967, 968, 969, 969,
+ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 971, 971, 972, 972, 972, 973, 973, 973,
+ 973, 973, 974, 974, 974, 975, 975, 976, 976, 976,
+ 977, 977, 977, 977, 978, 978, 978, 978, 979, 980,
+ 981, 981, 982, 982, 983, 983, 983, 984, 984, 984,
+ 984, 984, 984, 984, 985, 985, 986, 986, 986, 987,
+ 988, 988, 988, 988, 989, 989, 990, 991, 992, 992,
+ 993, 994, 994, 994, 994, 994, 994, 994, 995, 995,
+ 996, 997, 997, 997, 997, 997, 997, 998, 998, 999,
+ 1000, 1000, 1000, 1000, 1001, 1001, 1002, 1002, 1003, 1003,
+ 1004, 1004, 1005, 1005, 1006, 1007, 1007, 1008, 1008, 1008,
+ 1009, 1009, 1010, 1010, 1011, 1011, 1012, 1012, 1013, 1013,
+ 1014, 1015, 1015, 1016, 1016, 1017, 1017, 1017, 1017, 1018,
+ 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1019, 1019,
+ 1020, 1020, 1021, 1021, 1021, 1021, 1022, 1022, 1022, 1023,
+ 1023, 1024, 1025, 1025, 1026, 1026, 1026, 1026, 1026, 1027,
+ 1027, 1028, 1028, 1029, 1030, 1030, 1030, 1031, 1031, 1031,
+ 1032, 1032, 1033, 1034, 1034, 1035, 1036, 1036, 1037, 1037,
+ 1037, 1037, 1037, 1037, 1037, 1037, 1038, 1038, 1039, 1039,
+ 1039, 1040, 1041, 1041, 1042, 1042, 1043, 1044, 1044, 1045,
+ 1046, 1046, 1047, 1047, 1047, 1047, 1047, 1047, 1048, 1048,
+ 1048, 1049, 1049, 1050, 1050, 1051, 1051, 1051, 1051, 1051,
+ 1051, 1051, 1051, 1052, 1052, 1053, 1053, 1053, 1053, 1053,
+ 1053, 1053, 1054, 1054, 1054, 1055, 1055, 1056, 1057, 1057,
+ 1057, 1058, 1058, 1058, 1059, 1059, 1059, 1060, 1060, 1061,
+ 1061, 1061, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1063, 1063, 1064, 1064, 1064, 1065, 1065, 1066, 1066,
+ 1067, 1067, 1068, 1069, 1069, 1070, 1070, 1071, 1071, 1071,
+ 1071, 1072, 1072, 1073, 1073, 1073, 1073, 1073, 1073, 1074,
+ 1074, 1075, 1075, 1076, 1077, 1077, 1077, 1078, 1078, 1079,
+ 1079, 1080, 1080, 1081, 1081, 1082, 1082, 1083, 1083, 1083,
+ 1083, 1083, 1084, 1085, 1086, 1087, 1088, 1088, 1089, 1089,
+ 1090, 1090, 1091, 1091, 1092, 1093, 1093, 1093, 1093, 1094,
+ 1094, 1095, 1095, 1096, 1096, 1097, 1097, 1098, 1098, 1098,
+ 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1099, 1099, 1099,
+ 1099, 1099, 1099, 1100, 1100, 1100, 1100, 1101, 1101, 1102,
+ 1102, 1103, 1103, 1103, 1103, 1103, 1104, 1104, 1104, 1104,
+ 1105, 1105, 1106, 1106, 1107, 1107, 1107, 1107, 1108, 1108,
+ 1109, 1109, 1109, 1110, 1111, 1111, 1112, 1112, 1113, 1114,
+ 1114, 1115, 1115, 1116, 1116, 1117, 1117, 1118, 1118, 1118,
+ 1119, 1119, 1120, 1120, 1121, 1122, 1122, 1123, 1123, 1124,
+ 1124, 1124, 1125, 1125, 1126, 1126, 1126, 1126, 1127, 1127,
+ 1128, 1128, 1129, 1129, 1129, 1129, 1129, 1129, 1130, 1130,
+ 1130, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1132, 1132,
+ 1132, 1132, 1133, 1133, 1134, 1134, 1135, 1135, 1135, 1135,
+ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1136, 1136, 1137,
+ 1137, 1138, 1138, 1139, 1140, 1141, 1141, 1142, 1142, 1143,
+ 1144, 1145, 1145, 1145, 1145, 1145, 1145, 1146, 1146, 1147,
+ 1147, 1147, 1147, 1148, 1149, 1149, 1149, 1150, 1150, 1150,
+ 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150,
+ 1150, 1151, 1151, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154,
+ 1154, 1154, 1154, 1154, 1155, 1155, 1155, 1155, 1155, 1155,
+ 1155, 1156, 1156, 1157, 1157, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1159, 1159, 1160, 1160, 1160, 1160, 1161, 1162, 1162,
+ 1163, 1163, 1164, 1164, 1165, 1165, 1165, 1166, 1166, 1166,
+ 1166, 1167, 1167, 1168, 1168, 1169, 1169, 1170, 1170, 1171,
+ 1171, 1172, 1173, 1173, 1173, 1174, 1175, 1175, 1176, 1176,
+ 1177, 1177, 1177, 1177, 1178, 1178, 1179, 1179, 1179, 1179,
+ 1179, 1180, 1180, 1180, 1180, 1180, 1181, 1181, 1181, 1182,
+ 1182, 1183, 1184, 1184, 1184, 1185, 1185, 1186, 1186, 1186,
+ 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1187,
+ 1187, 1188, 1188, 1189, 1189, 1189, 1189, 1189, 1189, 1190,
+ 1190, 1191, 1191, 1192, 1192, 1192, 1193, 1193, 1194, 1194,
+ 1195, 1195, 1195, 1196, 1196, 1197, 1198, 1198, 1198, 1198,
+ 1198, 1198, 1198, 1198, 1199, 1199, 1199, 1199, 1200, 1200,
+ 1201, 1202, 1202, 1202, 1202, 1202, 1203, 1203, 1203, 1204,
+ 1204, 1205, 1206, 1206, 1207, 1208, 1208, 1209, 1209, 1210,
+ 1210, 1211, 1211, 1211, 1211, 1212, 1212, 1213, 1213, 1214,
+ 1214, 1215, 1215, 1216, 1216, 1217, 1217, 1218, 1218, 1218,
+ 1218, 1219, 1219, 1220, 1220, 1221, 1221, 1222, 1223, 1224,
+ 1225, 1225, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1227, 1228, 1228,
+ 1228, 1228, 1229, 1230, 1230, 1230, 1230, 1231, 1231, 1232,
+ 1232, 1232, 1232, 1233, 1233, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234,
+ 1234, 1234, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+ 1236, 1236, 1236, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1239, 1239, 1240, 1240,
+ 1240, 1240, 1240, 1240, 1240, 1240, 1242, 1241, 1243, 1241,
+ 1244, 1245, 1245, 1245, 1245, 1246, 1246, 1246, 1246, 1247,
+ 1247, 1248, 1249, 1250, 1250, 1251, 1251, 1251, 1252, 1252,
+ 1253, 1253, 1254, 1254, 1255, 1255, 1255, 1255, 1256, 1256,
+ 1256, 1257, 1258, 1258, 1259, 1259, 1260, 1260, 1260, 1260,
+ 1261, 1261, 1262, 1263, 1264, 1265, 1266, 1266, 1267, 1268,
+ 1268, 1269, 1269, 1269, 1269, 1269, 1271, 1270, 1272, 1273,
+ 1274, 1274, 1275, 1275, 1275, 1275, 1276, 1276, 1278, 1277,
+ 1280, 1279, 1281, 1279, 1279, 1282, 1282, 1283, 1283, 1283,
+ 1284, 1284, 1284, 1284, 1285, 1285, 1286, 1286, 1286, 1286,
+ 1286, 1286, 1287, 1287, 1287, 1288, 1290, 1289, 1291, 1292,
+ 1291, 1293, 1293, 1294, 1294, 1295, 1295, 1296, 1296, 1296,
+ 1296, 1296, 1296, 1296, 1296, 1296, 1297, 1297, 1297, 1297,
+ 1297, 1297, 1297, 1297, 1297, 1297, 1298, 1298, 1299, 1299,
+ 1300, 1301, 1301, 1302, 1302, 1302, 1303, 1304, 1305, 1305,
+ 1305, 1305, 1306, 1306, 1306, 1307, 1307, 1308, 1308, 1309,
+ 1310, 1310, 1311, 1311, 1312, 1312, 1313, 1313, 1314, 1315,
+ 1315, 1316, 1316, 1316, 1317, 1317, 1317, 1317, 1317, 1317,
+ 1317, 1317, 1317, 1318, 1318, 1318, 1318, 1318, 1319, 1319,
+ 1320, 1321, 1322, 1323, 1323, 1324, 1325, 1326, 1326, 1327,
+ 1328, 1328, 1329, 1330, 1331, 1331, 1332, 1333, 1334, 1334,
+ 1335, 1336, 1336, 1336, 1336, 1336, 1337, 1337, 1337, 1337,
+ 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1337,
+ 1337, 1338, 1338, 1339, 1339, 1340, 1340, 1340, 1342, 1341,
+ 1343, 1343, 1345, 1344, 1346, 1346, 1346, 1347, 1347, 1347,
+ 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1348, 1348, 1349,
+ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349,
+ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349,
+ 1349, 1350, 1350, 1350, 1350, 1350, 1350, 1351, 1351, 1351,
+ 1351, 1351, 1351, 1351, 1352, 1353, 1353, 1353, 1353, 1353,
+ 1353, 1353, 1353, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1355, 1355, 1355, 1355, 1355, 1355, 1356, 1356, 1356, 1356,
+ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1357, 1357, 1357,
+ 1357, 1357, 1358, 1358, 1358, 1358, 1359, 1359, 1359, 1359,
+ 1359, 1359, 1359, 1360, 1360, 1360, 1361, 1361, 1361, 1361,
+ 1361, 1361, 1362, 1362, 1363, 1364, 1364, 1365, 1365, 1366,
+ 1367, 1368, 1369, 1369, 1369, 1370, 1371, 1372, 1373, 1374,
+ 1375, 1376, 1376, 1377, 1377, 1378, 1378, 1378, 1379, 1379,
+ 1380, 1380, 1381, 1381, 1382, 1382, 1382, 1382, 1382, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1384, 1384, 1384, 1384, 1385,
+ 1385, 1385, 1385, 1385, 1385, 1385, 1385, 1385, 1385, 1386,
+ 1386, 1386, 1386, 1387, 1387, 1388, 1388, 1389, 1389, 1390,
+ 1390
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_int8 yyr2[] =
+{
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 2,
+ 5, 1, 1, 0, 2, 0, 2, 0, 2, 2,
+ 3, 3, 1, 3, 3, 2, 1, 1, 2, 2,
+ 2, 3, 3, 5, 5, 5, 0, 3, 5, 5,
+ 5, 5, 3, 5, 3, 5, 3, 5, 5, 6,
+ 1, 1, 6, 4, 9, 7, 1, 0, 2, 0,
+ 1, 1, 1, 1, 1, 1, 2, 3, 3, 2,
+ 5, 1, 3, 3, 3, 3, 1, 3, 3, 2,
+ 2, 2, 2, 3, 3, 3, 3, 1, 3, 1,
+ 3, 1, 1, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 3, 5, 1, 1, 1, 1, 1,
+ 0, 1, 1, 2, 1, 2, 3, 2, 1, 1,
+ 2, 1, 2, 1, 3, 4, 5, 4, 2, 4,
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
+ 4, 6, 4, 6, 10, 13, 4, 6, 4, 10,
+ 13, 4, 6, 4, 6, 5, 7, 11, 14, 5,
+ 7, 1, 3, 4, 4, 4, 3, 2, 5, 3,
+ 6, 4, 6, 6, 5, 7, 6, 6, 5, 5,
+ 6, 5, 9, 4, 5, 7, 6, 4, 8, 4,
+ 2, 4, 3, 6, 4, 3, 3, 3, 2, 2,
+ 3, 4, 4, 3, 3, 3, 3, 3, 3, 4,
+ 4, 3, 2, 3, 2, 2, 3, 3, 2, 2,
+ 3, 4, 4, 4, 5, 1, 3, 2, 1, 1,
+ 0, 2, 0, 2, 0, 1, 1, 1, 3, 3,
+ 2, 0, 1, 3, 3, 1, 5, 3, 1, 2,
+ 1, 3, 2, 3, 6, 6, 10, 1, 2, 1,
+ 3, 4, 1, 3, 4, 6, 4, 8, 2, 2,
+ 11, 9, 1, 1, 1, 0, 1, 1, 1, 1,
+ 3, 2, 0, 1, 1, 3, 3, 1, 1, 3,
+ 3, 3, 3, 4, 3, 2, 1, 0, 3, 0,
+ 1, 0, 1, 3, 2, 1, 1, 1, 3, 0,
+ 1, 3, 1, 13, 16, 12, 15, 14, 17, 1,
+ 1, 2, 2, 2, 2, 1, 0, 1, 0, 3,
+ 0, 1, 3, 1, 3, 1, 1, 1, 1, 1,
+ 5, 2, 4, 2, 2, 1, 0, 2, 0, 3,
+ 1, 1, 2, 2, 1, 3, 4, 5, 2, 5,
+ 7, 5, 1, 2, 1, 2, 2, 2, 3, 3,
+ 3, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 3, 1, 5, 8, 3, 9, 4, 10,
+ 11, 2, 0, 3, 0, 1, 3, 1, 4, 0,
+ 2, 2, 2, 0, 1, 3, 3, 6, 4, 0,
+ 1, 1, 2, 2, 0, 3, 3, 2, 1, 1,
+ 2, 2, 4, 0, 1, 0, 6, 1, 3, 3,
+ 3, 5, 2, 0, 2, 2, 0, 3, 4, 4,
+ 0, 2, 0, 4, 0, 3, 8, 11, 1, 3,
+ 1, 1, 3, 6, 8, 6, 2, 3, 0, 8,
+ 11, 5, 1, 0, 6, 5, 8, 4, 6, 1,
+ 0, 3, 0, 1, 2, 2, 2, 1, 2, 3,
+ 2, 2, 2, 2, 3, 3, 3, 1, 3, 1,
+ 0, 1, 2, 2, 1, 1, 3, 6, 10, 1,
+ 0, 1, 2, 2, 0, 2, 2, 1, 0, 1,
+ 0, 7, 2, 0, 3, 5, 5, 8, 2, 0,
+ 2, 2, 2, 1, 5, 2, 0, 2, 6, 6,
+ 6, 10, 6, 6, 6, 9, 9, 6, 6, 9,
+ 6, 7, 2, 2, 2, 2, 1, 2, 1, 0,
+ 7, 6, 4, 0, 1, 3, 4, 1, 3, 1,
+ 2, 2, 2, 2, 1, 1, 10, 13, 2, 0,
+ 2, 2, 1, 0, 5, 4, 4, 11, 14, 12,
+ 15, 11, 2, 1, 4, 0, 8, 11, 1, 1,
+ 7, 9, 8, 10, 8, 4, 0, 5, 0, 2,
+ 0, 2, 0, 2, 0, 2, 0, 1, 1, 1,
+ 1, 1, 8, 1, 1, 17, 21, 1, 1, 2,
+ 1, 3, 1, 1, 1, 3, 1, 2, 0, 1,
+ 2, 4, 1, 1, 1, 1, 1, 3, 0, 1,
+ 0, 1, 1, 4, 0, 1, 1, 1, 3, 0,
+ 1, 1, 1, 1, 2, 0, 0, 2, 2, 1,
+ 2, 2, 2, 2, 11, 13, 1, 3, 5, 1,
+ 3, 5, 1, 2, 2, 1, 8, 6, 5, 4,
+ 4, 3, 7, 8, 6, 6, 6, 6, 6, 4,
+ 7, 5, 8, 3, 1, 3, 3, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 3, 3, 1, 0,
+ 1, 3, 7, 9, 9, 8, 3, 0, 13, 1,
+ 3, 5, 5, 3, 6, 2, 1, 0, 2, 0,
+ 2, 4, 0, 1, 0, 6, 8, 8, 1, 3,
+ 5, 5, 7, 9, 7, 9, 5, 6, 6, 4,
+ 6, 4, 6, 8, 4, 6, 4, 6, 5, 7,
+ 1, 1, 1, 2, 1, 2, 1, 1, 1, 3,
+ 3, 3, 3, 1, 1, 1, 1, 1, 2, 2,
+ 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 2, 2, 3, 1, 3, 5, 2, 2,
+ 0, 6, 6, 6, 6, 6, 6, 6, 6, 8,
+ 9, 8, 6, 6, 9, 9, 9, 7, 10, 1,
+ 1, 8, 8, 8, 8, 8, 8, 8, 9, 8,
+ 8, 2, 0, 1, 1, 2, 2, 3, 4, 5,
+ 4, 5, 3, 4, 3, 4, 1, 2, 3, 3,
+ 3, 3, 4, 4, 3, 3, 4, 4, 4, 4,
+ 1, 1, 1, 0, 8, 8, 11, 1, 1, 2,
+ 4, 5, 1, 3, 2, 2, 2, 2, 1, 2,
+ 2, 4, 3, 2, 2, 2, 2, 2, 2, 3,
+ 2, 2, 2, 5, 5, 5, 5, 5, 1, 3,
+ 1, 2, 3, 0, 6, 6, 9, 3, 0, 3,
+ 0, 5, 2, 0, 3, 3, 3, 7, 7, 10,
+ 1, 1, 1, 1, 1, 1, 15, 18, 1, 0,
+ 1, 0, 1, 0, 2, 0, 1, 3, 4, 5,
+ 2, 2, 4, 4, 0, 1, 3, 2, 0, 1,
+ 0, 1, 1, 0, 2, 2, 0, 9, 12, 7,
+ 7, 2, 0, 3, 2, 1, 3, 1, 3, 2,
+ 1, 1, 2, 3, 2, 1, 3, 3, 3, 2,
+ 2, 1, 1, 1, 1, 2, 1, 1, 1, 1,
+ 4, 5, 1, 3, 3, 1, 3, 3, 5, 6,
+ 1, 3, 2, 1, 3, 1, 0, 1, 2, 4,
+ 5, 1, 1, 1, 1, 3, 3, 2, 2, 1,
+ 2, 2, 2, 2, 1, 2, 2, 2, 2, 1,
+ 1, 1, 3, 2, 1, 4, 0, 3, 0, 1,
+ 1, 3, 5, 2, 0, 2, 1, 3, 5, 5,
+ 5, 1, 2, 1, 0, 4, 6, 4, 6, 4,
+ 6, 4, 6, 4, 6, 3, 5, 5, 5, 1,
+ 3, 1, 3, 2, 2, 1, 2, 1, 2, 11,
+ 10, 10, 2, 2, 0, 9, 2, 0, 10, 11,
+ 11, 5, 5, 8, 4, 4, 7, 7, 1, 1,
+ 1, 1, 1, 5, 5, 6, 6, 6, 6, 6,
+ 8, 8, 6, 6, 7, 9, 9, 8, 10, 6,
+ 6, 6, 6, 6, 6, 6, 8, 6, 8, 6,
+ 8, 7, 9, 6, 8, 7, 9, 8, 10, 8,
+ 10, 9, 11, 8, 10, 9, 11, 8, 8, 7,
+ 6, 6, 6, 6, 8, 8, 8, 8, 6, 9,
+ 1, 0, 2, 0, 8, 8, 8, 10, 9, 8,
+ 1, 0, 6, 6, 6, 6, 6, 6, 6, 9,
+ 9, 6, 6, 6, 8, 6, 8, 8, 8, 8,
+ 6, 8, 6, 8, 7, 9, 7, 9, 6, 7,
+ 1, 3, 3, 3, 1, 1, 1, 1, 1, 7,
+ 6, 6, 6, 6, 6, 6, 7, 7, 6, 9,
+ 9, 6, 6, 6, 6, 6, 6, 8, 8, 8,
+ 6, 7, 6, 6, 5, 1, 0, 3, 3, 5,
+ 6, 6, 6, 8, 5, 5, 6, 7, 7, 7,
+ 4, 4, 4, 6, 13, 1, 1, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
+ 1, 1, 1, 0, 3, 2, 0, 2, 2, 2,
+ 3, 3, 3, 3, 2, 3, 2, 5, 4, 3,
+ 3, 3, 3, 3, 1, 1, 0, 3, 2, 2,
+ 1, 2, 1, 3, 2, 1, 0, 2, 3, 0,
+ 9, 11, 12, 14, 3, 4, 4, 0, 2, 5,
+ 1, 0, 1, 2, 3, 3, 3, 1, 2, 1,
+ 1, 1, 1, 1, 1, 0, 5, 4, 6, 4,
+ 3, 5, 7, 9, 1, 3, 1, 5, 4, 4,
+ 6, 4, 6, 6, 5, 7, 9, 6, 1, 0,
+ 6, 11, 11, 11, 13, 9, 11, 1, 1, 10,
+ 4, 6, 2, 5, 2, 0, 6, 5, 3, 5,
+ 1, 3, 1, 1, 2, 1, 1, 1, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 3, 0,
+ 2, 1, 3, 1, 0, 2, 4, 3, 5, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 5, 4,
+ 3, 0, 1, 1, 1, 1, 4, 10, 13, 3,
+ 0, 7, 1, 3, 1, 4, 4, 7, 2, 1,
+ 1, 1, 3, 2, 8, 5, 0, 4, 3, 0,
+ 3, 0, 7, 2, 0, 5, 3, 0, 2, 2,
+ 2, 3, 1, 3, 1, 2, 1, 0, 1, 2,
+ 0, 8, 1, 3, 3, 5, 2, 1, 3, 7,
+ 1, 1, 0, 3, 2, 2, 2, 2, 0, 2,
+ 2, 1, 1, 3, 3, 1, 2, 4, 4, 2,
+ 3, 5, 5, 1, 1, 9, 9, 1, 2, 4,
+ 4, 4, 2, 2, 3, 1, 3, 9, 1, 2,
+ 0, 7, 7, 0, 10, 6, 0, 1, 0, 2,
+ 1, 0, 3, 3, 4, 4, 4, 4, 3, 2,
+ 1, 1, 0, 1, 1, 0, 1, 5, 1, 0,
+ 1, 0, 3, 1, 3, 4, 3, 2, 2, 1,
+ 1, 1, 0, 2, 4, 5, 6, 4, 5, 2,
+ 3, 1, 1, 1, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 4, 0, 1, 3, 1, 1, 1,
+ 1, 1, 2, 4, 4, 5, 2, 0, 1, 3,
+ 1, 0, 1, 2, 3, 2, 4, 2, 3, 2,
+ 0, 4, 5, 2, 0, 1, 3, 2, 3, 2,
+ 3, 2, 3, 2, 3, 1, 4, 3, 4, 5,
+ 4, 5, 4, 5, 2, 4, 1, 1, 0, 2,
+ 0, 1, 4, 5, 4, 0, 2, 2, 2, 1,
+ 1, 0, 5, 2, 1, 2, 2, 4, 1, 3,
+ 1, 2, 3, 6, 4, 0, 2, 6, 2, 1,
+ 3, 4, 0, 2, 0, 2, 0, 2, 4, 0,
+ 1, 0, 1, 3, 3, 7, 12, 1, 3, 2,
+ 3, 3, 1, 2, 2, 2, 2, 1, 1, 3,
+ 3, 2, 2, 3, 5, 6, 2, 3, 3, 4,
+ 0, 1, 1, 1, 1, 1, 2, 4, 1, 1,
+ 1, 1, 2, 3, 3, 0, 1, 1, 1, 1,
+ 1, 2, 2, 2, 2, 2, 1, 3, 0, 1,
+ 1, 1, 1, 5, 2, 1, 1, 1, 1, 4,
+ 1, 2, 2, 1, 3, 3, 2, 1, 0, 5,
+ 2, 5, 2, 1, 3, 3, 0, 1, 1, 1,
+ 1, 1, 1, 3, 3, 3, 3, 3, 3, 3,
+ 0, 1, 4, 1, 3, 3, 5, 2, 2, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 2, 3, 3, 2, 2, 3, 5, 4,
+ 6, 3, 5, 4, 6, 4, 6, 5, 7, 3,
+ 2, 4, 2, 3, 3, 4, 3, 4, 3, 4,
+ 5, 6, 6, 7, 6, 7, 3, 4, 4, 6,
+ 2, 3, 4, 3, 4, 4, 5, 1, 1, 3,
+ 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 2, 5, 6, 3, 4,
+ 1, 1, 2, 4, 1, 1, 1, 2, 2, 2,
+ 2, 1, 1, 4, 3, 5, 6, 8, 6, 6,
+ 4, 4, 1, 1, 1, 5, 1, 1, 4, 1,
+ 4, 1, 4, 1, 4, 1, 1, 1, 1, 1,
+ 1, 6, 4, 4, 6, 4, 4, 4, 4, 4,
+ 6, 5, 5, 5, 4, 6, 4, 4, 4, 4,
+ 5, 7, 7, 9, 5, 4, 6, 5, 7, 7,
+ 7, 2, 3, 3, 3, 4, 0, 4, 1, 3,
+ 3, 1, 1, 1, 2, 2, 0, 2, 3, 3,
+ 4, 2, 2, 5, 0, 5, 0, 2, 0, 1,
+ 3, 3, 2, 2, 0, 6, 1, 0, 3, 0,
+ 3, 3, 3, 0, 1, 4, 2, 2, 2, 2,
+ 2, 3, 2, 2, 3, 0, 4, 3, 5, 4,
+ 3, 5, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 4, 1, 4, 1, 4, 1, 2, 1, 2, 1,
+ 3, 1, 3, 1, 3, 3, 1, 0, 1, 3,
+ 3, 3, 2, 1, 3, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 7, 5,
+ 3, 5, 5, 3, 3, 5, 3, 2, 1, 1,
+ 3, 5, 1, 2, 4, 2, 0, 1, 0, 1,
+ 2, 2, 2, 3, 5, 1, 0, 1, 2, 0,
+ 2, 1, 0, 1, 0, 1, 3, 3, 2, 1,
+ 1, 1, 3, 1, 2, 1, 3, 1, 1, 1,
+ 1, 2, 1, 1, 1, 1, 1, 2, 6, 2,
+ 3, 5, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 1, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 2, 4, 3,
+ 2, 1, 1, 1, 1, 1, 0, 8, 0, 11,
+ 2, 5, 3, 2, 2, 3, 7, 1, 1, 1,
+ 0, 2, 2, 1, 0, 1, 3, 1, 2, 0,
+ 2, 0, 2, 0, 1, 3, 4, 3, 1, 1,
+ 1, 1, 2, 0, 2, 4, 0, 2, 2, 2,
+ 1, 1, 3, 7, 3, 1, 1, 1, 1, 2,
+ 0, 1, 3, 3, 3, 3, 0, 4, 5, 5,
+ 0, 1, 1, 1, 2, 2, 1, 2, 0, 7,
+ 0, 5, 0, 4, 2, 2, 0, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
+ 2, 1, 3, 2, 2, 3, 0, 5, 1, 0,
+ 5, 2, 2, 1, 1, 1, 2, 2, 3, 1,
+ 2, 2, 3, 3, 4, 2, 1, 2, 1, 1,
+ 2, 2, 3, 1, 1, 1, 1, 0, 1, 3,
+ 5, 0, 2, 0, 1, 2, 3, 2, 1, 1,
+ 1, 0, 1, 1, 1, 1, 1, 2, 2, 3,
+ 0, 1, 2, 1, 4, 3, 4, 3, 2, 1,
+ 3, 1, 1, 1, 1, 2, 2, 1, 2, 2,
+ 1, 1, 1, 4, 4, 4, 4, 4, 1, 0,
+ 3, 3, 4, 1, 3, 3, 4, 1, 3, 3,
+ 1, 1, 1, 6, 1, 3, 3, 6, 1, 3,
+ 3, 1, 1, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 4, 1, 1, 4, 4, 3, 0, 7,
+ 1, 0, 0, 7, 3, 4, 3, 1, 1, 1,
+ 2, 3, 5, 2, 2, 5, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 0, 1, 2, 1, 2,
+ 1, 1, 1, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 3, 1, 2,
+ 1, 3, 1, 3, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 3, 2, 3, 1,
+ 3, 3, 3, 3, 3, 3, 1, 1, 4, 0,
+ 2, 2, 1, 2, 1, 0, 1, 1, 1, 0,
+ 1
+};
+
+
+enum { YYENOMEM = -2 };
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+# ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+
+/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
+
+YY_ATTRIBUTE_UNUSED
+static int
+yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
+{
+ int res = 0;
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+ if (0 <= yylocp->first_line)
+ {
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
+ if (0 <= yylocp->first_column)
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
+ }
+ if (0 <= yylocp->last_line)
+ {
+ if (yylocp->first_line < yylocp->last_line)
+ {
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
+ if (0 <= end_col)
+ res += YYFPRINTF (yyo, ".%d", end_col);
+ }
+ else if (0 <= end_col && yylocp->first_column < end_col)
+ res += YYFPRINTF (yyo, "-%d", end_col);
+ }
+ return res;
+ }
+
+# define YY_LOCATION_PRINT(File, Loc) \
+ yy_location_print_ (File, &(Loc))
+
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+# endif /* !defined YY_LOCATION_PRINT */
+
+
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Kind, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ FILE *yyoutput = yyo;
+ YY_USE (yyoutput);
+ YY_USE (yylocationp);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yykind < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
+# endif
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+
+ YY_LOCATION_PRINT (yyo, *yylocationp);
+ YYFPRINTF (yyo, ": ");
+ yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
+ int yyrule)
+{
+ int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)],
+ &(yylsp[(yyi + 1) - (yynrhs)]));
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+{
+ YY_USE (yyvaluep);
+ YY_USE (yylocationp);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/* Lookahead token kind. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+ = { 1, 1, 1, 1 }
+# endif
+;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ yy_state_fast_t yystate = 0;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus = 0;
+
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
+
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
+
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
+
+ /* The location stack: array, bottom, top. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp = yyls;
+
+ int yyn;
+ /* The return value of yyparse. */
+ int yyresult;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ yylsp[0] = yylloc;
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ yy_state_t *yyss1 = yyss;
+ YYSTYPE *yyvs1 = yyvs;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
+ &yyls1, yysize * YYSIZEOF (*yylsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ yyls = yyls1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yy_state_t *yyss1 = yyss;
+ union yyalloc *yyptr =
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
+
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token\n"));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ yyerror_range[1] = yylloc;
+ goto yyerrlab1;
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+ *++yylsp = yylloc;
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ yyerror_range[1] = yyloc;
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3: /* toplevel_stmt: stmt */
+#line 1663 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36452 "preproc.c"
+ break;
+
+ case 4: /* toplevel_stmt: TransactionStmtLegacy */
+#line 1667 "preproc.y"
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", (yyvsp[0].str));
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 36462 "preproc.c"
+ break;
+
+ case 5: /* stmt: AlterEventTrigStmt */
+#line 1677 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36468 "preproc.c"
+ break;
+
+ case 6: /* stmt: AlterCollationStmt */
+#line 1679 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36474 "preproc.c"
+ break;
+
+ case 7: /* stmt: AlterDatabaseStmt */
+#line 1681 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36480 "preproc.c"
+ break;
+
+ case 8: /* stmt: AlterDatabaseSetStmt */
+#line 1683 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36486 "preproc.c"
+ break;
+
+ case 9: /* stmt: AlterDefaultPrivilegesStmt */
+#line 1685 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36492 "preproc.c"
+ break;
+
+ case 10: /* stmt: AlterDomainStmt */
+#line 1687 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36498 "preproc.c"
+ break;
+
+ case 11: /* stmt: AlterEnumStmt */
+#line 1689 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36504 "preproc.c"
+ break;
+
+ case 12: /* stmt: AlterExtensionStmt */
+#line 1691 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36510 "preproc.c"
+ break;
+
+ case 13: /* stmt: AlterExtensionContentsStmt */
+#line 1693 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36516 "preproc.c"
+ break;
+
+ case 14: /* stmt: AlterFdwStmt */
+#line 1695 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36522 "preproc.c"
+ break;
+
+ case 15: /* stmt: AlterForeignServerStmt */
+#line 1697 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36528 "preproc.c"
+ break;
+
+ case 16: /* stmt: AlterFunctionStmt */
+#line 1699 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36534 "preproc.c"
+ break;
+
+ case 17: /* stmt: AlterGroupStmt */
+#line 1701 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36540 "preproc.c"
+ break;
+
+ case 18: /* stmt: AlterObjectDependsStmt */
+#line 1703 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36546 "preproc.c"
+ break;
+
+ case 19: /* stmt: AlterObjectSchemaStmt */
+#line 1705 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36552 "preproc.c"
+ break;
+
+ case 20: /* stmt: AlterOwnerStmt */
+#line 1707 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36558 "preproc.c"
+ break;
+
+ case 21: /* stmt: AlterOperatorStmt */
+#line 1709 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36564 "preproc.c"
+ break;
+
+ case 22: /* stmt: AlterTypeStmt */
+#line 1711 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36570 "preproc.c"
+ break;
+
+ case 23: /* stmt: AlterPolicyStmt */
+#line 1713 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36576 "preproc.c"
+ break;
+
+ case 24: /* stmt: AlterSeqStmt */
+#line 1715 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36582 "preproc.c"
+ break;
+
+ case 25: /* stmt: AlterSystemStmt */
+#line 1717 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36588 "preproc.c"
+ break;
+
+ case 26: /* stmt: AlterTableStmt */
+#line 1719 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36594 "preproc.c"
+ break;
+
+ case 27: /* stmt: AlterTblSpcStmt */
+#line 1721 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36600 "preproc.c"
+ break;
+
+ case 28: /* stmt: AlterCompositeTypeStmt */
+#line 1723 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36606 "preproc.c"
+ break;
+
+ case 29: /* stmt: AlterPublicationStmt */
+#line 1725 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36612 "preproc.c"
+ break;
+
+ case 30: /* stmt: AlterRoleSetStmt */
+#line 1727 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36618 "preproc.c"
+ break;
+
+ case 31: /* stmt: AlterRoleStmt */
+#line 1729 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36624 "preproc.c"
+ break;
+
+ case 32: /* stmt: AlterSubscriptionStmt */
+#line 1731 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36630 "preproc.c"
+ break;
+
+ case 33: /* stmt: AlterStatsStmt */
+#line 1733 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36636 "preproc.c"
+ break;
+
+ case 34: /* stmt: AlterTSConfigurationStmt */
+#line 1735 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36642 "preproc.c"
+ break;
+
+ case 35: /* stmt: AlterTSDictionaryStmt */
+#line 1737 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36648 "preproc.c"
+ break;
+
+ case 36: /* stmt: AlterUserMappingStmt */
+#line 1739 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36654 "preproc.c"
+ break;
+
+ case 37: /* stmt: AnalyzeStmt */
+#line 1741 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36660 "preproc.c"
+ break;
+
+ case 38: /* stmt: CallStmt */
+#line 1743 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36666 "preproc.c"
+ break;
+
+ case 39: /* stmt: CheckPointStmt */
+#line 1745 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36672 "preproc.c"
+ break;
+
+ case 40: /* stmt: ClosePortalStmt */
+#line 1747 "preproc.y"
+ {
+ if (INFORMIX_MODE)
+ {
+ if (pg_strcasecmp((yyvsp[0].str)+strlen("close "), "database") == 0)
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CLOSE DATABASE statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");");
+ whenever_action(2);
+ free((yyvsp[0].str));
+ break;
+ }
+ }
+
+ output_statement((yyvsp[0].str), 0, ECPGst_normal);
+ }
+#line 36694 "preproc.c"
+ break;
+
+ case 41: /* stmt: ClusterStmt */
+#line 1765 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36700 "preproc.c"
+ break;
+
+ case 42: /* stmt: CommentStmt */
+#line 1767 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36706 "preproc.c"
+ break;
+
+ case 43: /* stmt: ConstraintsSetStmt */
+#line 1769 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36712 "preproc.c"
+ break;
+
+ case 44: /* stmt: CopyStmt */
+#line 1771 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36718 "preproc.c"
+ break;
+
+ case 45: /* stmt: CreateAmStmt */
+#line 1773 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36724 "preproc.c"
+ break;
+
+ case 46: /* stmt: CreateAsStmt */
+#line 1775 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36730 "preproc.c"
+ break;
+
+ case 47: /* stmt: CreateAssertionStmt */
+#line 1777 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36736 "preproc.c"
+ break;
+
+ case 48: /* stmt: CreateCastStmt */
+#line 1779 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36742 "preproc.c"
+ break;
+
+ case 49: /* stmt: CreateConversionStmt */
+#line 1781 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36748 "preproc.c"
+ break;
+
+ case 50: /* stmt: CreateDomainStmt */
+#line 1783 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36754 "preproc.c"
+ break;
+
+ case 51: /* stmt: CreateExtensionStmt */
+#line 1785 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36760 "preproc.c"
+ break;
+
+ case 52: /* stmt: CreateFdwStmt */
+#line 1787 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36766 "preproc.c"
+ break;
+
+ case 53: /* stmt: CreateForeignServerStmt */
+#line 1789 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36772 "preproc.c"
+ break;
+
+ case 54: /* stmt: CreateForeignTableStmt */
+#line 1791 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36778 "preproc.c"
+ break;
+
+ case 55: /* stmt: CreateFunctionStmt */
+#line 1793 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36784 "preproc.c"
+ break;
+
+ case 56: /* stmt: CreateGroupStmt */
+#line 1795 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36790 "preproc.c"
+ break;
+
+ case 57: /* stmt: CreateMatViewStmt */
+#line 1797 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36796 "preproc.c"
+ break;
+
+ case 58: /* stmt: CreateOpClassStmt */
+#line 1799 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36802 "preproc.c"
+ break;
+
+ case 59: /* stmt: CreateOpFamilyStmt */
+#line 1801 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36808 "preproc.c"
+ break;
+
+ case 60: /* stmt: CreatePublicationStmt */
+#line 1803 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36814 "preproc.c"
+ break;
+
+ case 61: /* stmt: AlterOpFamilyStmt */
+#line 1805 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36820 "preproc.c"
+ break;
+
+ case 62: /* stmt: CreatePolicyStmt */
+#line 1807 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36826 "preproc.c"
+ break;
+
+ case 63: /* stmt: CreatePLangStmt */
+#line 1809 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36832 "preproc.c"
+ break;
+
+ case 64: /* stmt: CreateSchemaStmt */
+#line 1811 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36838 "preproc.c"
+ break;
+
+ case 65: /* stmt: CreateSeqStmt */
+#line 1813 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36844 "preproc.c"
+ break;
+
+ case 66: /* stmt: CreateStmt */
+#line 1815 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36850 "preproc.c"
+ break;
+
+ case 67: /* stmt: CreateSubscriptionStmt */
+#line 1817 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36856 "preproc.c"
+ break;
+
+ case 68: /* stmt: CreateStatsStmt */
+#line 1819 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36862 "preproc.c"
+ break;
+
+ case 69: /* stmt: CreateTableSpaceStmt */
+#line 1821 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36868 "preproc.c"
+ break;
+
+ case 70: /* stmt: CreateTransformStmt */
+#line 1823 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36874 "preproc.c"
+ break;
+
+ case 71: /* stmt: CreateTrigStmt */
+#line 1825 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36880 "preproc.c"
+ break;
+
+ case 72: /* stmt: CreateEventTrigStmt */
+#line 1827 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36886 "preproc.c"
+ break;
+
+ case 73: /* stmt: CreateRoleStmt */
+#line 1829 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36892 "preproc.c"
+ break;
+
+ case 74: /* stmt: CreateUserStmt */
+#line 1831 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36898 "preproc.c"
+ break;
+
+ case 75: /* stmt: CreateUserMappingStmt */
+#line 1833 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36904 "preproc.c"
+ break;
+
+ case 76: /* stmt: CreatedbStmt */
+#line 1835 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36910 "preproc.c"
+ break;
+
+ case 77: /* stmt: DeallocateStmt */
+#line 1837 "preproc.y"
+ {
+ output_deallocate_prepare_statement((yyvsp[0].str));
+ }
+#line 36918 "preproc.c"
+ break;
+
+ case 78: /* stmt: DeclareCursorStmt */
+#line 1841 "preproc.y"
+ { output_simple_statement((yyvsp[0].str), (strncmp((yyvsp[0].str), "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0); }
+#line 36924 "preproc.c"
+ break;
+
+ case 79: /* stmt: DefineStmt */
+#line 1843 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36930 "preproc.c"
+ break;
+
+ case 80: /* stmt: DeleteStmt */
+#line 1845 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 36936 "preproc.c"
+ break;
+
+ case 81: /* stmt: DiscardStmt */
+#line 1847 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_normal); }
+#line 36942 "preproc.c"
+ break;
+
+ case 82: /* stmt: DoStmt */
+#line 1849 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36948 "preproc.c"
+ break;
+
+ case 83: /* stmt: DropCastStmt */
+#line 1851 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36954 "preproc.c"
+ break;
+
+ case 84: /* stmt: DropOpClassStmt */
+#line 1853 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36960 "preproc.c"
+ break;
+
+ case 85: /* stmt: DropOpFamilyStmt */
+#line 1855 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36966 "preproc.c"
+ break;
+
+ case 86: /* stmt: DropOwnedStmt */
+#line 1857 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36972 "preproc.c"
+ break;
+
+ case 87: /* stmt: DropStmt */
+#line 1859 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36978 "preproc.c"
+ break;
+
+ case 88: /* stmt: DropSubscriptionStmt */
+#line 1861 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36984 "preproc.c"
+ break;
+
+ case 89: /* stmt: DropTableSpaceStmt */
+#line 1863 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36990 "preproc.c"
+ break;
+
+ case 90: /* stmt: DropTransformStmt */
+#line 1865 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 36996 "preproc.c"
+ break;
+
+ case 91: /* stmt: DropRoleStmt */
+#line 1867 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37002 "preproc.c"
+ break;
+
+ case 92: /* stmt: DropUserMappingStmt */
+#line 1869 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37008 "preproc.c"
+ break;
+
+ case 93: /* stmt: DropdbStmt */
+#line 1871 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37014 "preproc.c"
+ break;
+
+ case 94: /* stmt: ExecuteStmt */
+#line 1873 "preproc.y"
+ {
+ check_declared_list((yyvsp[0].exec).name);
+ if ((yyvsp[0].exec).type == NULL || strlen((yyvsp[0].exec).type) == 0)
+ output_statement((yyvsp[0].exec).name, 1, ECPGst_execute);
+ else
+ {
+ if ((yyvsp[0].exec).name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable((yyvsp[0].exec).name), &no_indicator);
+ else
+ {
+ /* case of ecpg_ident or CSTRING */
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup((yyvsp[0].exec).name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(3, mm_strdup("execute"), mm_strdup("$0"), (yyvsp[0].exec).type), 0, ECPGst_exec_with_exprlist);
+ }
+ }
+#line 37042 "preproc.c"
+ break;
+
+ case 95: /* stmt: ExplainStmt */
+#line 1897 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37048 "preproc.c"
+ break;
+
+ case 96: /* stmt: FetchStmt */
+#line 1899 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_normal); }
+#line 37054 "preproc.c"
+ break;
+
+ case 97: /* stmt: GrantStmt */
+#line 1901 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37060 "preproc.c"
+ break;
+
+ case 98: /* stmt: GrantRoleStmt */
+#line 1903 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37066 "preproc.c"
+ break;
+
+ case 99: /* stmt: ImportForeignSchemaStmt */
+#line 1905 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37072 "preproc.c"
+ break;
+
+ case 100: /* stmt: IndexStmt */
+#line 1907 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37078 "preproc.c"
+ break;
+
+ case 101: /* stmt: InsertStmt */
+#line 1909 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 37084 "preproc.c"
+ break;
+
+ case 102: /* stmt: ListenStmt */
+#line 1911 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37090 "preproc.c"
+ break;
+
+ case 103: /* stmt: RefreshMatViewStmt */
+#line 1913 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37096 "preproc.c"
+ break;
+
+ case 104: /* stmt: LoadStmt */
+#line 1915 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37102 "preproc.c"
+ break;
+
+ case 105: /* stmt: LockStmt */
+#line 1917 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37108 "preproc.c"
+ break;
+
+ case 106: /* stmt: NotifyStmt */
+#line 1919 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37114 "preproc.c"
+ break;
+
+ case 107: /* stmt: PrepareStmt */
+#line 1921 "preproc.y"
+ {
+ check_declared_list((yyvsp[0].prep).name);
+ if ((yyvsp[0].prep).type == NULL)
+ output_prepare_statement((yyvsp[0].prep).name, (yyvsp[0].prep).stmt);
+ else if (strlen((yyvsp[0].prep).type) == 0)
+ {
+ char *stmt = cat_str(3, mm_strdup("\""), (yyvsp[0].prep).stmt, mm_strdup("\""));
+ output_prepare_statement((yyvsp[0].prep).name, stmt);
+ }
+ else
+ {
+ if ((yyvsp[0].prep).name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable((yyvsp[0].prep).name), &no_indicator);
+ else
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup((yyvsp[0].prep).name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(5, mm_strdup("prepare"), mm_strdup("$0"), (yyvsp[0].prep).type, mm_strdup("as"), (yyvsp[0].prep).stmt), 0, ECPGst_prepare);
+ }
+ }
+#line 37146 "preproc.c"
+ break;
+
+ case 108: /* stmt: ReassignOwnedStmt */
+#line 1949 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37152 "preproc.c"
+ break;
+
+ case 109: /* stmt: ReindexStmt */
+#line 1951 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37158 "preproc.c"
+ break;
+
+ case 110: /* stmt: RemoveAggrStmt */
+#line 1953 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37164 "preproc.c"
+ break;
+
+ case 111: /* stmt: RemoveFuncStmt */
+#line 1955 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37170 "preproc.c"
+ break;
+
+ case 112: /* stmt: RemoveOperStmt */
+#line 1957 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37176 "preproc.c"
+ break;
+
+ case 113: /* stmt: RenameStmt */
+#line 1959 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37182 "preproc.c"
+ break;
+
+ case 114: /* stmt: RevokeStmt */
+#line 1961 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37188 "preproc.c"
+ break;
+
+ case 115: /* stmt: RevokeRoleStmt */
+#line 1963 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37194 "preproc.c"
+ break;
+
+ case 116: /* stmt: RuleStmt */
+#line 1965 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37200 "preproc.c"
+ break;
+
+ case 117: /* stmt: SecLabelStmt */
+#line 1967 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37206 "preproc.c"
+ break;
+
+ case 118: /* stmt: SelectStmt */
+#line 1969 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 37212 "preproc.c"
+ break;
+
+ case 119: /* stmt: TransactionStmt */
+#line 1971 "preproc.y"
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", (yyvsp[0].str));
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37222 "preproc.c"
+ break;
+
+ case 120: /* stmt: TruncateStmt */
+#line 1977 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37228 "preproc.c"
+ break;
+
+ case 121: /* stmt: UnlistenStmt */
+#line 1979 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37234 "preproc.c"
+ break;
+
+ case 122: /* stmt: UpdateStmt */
+#line 1981 "preproc.y"
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 37240 "preproc.c"
+ break;
+
+ case 123: /* stmt: VacuumStmt */
+#line 1983 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37246 "preproc.c"
+ break;
+
+ case 124: /* stmt: VariableResetStmt */
+#line 1985 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37252 "preproc.c"
+ break;
+
+ case 125: /* stmt: VariableSetStmt */
+#line 1987 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37258 "preproc.c"
+ break;
+
+ case 126: /* stmt: VariableShowStmt */
+#line 1989 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37264 "preproc.c"
+ break;
+
+ case 127: /* stmt: ViewStmt */
+#line 1991 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 37270 "preproc.c"
+ break;
+
+ case 128: /* stmt: ECPGAllocateDescr */
+#line 1993 "preproc.y"
+ {
+ fprintf(base_yyout,"ECPGallocate_desc(__LINE__, %s);",(yyvsp[0].str));
+ whenever_action(0);
+ free((yyvsp[0].str));
+ }
+#line 37280 "preproc.c"
+ break;
+
+ case 129: /* stmt: ECPGConnect */
+#line 1999 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGconnect(__LINE__, %d, %s, %d); ", compat, (yyvsp[0].str), autocommit);
+ reset_variables();
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37294 "preproc.c"
+ break;
+
+ case 130: /* stmt: ECPGDeclareStmt */
+#line 2009 "preproc.y"
+ {
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 37302 "preproc.c"
+ break;
+
+ case 131: /* stmt: ECPGCursorStmt */
+#line 2013 "preproc.y"
+ {
+ output_simple_statement((yyvsp[0].str), (strncmp((yyvsp[0].str), "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0);
+ }
+#line 37310 "preproc.c"
+ break;
+
+ case 132: /* stmt: ECPGDeallocateDescr */
+#line 2017 "preproc.y"
+ {
+ fprintf(base_yyout,"ECPGdeallocate_desc(__LINE__, %s);",(yyvsp[0].str));
+ whenever_action(0);
+ free((yyvsp[0].str));
+ }
+#line 37320 "preproc.c"
+ break;
+
+ case 133: /* stmt: ECPGDeclare */
+#line 2023 "preproc.y"
+ {
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 37328 "preproc.c"
+ break;
+
+ case 134: /* stmt: ECPGDescribe */
+#line 2027 "preproc.y"
+ {
+ check_declared_list((yyvsp[0].describe).stmt_name);
+
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %d, %s, %s,", compat, (yyvsp[0].describe).input, connection ? connection : "NULL", (yyvsp[0].describe).stmt_name);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free((yyvsp[0].describe).stmt_name);
+ }
+#line 37344 "preproc.c"
+ break;
+
+ case 135: /* stmt: ECPGDisconnect */
+#line 2039 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in DISCONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, %s);",
+ (yyvsp[0].str) ? (yyvsp[0].str) : "\"CURRENT\"");
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37358 "preproc.c"
+ break;
+
+ case 136: /* stmt: ECPGExecuteImmediateStmt */
+#line 2048 "preproc.y"
+ { output_statement((yyvsp[0].str), 0, ECPGst_exec_immediate); }
+#line 37364 "preproc.c"
+ break;
+
+ case 137: /* stmt: ECPGFree */
+#line 2050 "preproc.y"
+ {
+ const char *con = connection ? connection : "NULL";
+
+ if (strcmp((yyvsp[0].str), "all") == 0)
+ fprintf(base_yyout, "{ ECPGdeallocate_all(__LINE__, %d, %s);", compat, con);
+ else if ((yyvsp[0].str)[0] == ':')
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, %s);", compat, con, (yyvsp[0].str)+1);
+ else
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, \"%s\");", compat, con, (yyvsp[0].str));
+
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37382 "preproc.c"
+ break;
+
+ case 138: /* stmt: ECPGGetDescriptor */
+#line 2064 "preproc.y"
+ {
+ lookup_descriptor((yyvsp[0].descriptor).name, connection);
+ output_get_descr((yyvsp[0].descriptor).name, (yyvsp[0].descriptor).str);
+ free((yyvsp[0].descriptor).name);
+ free((yyvsp[0].descriptor).str);
+ }
+#line 37393 "preproc.c"
+ break;
+
+ case 139: /* stmt: ECPGGetDescriptorHeader */
+#line 2071 "preproc.y"
+ {
+ lookup_descriptor((yyvsp[0].str), connection);
+ output_get_descr_header((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 37403 "preproc.c"
+ break;
+
+ case 140: /* stmt: ECPGOpen */
+#line 2077 "preproc.y"
+ {
+ struct cursor *ptr;
+
+ if ((ptr = add_additional_variables((yyvsp[0].str), true)) != NULL)
+ {
+ connection = ptr->connection ? mm_strdup(ptr->connection) : NULL;
+ output_statement(mm_strdup(ptr->command), 0, ECPGst_normal);
+ ptr->opened = true;
+ }
+ }
+#line 37418 "preproc.c"
+ break;
+
+ case 141: /* stmt: ECPGSetAutocommit */
+#line 2088 "preproc.y"
+ {
+ fprintf(base_yyout, "{ ECPGsetcommit(__LINE__, \"%s\", %s);", (yyvsp[0].str), connection ? connection : "NULL");
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37428 "preproc.c"
+ break;
+
+ case 142: /* stmt: ECPGSetConnection */
+#line 2094 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in SET CONNECTION statement");
+
+ fprintf(base_yyout, "{ ECPGsetconn(__LINE__, %s);", (yyvsp[0].str));
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 37441 "preproc.c"
+ break;
+
+ case 143: /* stmt: ECPGSetDescriptor */
+#line 2103 "preproc.y"
+ {
+ lookup_descriptor((yyvsp[0].descriptor).name, connection);
+ output_set_descr((yyvsp[0].descriptor).name, (yyvsp[0].descriptor).str);
+ free((yyvsp[0].descriptor).name);
+ free((yyvsp[0].descriptor).str);
+ }
+#line 37452 "preproc.c"
+ break;
+
+ case 144: /* stmt: ECPGSetDescriptorHeader */
+#line 2110 "preproc.y"
+ {
+ lookup_descriptor((yyvsp[0].str), connection);
+ output_set_descr_header((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 37462 "preproc.c"
+ break;
+
+ case 145: /* stmt: ECPGTypedef */
+#line 2116 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in TYPE statement");
+
+ fprintf(base_yyout, "%s", (yyvsp[0].str));
+ free((yyvsp[0].str));
+ output_line_number();
+ }
+#line 37475 "preproc.c"
+ break;
+
+ case 146: /* stmt: ECPGVar */
+#line 2125 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in VAR statement");
+
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 37486 "preproc.c"
+ break;
+
+ case 147: /* stmt: ECPGWhenever */
+#line 2132 "preproc.y"
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in WHENEVER statement");
+
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 37497 "preproc.c"
+ break;
+
+ case 148: /* stmt: %empty */
+#line 2139 "preproc.y"
+ { (yyval.str) = NULL; }
+#line 37503 "preproc.c"
+ break;
+
+ case 149: /* CallStmt: CALL func_application */
+#line 2145 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("call"),(yyvsp[0].str));
+}
+#line 37511 "preproc.c"
+ break;
+
+ case 150: /* CreateRoleStmt: CREATE ROLE RoleId opt_with OptRoleList */
+#line 2153 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37519 "preproc.c"
+ break;
+
+ case 151: /* opt_with: WITH */
+#line 2161 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 37527 "preproc.c"
+ break;
+
+ case 152: /* opt_with: WITH_LA */
+#line 2165 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 37535 "preproc.c"
+ break;
+
+ case 153: /* opt_with: %empty */
+#line 2169 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37542 "preproc.c"
+ break;
+
+ case 154: /* OptRoleList: OptRoleList CreateOptRoleElem */
+#line 2176 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37550 "preproc.c"
+ break;
+
+ case 155: /* OptRoleList: %empty */
+#line 2180 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37557 "preproc.c"
+ break;
+
+ case 156: /* AlterOptRoleList: AlterOptRoleList AlterOptRoleElem */
+#line 2187 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37565 "preproc.c"
+ break;
+
+ case 157: /* AlterOptRoleList: %empty */
+#line 2191 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37572 "preproc.c"
+ break;
+
+ case 158: /* AlterOptRoleElem: PASSWORD ecpg_sconst */
+#line 2198 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("password"),(yyvsp[0].str));
+}
+#line 37580 "preproc.c"
+ break;
+
+ case 159: /* AlterOptRoleElem: PASSWORD NULL_P */
+#line 2202 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("password null");
+}
+#line 37588 "preproc.c"
+ break;
+
+ case 160: /* AlterOptRoleElem: ENCRYPTED PASSWORD ecpg_sconst */
+#line 2206 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("encrypted password"),(yyvsp[0].str));
+}
+#line 37596 "preproc.c"
+ break;
+
+ case 161: /* AlterOptRoleElem: UNENCRYPTED PASSWORD ecpg_sconst */
+#line 2210 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("unencrypted password"),(yyvsp[0].str));
+}
+#line 37605 "preproc.c"
+ break;
+
+ case 162: /* AlterOptRoleElem: INHERIT */
+#line 2215 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inherit");
+}
+#line 37613 "preproc.c"
+ break;
+
+ case 163: /* AlterOptRoleElem: CONNECTION LIMIT SignedIconst */
+#line 2219 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("connection limit"),(yyvsp[0].str));
+}
+#line 37621 "preproc.c"
+ break;
+
+ case 164: /* AlterOptRoleElem: VALID UNTIL ecpg_sconst */
+#line 2223 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("valid until"),(yyvsp[0].str));
+}
+#line 37629 "preproc.c"
+ break;
+
+ case 165: /* AlterOptRoleElem: USER role_list */
+#line 2227 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("user"),(yyvsp[0].str));
+}
+#line 37637 "preproc.c"
+ break;
+
+ case 166: /* AlterOptRoleElem: ecpg_ident */
+#line 2231 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37645 "preproc.c"
+ break;
+
+ case 167: /* CreateOptRoleElem: AlterOptRoleElem */
+#line 2239 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37653 "preproc.c"
+ break;
+
+ case 168: /* CreateOptRoleElem: SYSID Iconst */
+#line 2243 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sysid"),(yyvsp[0].str));
+}
+#line 37661 "preproc.c"
+ break;
+
+ case 169: /* CreateOptRoleElem: ADMIN role_list */
+#line 2247 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("admin"),(yyvsp[0].str));
+}
+#line 37669 "preproc.c"
+ break;
+
+ case 170: /* CreateOptRoleElem: ROLE role_list */
+#line 2251 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("role"),(yyvsp[0].str));
+}
+#line 37677 "preproc.c"
+ break;
+
+ case 171: /* CreateOptRoleElem: IN_P ROLE role_list */
+#line 2255 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in role"),(yyvsp[0].str));
+}
+#line 37685 "preproc.c"
+ break;
+
+ case 172: /* CreateOptRoleElem: IN_P GROUP_P role_list */
+#line 2259 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in group"),(yyvsp[0].str));
+}
+#line 37693 "preproc.c"
+ break;
+
+ case 173: /* CreateUserStmt: CREATE USER RoleId opt_with OptRoleList */
+#line 2267 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37701 "preproc.c"
+ break;
+
+ case 174: /* AlterRoleStmt: ALTER ROLE RoleSpec opt_with AlterOptRoleList */
+#line 2275 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37709 "preproc.c"
+ break;
+
+ case 175: /* AlterRoleStmt: ALTER USER RoleSpec opt_with AlterOptRoleList */
+#line 2279 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37717 "preproc.c"
+ break;
+
+ case 176: /* opt_in_database: %empty */
+#line 2287 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37724 "preproc.c"
+ break;
+
+ case 177: /* opt_in_database: IN_P DATABASE name */
+#line 2290 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in database"),(yyvsp[0].str));
+}
+#line 37732 "preproc.c"
+ break;
+
+ case 178: /* AlterRoleSetStmt: ALTER ROLE RoleSpec opt_in_database SetResetClause */
+#line 2298 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37740 "preproc.c"
+ break;
+
+ case 179: /* AlterRoleSetStmt: ALTER ROLE ALL opt_in_database SetResetClause */
+#line 2302 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter role all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37748 "preproc.c"
+ break;
+
+ case 180: /* AlterRoleSetStmt: ALTER USER RoleSpec opt_in_database SetResetClause */
+#line 2306 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37756 "preproc.c"
+ break;
+
+ case 181: /* AlterRoleSetStmt: ALTER USER ALL opt_in_database SetResetClause */
+#line 2310 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter user all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37764 "preproc.c"
+ break;
+
+ case 182: /* DropRoleStmt: DROP ROLE role_list */
+#line 2318 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop role"),(yyvsp[0].str));
+}
+#line 37772 "preproc.c"
+ break;
+
+ case 183: /* DropRoleStmt: DROP ROLE IF_P EXISTS role_list */
+#line 2322 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop role if exists"),(yyvsp[0].str));
+}
+#line 37780 "preproc.c"
+ break;
+
+ case 184: /* DropRoleStmt: DROP USER role_list */
+#line 2326 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop user"),(yyvsp[0].str));
+}
+#line 37788 "preproc.c"
+ break;
+
+ case 185: /* DropRoleStmt: DROP USER IF_P EXISTS role_list */
+#line 2330 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop user if exists"),(yyvsp[0].str));
+}
+#line 37796 "preproc.c"
+ break;
+
+ case 186: /* DropRoleStmt: DROP GROUP_P role_list */
+#line 2334 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop group"),(yyvsp[0].str));
+}
+#line 37804 "preproc.c"
+ break;
+
+ case 187: /* DropRoleStmt: DROP GROUP_P IF_P EXISTS role_list */
+#line 2338 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop group if exists"),(yyvsp[0].str));
+}
+#line 37812 "preproc.c"
+ break;
+
+ case 188: /* CreateGroupStmt: CREATE GROUP_P RoleId opt_with OptRoleList */
+#line 2346 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create group"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37820 "preproc.c"
+ break;
+
+ case 189: /* AlterGroupStmt: ALTER GROUP_P RoleSpec add_drop USER role_list */
+#line 2354 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter group"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("user"),(yyvsp[0].str));
+}
+#line 37828 "preproc.c"
+ break;
+
+ case 190: /* add_drop: ADD_P */
+#line 2362 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("add");
+}
+#line 37836 "preproc.c"
+ break;
+
+ case 191: /* add_drop: DROP */
+#line 2366 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("drop");
+}
+#line 37844 "preproc.c"
+ break;
+
+ case 192: /* CreateSchemaStmt: CREATE SCHEMA OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList */
+#line 2374 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create schema"),(yyvsp[-3].str),mm_strdup("authorization"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37852 "preproc.c"
+ break;
+
+ case 193: /* CreateSchemaStmt: CREATE SCHEMA ColId OptSchemaEltList */
+#line 2378 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create schema"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37860 "preproc.c"
+ break;
+
+ case 194: /* CreateSchemaStmt: CREATE SCHEMA IF_P NOT EXISTS OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList */
+#line 2382 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(5,mm_strdup("create schema if not exists"),(yyvsp[-3].str),mm_strdup("authorization"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37869 "preproc.c"
+ break;
+
+ case 195: /* CreateSchemaStmt: CREATE SCHEMA IF_P NOT EXISTS ColId OptSchemaEltList */
+#line 2387 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(3,mm_strdup("create schema if not exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37878 "preproc.c"
+ break;
+
+ case 196: /* OptSchemaName: ColId */
+#line 2396 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37886 "preproc.c"
+ break;
+
+ case 197: /* OptSchemaName: %empty */
+#line 2400 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37893 "preproc.c"
+ break;
+
+ case 198: /* OptSchemaEltList: OptSchemaEltList schema_stmt */
+#line 2407 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37901 "preproc.c"
+ break;
+
+ case 199: /* OptSchemaEltList: %empty */
+#line 2411 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 37908 "preproc.c"
+ break;
+
+ case 200: /* schema_stmt: CreateStmt */
+#line 2418 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37916 "preproc.c"
+ break;
+
+ case 201: /* schema_stmt: IndexStmt */
+#line 2422 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37924 "preproc.c"
+ break;
+
+ case 202: /* schema_stmt: CreateSeqStmt */
+#line 2426 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37932 "preproc.c"
+ break;
+
+ case 203: /* schema_stmt: CreateTrigStmt */
+#line 2430 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37940 "preproc.c"
+ break;
+
+ case 204: /* schema_stmt: GrantStmt */
+#line 2434 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37948 "preproc.c"
+ break;
+
+ case 205: /* schema_stmt: ViewStmt */
+#line 2438 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37956 "preproc.c"
+ break;
+
+ case 206: /* VariableSetStmt: SET set_rest */
+#line 2446 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 37964 "preproc.c"
+ break;
+
+ case 207: /* VariableSetStmt: SET LOCAL set_rest */
+#line 2450 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set local"),(yyvsp[0].str));
+}
+#line 37972 "preproc.c"
+ break;
+
+ case 208: /* VariableSetStmt: SET SESSION set_rest */
+#line 2454 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set session"),(yyvsp[0].str));
+}
+#line 37980 "preproc.c"
+ break;
+
+ case 209: /* set_rest: TRANSACTION transaction_mode_list */
+#line 2462 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transaction"),(yyvsp[0].str));
+}
+#line 37988 "preproc.c"
+ break;
+
+ case 210: /* set_rest: SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list */
+#line 2466 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("session characteristics as transaction"),(yyvsp[0].str));
+}
+#line 37996 "preproc.c"
+ break;
+
+ case 211: /* set_rest: set_rest_more */
+#line 2470 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38004 "preproc.c"
+ break;
+
+ case 212: /* generic_set: var_name TO var_list */
+#line 2478 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 38012 "preproc.c"
+ break;
+
+ case 213: /* generic_set: var_name '=' var_list */
+#line 2482 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 38020 "preproc.c"
+ break;
+
+ case 214: /* generic_set: var_name TO DEFAULT */
+#line 2486 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("to default"));
+}
+#line 38028 "preproc.c"
+ break;
+
+ case 215: /* generic_set: var_name '=' DEFAULT */
+#line 2490 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("= default"));
+}
+#line 38036 "preproc.c"
+ break;
+
+ case 216: /* set_rest_more: generic_set */
+#line 2498 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38044 "preproc.c"
+ break;
+
+ case 217: /* set_rest_more: var_name FROM CURRENT_P */
+#line 2502 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("from current"));
+}
+#line 38052 "preproc.c"
+ break;
+
+ case 218: /* set_rest_more: TIME ZONE zone_value */
+#line 2506 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("time zone"),(yyvsp[0].str));
+}
+#line 38060 "preproc.c"
+ break;
+
+ case 219: /* set_rest_more: CATALOG_P ecpg_sconst */
+#line 2510 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("catalog"),(yyvsp[0].str));
+}
+#line 38069 "preproc.c"
+ break;
+
+ case 220: /* set_rest_more: SCHEMA ecpg_sconst */
+#line 2515 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 38077 "preproc.c"
+ break;
+
+ case 221: /* set_rest_more: NAMES opt_encoding */
+#line 2519 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("names"),(yyvsp[0].str));
+}
+#line 38085 "preproc.c"
+ break;
+
+ case 222: /* set_rest_more: ROLE NonReservedWord_or_Sconst */
+#line 2523 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("role"),(yyvsp[0].str));
+}
+#line 38093 "preproc.c"
+ break;
+
+ case 223: /* set_rest_more: SESSION AUTHORIZATION NonReservedWord_or_Sconst */
+#line 2527 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("session authorization"),(yyvsp[0].str));
+}
+#line 38101 "preproc.c"
+ break;
+
+ case 224: /* set_rest_more: SESSION AUTHORIZATION DEFAULT */
+#line 2531 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session authorization default");
+}
+#line 38109 "preproc.c"
+ break;
+
+ case 225: /* set_rest_more: XML_P OPTION document_or_content */
+#line 2535 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("xml option"),(yyvsp[0].str));
+}
+#line 38117 "preproc.c"
+ break;
+
+ case 226: /* set_rest_more: TRANSACTION SNAPSHOT ecpg_sconst */
+#line 2539 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transaction snapshot"),(yyvsp[0].str));
+}
+#line 38125 "preproc.c"
+ break;
+
+ case 227: /* var_name: ECPGColId */
+#line 2547 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38133 "preproc.c"
+ break;
+
+ case 228: /* var_name: var_name '.' ColId */
+#line 2551 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 38141 "preproc.c"
+ break;
+
+ case 229: /* var_list: var_value */
+#line 2559 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38149 "preproc.c"
+ break;
+
+ case 230: /* var_list: var_list ',' var_value */
+#line 2563 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38157 "preproc.c"
+ break;
+
+ case 231: /* var_value: opt_boolean_or_string */
+#line 2571 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38165 "preproc.c"
+ break;
+
+ case 232: /* var_value: NumericOnly */
+#line 2575 "preproc.y"
+ {
+ if ((yyvsp[0].str)[0] == '$')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38179 "preproc.c"
+ break;
+
+ case 233: /* iso_level: READ UNCOMMITTED */
+#line 2589 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read uncommitted");
+}
+#line 38187 "preproc.c"
+ break;
+
+ case 234: /* iso_level: READ COMMITTED */
+#line 2593 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read committed");
+}
+#line 38195 "preproc.c"
+ break;
+
+ case 235: /* iso_level: REPEATABLE READ */
+#line 2597 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("repeatable read");
+}
+#line 38203 "preproc.c"
+ break;
+
+ case 236: /* iso_level: SERIALIZABLE */
+#line 2601 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("serializable");
+}
+#line 38211 "preproc.c"
+ break;
+
+ case 237: /* opt_boolean_or_string: TRUE_P */
+#line 2609 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 38219 "preproc.c"
+ break;
+
+ case 238: /* opt_boolean_or_string: FALSE_P */
+#line 2613 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 38227 "preproc.c"
+ break;
+
+ case 239: /* opt_boolean_or_string: ON */
+#line 2617 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("on");
+}
+#line 38235 "preproc.c"
+ break;
+
+ case 240: /* opt_boolean_or_string: NonReservedWord_or_Sconst */
+#line 2621 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38243 "preproc.c"
+ break;
+
+ case 241: /* zone_value: ecpg_sconst */
+#line 2629 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38251 "preproc.c"
+ break;
+
+ case 242: /* zone_value: ecpg_ident */
+#line 2633 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38259 "preproc.c"
+ break;
+
+ case 243: /* zone_value: ConstInterval ecpg_sconst opt_interval */
+#line 2637 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38267 "preproc.c"
+ break;
+
+ case 244: /* zone_value: ConstInterval '(' Iconst ')' ecpg_sconst */
+#line 2641 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 38275 "preproc.c"
+ break;
+
+ case 245: /* zone_value: NumericOnly */
+#line 2645 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38283 "preproc.c"
+ break;
+
+ case 246: /* zone_value: DEFAULT */
+#line 2649 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 38291 "preproc.c"
+ break;
+
+ case 247: /* zone_value: LOCAL */
+#line 2653 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("local");
+}
+#line 38299 "preproc.c"
+ break;
+
+ case 248: /* opt_encoding: ecpg_sconst */
+#line 2661 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38307 "preproc.c"
+ break;
+
+ case 249: /* opt_encoding: DEFAULT */
+#line 2665 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 38315 "preproc.c"
+ break;
+
+ case 250: /* opt_encoding: %empty */
+#line 2669 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 38322 "preproc.c"
+ break;
+
+ case 251: /* NonReservedWord_or_Sconst: NonReservedWord */
+#line 2676 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38330 "preproc.c"
+ break;
+
+ case 252: /* NonReservedWord_or_Sconst: ecpg_sconst */
+#line 2680 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38338 "preproc.c"
+ break;
+
+ case 253: /* VariableResetStmt: RESET reset_rest */
+#line 2688 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 38346 "preproc.c"
+ break;
+
+ case 254: /* reset_rest: generic_reset */
+#line 2696 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38354 "preproc.c"
+ break;
+
+ case 255: /* reset_rest: TIME ZONE */
+#line 2700 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("time zone");
+}
+#line 38362 "preproc.c"
+ break;
+
+ case 256: /* reset_rest: TRANSACTION ISOLATION LEVEL */
+#line 2704 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transaction isolation level");
+}
+#line 38370 "preproc.c"
+ break;
+
+ case 257: /* reset_rest: SESSION AUTHORIZATION */
+#line 2708 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session authorization");
+}
+#line 38378 "preproc.c"
+ break;
+
+ case 258: /* generic_reset: var_name */
+#line 2716 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38386 "preproc.c"
+ break;
+
+ case 259: /* generic_reset: ALL */
+#line 2720 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 38394 "preproc.c"
+ break;
+
+ case 260: /* SetResetClause: SET set_rest */
+#line 2728 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 38402 "preproc.c"
+ break;
+
+ case 261: /* SetResetClause: VariableResetStmt */
+#line 2732 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38410 "preproc.c"
+ break;
+
+ case 262: /* FunctionSetResetClause: SET set_rest_more */
+#line 2740 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 38418 "preproc.c"
+ break;
+
+ case 263: /* FunctionSetResetClause: VariableResetStmt */
+#line 2744 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38426 "preproc.c"
+ break;
+
+ case 264: /* VariableShowStmt: SHOW var_name ecpg_into */
+#line 2752 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("show"),(yyvsp[-1].str));
+}
+#line 38434 "preproc.c"
+ break;
+
+ case 265: /* VariableShowStmt: SHOW TIME ZONE ecpg_into */
+#line 2756 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("show time zone");
+}
+#line 38442 "preproc.c"
+ break;
+
+ case 266: /* VariableShowStmt: SHOW TRANSACTION ISOLATION LEVEL ecpg_into */
+#line 2760 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("show transaction isolation level");
+}
+#line 38450 "preproc.c"
+ break;
+
+ case 267: /* VariableShowStmt: SHOW SESSION AUTHORIZATION ecpg_into */
+#line 2764 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("show session authorization");
+}
+#line 38458 "preproc.c"
+ break;
+
+ case 268: /* VariableShowStmt: SHOW ALL */
+#line 2768 "preproc.y"
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "SHOW ALL is not implemented");
+ (yyval.str) = EMPTY;
+ }
+#line 38467 "preproc.c"
+ break;
+
+ case 269: /* ConstraintsSetStmt: SET CONSTRAINTS constraints_set_list constraints_set_mode */
+#line 2777 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("set constraints"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38475 "preproc.c"
+ break;
+
+ case 270: /* constraints_set_list: ALL */
+#line 2785 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 38483 "preproc.c"
+ break;
+
+ case 271: /* constraints_set_list: qualified_name_list */
+#line 2789 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38491 "preproc.c"
+ break;
+
+ case 272: /* constraints_set_mode: DEFERRED */
+#line 2797 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferred");
+}
+#line 38499 "preproc.c"
+ break;
+
+ case 273: /* constraints_set_mode: IMMEDIATE */
+#line 2801 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immediate");
+}
+#line 38507 "preproc.c"
+ break;
+
+ case 274: /* CheckPointStmt: CHECKPOINT */
+#line 2809 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("checkpoint");
+}
+#line 38515 "preproc.c"
+ break;
+
+ case 275: /* DiscardStmt: DISCARD ALL */
+#line 2817 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard all");
+}
+#line 38523 "preproc.c"
+ break;
+
+ case 276: /* DiscardStmt: DISCARD TEMP */
+#line 2821 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard temp");
+}
+#line 38531 "preproc.c"
+ break;
+
+ case 277: /* DiscardStmt: DISCARD TEMPORARY */
+#line 2825 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard temporary");
+}
+#line 38539 "preproc.c"
+ break;
+
+ case 278: /* DiscardStmt: DISCARD PLANS */
+#line 2829 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard plans");
+}
+#line 38547 "preproc.c"
+ break;
+
+ case 279: /* DiscardStmt: DISCARD SEQUENCES */
+#line 2833 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard sequences");
+}
+#line 38555 "preproc.c"
+ break;
+
+ case 280: /* AlterTableStmt: ALTER TABLE relation_expr alter_table_cmds */
+#line 2841 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38563 "preproc.c"
+ break;
+
+ case 281: /* AlterTableStmt: ALTER TABLE IF_P EXISTS relation_expr alter_table_cmds */
+#line 2845 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38571 "preproc.c"
+ break;
+
+ case 282: /* AlterTableStmt: ALTER TABLE relation_expr partition_cmd */
+#line 2849 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38579 "preproc.c"
+ break;
+
+ case 283: /* AlterTableStmt: ALTER TABLE IF_P EXISTS relation_expr partition_cmd */
+#line 2853 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38587 "preproc.c"
+ break;
+
+ case 284: /* AlterTableStmt: ALTER TABLE ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */
+#line 2857 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter table all in tablespace"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38595 "preproc.c"
+ break;
+
+ case 285: /* AlterTableStmt: ALTER TABLE ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */
+#line 2861 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter table all in tablespace"),(yyvsp[-7].str),mm_strdup("owned by"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38603 "preproc.c"
+ break;
+
+ case 286: /* AlterTableStmt: ALTER INDEX qualified_name alter_table_cmds */
+#line 2865 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38611 "preproc.c"
+ break;
+
+ case 287: /* AlterTableStmt: ALTER INDEX IF_P EXISTS qualified_name alter_table_cmds */
+#line 2869 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38619 "preproc.c"
+ break;
+
+ case 288: /* AlterTableStmt: ALTER INDEX qualified_name index_partition_cmd */
+#line 2873 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38627 "preproc.c"
+ break;
+
+ case 289: /* AlterTableStmt: ALTER INDEX ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */
+#line 2877 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter index all in tablespace"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38635 "preproc.c"
+ break;
+
+ case 290: /* AlterTableStmt: ALTER INDEX ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */
+#line 2881 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter index all in tablespace"),(yyvsp[-7].str),mm_strdup("owned by"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38643 "preproc.c"
+ break;
+
+ case 291: /* AlterTableStmt: ALTER SEQUENCE qualified_name alter_table_cmds */
+#line 2885 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38651 "preproc.c"
+ break;
+
+ case 292: /* AlterTableStmt: ALTER SEQUENCE IF_P EXISTS qualified_name alter_table_cmds */
+#line 2889 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38659 "preproc.c"
+ break;
+
+ case 293: /* AlterTableStmt: ALTER VIEW qualified_name alter_table_cmds */
+#line 2893 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter view"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38667 "preproc.c"
+ break;
+
+ case 294: /* AlterTableStmt: ALTER VIEW IF_P EXISTS qualified_name alter_table_cmds */
+#line 2897 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter view if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38675 "preproc.c"
+ break;
+
+ case 295: /* AlterTableStmt: ALTER MATERIALIZED VIEW qualified_name alter_table_cmds */
+#line 2901 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter materialized view"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38683 "preproc.c"
+ break;
+
+ case 296: /* AlterTableStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name alter_table_cmds */
+#line 2905 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter materialized view if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38691 "preproc.c"
+ break;
+
+ case 297: /* AlterTableStmt: ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */
+#line 2909 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter materialized view all in tablespace"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38699 "preproc.c"
+ break;
+
+ case 298: /* AlterTableStmt: ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */
+#line 2913 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter materialized view all in tablespace"),(yyvsp[-7].str),mm_strdup("owned by"),(yyvsp[-4].str),mm_strdup("set tablespace"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38707 "preproc.c"
+ break;
+
+ case 299: /* AlterTableStmt: ALTER FOREIGN TABLE relation_expr alter_table_cmds */
+#line 2917 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38715 "preproc.c"
+ break;
+
+ case 300: /* AlterTableStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds */
+#line 2921 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38723 "preproc.c"
+ break;
+
+ case 301: /* alter_table_cmds: alter_table_cmd */
+#line 2929 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38731 "preproc.c"
+ break;
+
+ case 302: /* alter_table_cmds: alter_table_cmds ',' alter_table_cmd */
+#line 2933 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38739 "preproc.c"
+ break;
+
+ case 303: /* partition_cmd: ATTACH PARTITION qualified_name PartitionBoundSpec */
+#line 2941 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("attach partition"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38747 "preproc.c"
+ break;
+
+ case 304: /* partition_cmd: DETACH PARTITION qualified_name opt_concurrently */
+#line 2945 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("detach partition"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38755 "preproc.c"
+ break;
+
+ case 305: /* partition_cmd: DETACH PARTITION qualified_name FINALIZE */
+#line 2949 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("detach partition"),(yyvsp[-1].str),mm_strdup("finalize"));
+}
+#line 38763 "preproc.c"
+ break;
+
+ case 306: /* index_partition_cmd: ATTACH PARTITION qualified_name */
+#line 2957 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("attach partition"),(yyvsp[0].str));
+}
+#line 38771 "preproc.c"
+ break;
+
+ case 307: /* alter_table_cmd: ADD_P columnDef */
+#line 2965 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 38779 "preproc.c"
+ break;
+
+ case 308: /* alter_table_cmd: ADD_P IF_P NOT EXISTS columnDef */
+#line 2969 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add if not exists"),(yyvsp[0].str));
+}
+#line 38787 "preproc.c"
+ break;
+
+ case 309: /* alter_table_cmd: ADD_P COLUMN columnDef */
+#line 2973 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add column"),(yyvsp[0].str));
+}
+#line 38795 "preproc.c"
+ break;
+
+ case 310: /* alter_table_cmd: ADD_P COLUMN IF_P NOT EXISTS columnDef */
+#line 2977 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add column if not exists"),(yyvsp[0].str));
+}
+#line 38803 "preproc.c"
+ break;
+
+ case 311: /* alter_table_cmd: ALTER opt_column ColId alter_column_default */
+#line 2981 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38811 "preproc.c"
+ break;
+
+ case 312: /* alter_table_cmd: ALTER opt_column ColId DROP NOT NULL_P */
+#line 2985 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("drop not null"));
+}
+#line 38819 "preproc.c"
+ break;
+
+ case 313: /* alter_table_cmd: ALTER opt_column ColId SET NOT NULL_P */
+#line 2989 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set not null"));
+}
+#line 38827 "preproc.c"
+ break;
+
+ case 314: /* alter_table_cmd: ALTER opt_column ColId DROP EXPRESSION */
+#line 2993 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("drop expression"));
+}
+#line 38835 "preproc.c"
+ break;
+
+ case 315: /* alter_table_cmd: ALTER opt_column ColId DROP EXPRESSION IF_P EXISTS */
+#line 2997 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("drop expression if exists"));
+}
+#line 38843 "preproc.c"
+ break;
+
+ case 316: /* alter_table_cmd: ALTER opt_column ColId SET STATISTICS SignedIconst */
+#line 3001 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 38851 "preproc.c"
+ break;
+
+ case 317: /* alter_table_cmd: ALTER opt_column Iconst SET STATISTICS SignedIconst */
+#line 3005 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 38859 "preproc.c"
+ break;
+
+ case 318: /* alter_table_cmd: ALTER opt_column ColId SET reloptions */
+#line 3009 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 38867 "preproc.c"
+ break;
+
+ case 319: /* alter_table_cmd: ALTER opt_column ColId RESET reloptions */
+#line 3013 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 38875 "preproc.c"
+ break;
+
+ case 320: /* alter_table_cmd: ALTER opt_column ColId SET STORAGE ColId */
+#line 3017 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set storage"),(yyvsp[0].str));
+}
+#line 38883 "preproc.c"
+ break;
+
+ case 321: /* alter_table_cmd: ALTER opt_column ColId SET column_compression */
+#line 3021 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 38891 "preproc.c"
+ break;
+
+ case 322: /* alter_table_cmd: ALTER opt_column ColId ADD_P GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList */
+#line 3025 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter"),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("add generated"),(yyvsp[-3].str),mm_strdup("as identity"),(yyvsp[0].str));
+}
+#line 38899 "preproc.c"
+ break;
+
+ case 323: /* alter_table_cmd: ALTER opt_column ColId alter_identity_column_option_list */
+#line 3029 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38907 "preproc.c"
+ break;
+
+ case 324: /* alter_table_cmd: ALTER opt_column ColId DROP IDENTITY_P */
+#line 3033 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("drop identity"));
+}
+#line 38915 "preproc.c"
+ break;
+
+ case 325: /* alter_table_cmd: ALTER opt_column ColId DROP IDENTITY_P IF_P EXISTS */
+#line 3037 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("drop identity if exists"));
+}
+#line 38923 "preproc.c"
+ break;
+
+ case 326: /* alter_table_cmd: DROP opt_column IF_P EXISTS ColId opt_drop_behavior */
+#line 3041 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38931 "preproc.c"
+ break;
+
+ case 327: /* alter_table_cmd: DROP opt_column ColId opt_drop_behavior */
+#line 3045 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38939 "preproc.c"
+ break;
+
+ case 328: /* alter_table_cmd: ALTER opt_column ColId opt_set_data TYPE_P Typename opt_collate_clause alter_using */
+#line 3049 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("alter"),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("type"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38947 "preproc.c"
+ break;
+
+ case 329: /* alter_table_cmd: ALTER opt_column ColId alter_generic_options */
+#line 3053 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38955 "preproc.c"
+ break;
+
+ case 330: /* alter_table_cmd: ADD_P TableConstraint */
+#line 3057 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 38963 "preproc.c"
+ break;
+
+ case 331: /* alter_table_cmd: ALTER CONSTRAINT name ConstraintAttributeSpec */
+#line 3061 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38971 "preproc.c"
+ break;
+
+ case 332: /* alter_table_cmd: VALIDATE CONSTRAINT name */
+#line 3065 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validate constraint"),(yyvsp[0].str));
+}
+#line 38979 "preproc.c"
+ break;
+
+ case 333: /* alter_table_cmd: DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior */
+#line 3069 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop constraint if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38987 "preproc.c"
+ break;
+
+ case 334: /* alter_table_cmd: DROP CONSTRAINT name opt_drop_behavior */
+#line 3073 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38995 "preproc.c"
+ break;
+
+ case 335: /* alter_table_cmd: SET WITHOUT OIDS */
+#line 3077 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set without oids");
+}
+#line 39003 "preproc.c"
+ break;
+
+ case 336: /* alter_table_cmd: CLUSTER ON name */
+#line 3081 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cluster on"),(yyvsp[0].str));
+}
+#line 39011 "preproc.c"
+ break;
+
+ case 337: /* alter_table_cmd: SET WITHOUT CLUSTER */
+#line 3085 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set without cluster");
+}
+#line 39019 "preproc.c"
+ break;
+
+ case 338: /* alter_table_cmd: SET LOGGED */
+#line 3089 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set logged");
+}
+#line 39027 "preproc.c"
+ break;
+
+ case 339: /* alter_table_cmd: SET UNLOGGED */
+#line 3093 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set unlogged");
+}
+#line 39035 "preproc.c"
+ break;
+
+ case 340: /* alter_table_cmd: ENABLE_P TRIGGER name */
+#line 3097 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable trigger"),(yyvsp[0].str));
+}
+#line 39043 "preproc.c"
+ break;
+
+ case 341: /* alter_table_cmd: ENABLE_P ALWAYS TRIGGER name */
+#line 3101 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable always trigger"),(yyvsp[0].str));
+}
+#line 39051 "preproc.c"
+ break;
+
+ case 342: /* alter_table_cmd: ENABLE_P REPLICA TRIGGER name */
+#line 3105 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable replica trigger"),(yyvsp[0].str));
+}
+#line 39059 "preproc.c"
+ break;
+
+ case 343: /* alter_table_cmd: ENABLE_P TRIGGER ALL */
+#line 3109 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable trigger all");
+}
+#line 39067 "preproc.c"
+ break;
+
+ case 344: /* alter_table_cmd: ENABLE_P TRIGGER USER */
+#line 3113 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable trigger user");
+}
+#line 39075 "preproc.c"
+ break;
+
+ case 345: /* alter_table_cmd: DISABLE_P TRIGGER name */
+#line 3117 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("disable trigger"),(yyvsp[0].str));
+}
+#line 39083 "preproc.c"
+ break;
+
+ case 346: /* alter_table_cmd: DISABLE_P TRIGGER ALL */
+#line 3121 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable trigger all");
+}
+#line 39091 "preproc.c"
+ break;
+
+ case 347: /* alter_table_cmd: DISABLE_P TRIGGER USER */
+#line 3125 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable trigger user");
+}
+#line 39099 "preproc.c"
+ break;
+
+ case 348: /* alter_table_cmd: ENABLE_P RULE name */
+#line 3129 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable rule"),(yyvsp[0].str));
+}
+#line 39107 "preproc.c"
+ break;
+
+ case 349: /* alter_table_cmd: ENABLE_P ALWAYS RULE name */
+#line 3133 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable always rule"),(yyvsp[0].str));
+}
+#line 39115 "preproc.c"
+ break;
+
+ case 350: /* alter_table_cmd: ENABLE_P REPLICA RULE name */
+#line 3137 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable replica rule"),(yyvsp[0].str));
+}
+#line 39123 "preproc.c"
+ break;
+
+ case 351: /* alter_table_cmd: DISABLE_P RULE name */
+#line 3141 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("disable rule"),(yyvsp[0].str));
+}
+#line 39131 "preproc.c"
+ break;
+
+ case 352: /* alter_table_cmd: INHERIT qualified_name */
+#line 3145 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("inherit"),(yyvsp[0].str));
+}
+#line 39139 "preproc.c"
+ break;
+
+ case 353: /* alter_table_cmd: NO INHERIT qualified_name */
+#line 3149 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("no inherit"),(yyvsp[0].str));
+}
+#line 39147 "preproc.c"
+ break;
+
+ case 354: /* alter_table_cmd: OF any_name */
+#line 3153 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("of"),(yyvsp[0].str));
+}
+#line 39155 "preproc.c"
+ break;
+
+ case 355: /* alter_table_cmd: NOT OF */
+#line 3157 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not of");
+}
+#line 39163 "preproc.c"
+ break;
+
+ case 356: /* alter_table_cmd: OWNER TO RoleSpec */
+#line 3161 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 39171 "preproc.c"
+ break;
+
+ case 357: /* alter_table_cmd: SET TABLESPACE name */
+#line 3165 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set tablespace"),(yyvsp[0].str));
+}
+#line 39179 "preproc.c"
+ break;
+
+ case 358: /* alter_table_cmd: SET reloptions */
+#line 3169 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 39187 "preproc.c"
+ break;
+
+ case 359: /* alter_table_cmd: RESET reloptions */
+#line 3173 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 39195 "preproc.c"
+ break;
+
+ case 360: /* alter_table_cmd: REPLICA IDENTITY_P replica_identity */
+#line 3177 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("replica identity"),(yyvsp[0].str));
+}
+#line 39203 "preproc.c"
+ break;
+
+ case 361: /* alter_table_cmd: ENABLE_P ROW LEVEL SECURITY */
+#line 3181 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable row level security");
+}
+#line 39211 "preproc.c"
+ break;
+
+ case 362: /* alter_table_cmd: DISABLE_P ROW LEVEL SECURITY */
+#line 3185 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable row level security");
+}
+#line 39219 "preproc.c"
+ break;
+
+ case 363: /* alter_table_cmd: FORCE ROW LEVEL SECURITY */
+#line 3189 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("force row level security");
+}
+#line 39227 "preproc.c"
+ break;
+
+ case 364: /* alter_table_cmd: NO FORCE ROW LEVEL SECURITY */
+#line 3193 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no force row level security");
+}
+#line 39235 "preproc.c"
+ break;
+
+ case 365: /* alter_table_cmd: alter_generic_options */
+#line 3197 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39243 "preproc.c"
+ break;
+
+ case 366: /* alter_column_default: SET DEFAULT a_expr */
+#line 3205 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set default"),(yyvsp[0].str));
+}
+#line 39251 "preproc.c"
+ break;
+
+ case 367: /* alter_column_default: DROP DEFAULT */
+#line 3209 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("drop default");
+}
+#line 39259 "preproc.c"
+ break;
+
+ case 368: /* opt_drop_behavior: CASCADE */
+#line 3217 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 39267 "preproc.c"
+ break;
+
+ case 369: /* opt_drop_behavior: RESTRICT */
+#line 3221 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 39275 "preproc.c"
+ break;
+
+ case 370: /* opt_drop_behavior: %empty */
+#line 3225 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39282 "preproc.c"
+ break;
+
+ case 371: /* opt_collate_clause: COLLATE any_name */
+#line 3232 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 39290 "preproc.c"
+ break;
+
+ case 372: /* opt_collate_clause: %empty */
+#line 3236 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39297 "preproc.c"
+ break;
+
+ case 373: /* alter_using: USING a_expr */
+#line 3243 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 39305 "preproc.c"
+ break;
+
+ case 374: /* alter_using: %empty */
+#line 3247 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39312 "preproc.c"
+ break;
+
+ case 375: /* replica_identity: NOTHING */
+#line 3254 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 39320 "preproc.c"
+ break;
+
+ case 376: /* replica_identity: FULL */
+#line 3258 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 39328 "preproc.c"
+ break;
+
+ case 377: /* replica_identity: DEFAULT */
+#line 3262 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 39336 "preproc.c"
+ break;
+
+ case 378: /* replica_identity: USING INDEX name */
+#line 3266 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index"),(yyvsp[0].str));
+}
+#line 39344 "preproc.c"
+ break;
+
+ case 379: /* reloptions: '(' reloption_list ')' */
+#line 3274 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39352 "preproc.c"
+ break;
+
+ case 380: /* opt_reloptions: WITH reloptions */
+#line 3282 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 39360 "preproc.c"
+ break;
+
+ case 381: /* opt_reloptions: %empty */
+#line 3286 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39367 "preproc.c"
+ break;
+
+ case 382: /* reloption_list: reloption_elem */
+#line 3293 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39375 "preproc.c"
+ break;
+
+ case 383: /* reloption_list: reloption_list ',' reloption_elem */
+#line 3297 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39383 "preproc.c"
+ break;
+
+ case 384: /* reloption_elem: ColLabel '=' def_arg */
+#line 3305 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 39391 "preproc.c"
+ break;
+
+ case 385: /* reloption_elem: ColLabel */
+#line 3309 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39399 "preproc.c"
+ break;
+
+ case 386: /* reloption_elem: ColLabel '.' ColLabel '=' def_arg */
+#line 3313 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("."),(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 39407 "preproc.c"
+ break;
+
+ case 387: /* reloption_elem: ColLabel '.' ColLabel */
+#line 3317 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 39415 "preproc.c"
+ break;
+
+ case 388: /* alter_identity_column_option_list: alter_identity_column_option */
+#line 3325 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39423 "preproc.c"
+ break;
+
+ case 389: /* alter_identity_column_option_list: alter_identity_column_option_list alter_identity_column_option */
+#line 3329 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39431 "preproc.c"
+ break;
+
+ case 390: /* alter_identity_column_option: RESTART */
+#line 3337 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 39439 "preproc.c"
+ break;
+
+ case 391: /* alter_identity_column_option: RESTART opt_with NumericOnly */
+#line 3341 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("restart"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39447 "preproc.c"
+ break;
+
+ case 392: /* alter_identity_column_option: SET SeqOptElem */
+#line 3345 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 39455 "preproc.c"
+ break;
+
+ case 393: /* alter_identity_column_option: SET GENERATED generated_when */
+#line 3349 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set generated"),(yyvsp[0].str));
+}
+#line 39463 "preproc.c"
+ break;
+
+ case 394: /* PartitionBoundSpec: FOR VALUES WITH '(' hash_partbound ')' */
+#line 3357 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for values with ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39471 "preproc.c"
+ break;
+
+ case 395: /* PartitionBoundSpec: FOR VALUES IN_P '(' expr_list ')' */
+#line 3361 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for values in ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39479 "preproc.c"
+ break;
+
+ case 396: /* PartitionBoundSpec: FOR VALUES FROM '(' expr_list ')' TO '(' expr_list ')' */
+#line 3365 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("for values from ("),(yyvsp[-5].str),mm_strdup(") to ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39487 "preproc.c"
+ break;
+
+ case 397: /* PartitionBoundSpec: DEFAULT */
+#line 3369 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 39495 "preproc.c"
+ break;
+
+ case 398: /* hash_partbound_elem: NonReservedWord Iconst */
+#line 3377 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39503 "preproc.c"
+ break;
+
+ case 399: /* hash_partbound: hash_partbound_elem */
+#line 3385 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39511 "preproc.c"
+ break;
+
+ case 400: /* hash_partbound: hash_partbound ',' hash_partbound_elem */
+#line 3389 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39519 "preproc.c"
+ break;
+
+ case 401: /* AlterCompositeTypeStmt: ALTER TYPE_P any_name alter_type_cmds */
+#line 3397 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39527 "preproc.c"
+ break;
+
+ case 402: /* alter_type_cmds: alter_type_cmd */
+#line 3405 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39535 "preproc.c"
+ break;
+
+ case 403: /* alter_type_cmds: alter_type_cmds ',' alter_type_cmd */
+#line 3409 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39543 "preproc.c"
+ break;
+
+ case 404: /* alter_type_cmd: ADD_P ATTRIBUTE TableFuncElement opt_drop_behavior */
+#line 3417 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("add attribute"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39551 "preproc.c"
+ break;
+
+ case 405: /* alter_type_cmd: DROP ATTRIBUTE IF_P EXISTS ColId opt_drop_behavior */
+#line 3421 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop attribute if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39559 "preproc.c"
+ break;
+
+ case 406: /* alter_type_cmd: DROP ATTRIBUTE ColId opt_drop_behavior */
+#line 3425 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop attribute"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39567 "preproc.c"
+ break;
+
+ case 407: /* alter_type_cmd: ALTER ATTRIBUTE ColId opt_set_data TYPE_P Typename opt_collate_clause opt_drop_behavior */
+#line 3429 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter attribute"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("type"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39575 "preproc.c"
+ break;
+
+ case 408: /* ClosePortalStmt: CLOSE cursor_name */
+#line 3437 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ struct cursor *ptr = NULL;
+ for (ptr = cur; ptr != NULL; ptr = ptr -> next)
+ {
+ if (strcmp((yyvsp[0].str), ptr -> name) == 0)
+ {
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ break;
+ }
+ }
+ (yyval.str) = cat2_str(mm_strdup("close"), cursor_marker);
+ }
+#line 39595 "preproc.c"
+ break;
+
+ case 409: /* ClosePortalStmt: CLOSE ALL */
+#line 3453 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("close all");
+}
+#line 39603 "preproc.c"
+ break;
+
+ case 410: /* CopyStmt: COPY opt_binary qualified_name opt_column_list copy_from opt_program copy_file_name copy_delimiter opt_with copy_options where_clause */
+#line 3461 "preproc.y"
+ {
+ if (strcmp((yyvsp[-5].str), "from") == 0 &&
+ (strcmp((yyvsp[-4].str), "stdin") == 0 || strcmp((yyvsp[-4].str), "stdout") == 0))
+ mmerror(PARSE_ERROR, ET_WARNING, "COPY FROM STDIN is not implemented");
+
+ (yyval.str) = cat_str(11,mm_strdup("copy"),(yyvsp[-9].str),(yyvsp[-8].str),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39615 "preproc.c"
+ break;
+
+ case 411: /* CopyStmt: COPY '(' PreparableStmt ')' TO opt_program copy_file_name opt_with copy_options */
+#line 3469 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("copy ("),(yyvsp[-6].str),mm_strdup(") to"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39623 "preproc.c"
+ break;
+
+ case 412: /* copy_from: FROM */
+#line 3477 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 39631 "preproc.c"
+ break;
+
+ case 413: /* copy_from: TO */
+#line 3481 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("to");
+}
+#line 39639 "preproc.c"
+ break;
+
+ case 414: /* opt_program: PROGRAM */
+#line 3489 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("program");
+}
+#line 39647 "preproc.c"
+ break;
+
+ case 415: /* opt_program: %empty */
+#line 3493 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39654 "preproc.c"
+ break;
+
+ case 416: /* copy_file_name: ecpg_sconst */
+#line 3500 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39662 "preproc.c"
+ break;
+
+ case 417: /* copy_file_name: STDIN */
+#line 3504 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdin");
+}
+#line 39670 "preproc.c"
+ break;
+
+ case 418: /* copy_file_name: STDOUT */
+#line 3508 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdout");
+}
+#line 39678 "preproc.c"
+ break;
+
+ case 419: /* copy_options: copy_opt_list */
+#line 3516 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39686 "preproc.c"
+ break;
+
+ case 420: /* copy_options: '(' copy_generic_opt_list ')' */
+#line 3520 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39694 "preproc.c"
+ break;
+
+ case 421: /* copy_opt_list: copy_opt_list copy_opt_item */
+#line 3528 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39702 "preproc.c"
+ break;
+
+ case 422: /* copy_opt_list: %empty */
+#line 3532 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39709 "preproc.c"
+ break;
+
+ case 423: /* copy_opt_item: BINARY */
+#line 3539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 39717 "preproc.c"
+ break;
+
+ case 424: /* copy_opt_item: FREEZE */
+#line 3543 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 39725 "preproc.c"
+ break;
+
+ case 425: /* copy_opt_item: DELIMITER opt_as ecpg_sconst */
+#line 3547 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("delimiter"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39733 "preproc.c"
+ break;
+
+ case 426: /* copy_opt_item: NULL_P opt_as ecpg_sconst */
+#line 3551 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("null"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39741 "preproc.c"
+ break;
+
+ case 427: /* copy_opt_item: CSV */
+#line 3555 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("csv");
+}
+#line 39749 "preproc.c"
+ break;
+
+ case 428: /* copy_opt_item: HEADER_P */
+#line 3559 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("header");
+}
+#line 39757 "preproc.c"
+ break;
+
+ case 429: /* copy_opt_item: QUOTE opt_as ecpg_sconst */
+#line 3563 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("quote"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39765 "preproc.c"
+ break;
+
+ case 430: /* copy_opt_item: ESCAPE opt_as ecpg_sconst */
+#line 3567 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("escape"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39773 "preproc.c"
+ break;
+
+ case 431: /* copy_opt_item: FORCE QUOTE columnList */
+#line 3571 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force quote"),(yyvsp[0].str));
+}
+#line 39781 "preproc.c"
+ break;
+
+ case 432: /* copy_opt_item: FORCE QUOTE '*' */
+#line 3575 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("force quote *");
+}
+#line 39789 "preproc.c"
+ break;
+
+ case 433: /* copy_opt_item: FORCE NOT NULL_P columnList */
+#line 3579 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force not null"),(yyvsp[0].str));
+}
+#line 39797 "preproc.c"
+ break;
+
+ case 434: /* copy_opt_item: FORCE NULL_P columnList */
+#line 3583 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force null"),(yyvsp[0].str));
+}
+#line 39805 "preproc.c"
+ break;
+
+ case 435: /* copy_opt_item: ENCODING ecpg_sconst */
+#line 3587 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("encoding"),(yyvsp[0].str));
+}
+#line 39813 "preproc.c"
+ break;
+
+ case 436: /* opt_binary: BINARY */
+#line 3595 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 39821 "preproc.c"
+ break;
+
+ case 437: /* opt_binary: %empty */
+#line 3599 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39828 "preproc.c"
+ break;
+
+ case 438: /* copy_delimiter: opt_using DELIMITERS ecpg_sconst */
+#line 3606 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("delimiters"),(yyvsp[0].str));
+}
+#line 39836 "preproc.c"
+ break;
+
+ case 439: /* copy_delimiter: %empty */
+#line 3610 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39843 "preproc.c"
+ break;
+
+ case 440: /* opt_using: USING */
+#line 3617 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("using");
+}
+#line 39851 "preproc.c"
+ break;
+
+ case 441: /* opt_using: %empty */
+#line 3621 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39858 "preproc.c"
+ break;
+
+ case 442: /* copy_generic_opt_list: copy_generic_opt_elem */
+#line 3628 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39866 "preproc.c"
+ break;
+
+ case 443: /* copy_generic_opt_list: copy_generic_opt_list ',' copy_generic_opt_elem */
+#line 3632 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39874 "preproc.c"
+ break;
+
+ case 444: /* copy_generic_opt_elem: ColLabel copy_generic_opt_arg */
+#line 3640 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39882 "preproc.c"
+ break;
+
+ case 445: /* copy_generic_opt_arg: opt_boolean_or_string */
+#line 3648 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39890 "preproc.c"
+ break;
+
+ case 446: /* copy_generic_opt_arg: NumericOnly */
+#line 3652 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39898 "preproc.c"
+ break;
+
+ case 447: /* copy_generic_opt_arg: '*' */
+#line 3656 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 39906 "preproc.c"
+ break;
+
+ case 448: /* copy_generic_opt_arg: '(' copy_generic_opt_arg_list ')' */
+#line 3660 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39914 "preproc.c"
+ break;
+
+ case 449: /* copy_generic_opt_arg: %empty */
+#line 3664 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 39921 "preproc.c"
+ break;
+
+ case 450: /* copy_generic_opt_arg_list: copy_generic_opt_arg_list_item */
+#line 3671 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39929 "preproc.c"
+ break;
+
+ case 451: /* copy_generic_opt_arg_list: copy_generic_opt_arg_list ',' copy_generic_opt_arg_list_item */
+#line 3675 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39937 "preproc.c"
+ break;
+
+ case 452: /* copy_generic_opt_arg_list_item: opt_boolean_or_string */
+#line 3683 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39945 "preproc.c"
+ break;
+
+ case 453: /* CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3691 "preproc.y"
+ {
+ (yyval.str) = cat_str(13,mm_strdup("create"),(yyvsp[-11].str),mm_strdup("table"),(yyvsp[-9].str),mm_strdup("("),(yyvsp[-7].str),mm_strdup(")"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39953 "preproc.c"
+ break;
+
+ case 454: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3695 "preproc.y"
+ {
+ (yyval.str) = cat_str(13,mm_strdup("create"),(yyvsp[-14].str),mm_strdup("table if not exists"),(yyvsp[-9].str),mm_strdup("("),(yyvsp[-7].str),mm_strdup(")"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39961 "preproc.c"
+ break;
+
+ case 455: /* CreateStmt: CREATE OptTemp TABLE qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3699 "preproc.y"
+ {
+ (yyval.str) = cat_str(12,mm_strdup("create"),(yyvsp[-10].str),mm_strdup("table"),(yyvsp[-8].str),mm_strdup("of"),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39969 "preproc.c"
+ break;
+
+ case 456: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3703 "preproc.y"
+ {
+ (yyval.str) = cat_str(12,mm_strdup("create"),(yyvsp[-13].str),mm_strdup("table if not exists"),(yyvsp[-8].str),mm_strdup("of"),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39977 "preproc.c"
+ break;
+
+ case 457: /* CreateStmt: CREATE OptTemp TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3707 "preproc.y"
+ {
+ (yyval.str) = cat_str(13,mm_strdup("create"),(yyvsp[-12].str),mm_strdup("table"),(yyvsp[-10].str),mm_strdup("partition of"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39985 "preproc.c"
+ break;
+
+ case 458: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 3711 "preproc.y"
+ {
+ (yyval.str) = cat_str(13,mm_strdup("create"),(yyvsp[-15].str),mm_strdup("table if not exists"),(yyvsp[-10].str),mm_strdup("partition of"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39993 "preproc.c"
+ break;
+
+ case 459: /* OptTemp: TEMPORARY */
+#line 3719 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temporary");
+}
+#line 40001 "preproc.c"
+ break;
+
+ case 460: /* OptTemp: TEMP */
+#line 3723 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temp");
+}
+#line 40009 "preproc.c"
+ break;
+
+ case 461: /* OptTemp: LOCAL TEMPORARY */
+#line 3727 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("local temporary");
+}
+#line 40017 "preproc.c"
+ break;
+
+ case 462: /* OptTemp: LOCAL TEMP */
+#line 3731 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("local temp");
+}
+#line 40025 "preproc.c"
+ break;
+
+ case 463: /* OptTemp: GLOBAL TEMPORARY */
+#line 3735 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("global temporary");
+}
+#line 40033 "preproc.c"
+ break;
+
+ case 464: /* OptTemp: GLOBAL TEMP */
+#line 3739 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("global temp");
+}
+#line 40041 "preproc.c"
+ break;
+
+ case 465: /* OptTemp: UNLOGGED */
+#line 3743 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 40049 "preproc.c"
+ break;
+
+ case 466: /* OptTemp: %empty */
+#line 3747 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40056 "preproc.c"
+ break;
+
+ case 467: /* OptTableElementList: TableElementList */
+#line 3754 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40064 "preproc.c"
+ break;
+
+ case 468: /* OptTableElementList: %empty */
+#line 3758 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40071 "preproc.c"
+ break;
+
+ case 469: /* OptTypedTableElementList: '(' TypedTableElementList ')' */
+#line 3765 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40079 "preproc.c"
+ break;
+
+ case 470: /* OptTypedTableElementList: %empty */
+#line 3769 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40086 "preproc.c"
+ break;
+
+ case 471: /* TableElementList: TableElement */
+#line 3776 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40094 "preproc.c"
+ break;
+
+ case 472: /* TableElementList: TableElementList ',' TableElement */
+#line 3780 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40102 "preproc.c"
+ break;
+
+ case 473: /* TypedTableElementList: TypedTableElement */
+#line 3788 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40110 "preproc.c"
+ break;
+
+ case 474: /* TypedTableElementList: TypedTableElementList ',' TypedTableElement */
+#line 3792 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40118 "preproc.c"
+ break;
+
+ case 475: /* TableElement: columnDef */
+#line 3800 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40126 "preproc.c"
+ break;
+
+ case 476: /* TableElement: TableLikeClause */
+#line 3804 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40134 "preproc.c"
+ break;
+
+ case 477: /* TableElement: TableConstraint */
+#line 3808 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40142 "preproc.c"
+ break;
+
+ case 478: /* TypedTableElement: columnOptions */
+#line 3816 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40150 "preproc.c"
+ break;
+
+ case 479: /* TypedTableElement: TableConstraint */
+#line 3820 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40158 "preproc.c"
+ break;
+
+ case 480: /* columnDef: ColId Typename opt_column_compression create_generic_options ColQualList */
+#line 3828 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40166 "preproc.c"
+ break;
+
+ case 481: /* columnOptions: ColId ColQualList */
+#line 3836 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40174 "preproc.c"
+ break;
+
+ case 482: /* columnOptions: ColId WITH OPTIONS ColQualList */
+#line 3840 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("with options"),(yyvsp[0].str));
+}
+#line 40182 "preproc.c"
+ break;
+
+ case 483: /* column_compression: COMPRESSION ColId */
+#line 3848 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("compression"),(yyvsp[0].str));
+}
+#line 40190 "preproc.c"
+ break;
+
+ case 484: /* column_compression: COMPRESSION DEFAULT */
+#line 3852 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("compression default");
+}
+#line 40198 "preproc.c"
+ break;
+
+ case 485: /* opt_column_compression: column_compression */
+#line 3860 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40206 "preproc.c"
+ break;
+
+ case 486: /* opt_column_compression: %empty */
+#line 3864 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40213 "preproc.c"
+ break;
+
+ case 487: /* ColQualList: ColQualList ColConstraint */
+#line 3871 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40221 "preproc.c"
+ break;
+
+ case 488: /* ColQualList: %empty */
+#line 3875 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40228 "preproc.c"
+ break;
+
+ case 489: /* ColConstraint: CONSTRAINT name ColConstraintElem */
+#line 3882 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40236 "preproc.c"
+ break;
+
+ case 490: /* ColConstraint: ColConstraintElem */
+#line 3886 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40244 "preproc.c"
+ break;
+
+ case 491: /* ColConstraint: ConstraintAttr */
+#line 3890 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40252 "preproc.c"
+ break;
+
+ case 492: /* ColConstraint: COLLATE any_name */
+#line 3894 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 40260 "preproc.c"
+ break;
+
+ case 493: /* ColConstraintElem: NOT NULL_P */
+#line 3902 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not null");
+}
+#line 40268 "preproc.c"
+ break;
+
+ case 494: /* ColConstraintElem: NULL_P */
+#line 3906 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 40276 "preproc.c"
+ break;
+
+ case 495: /* ColConstraintElem: UNIQUE opt_definition OptConsTableSpace */
+#line 3910 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unique"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40284 "preproc.c"
+ break;
+
+ case 496: /* ColConstraintElem: PRIMARY KEY opt_definition OptConsTableSpace */
+#line 3914 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("primary key"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40292 "preproc.c"
+ break;
+
+ case 497: /* ColConstraintElem: CHECK '(' a_expr ')' opt_no_inherit */
+#line 3918 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("check ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 40300 "preproc.c"
+ break;
+
+ case 498: /* ColConstraintElem: DEFAULT b_expr */
+#line 3922 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 40308 "preproc.c"
+ break;
+
+ case 499: /* ColConstraintElem: GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList */
+#line 3926 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("generated"),(yyvsp[-3].str),mm_strdup("as identity"),(yyvsp[0].str));
+}
+#line 40316 "preproc.c"
+ break;
+
+ case 500: /* ColConstraintElem: GENERATED generated_when AS '(' a_expr ')' STORED */
+#line 3930 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("generated"),(yyvsp[-5].str),mm_strdup("as ("),(yyvsp[-2].str),mm_strdup(") stored"));
+}
+#line 40324 "preproc.c"
+ break;
+
+ case 501: /* ColConstraintElem: REFERENCES qualified_name opt_column_list key_match key_actions */
+#line 3934 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("references"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40332 "preproc.c"
+ break;
+
+ case 502: /* generated_when: ALWAYS */
+#line 3942 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("always");
+}
+#line 40340 "preproc.c"
+ break;
+
+ case 503: /* generated_when: BY DEFAULT */
+#line 3946 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by default");
+}
+#line 40348 "preproc.c"
+ break;
+
+ case 504: /* ConstraintAttr: DEFERRABLE */
+#line 3954 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 40356 "preproc.c"
+ break;
+
+ case 505: /* ConstraintAttr: NOT DEFERRABLE */
+#line 3958 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 40364 "preproc.c"
+ break;
+
+ case 506: /* ConstraintAttr: INITIALLY DEFERRED */
+#line 3962 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially deferred");
+}
+#line 40372 "preproc.c"
+ break;
+
+ case 507: /* ConstraintAttr: INITIALLY IMMEDIATE */
+#line 3966 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially immediate");
+}
+#line 40380 "preproc.c"
+ break;
+
+ case 508: /* TableLikeClause: LIKE qualified_name TableLikeOptionList */
+#line 3974 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("like"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40388 "preproc.c"
+ break;
+
+ case 509: /* TableLikeOptionList: TableLikeOptionList INCLUDING TableLikeOption */
+#line 3982 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("including"),(yyvsp[0].str));
+}
+#line 40396 "preproc.c"
+ break;
+
+ case 510: /* TableLikeOptionList: TableLikeOptionList EXCLUDING TableLikeOption */
+#line 3986 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("excluding"),(yyvsp[0].str));
+}
+#line 40404 "preproc.c"
+ break;
+
+ case 511: /* TableLikeOptionList: %empty */
+#line 3990 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40411 "preproc.c"
+ break;
+
+ case 512: /* TableLikeOption: COMMENTS */
+#line 3997 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("comments");
+}
+#line 40419 "preproc.c"
+ break;
+
+ case 513: /* TableLikeOption: COMPRESSION */
+#line 4001 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("compression");
+}
+#line 40427 "preproc.c"
+ break;
+
+ case 514: /* TableLikeOption: CONSTRAINTS */
+#line 4005 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("constraints");
+}
+#line 40435 "preproc.c"
+ break;
+
+ case 515: /* TableLikeOption: DEFAULTS */
+#line 4009 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("defaults");
+}
+#line 40443 "preproc.c"
+ break;
+
+ case 516: /* TableLikeOption: IDENTITY_P */
+#line 4013 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("identity");
+}
+#line 40451 "preproc.c"
+ break;
+
+ case 517: /* TableLikeOption: GENERATED */
+#line 4017 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("generated");
+}
+#line 40459 "preproc.c"
+ break;
+
+ case 518: /* TableLikeOption: INDEXES */
+#line 4021 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("indexes");
+}
+#line 40467 "preproc.c"
+ break;
+
+ case 519: /* TableLikeOption: STATISTICS */
+#line 4025 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 40475 "preproc.c"
+ break;
+
+ case 520: /* TableLikeOption: STORAGE */
+#line 4029 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("storage");
+}
+#line 40483 "preproc.c"
+ break;
+
+ case 521: /* TableLikeOption: ALL */
+#line 4033 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 40491 "preproc.c"
+ break;
+
+ case 522: /* TableConstraint: CONSTRAINT name ConstraintElem */
+#line 4041 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40499 "preproc.c"
+ break;
+
+ case 523: /* TableConstraint: ConstraintElem */
+#line 4045 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40507 "preproc.c"
+ break;
+
+ case 524: /* ConstraintElem: CHECK '(' a_expr ')' ConstraintAttributeSpec */
+#line 4053 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("check ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 40515 "preproc.c"
+ break;
+
+ case 525: /* ConstraintElem: UNIQUE '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec */
+#line 4057 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("unique ("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40523 "preproc.c"
+ break;
+
+ case 526: /* ConstraintElem: UNIQUE ExistingIndex ConstraintAttributeSpec */
+#line 4061 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unique"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40531 "preproc.c"
+ break;
+
+ case 527: /* ConstraintElem: PRIMARY KEY '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec */
+#line 4065 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("primary key ("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40539 "preproc.c"
+ break;
+
+ case 528: /* ConstraintElem: PRIMARY KEY ExistingIndex ConstraintAttributeSpec */
+#line 4069 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("primary key"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40547 "preproc.c"
+ break;
+
+ case 529: /* ConstraintElem: EXCLUDE access_method_clause '(' ExclusionConstraintList ')' opt_c_include opt_definition OptConsTableSpace OptWhereClause ConstraintAttributeSpec */
+#line 4073 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("exclude"),(yyvsp[-8].str),mm_strdup("("),(yyvsp[-6].str),mm_strdup(")"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40555 "preproc.c"
+ break;
+
+ case 530: /* ConstraintElem: FOREIGN KEY '(' columnList ')' REFERENCES qualified_name opt_column_list key_match key_actions ConstraintAttributeSpec */
+#line 4077 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("foreign key ("),(yyvsp[-7].str),mm_strdup(") references"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40563 "preproc.c"
+ break;
+
+ case 531: /* opt_no_inherit: NO INHERIT */
+#line 4085 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no inherit");
+}
+#line 40571 "preproc.c"
+ break;
+
+ case 532: /* opt_no_inherit: %empty */
+#line 4089 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40578 "preproc.c"
+ break;
+
+ case 533: /* opt_column_list: '(' columnList ')' */
+#line 4096 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40586 "preproc.c"
+ break;
+
+ case 534: /* opt_column_list: %empty */
+#line 4100 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40593 "preproc.c"
+ break;
+
+ case 535: /* columnList: columnElem */
+#line 4107 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40601 "preproc.c"
+ break;
+
+ case 536: /* columnList: columnList ',' columnElem */
+#line 4111 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40609 "preproc.c"
+ break;
+
+ case 537: /* columnElem: ColId */
+#line 4119 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40617 "preproc.c"
+ break;
+
+ case 538: /* opt_c_include: INCLUDE '(' columnList ')' */
+#line 4127 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("include ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40625 "preproc.c"
+ break;
+
+ case 539: /* opt_c_include: %empty */
+#line 4131 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40632 "preproc.c"
+ break;
+
+ case 540: /* key_match: MATCH FULL */
+#line 4138 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("match full");
+}
+#line 40640 "preproc.c"
+ break;
+
+ case 541: /* key_match: MATCH PARTIAL */
+#line 4142 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = mm_strdup("match partial");
+}
+#line 40649 "preproc.c"
+ break;
+
+ case 542: /* key_match: MATCH SIMPLE */
+#line 4147 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("match simple");
+}
+#line 40657 "preproc.c"
+ break;
+
+ case 543: /* key_match: %empty */
+#line 4151 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40664 "preproc.c"
+ break;
+
+ case 544: /* ExclusionConstraintList: ExclusionConstraintElem */
+#line 4158 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40672 "preproc.c"
+ break;
+
+ case 545: /* ExclusionConstraintList: ExclusionConstraintList ',' ExclusionConstraintElem */
+#line 4162 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40680 "preproc.c"
+ break;
+
+ case 546: /* ExclusionConstraintElem: index_elem WITH any_operator */
+#line 4170 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("with"),(yyvsp[0].str));
+}
+#line 40688 "preproc.c"
+ break;
+
+ case 547: /* ExclusionConstraintElem: index_elem WITH OPERATOR '(' any_operator ')' */
+#line 4174 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-5].str),mm_strdup("with operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40696 "preproc.c"
+ break;
+
+ case 548: /* OptWhereClause: WHERE '(' a_expr ')' */
+#line 4182 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("where ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40704 "preproc.c"
+ break;
+
+ case 549: /* OptWhereClause: %empty */
+#line 4186 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40711 "preproc.c"
+ break;
+
+ case 550: /* key_actions: key_update */
+#line 4193 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40719 "preproc.c"
+ break;
+
+ case 551: /* key_actions: key_delete */
+#line 4197 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40727 "preproc.c"
+ break;
+
+ case 552: /* key_actions: key_update key_delete */
+#line 4201 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40735 "preproc.c"
+ break;
+
+ case 553: /* key_actions: key_delete key_update */
+#line 4205 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40743 "preproc.c"
+ break;
+
+ case 554: /* key_actions: %empty */
+#line 4209 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40750 "preproc.c"
+ break;
+
+ case 555: /* key_update: ON UPDATE key_action */
+#line 4216 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on update"),(yyvsp[0].str));
+}
+#line 40758 "preproc.c"
+ break;
+
+ case 556: /* key_delete: ON DELETE_P key_action */
+#line 4224 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on delete"),(yyvsp[0].str));
+}
+#line 40766 "preproc.c"
+ break;
+
+ case 557: /* key_action: NO ACTION */
+#line 4232 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no action");
+}
+#line 40774 "preproc.c"
+ break;
+
+ case 558: /* key_action: RESTRICT */
+#line 4236 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 40782 "preproc.c"
+ break;
+
+ case 559: /* key_action: CASCADE */
+#line 4240 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 40790 "preproc.c"
+ break;
+
+ case 560: /* key_action: SET NULL_P */
+#line 4244 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set null");
+}
+#line 40798 "preproc.c"
+ break;
+
+ case 561: /* key_action: SET DEFAULT */
+#line 4248 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set default");
+}
+#line 40806 "preproc.c"
+ break;
+
+ case 562: /* OptInherit: INHERITS '(' qualified_name_list ')' */
+#line 4256 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("inherits ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40814 "preproc.c"
+ break;
+
+ case 563: /* OptInherit: %empty */
+#line 4260 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40821 "preproc.c"
+ break;
+
+ case 564: /* OptPartitionSpec: PartitionSpec */
+#line 4267 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40829 "preproc.c"
+ break;
+
+ case 565: /* OptPartitionSpec: %empty */
+#line 4271 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40836 "preproc.c"
+ break;
+
+ case 566: /* PartitionSpec: PARTITION BY ColId '(' part_params ')' */
+#line 4278 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("partition by"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40844 "preproc.c"
+ break;
+
+ case 567: /* part_params: part_elem */
+#line 4286 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40852 "preproc.c"
+ break;
+
+ case 568: /* part_params: part_params ',' part_elem */
+#line 4290 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40860 "preproc.c"
+ break;
+
+ case 569: /* part_elem: ColId opt_collate opt_class */
+#line 4298 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40868 "preproc.c"
+ break;
+
+ case 570: /* part_elem: func_expr_windowless opt_collate opt_class */
+#line 4302 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40876 "preproc.c"
+ break;
+
+ case 571: /* part_elem: '(' a_expr ')' opt_collate opt_class */
+#line 4306 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(")"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40884 "preproc.c"
+ break;
+
+ case 572: /* table_access_method_clause: USING name */
+#line 4314 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 40892 "preproc.c"
+ break;
+
+ case 573: /* table_access_method_clause: %empty */
+#line 4318 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40899 "preproc.c"
+ break;
+
+ case 574: /* OptWith: WITH reloptions */
+#line 4325 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 40907 "preproc.c"
+ break;
+
+ case 575: /* OptWith: WITHOUT OIDS */
+#line 4329 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("without oids");
+}
+#line 40915 "preproc.c"
+ break;
+
+ case 576: /* OptWith: %empty */
+#line 4333 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40922 "preproc.c"
+ break;
+
+ case 577: /* OnCommitOption: ON COMMIT DROP */
+#line 4340 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("on commit drop");
+}
+#line 40930 "preproc.c"
+ break;
+
+ case 578: /* OnCommitOption: ON COMMIT DELETE_P ROWS */
+#line 4344 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("on commit delete rows");
+}
+#line 40938 "preproc.c"
+ break;
+
+ case 579: /* OnCommitOption: ON COMMIT PRESERVE ROWS */
+#line 4348 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("on commit preserve rows");
+}
+#line 40946 "preproc.c"
+ break;
+
+ case 580: /* OnCommitOption: %empty */
+#line 4352 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40953 "preproc.c"
+ break;
+
+ case 581: /* OptTableSpace: TABLESPACE name */
+#line 4359 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("tablespace"),(yyvsp[0].str));
+}
+#line 40961 "preproc.c"
+ break;
+
+ case 582: /* OptTableSpace: %empty */
+#line 4363 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40968 "preproc.c"
+ break;
+
+ case 583: /* OptConsTableSpace: USING INDEX TABLESPACE name */
+#line 4370 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index tablespace"),(yyvsp[0].str));
+}
+#line 40976 "preproc.c"
+ break;
+
+ case 584: /* OptConsTableSpace: %empty */
+#line 4374 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 40983 "preproc.c"
+ break;
+
+ case 585: /* ExistingIndex: USING INDEX name */
+#line 4381 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index"),(yyvsp[0].str));
+}
+#line 40991 "preproc.c"
+ break;
+
+ case 586: /* CreateStatsStmt: CREATE STATISTICS any_name opt_name_list ON stats_params FROM from_list */
+#line 4389 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create statistics"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 40999 "preproc.c"
+ break;
+
+ case 587: /* CreateStatsStmt: CREATE STATISTICS IF_P NOT EXISTS any_name opt_name_list ON stats_params FROM from_list */
+#line 4393 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create statistics if not exists"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 41007 "preproc.c"
+ break;
+
+ case 588: /* stats_params: stats_param */
+#line 4401 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41015 "preproc.c"
+ break;
+
+ case 589: /* stats_params: stats_params ',' stats_param */
+#line 4405 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41023 "preproc.c"
+ break;
+
+ case 590: /* stats_param: ColId */
+#line 4413 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41031 "preproc.c"
+ break;
+
+ case 591: /* stats_param: func_expr_windowless */
+#line 4417 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41039 "preproc.c"
+ break;
+
+ case 592: /* stats_param: '(' a_expr ')' */
+#line 4421 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41047 "preproc.c"
+ break;
+
+ case 593: /* AlterStatsStmt: ALTER STATISTICS any_name SET STATISTICS SignedIconst */
+#line 4429 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 41055 "preproc.c"
+ break;
+
+ case 594: /* AlterStatsStmt: ALTER STATISTICS IF_P EXISTS any_name SET STATISTICS SignedIconst */
+#line 4433 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics if exists"),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 41063 "preproc.c"
+ break;
+
+ case 595: /* create_as_target: qualified_name opt_column_list table_access_method_clause OptWith OnCommitOption OptTableSpace */
+#line 4441 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41071 "preproc.c"
+ break;
+
+ case 596: /* opt_with_data: WITH DATA_P */
+#line 4449 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with data");
+}
+#line 41079 "preproc.c"
+ break;
+
+ case 597: /* opt_with_data: WITH NO DATA_P */
+#line 4453 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with no data");
+}
+#line 41087 "preproc.c"
+ break;
+
+ case 598: /* opt_with_data: %empty */
+#line 4457 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41094 "preproc.c"
+ break;
+
+ case 599: /* CreateMatViewStmt: CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data */
+#line 4464 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create"),(yyvsp[-6].str),mm_strdup("materialized view"),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41102 "preproc.c"
+ break;
+
+ case 600: /* CreateMatViewStmt: CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data */
+#line 4468 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create"),(yyvsp[-9].str),mm_strdup("materialized view if not exists"),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41110 "preproc.c"
+ break;
+
+ case 601: /* create_mv_target: qualified_name opt_column_list table_access_method_clause opt_reloptions OptTableSpace */
+#line 4476 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41118 "preproc.c"
+ break;
+
+ case 602: /* OptNoLog: UNLOGGED */
+#line 4484 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 41126 "preproc.c"
+ break;
+
+ case 603: /* OptNoLog: %empty */
+#line 4488 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41133 "preproc.c"
+ break;
+
+ case 604: /* RefreshMatViewStmt: REFRESH MATERIALIZED VIEW opt_concurrently qualified_name opt_with_data */
+#line 4495 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("refresh materialized view"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41141 "preproc.c"
+ break;
+
+ case 605: /* CreateSeqStmt: CREATE OptTemp SEQUENCE qualified_name OptSeqOptList */
+#line 4503 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-3].str),mm_strdup("sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41149 "preproc.c"
+ break;
+
+ case 606: /* CreateSeqStmt: CREATE OptTemp SEQUENCE IF_P NOT EXISTS qualified_name OptSeqOptList */
+#line 4507 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-6].str),mm_strdup("sequence if not exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41157 "preproc.c"
+ break;
+
+ case 607: /* AlterSeqStmt: ALTER SEQUENCE qualified_name SeqOptList */
+#line 4515 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41165 "preproc.c"
+ break;
+
+ case 608: /* AlterSeqStmt: ALTER SEQUENCE IF_P EXISTS qualified_name SeqOptList */
+#line 4519 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41173 "preproc.c"
+ break;
+
+ case 609: /* OptSeqOptList: SeqOptList */
+#line 4527 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41181 "preproc.c"
+ break;
+
+ case 610: /* OptSeqOptList: %empty */
+#line 4531 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41188 "preproc.c"
+ break;
+
+ case 611: /* OptParenthesizedSeqOptList: '(' SeqOptList ')' */
+#line 4538 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41196 "preproc.c"
+ break;
+
+ case 612: /* OptParenthesizedSeqOptList: %empty */
+#line 4542 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41203 "preproc.c"
+ break;
+
+ case 613: /* SeqOptList: SeqOptElem */
+#line 4549 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41211 "preproc.c"
+ break;
+
+ case 614: /* SeqOptList: SeqOptList SeqOptElem */
+#line 4553 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41219 "preproc.c"
+ break;
+
+ case 615: /* SeqOptElem: AS SimpleTypename */
+#line 4561 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 41227 "preproc.c"
+ break;
+
+ case 616: /* SeqOptElem: CACHE NumericOnly */
+#line 4565 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cache"),(yyvsp[0].str));
+}
+#line 41235 "preproc.c"
+ break;
+
+ case 617: /* SeqOptElem: CYCLE */
+#line 4569 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cycle");
+}
+#line 41243 "preproc.c"
+ break;
+
+ case 618: /* SeqOptElem: NO CYCLE */
+#line 4573 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no cycle");
+}
+#line 41251 "preproc.c"
+ break;
+
+ case 619: /* SeqOptElem: INCREMENT opt_by NumericOnly */
+#line 4577 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("increment"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41259 "preproc.c"
+ break;
+
+ case 620: /* SeqOptElem: MAXVALUE NumericOnly */
+#line 4581 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("maxvalue"),(yyvsp[0].str));
+}
+#line 41267 "preproc.c"
+ break;
+
+ case 621: /* SeqOptElem: MINVALUE NumericOnly */
+#line 4585 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("minvalue"),(yyvsp[0].str));
+}
+#line 41275 "preproc.c"
+ break;
+
+ case 622: /* SeqOptElem: NO MAXVALUE */
+#line 4589 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no maxvalue");
+}
+#line 41283 "preproc.c"
+ break;
+
+ case 623: /* SeqOptElem: NO MINVALUE */
+#line 4593 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no minvalue");
+}
+#line 41291 "preproc.c"
+ break;
+
+ case 624: /* SeqOptElem: OWNED BY any_name */
+#line 4597 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owned by"),(yyvsp[0].str));
+}
+#line 41299 "preproc.c"
+ break;
+
+ case 625: /* SeqOptElem: SEQUENCE NAME_P any_name */
+#line 4601 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sequence name"),(yyvsp[0].str));
+}
+#line 41307 "preproc.c"
+ break;
+
+ case 626: /* SeqOptElem: START opt_with NumericOnly */
+#line 4605 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("start"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41315 "preproc.c"
+ break;
+
+ case 627: /* SeqOptElem: RESTART */
+#line 4609 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 41323 "preproc.c"
+ break;
+
+ case 628: /* SeqOptElem: RESTART opt_with NumericOnly */
+#line 4613 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("restart"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41331 "preproc.c"
+ break;
+
+ case 629: /* opt_by: BY */
+#line 4621 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by");
+}
+#line 41339 "preproc.c"
+ break;
+
+ case 630: /* opt_by: %empty */
+#line 4625 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41346 "preproc.c"
+ break;
+
+ case 631: /* NumericOnly: ecpg_fconst */
+#line 4632 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41354 "preproc.c"
+ break;
+
+ case 632: /* NumericOnly: '+' ecpg_fconst */
+#line 4636 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 41362 "preproc.c"
+ break;
+
+ case 633: /* NumericOnly: '-' ecpg_fconst */
+#line 4640 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 41370 "preproc.c"
+ break;
+
+ case 634: /* NumericOnly: SignedIconst */
+#line 4644 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41378 "preproc.c"
+ break;
+
+ case 635: /* NumericOnly_list: NumericOnly */
+#line 4652 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41386 "preproc.c"
+ break;
+
+ case 636: /* NumericOnly_list: NumericOnly_list ',' NumericOnly */
+#line 4656 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41394 "preproc.c"
+ break;
+
+ case 637: /* CreatePLangStmt: CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name */
+#line 4664 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("language"),(yyvsp[0].str));
+}
+#line 41402 "preproc.c"
+ break;
+
+ case 638: /* CreatePLangStmt: CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name HANDLER handler_name opt_inline_handler opt_validator */
+#line 4668 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("create"),(yyvsp[-8].str),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("language"),(yyvsp[-4].str),mm_strdup("handler"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41410 "preproc.c"
+ break;
+
+ case 639: /* opt_trusted: TRUSTED */
+#line 4676 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trusted");
+}
+#line 41418 "preproc.c"
+ break;
+
+ case 640: /* opt_trusted: %empty */
+#line 4680 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41425 "preproc.c"
+ break;
+
+ case 641: /* handler_name: name */
+#line 4687 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41433 "preproc.c"
+ break;
+
+ case 642: /* handler_name: name attrs */
+#line 4691 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41441 "preproc.c"
+ break;
+
+ case 643: /* opt_inline_handler: INLINE_P handler_name */
+#line 4699 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("inline"),(yyvsp[0].str));
+}
+#line 41449 "preproc.c"
+ break;
+
+ case 644: /* opt_inline_handler: %empty */
+#line 4703 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41456 "preproc.c"
+ break;
+
+ case 645: /* validator_clause: VALIDATOR handler_name */
+#line 4710 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validator"),(yyvsp[0].str));
+}
+#line 41464 "preproc.c"
+ break;
+
+ case 646: /* validator_clause: NO VALIDATOR */
+#line 4714 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no validator");
+}
+#line 41472 "preproc.c"
+ break;
+
+ case 647: /* opt_validator: validator_clause */
+#line 4722 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41480 "preproc.c"
+ break;
+
+ case 648: /* opt_validator: %empty */
+#line 4726 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41487 "preproc.c"
+ break;
+
+ case 649: /* opt_procedural: PROCEDURAL */
+#line 4733 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedural");
+}
+#line 41495 "preproc.c"
+ break;
+
+ case 650: /* opt_procedural: %empty */
+#line 4737 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41502 "preproc.c"
+ break;
+
+ case 651: /* CreateTableSpaceStmt: CREATE TABLESPACE name OptTableSpaceOwner LOCATION ecpg_sconst opt_reloptions */
+#line 4744 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create tablespace"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("location"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41510 "preproc.c"
+ break;
+
+ case 652: /* OptTableSpaceOwner: OWNER RoleSpec */
+#line 4752 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owner"),(yyvsp[0].str));
+}
+#line 41518 "preproc.c"
+ break;
+
+ case 653: /* OptTableSpaceOwner: %empty */
+#line 4756 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41525 "preproc.c"
+ break;
+
+ case 654: /* DropTableSpaceStmt: DROP TABLESPACE name */
+#line 4763 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop tablespace"),(yyvsp[0].str));
+}
+#line 41533 "preproc.c"
+ break;
+
+ case 655: /* DropTableSpaceStmt: DROP TABLESPACE IF_P EXISTS name */
+#line 4767 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop tablespace if exists"),(yyvsp[0].str));
+}
+#line 41541 "preproc.c"
+ break;
+
+ case 656: /* CreateExtensionStmt: CREATE EXTENSION name opt_with create_extension_opt_list */
+#line 4775 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create extension"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41549 "preproc.c"
+ break;
+
+ case 657: /* CreateExtensionStmt: CREATE EXTENSION IF_P NOT EXISTS name opt_with create_extension_opt_list */
+#line 4779 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create extension if not exists"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41557 "preproc.c"
+ break;
+
+ case 658: /* create_extension_opt_list: create_extension_opt_list create_extension_opt_item */
+#line 4787 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41565 "preproc.c"
+ break;
+
+ case 659: /* create_extension_opt_list: %empty */
+#line 4791 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41572 "preproc.c"
+ break;
+
+ case 660: /* create_extension_opt_item: SCHEMA name */
+#line 4798 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 41580 "preproc.c"
+ break;
+
+ case 661: /* create_extension_opt_item: VERSION_P NonReservedWord_or_Sconst */
+#line 4802 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 41588 "preproc.c"
+ break;
+
+ case 662: /* create_extension_opt_item: FROM NonReservedWord_or_Sconst */
+#line 4806 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 41597 "preproc.c"
+ break;
+
+ case 663: /* create_extension_opt_item: CASCADE */
+#line 4811 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 41605 "preproc.c"
+ break;
+
+ case 664: /* AlterExtensionStmt: ALTER EXTENSION name UPDATE alter_extension_opt_list */
+#line 4819 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter extension"),(yyvsp[-2].str),mm_strdup("update"),(yyvsp[0].str));
+}
+#line 41613 "preproc.c"
+ break;
+
+ case 665: /* alter_extension_opt_list: alter_extension_opt_list alter_extension_opt_item */
+#line 4827 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41621 "preproc.c"
+ break;
+
+ case 666: /* alter_extension_opt_list: %empty */
+#line 4831 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41628 "preproc.c"
+ break;
+
+ case 667: /* alter_extension_opt_item: TO NonReservedWord_or_Sconst */
+#line 4838 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 41636 "preproc.c"
+ break;
+
+ case 668: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop object_type_name name */
+#line 4846 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41644 "preproc.c"
+ break;
+
+ case 669: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop object_type_any_name any_name */
+#line 4850 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41652 "preproc.c"
+ break;
+
+ case 670: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop AGGREGATE aggregate_with_argtypes */
+#line 4854 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("aggregate"),(yyvsp[0].str));
+}
+#line 41660 "preproc.c"
+ break;
+
+ case 671: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop CAST '(' Typename AS Typename ')' */
+#line 4858 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("alter extension"),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("cast ("),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41668 "preproc.c"
+ break;
+
+ case 672: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop DOMAIN_P Typename */
+#line 4862 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("domain"),(yyvsp[0].str));
+}
+#line 41676 "preproc.c"
+ break;
+
+ case 673: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop FUNCTION function_with_argtypes */
+#line 4866 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("function"),(yyvsp[0].str));
+}
+#line 41684 "preproc.c"
+ break;
+
+ case 674: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR operator_with_argtypes */
+#line 4870 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("operator"),(yyvsp[0].str));
+}
+#line 41692 "preproc.c"
+ break;
+
+ case 675: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR CLASS any_name USING name */
+#line 4874 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter extension"),(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("operator class"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 41700 "preproc.c"
+ break;
+
+ case 676: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR FAMILY any_name USING name */
+#line 4878 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter extension"),(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("operator family"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 41708 "preproc.c"
+ break;
+
+ case 677: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop PROCEDURE function_with_argtypes */
+#line 4882 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("procedure"),(yyvsp[0].str));
+}
+#line 41716 "preproc.c"
+ break;
+
+ case 678: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop ROUTINE function_with_argtypes */
+#line 4886 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("routine"),(yyvsp[0].str));
+}
+#line 41724 "preproc.c"
+ break;
+
+ case 679: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop TRANSFORM FOR Typename LANGUAGE name */
+#line 4890 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter extension"),(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("transform for"),(yyvsp[-2].str),mm_strdup("language"),(yyvsp[0].str));
+}
+#line 41732 "preproc.c"
+ break;
+
+ case 680: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop TYPE_P Typename */
+#line 4894 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("type"),(yyvsp[0].str));
+}
+#line 41740 "preproc.c"
+ break;
+
+ case 681: /* CreateFdwStmt: CREATE FOREIGN DATA_P WRAPPER name opt_fdw_options create_generic_options */
+#line 4902 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create foreign data wrapper"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41748 "preproc.c"
+ break;
+
+ case 682: /* fdw_option: HANDLER handler_name */
+#line 4910 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("handler"),(yyvsp[0].str));
+}
+#line 41756 "preproc.c"
+ break;
+
+ case 683: /* fdw_option: NO HANDLER */
+#line 4914 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no handler");
+}
+#line 41764 "preproc.c"
+ break;
+
+ case 684: /* fdw_option: VALIDATOR handler_name */
+#line 4918 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validator"),(yyvsp[0].str));
+}
+#line 41772 "preproc.c"
+ break;
+
+ case 685: /* fdw_option: NO VALIDATOR */
+#line 4922 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no validator");
+}
+#line 41780 "preproc.c"
+ break;
+
+ case 686: /* fdw_options: fdw_option */
+#line 4930 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41788 "preproc.c"
+ break;
+
+ case 687: /* fdw_options: fdw_options fdw_option */
+#line 4934 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41796 "preproc.c"
+ break;
+
+ case 688: /* opt_fdw_options: fdw_options */
+#line 4942 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41804 "preproc.c"
+ break;
+
+ case 689: /* opt_fdw_options: %empty */
+#line 4946 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41811 "preproc.c"
+ break;
+
+ case 690: /* AlterFdwStmt: ALTER FOREIGN DATA_P WRAPPER name opt_fdw_options alter_generic_options */
+#line 4953 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41819 "preproc.c"
+ break;
+
+ case 691: /* AlterFdwStmt: ALTER FOREIGN DATA_P WRAPPER name fdw_options */
+#line 4957 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign data wrapper"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41827 "preproc.c"
+ break;
+
+ case 692: /* create_generic_options: OPTIONS '(' generic_option_list ')' */
+#line 4965 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("options ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41835 "preproc.c"
+ break;
+
+ case 693: /* create_generic_options: %empty */
+#line 4969 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41842 "preproc.c"
+ break;
+
+ case 694: /* generic_option_list: generic_option_elem */
+#line 4976 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41850 "preproc.c"
+ break;
+
+ case 695: /* generic_option_list: generic_option_list ',' generic_option_elem */
+#line 4980 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41858 "preproc.c"
+ break;
+
+ case 696: /* alter_generic_options: OPTIONS '(' alter_generic_option_list ')' */
+#line 4988 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("options ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41866 "preproc.c"
+ break;
+
+ case 697: /* alter_generic_option_list: alter_generic_option_elem */
+#line 4996 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41874 "preproc.c"
+ break;
+
+ case 698: /* alter_generic_option_list: alter_generic_option_list ',' alter_generic_option_elem */
+#line 5000 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41882 "preproc.c"
+ break;
+
+ case 699: /* alter_generic_option_elem: generic_option_elem */
+#line 5008 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41890 "preproc.c"
+ break;
+
+ case 700: /* alter_generic_option_elem: SET generic_option_elem */
+#line 5012 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 41898 "preproc.c"
+ break;
+
+ case 701: /* alter_generic_option_elem: ADD_P generic_option_elem */
+#line 5016 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 41906 "preproc.c"
+ break;
+
+ case 702: /* alter_generic_option_elem: DROP generic_option_name */
+#line 5020 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop"),(yyvsp[0].str));
+}
+#line 41914 "preproc.c"
+ break;
+
+ case 703: /* generic_option_elem: generic_option_name generic_option_arg */
+#line 5028 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41922 "preproc.c"
+ break;
+
+ case 704: /* generic_option_name: ColLabel */
+#line 5036 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41930 "preproc.c"
+ break;
+
+ case 705: /* generic_option_arg: ecpg_sconst */
+#line 5044 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41938 "preproc.c"
+ break;
+
+ case 706: /* CreateForeignServerStmt: CREATE SERVER name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options */
+#line 5052 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create server"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("foreign data wrapper"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41946 "preproc.c"
+ break;
+
+ case 707: /* CreateForeignServerStmt: CREATE SERVER IF_P NOT EXISTS name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options */
+#line 5056 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create server if not exists"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("foreign data wrapper"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41954 "preproc.c"
+ break;
+
+ case 708: /* opt_type: TYPE_P ecpg_sconst */
+#line 5064 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("type"),(yyvsp[0].str));
+}
+#line 41962 "preproc.c"
+ break;
+
+ case 709: /* opt_type: %empty */
+#line 5068 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 41969 "preproc.c"
+ break;
+
+ case 710: /* foreign_server_version: VERSION_P ecpg_sconst */
+#line 5075 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 41977 "preproc.c"
+ break;
+
+ case 711: /* foreign_server_version: VERSION_P NULL_P */
+#line 5079 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("version null");
+}
+#line 41985 "preproc.c"
+ break;
+
+ case 712: /* opt_foreign_server_version: foreign_server_version */
+#line 5087 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41993 "preproc.c"
+ break;
+
+ case 713: /* opt_foreign_server_version: %empty */
+#line 5091 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42000 "preproc.c"
+ break;
+
+ case 714: /* AlterForeignServerStmt: ALTER SERVER name foreign_server_version alter_generic_options */
+#line 5098 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42008 "preproc.c"
+ break;
+
+ case 715: /* AlterForeignServerStmt: ALTER SERVER name foreign_server_version */
+#line 5102 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42016 "preproc.c"
+ break;
+
+ case 716: /* AlterForeignServerStmt: ALTER SERVER name alter_generic_options */
+#line 5106 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42024 "preproc.c"
+ break;
+
+ case 717: /* CreateForeignTableStmt: CREATE FOREIGN TABLE qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options */
+#line 5114 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create foreign table"),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42032 "preproc.c"
+ break;
+
+ case 718: /* CreateForeignTableStmt: CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options */
+#line 5118 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create foreign table if not exists"),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42040 "preproc.c"
+ break;
+
+ case 719: /* CreateForeignTableStmt: CREATE FOREIGN TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options */
+#line 5122 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create foreign table"),(yyvsp[-8].str),mm_strdup("partition of"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42048 "preproc.c"
+ break;
+
+ case 720: /* CreateForeignTableStmt: CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options */
+#line 5126 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create foreign table if not exists"),(yyvsp[-8].str),mm_strdup("partition of"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42056 "preproc.c"
+ break;
+
+ case 721: /* ImportForeignSchemaStmt: IMPORT_P FOREIGN SCHEMA name import_qualification FROM SERVER name INTO name create_generic_options */
+#line 5134 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("import foreign schema"),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("from server"),(yyvsp[-3].str),mm_strdup("into"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42064 "preproc.c"
+ break;
+
+ case 722: /* import_qualification_type: LIMIT TO */
+#line 5142 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("limit to");
+}
+#line 42072 "preproc.c"
+ break;
+
+ case 723: /* import_qualification_type: EXCEPT */
+#line 5146 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("except");
+}
+#line 42080 "preproc.c"
+ break;
+
+ case 724: /* import_qualification: import_qualification_type '(' relation_expr_list ')' */
+#line 5154 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42088 "preproc.c"
+ break;
+
+ case 725: /* import_qualification: %empty */
+#line 5158 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42095 "preproc.c"
+ break;
+
+ case 726: /* CreateUserMappingStmt: CREATE USER MAPPING FOR auth_ident SERVER name create_generic_options */
+#line 5165 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create user mapping for"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42103 "preproc.c"
+ break;
+
+ case 727: /* CreateUserMappingStmt: CREATE USER MAPPING IF_P NOT EXISTS FOR auth_ident SERVER name create_generic_options */
+#line 5169 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create user mapping if not exists for"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42111 "preproc.c"
+ break;
+
+ case 728: /* auth_ident: RoleSpec */
+#line 5177 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42119 "preproc.c"
+ break;
+
+ case 729: /* auth_ident: USER */
+#line 5181 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 42127 "preproc.c"
+ break;
+
+ case 730: /* DropUserMappingStmt: DROP USER MAPPING FOR auth_ident SERVER name */
+#line 5189 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop user mapping for"),(yyvsp[-2].str),mm_strdup("server"),(yyvsp[0].str));
+}
+#line 42135 "preproc.c"
+ break;
+
+ case 731: /* DropUserMappingStmt: DROP USER MAPPING IF_P EXISTS FOR auth_ident SERVER name */
+#line 5193 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop user mapping if exists for"),(yyvsp[-2].str),mm_strdup("server"),(yyvsp[0].str));
+}
+#line 42143 "preproc.c"
+ break;
+
+ case 732: /* AlterUserMappingStmt: ALTER USER MAPPING FOR auth_ident SERVER name alter_generic_options */
+#line 5201 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter user mapping for"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42151 "preproc.c"
+ break;
+
+ case 733: /* CreatePolicyStmt: CREATE POLICY name ON qualified_name RowSecurityDefaultPermissive RowSecurityDefaultForCmd RowSecurityDefaultToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck */
+#line 5209 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create policy"),(yyvsp[-7].str),mm_strdup("on"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42159 "preproc.c"
+ break;
+
+ case 734: /* AlterPolicyStmt: ALTER POLICY name ON qualified_name RowSecurityOptionalToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck */
+#line 5217 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter policy"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42167 "preproc.c"
+ break;
+
+ case 735: /* RowSecurityOptionalExpr: USING '(' a_expr ')' */
+#line 5225 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("using ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42175 "preproc.c"
+ break;
+
+ case 736: /* RowSecurityOptionalExpr: %empty */
+#line 5229 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42182 "preproc.c"
+ break;
+
+ case 737: /* RowSecurityOptionalWithCheck: WITH CHECK '(' a_expr ')' */
+#line 5236 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("with check ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42190 "preproc.c"
+ break;
+
+ case 738: /* RowSecurityOptionalWithCheck: %empty */
+#line 5240 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42197 "preproc.c"
+ break;
+
+ case 739: /* RowSecurityDefaultToRole: TO role_list */
+#line 5247 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 42205 "preproc.c"
+ break;
+
+ case 740: /* RowSecurityDefaultToRole: %empty */
+#line 5251 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42212 "preproc.c"
+ break;
+
+ case 741: /* RowSecurityOptionalToRole: TO role_list */
+#line 5258 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 42220 "preproc.c"
+ break;
+
+ case 742: /* RowSecurityOptionalToRole: %empty */
+#line 5262 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42227 "preproc.c"
+ break;
+
+ case 743: /* RowSecurityDefaultPermissive: AS ecpg_ident */
+#line 5269 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 42235 "preproc.c"
+ break;
+
+ case 744: /* RowSecurityDefaultPermissive: %empty */
+#line 5273 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42242 "preproc.c"
+ break;
+
+ case 745: /* RowSecurityDefaultForCmd: FOR row_security_cmd */
+#line 5280 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for"),(yyvsp[0].str));
+}
+#line 42250 "preproc.c"
+ break;
+
+ case 746: /* RowSecurityDefaultForCmd: %empty */
+#line 5284 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42257 "preproc.c"
+ break;
+
+ case 747: /* row_security_cmd: ALL */
+#line 5291 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 42265 "preproc.c"
+ break;
+
+ case 748: /* row_security_cmd: SELECT */
+#line 5295 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 42273 "preproc.c"
+ break;
+
+ case 749: /* row_security_cmd: INSERT */
+#line 5299 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 42281 "preproc.c"
+ break;
+
+ case 750: /* row_security_cmd: UPDATE */
+#line 5303 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 42289 "preproc.c"
+ break;
+
+ case 751: /* row_security_cmd: DELETE_P */
+#line 5307 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 42297 "preproc.c"
+ break;
+
+ case 752: /* CreateAmStmt: CREATE ACCESS METHOD name TYPE_P am_type HANDLER handler_name */
+#line 5315 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create access method"),(yyvsp[-4].str),mm_strdup("type"),(yyvsp[-2].str),mm_strdup("handler"),(yyvsp[0].str));
+}
+#line 42305 "preproc.c"
+ break;
+
+ case 753: /* am_type: INDEX */
+#line 5323 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 42313 "preproc.c"
+ break;
+
+ case 754: /* am_type: TABLE */
+#line 5327 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 42321 "preproc.c"
+ break;
+
+ case 755: /* CreateTrigStmt: CREATE opt_or_replace TRIGGER name TriggerActionTime TriggerEvents ON qualified_name TriggerReferencing TriggerForSpec TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')' */
+#line 5335 "preproc.y"
+ {
+ (yyval.str) = cat_str(17,mm_strdup("create"),(yyvsp[-15].str),mm_strdup("trigger"),(yyvsp[-13].str),(yyvsp[-12].str),(yyvsp[-11].str),mm_strdup("on"),(yyvsp[-9].str),(yyvsp[-8].str),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("execute"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42329 "preproc.c"
+ break;
+
+ case 756: /* CreateTrigStmt: CREATE opt_or_replace CONSTRAINT TRIGGER name AFTER TriggerEvents ON qualified_name OptConstrFromTable ConstraintAttributeSpec FOR EACH ROW TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')' */
+#line 5339 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(18,mm_strdup("create"),(yyvsp[-19].str),mm_strdup("constraint trigger"),(yyvsp[-16].str),mm_strdup("after"),(yyvsp[-14].str),mm_strdup("on"),(yyvsp[-12].str),(yyvsp[-11].str),(yyvsp[-10].str),mm_strdup("for each row"),(yyvsp[-6].str),mm_strdup("execute"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42338 "preproc.c"
+ break;
+
+ case 757: /* TriggerActionTime: BEFORE */
+#line 5348 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("before");
+}
+#line 42346 "preproc.c"
+ break;
+
+ case 758: /* TriggerActionTime: AFTER */
+#line 5352 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("after");
+}
+#line 42354 "preproc.c"
+ break;
+
+ case 759: /* TriggerActionTime: INSTEAD OF */
+#line 5356 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("instead of");
+}
+#line 42362 "preproc.c"
+ break;
+
+ case 760: /* TriggerEvents: TriggerOneEvent */
+#line 5364 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42370 "preproc.c"
+ break;
+
+ case 761: /* TriggerEvents: TriggerEvents OR TriggerOneEvent */
+#line 5368 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("or"),(yyvsp[0].str));
+}
+#line 42378 "preproc.c"
+ break;
+
+ case 762: /* TriggerOneEvent: INSERT */
+#line 5376 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 42386 "preproc.c"
+ break;
+
+ case 763: /* TriggerOneEvent: DELETE_P */
+#line 5380 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 42394 "preproc.c"
+ break;
+
+ case 764: /* TriggerOneEvent: UPDATE */
+#line 5384 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 42402 "preproc.c"
+ break;
+
+ case 765: /* TriggerOneEvent: UPDATE OF columnList */
+#line 5388 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("update of"),(yyvsp[0].str));
+}
+#line 42410 "preproc.c"
+ break;
+
+ case 766: /* TriggerOneEvent: TRUNCATE */
+#line 5392 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("truncate");
+}
+#line 42418 "preproc.c"
+ break;
+
+ case 767: /* TriggerReferencing: REFERENCING TriggerTransitions */
+#line 5400 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("referencing"),(yyvsp[0].str));
+}
+#line 42426 "preproc.c"
+ break;
+
+ case 768: /* TriggerReferencing: %empty */
+#line 5404 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42433 "preproc.c"
+ break;
+
+ case 769: /* TriggerTransitions: TriggerTransition */
+#line 5411 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42441 "preproc.c"
+ break;
+
+ case 770: /* TriggerTransitions: TriggerTransitions TriggerTransition */
+#line 5415 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42449 "preproc.c"
+ break;
+
+ case 771: /* TriggerTransition: TransitionOldOrNew TransitionRowOrTable opt_as TransitionRelName */
+#line 5423 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42457 "preproc.c"
+ break;
+
+ case 772: /* TransitionOldOrNew: NEW */
+#line 5431 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("new");
+}
+#line 42465 "preproc.c"
+ break;
+
+ case 773: /* TransitionOldOrNew: OLD */
+#line 5435 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("old");
+}
+#line 42473 "preproc.c"
+ break;
+
+ case 774: /* TransitionRowOrTable: TABLE */
+#line 5443 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 42481 "preproc.c"
+ break;
+
+ case 775: /* TransitionRowOrTable: ROW */
+#line 5447 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 42489 "preproc.c"
+ break;
+
+ case 776: /* TransitionRelName: ColId */
+#line 5455 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42497 "preproc.c"
+ break;
+
+ case 777: /* TriggerForSpec: FOR TriggerForOptEach TriggerForType */
+#line 5463 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42505 "preproc.c"
+ break;
+
+ case 778: /* TriggerForSpec: %empty */
+#line 5467 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42512 "preproc.c"
+ break;
+
+ case 779: /* TriggerForOptEach: EACH */
+#line 5474 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("each");
+}
+#line 42520 "preproc.c"
+ break;
+
+ case 780: /* TriggerForOptEach: %empty */
+#line 5478 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42527 "preproc.c"
+ break;
+
+ case 781: /* TriggerForType: ROW */
+#line 5485 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 42535 "preproc.c"
+ break;
+
+ case 782: /* TriggerForType: STATEMENT */
+#line 5489 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statement");
+}
+#line 42543 "preproc.c"
+ break;
+
+ case 783: /* TriggerWhen: WHEN '(' a_expr ')' */
+#line 5497 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("when ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42551 "preproc.c"
+ break;
+
+ case 784: /* TriggerWhen: %empty */
+#line 5501 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42558 "preproc.c"
+ break;
+
+ case 785: /* FUNCTION_or_PROCEDURE: FUNCTION */
+#line 5508 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("function");
+}
+#line 42566 "preproc.c"
+ break;
+
+ case 786: /* FUNCTION_or_PROCEDURE: PROCEDURE */
+#line 5512 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedure");
+}
+#line 42574 "preproc.c"
+ break;
+
+ case 787: /* TriggerFuncArgs: TriggerFuncArg */
+#line 5520 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42582 "preproc.c"
+ break;
+
+ case 788: /* TriggerFuncArgs: TriggerFuncArgs ',' TriggerFuncArg */
+#line 5524 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 42590 "preproc.c"
+ break;
+
+ case 789: /* TriggerFuncArgs: %empty */
+#line 5528 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42597 "preproc.c"
+ break;
+
+ case 790: /* TriggerFuncArg: Iconst */
+#line 5535 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42605 "preproc.c"
+ break;
+
+ case 791: /* TriggerFuncArg: ecpg_fconst */
+#line 5539 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42613 "preproc.c"
+ break;
+
+ case 792: /* TriggerFuncArg: ecpg_sconst */
+#line 5543 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42621 "preproc.c"
+ break;
+
+ case 793: /* TriggerFuncArg: ColLabel */
+#line 5547 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42629 "preproc.c"
+ break;
+
+ case 794: /* OptConstrFromTable: FROM qualified_name */
+#line 5555 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 42637 "preproc.c"
+ break;
+
+ case 795: /* OptConstrFromTable: %empty */
+#line 5559 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42644 "preproc.c"
+ break;
+
+ case 796: /* ConstraintAttributeSpec: %empty */
+#line 5566 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 42651 "preproc.c"
+ break;
+
+ case 797: /* ConstraintAttributeSpec: ConstraintAttributeSpec ConstraintAttributeElem */
+#line 5569 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42659 "preproc.c"
+ break;
+
+ case 798: /* ConstraintAttributeElem: NOT DEFERRABLE */
+#line 5577 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 42667 "preproc.c"
+ break;
+
+ case 799: /* ConstraintAttributeElem: DEFERRABLE */
+#line 5581 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 42675 "preproc.c"
+ break;
+
+ case 800: /* ConstraintAttributeElem: INITIALLY IMMEDIATE */
+#line 5585 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially immediate");
+}
+#line 42683 "preproc.c"
+ break;
+
+ case 801: /* ConstraintAttributeElem: INITIALLY DEFERRED */
+#line 5589 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially deferred");
+}
+#line 42691 "preproc.c"
+ break;
+
+ case 802: /* ConstraintAttributeElem: NOT VALID */
+#line 5593 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not valid");
+}
+#line 42699 "preproc.c"
+ break;
+
+ case 803: /* ConstraintAttributeElem: NO INHERIT */
+#line 5597 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no inherit");
+}
+#line 42707 "preproc.c"
+ break;
+
+ case 804: /* CreateEventTrigStmt: CREATE EVENT TRIGGER name ON ColLabel EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')' */
+#line 5605 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("create event trigger"),(yyvsp[-7].str),mm_strdup("on"),(yyvsp[-5].str),mm_strdup("execute"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("( )"));
+}
+#line 42715 "preproc.c"
+ break;
+
+ case 805: /* CreateEventTrigStmt: CREATE EVENT TRIGGER name ON ColLabel WHEN event_trigger_when_list EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')' */
+#line 5609 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("create event trigger"),(yyvsp[-9].str),mm_strdup("on"),(yyvsp[-7].str),mm_strdup("when"),(yyvsp[-5].str),mm_strdup("execute"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("( )"));
+}
+#line 42723 "preproc.c"
+ break;
+
+ case 806: /* event_trigger_when_list: event_trigger_when_item */
+#line 5617 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42731 "preproc.c"
+ break;
+
+ case 807: /* event_trigger_when_list: event_trigger_when_list AND event_trigger_when_item */
+#line 5621 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 42739 "preproc.c"
+ break;
+
+ case 808: /* event_trigger_when_item: ColId IN_P '(' event_trigger_value_list ')' */
+#line 5629 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("in ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42747 "preproc.c"
+ break;
+
+ case 809: /* event_trigger_value_list: SCONST */
+#line 5637 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sconst");
+}
+#line 42755 "preproc.c"
+ break;
+
+ case 810: /* event_trigger_value_list: event_trigger_value_list ',' SCONST */
+#line 5641 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup(", sconst"));
+}
+#line 42763 "preproc.c"
+ break;
+
+ case 811: /* AlterEventTrigStmt: ALTER EVENT TRIGGER name enable_trigger */
+#line 5649 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter event trigger"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42771 "preproc.c"
+ break;
+
+ case 812: /* enable_trigger: ENABLE_P */
+#line 5657 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable");
+}
+#line 42779 "preproc.c"
+ break;
+
+ case 813: /* enable_trigger: ENABLE_P REPLICA */
+#line 5661 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable replica");
+}
+#line 42787 "preproc.c"
+ break;
+
+ case 814: /* enable_trigger: ENABLE_P ALWAYS */
+#line 5665 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable always");
+}
+#line 42795 "preproc.c"
+ break;
+
+ case 815: /* enable_trigger: DISABLE_P */
+#line 5669 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable");
+}
+#line 42803 "preproc.c"
+ break;
+
+ case 816: /* CreateAssertionStmt: CREATE ASSERTION any_name CHECK '(' a_expr ')' ConstraintAttributeSpec */
+#line 5677 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(6,mm_strdup("create assertion"),(yyvsp[-5].str),mm_strdup("check ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 42812 "preproc.c"
+ break;
+
+ case 817: /* DefineStmt: CREATE opt_or_replace AGGREGATE func_name aggr_args definition */
+#line 5686 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),mm_strdup("aggregate"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42820 "preproc.c"
+ break;
+
+ case 818: /* DefineStmt: CREATE opt_or_replace AGGREGATE func_name old_aggr_definition */
+#line 5690 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-3].str),mm_strdup("aggregate"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42828 "preproc.c"
+ break;
+
+ case 819: /* DefineStmt: CREATE OPERATOR any_operator definition */
+#line 5694 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create operator"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42836 "preproc.c"
+ break;
+
+ case 820: /* DefineStmt: CREATE TYPE_P any_name definition */
+#line 5698 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42844 "preproc.c"
+ break;
+
+ case 821: /* DefineStmt: CREATE TYPE_P any_name */
+#line 5702 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("create type"),(yyvsp[0].str));
+}
+#line 42852 "preproc.c"
+ break;
+
+ case 822: /* DefineStmt: CREATE TYPE_P any_name AS '(' OptTableFuncElementList ')' */
+#line 5706 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create type"),(yyvsp[-4].str),mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42860 "preproc.c"
+ break;
+
+ case 823: /* DefineStmt: CREATE TYPE_P any_name AS ENUM_P '(' opt_enum_val_list ')' */
+#line 5710 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create type"),(yyvsp[-5].str),mm_strdup("as enum ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42868 "preproc.c"
+ break;
+
+ case 824: /* DefineStmt: CREATE TYPE_P any_name AS RANGE definition */
+#line 5714 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create type"),(yyvsp[-3].str),mm_strdup("as range"),(yyvsp[0].str));
+}
+#line 42876 "preproc.c"
+ break;
+
+ case 825: /* DefineStmt: CREATE TEXT_P SEARCH PARSER any_name definition */
+#line 5718 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search parser"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42884 "preproc.c"
+ break;
+
+ case 826: /* DefineStmt: CREATE TEXT_P SEARCH DICTIONARY any_name definition */
+#line 5722 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search dictionary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42892 "preproc.c"
+ break;
+
+ case 827: /* DefineStmt: CREATE TEXT_P SEARCH TEMPLATE any_name definition */
+#line 5726 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search template"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42900 "preproc.c"
+ break;
+
+ case 828: /* DefineStmt: CREATE TEXT_P SEARCH CONFIGURATION any_name definition */
+#line 5730 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search configuration"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42908 "preproc.c"
+ break;
+
+ case 829: /* DefineStmt: CREATE COLLATION any_name definition */
+#line 5734 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create collation"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42916 "preproc.c"
+ break;
+
+ case 830: /* DefineStmt: CREATE COLLATION IF_P NOT EXISTS any_name definition */
+#line 5738 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create collation if not exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42924 "preproc.c"
+ break;
+
+ case 831: /* DefineStmt: CREATE COLLATION any_name FROM any_name */
+#line 5742 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create collation"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 42932 "preproc.c"
+ break;
+
+ case 832: /* DefineStmt: CREATE COLLATION IF_P NOT EXISTS any_name FROM any_name */
+#line 5746 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create collation if not exists"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 42940 "preproc.c"
+ break;
+
+ case 833: /* definition: '(' def_list ')' */
+#line 5754 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42948 "preproc.c"
+ break;
+
+ case 834: /* def_list: def_elem */
+#line 5762 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42956 "preproc.c"
+ break;
+
+ case 835: /* def_list: def_list ',' def_elem */
+#line 5766 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 42964 "preproc.c"
+ break;
+
+ case 836: /* def_elem: ColLabel '=' def_arg */
+#line 5774 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 42972 "preproc.c"
+ break;
+
+ case 837: /* def_elem: ColLabel */
+#line 5778 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42980 "preproc.c"
+ break;
+
+ case 838: /* def_arg: func_type */
+#line 5786 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42988 "preproc.c"
+ break;
+
+ case 839: /* def_arg: reserved_keyword */
+#line 5790 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42996 "preproc.c"
+ break;
+
+ case 840: /* def_arg: qual_all_Op */
+#line 5794 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43004 "preproc.c"
+ break;
+
+ case 841: /* def_arg: NumericOnly */
+#line 5798 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43012 "preproc.c"
+ break;
+
+ case 842: /* def_arg: ecpg_sconst */
+#line 5802 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43020 "preproc.c"
+ break;
+
+ case 843: /* def_arg: NONE */
+#line 5806 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("none");
+}
+#line 43028 "preproc.c"
+ break;
+
+ case 844: /* old_aggr_definition: '(' old_aggr_list ')' */
+#line 5814 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43036 "preproc.c"
+ break;
+
+ case 845: /* old_aggr_list: old_aggr_elem */
+#line 5822 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43044 "preproc.c"
+ break;
+
+ case 846: /* old_aggr_list: old_aggr_list ',' old_aggr_elem */
+#line 5826 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43052 "preproc.c"
+ break;
+
+ case 847: /* old_aggr_elem: ecpg_ident '=' def_arg */
+#line 5834 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 43060 "preproc.c"
+ break;
+
+ case 848: /* opt_enum_val_list: enum_val_list */
+#line 5842 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43068 "preproc.c"
+ break;
+
+ case 849: /* opt_enum_val_list: %empty */
+#line 5846 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43075 "preproc.c"
+ break;
+
+ case 850: /* enum_val_list: ecpg_sconst */
+#line 5853 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43083 "preproc.c"
+ break;
+
+ case 851: /* enum_val_list: enum_val_list ',' ecpg_sconst */
+#line 5857 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43091 "preproc.c"
+ break;
+
+ case 852: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst */
+#line 5865 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter type"),(yyvsp[-4].str),mm_strdup("add value"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43099 "preproc.c"
+ break;
+
+ case 853: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst BEFORE ecpg_sconst */
+#line 5869 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter type"),(yyvsp[-6].str),mm_strdup("add value"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("before"),(yyvsp[0].str));
+}
+#line 43107 "preproc.c"
+ break;
+
+ case 854: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst AFTER ecpg_sconst */
+#line 5873 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter type"),(yyvsp[-6].str),mm_strdup("add value"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("after"),(yyvsp[0].str));
+}
+#line 43115 "preproc.c"
+ break;
+
+ case 855: /* AlterEnumStmt: ALTER TYPE_P any_name RENAME VALUE_P ecpg_sconst TO ecpg_sconst */
+#line 5877 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter type"),(yyvsp[-5].str),mm_strdup("rename value"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 43123 "preproc.c"
+ break;
+
+ case 856: /* opt_if_not_exists: IF_P NOT EXISTS */
+#line 5885 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("if not exists");
+}
+#line 43131 "preproc.c"
+ break;
+
+ case 857: /* opt_if_not_exists: %empty */
+#line 5889 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43138 "preproc.c"
+ break;
+
+ case 858: /* CreateOpClassStmt: CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename USING name opt_opfamily AS opclass_item_list */
+#line 5896 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("create operator class"),(yyvsp[-9].str),(yyvsp[-8].str),mm_strdup("for type"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 43146 "preproc.c"
+ break;
+
+ case 859: /* opclass_item_list: opclass_item */
+#line 5904 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43154 "preproc.c"
+ break;
+
+ case 860: /* opclass_item_list: opclass_item_list ',' opclass_item */
+#line 5908 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43162 "preproc.c"
+ break;
+
+ case 861: /* opclass_item: OPERATOR Iconst any_operator opclass_purpose opt_recheck */
+#line 5916 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43170 "preproc.c"
+ break;
+
+ case 862: /* opclass_item: OPERATOR Iconst operator_with_argtypes opclass_purpose opt_recheck */
+#line 5920 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43178 "preproc.c"
+ break;
+
+ case 863: /* opclass_item: FUNCTION Iconst function_with_argtypes */
+#line 5924 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("function"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43186 "preproc.c"
+ break;
+
+ case 864: /* opclass_item: FUNCTION Iconst '(' type_list ')' function_with_argtypes */
+#line 5928 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("function"),(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 43194 "preproc.c"
+ break;
+
+ case 865: /* opclass_item: STORAGE Typename */
+#line 5932 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("storage"),(yyvsp[0].str));
+}
+#line 43202 "preproc.c"
+ break;
+
+ case 866: /* opt_default: DEFAULT */
+#line 5940 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 43210 "preproc.c"
+ break;
+
+ case 867: /* opt_default: %empty */
+#line 5944 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43217 "preproc.c"
+ break;
+
+ case 868: /* opt_opfamily: FAMILY any_name */
+#line 5951 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("family"),(yyvsp[0].str));
+}
+#line 43225 "preproc.c"
+ break;
+
+ case 869: /* opt_opfamily: %empty */
+#line 5955 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43232 "preproc.c"
+ break;
+
+ case 870: /* opclass_purpose: FOR SEARCH */
+#line 5962 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for search");
+}
+#line 43240 "preproc.c"
+ break;
+
+ case 871: /* opclass_purpose: FOR ORDER BY any_name */
+#line 5966 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for order by"),(yyvsp[0].str));
+}
+#line 43248 "preproc.c"
+ break;
+
+ case 872: /* opclass_purpose: %empty */
+#line 5970 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43255 "preproc.c"
+ break;
+
+ case 873: /* opt_recheck: RECHECK */
+#line 5977 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = mm_strdup("recheck");
+}
+#line 43264 "preproc.c"
+ break;
+
+ case 874: /* opt_recheck: %empty */
+#line 5982 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43271 "preproc.c"
+ break;
+
+ case 875: /* CreateOpFamilyStmt: CREATE OPERATOR FAMILY any_name USING name */
+#line 5989 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create operator family"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 43279 "preproc.c"
+ break;
+
+ case 876: /* AlterOpFamilyStmt: ALTER OPERATOR FAMILY any_name USING name ADD_P opclass_item_list */
+#line 5997 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator family"),(yyvsp[-4].str),mm_strdup("using"),(yyvsp[-2].str),mm_strdup("add"),(yyvsp[0].str));
+}
+#line 43287 "preproc.c"
+ break;
+
+ case 877: /* AlterOpFamilyStmt: ALTER OPERATOR FAMILY any_name USING name DROP opclass_drop_list */
+#line 6001 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator family"),(yyvsp[-4].str),mm_strdup("using"),(yyvsp[-2].str),mm_strdup("drop"),(yyvsp[0].str));
+}
+#line 43295 "preproc.c"
+ break;
+
+ case 878: /* opclass_drop_list: opclass_drop */
+#line 6009 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43303 "preproc.c"
+ break;
+
+ case 879: /* opclass_drop_list: opclass_drop_list ',' opclass_drop */
+#line 6013 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43311 "preproc.c"
+ break;
+
+ case 880: /* opclass_drop: OPERATOR Iconst '(' type_list ')' */
+#line 6021 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43319 "preproc.c"
+ break;
+
+ case 881: /* opclass_drop: FUNCTION Iconst '(' type_list ')' */
+#line 6025 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("function"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43327 "preproc.c"
+ break;
+
+ case 882: /* DropOpClassStmt: DROP OPERATOR CLASS any_name USING name opt_drop_behavior */
+#line 6033 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator class"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43335 "preproc.c"
+ break;
+
+ case 883: /* DropOpClassStmt: DROP OPERATOR CLASS IF_P EXISTS any_name USING name opt_drop_behavior */
+#line 6037 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator class if exists"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43343 "preproc.c"
+ break;
+
+ case 884: /* DropOpFamilyStmt: DROP OPERATOR FAMILY any_name USING name opt_drop_behavior */
+#line 6045 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator family"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43351 "preproc.c"
+ break;
+
+ case 885: /* DropOpFamilyStmt: DROP OPERATOR FAMILY IF_P EXISTS any_name USING name opt_drop_behavior */
+#line 6049 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator family if exists"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43359 "preproc.c"
+ break;
+
+ case 886: /* DropOwnedStmt: DROP OWNED BY role_list opt_drop_behavior */
+#line 6057 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop owned by"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43367 "preproc.c"
+ break;
+
+ case 887: /* ReassignOwnedStmt: REASSIGN OWNED BY role_list TO RoleSpec */
+#line 6065 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reassign owned by"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 43375 "preproc.c"
+ break;
+
+ case 888: /* DropStmt: DROP object_type_any_name IF_P EXISTS any_name_list opt_drop_behavior */
+#line 6073 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43383 "preproc.c"
+ break;
+
+ case 889: /* DropStmt: DROP object_type_any_name any_name_list opt_drop_behavior */
+#line 6077 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43391 "preproc.c"
+ break;
+
+ case 890: /* DropStmt: DROP drop_type_name IF_P EXISTS name_list opt_drop_behavior */
+#line 6081 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43399 "preproc.c"
+ break;
+
+ case 891: /* DropStmt: DROP drop_type_name name_list opt_drop_behavior */
+#line 6085 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43407 "preproc.c"
+ break;
+
+ case 892: /* DropStmt: DROP object_type_name_on_any_name name ON any_name opt_drop_behavior */
+#line 6089 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("drop"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("on"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43415 "preproc.c"
+ break;
+
+ case 893: /* DropStmt: DROP object_type_name_on_any_name IF_P EXISTS name ON any_name opt_drop_behavior */
+#line 6093 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("drop"),(yyvsp[-6].str),mm_strdup("if exists"),(yyvsp[-3].str),mm_strdup("on"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43423 "preproc.c"
+ break;
+
+ case 894: /* DropStmt: DROP TYPE_P type_name_list opt_drop_behavior */
+#line 6097 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43431 "preproc.c"
+ break;
+
+ case 895: /* DropStmt: DROP TYPE_P IF_P EXISTS type_name_list opt_drop_behavior */
+#line 6101 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop type if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43439 "preproc.c"
+ break;
+
+ case 896: /* DropStmt: DROP DOMAIN_P type_name_list opt_drop_behavior */
+#line 6105 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop domain"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43447 "preproc.c"
+ break;
+
+ case 897: /* DropStmt: DROP DOMAIN_P IF_P EXISTS type_name_list opt_drop_behavior */
+#line 6109 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop domain if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43455 "preproc.c"
+ break;
+
+ case 898: /* DropStmt: DROP INDEX CONCURRENTLY any_name_list opt_drop_behavior */
+#line 6113 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop index concurrently"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43463 "preproc.c"
+ break;
+
+ case 899: /* DropStmt: DROP INDEX CONCURRENTLY IF_P EXISTS any_name_list opt_drop_behavior */
+#line 6117 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop index concurrently if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43471 "preproc.c"
+ break;
+
+ case 900: /* object_type_any_name: TABLE */
+#line 6125 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 43479 "preproc.c"
+ break;
+
+ case 901: /* object_type_any_name: SEQUENCE */
+#line 6129 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 43487 "preproc.c"
+ break;
+
+ case 902: /* object_type_any_name: VIEW */
+#line 6133 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 43495 "preproc.c"
+ break;
+
+ case 903: /* object_type_any_name: MATERIALIZED VIEW */
+#line 6137 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("materialized view");
+}
+#line 43503 "preproc.c"
+ break;
+
+ case 904: /* object_type_any_name: INDEX */
+#line 6141 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 43511 "preproc.c"
+ break;
+
+ case 905: /* object_type_any_name: FOREIGN TABLE */
+#line 6145 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("foreign table");
+}
+#line 43519 "preproc.c"
+ break;
+
+ case 906: /* object_type_any_name: COLLATION */
+#line 6149 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 43527 "preproc.c"
+ break;
+
+ case 907: /* object_type_any_name: CONVERSION_P */
+#line 6153 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 43535 "preproc.c"
+ break;
+
+ case 908: /* object_type_any_name: STATISTICS */
+#line 6157 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 43543 "preproc.c"
+ break;
+
+ case 909: /* object_type_any_name: TEXT_P SEARCH PARSER */
+#line 6161 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text search parser");
+}
+#line 43551 "preproc.c"
+ break;
+
+ case 910: /* object_type_any_name: TEXT_P SEARCH DICTIONARY */
+#line 6165 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text search dictionary");
+}
+#line 43559 "preproc.c"
+ break;
+
+ case 911: /* object_type_any_name: TEXT_P SEARCH TEMPLATE */
+#line 6169 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text search template");
+}
+#line 43567 "preproc.c"
+ break;
+
+ case 912: /* object_type_any_name: TEXT_P SEARCH CONFIGURATION */
+#line 6173 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text search configuration");
+}
+#line 43575 "preproc.c"
+ break;
+
+ case 913: /* object_type_name: drop_type_name */
+#line 6181 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43583 "preproc.c"
+ break;
+
+ case 914: /* object_type_name: DATABASE */
+#line 6185 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 43591 "preproc.c"
+ break;
+
+ case 915: /* object_type_name: ROLE */
+#line 6189 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 43599 "preproc.c"
+ break;
+
+ case 916: /* object_type_name: SUBSCRIPTION */
+#line 6193 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 43607 "preproc.c"
+ break;
+
+ case 917: /* object_type_name: TABLESPACE */
+#line 6197 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 43615 "preproc.c"
+ break;
+
+ case 918: /* drop_type_name: ACCESS METHOD */
+#line 6205 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("access method");
+}
+#line 43623 "preproc.c"
+ break;
+
+ case 919: /* drop_type_name: EVENT TRIGGER */
+#line 6209 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("event trigger");
+}
+#line 43631 "preproc.c"
+ break;
+
+ case 920: /* drop_type_name: EXTENSION */
+#line 6213 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 43639 "preproc.c"
+ break;
+
+ case 921: /* drop_type_name: FOREIGN DATA_P WRAPPER */
+#line 6217 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("foreign data wrapper");
+}
+#line 43647 "preproc.c"
+ break;
+
+ case 922: /* drop_type_name: opt_procedural LANGUAGE */
+#line 6221 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("language"));
+}
+#line 43655 "preproc.c"
+ break;
+
+ case 923: /* drop_type_name: PUBLICATION */
+#line 6225 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 43663 "preproc.c"
+ break;
+
+ case 924: /* drop_type_name: SCHEMA */
+#line 6229 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 43671 "preproc.c"
+ break;
+
+ case 925: /* drop_type_name: SERVER */
+#line 6233 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 43679 "preproc.c"
+ break;
+
+ case 926: /* object_type_name_on_any_name: POLICY */
+#line 6241 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("policy");
+}
+#line 43687 "preproc.c"
+ break;
+
+ case 927: /* object_type_name_on_any_name: RULE */
+#line 6245 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rule");
+}
+#line 43695 "preproc.c"
+ break;
+
+ case 928: /* object_type_name_on_any_name: TRIGGER */
+#line 6249 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trigger");
+}
+#line 43703 "preproc.c"
+ break;
+
+ case 929: /* any_name_list: any_name */
+#line 6257 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43711 "preproc.c"
+ break;
+
+ case 930: /* any_name_list: any_name_list ',' any_name */
+#line 6261 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43719 "preproc.c"
+ break;
+
+ case 931: /* any_name: ColId */
+#line 6269 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43727 "preproc.c"
+ break;
+
+ case 932: /* any_name: ColId attrs */
+#line 6273 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43735 "preproc.c"
+ break;
+
+ case 933: /* attrs: '.' attr_name */
+#line 6281 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("."),(yyvsp[0].str));
+}
+#line 43743 "preproc.c"
+ break;
+
+ case 934: /* attrs: attrs '.' attr_name */
+#line 6285 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 43751 "preproc.c"
+ break;
+
+ case 935: /* type_name_list: Typename */
+#line 6293 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43759 "preproc.c"
+ break;
+
+ case 936: /* type_name_list: type_name_list ',' Typename */
+#line 6297 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43767 "preproc.c"
+ break;
+
+ case 937: /* TruncateStmt: TRUNCATE opt_table relation_expr_list opt_restart_seqs opt_drop_behavior */
+#line 6305 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("truncate"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43775 "preproc.c"
+ break;
+
+ case 938: /* opt_restart_seqs: CONTINUE_P IDENTITY_P */
+#line 6313 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("continue identity");
+}
+#line 43783 "preproc.c"
+ break;
+
+ case 939: /* opt_restart_seqs: RESTART IDENTITY_P */
+#line 6317 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restart identity");
+}
+#line 43791 "preproc.c"
+ break;
+
+ case 940: /* opt_restart_seqs: %empty */
+#line 6321 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 43798 "preproc.c"
+ break;
+
+ case 941: /* CommentStmt: COMMENT ON object_type_any_name any_name IS comment_text */
+#line 6328 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("comment on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43806 "preproc.c"
+ break;
+
+ case 942: /* CommentStmt: COMMENT ON COLUMN any_name IS comment_text */
+#line 6332 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on column"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43814 "preproc.c"
+ break;
+
+ case 943: /* CommentStmt: COMMENT ON object_type_name name IS comment_text */
+#line 6336 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("comment on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43822 "preproc.c"
+ break;
+
+ case 944: /* CommentStmt: COMMENT ON TYPE_P Typename IS comment_text */
+#line 6340 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on type"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43830 "preproc.c"
+ break;
+
+ case 945: /* CommentStmt: COMMENT ON DOMAIN_P Typename IS comment_text */
+#line 6344 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on domain"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43838 "preproc.c"
+ break;
+
+ case 946: /* CommentStmt: COMMENT ON AGGREGATE aggregate_with_argtypes IS comment_text */
+#line 6348 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on aggregate"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43846 "preproc.c"
+ break;
+
+ case 947: /* CommentStmt: COMMENT ON FUNCTION function_with_argtypes IS comment_text */
+#line 6352 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on function"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43854 "preproc.c"
+ break;
+
+ case 948: /* CommentStmt: COMMENT ON OPERATOR operator_with_argtypes IS comment_text */
+#line 6356 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on operator"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43862 "preproc.c"
+ break;
+
+ case 949: /* CommentStmt: COMMENT ON CONSTRAINT name ON any_name IS comment_text */
+#line 6360 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on constraint"),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43870 "preproc.c"
+ break;
+
+ case 950: /* CommentStmt: COMMENT ON CONSTRAINT name ON DOMAIN_P any_name IS comment_text */
+#line 6364 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on constraint"),(yyvsp[-5].str),mm_strdup("on domain"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43878 "preproc.c"
+ break;
+
+ case 951: /* CommentStmt: COMMENT ON object_type_name_on_any_name name ON any_name IS comment_text */
+#line 6368 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("comment on"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43886 "preproc.c"
+ break;
+
+ case 952: /* CommentStmt: COMMENT ON PROCEDURE function_with_argtypes IS comment_text */
+#line 6372 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on procedure"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43894 "preproc.c"
+ break;
+
+ case 953: /* CommentStmt: COMMENT ON ROUTINE function_with_argtypes IS comment_text */
+#line 6376 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on routine"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43902 "preproc.c"
+ break;
+
+ case 954: /* CommentStmt: COMMENT ON TRANSFORM FOR Typename LANGUAGE name IS comment_text */
+#line 6380 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on transform for"),(yyvsp[-4].str),mm_strdup("language"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43910 "preproc.c"
+ break;
+
+ case 955: /* CommentStmt: COMMENT ON OPERATOR CLASS any_name USING name IS comment_text */
+#line 6384 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on operator class"),(yyvsp[-4].str),mm_strdup("using"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43918 "preproc.c"
+ break;
+
+ case 956: /* CommentStmt: COMMENT ON OPERATOR FAMILY any_name USING name IS comment_text */
+#line 6388 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on operator family"),(yyvsp[-4].str),mm_strdup("using"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43926 "preproc.c"
+ break;
+
+ case 957: /* CommentStmt: COMMENT ON LARGE_P OBJECT_P NumericOnly IS comment_text */
+#line 6392 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on large object"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43934 "preproc.c"
+ break;
+
+ case 958: /* CommentStmt: COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text */
+#line 6396 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on cast ("),(yyvsp[-5].str),mm_strdup("as"),(yyvsp[-3].str),mm_strdup(") is"),(yyvsp[0].str));
+}
+#line 43942 "preproc.c"
+ break;
+
+ case 959: /* comment_text: ecpg_sconst */
+#line 6404 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43950 "preproc.c"
+ break;
+
+ case 960: /* comment_text: NULL_P */
+#line 6408 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 43958 "preproc.c"
+ break;
+
+ case 961: /* SecLabelStmt: SECURITY LABEL opt_provider ON object_type_any_name any_name IS security_label */
+#line 6416 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43966 "preproc.c"
+ break;
+
+ case 962: /* SecLabelStmt: SECURITY LABEL opt_provider ON COLUMN any_name IS security_label */
+#line 6420 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on column"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43974 "preproc.c"
+ break;
+
+ case 963: /* SecLabelStmt: SECURITY LABEL opt_provider ON object_type_name name IS security_label */
+#line 6424 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43982 "preproc.c"
+ break;
+
+ case 964: /* SecLabelStmt: SECURITY LABEL opt_provider ON TYPE_P Typename IS security_label */
+#line 6428 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on type"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43990 "preproc.c"
+ break;
+
+ case 965: /* SecLabelStmt: SECURITY LABEL opt_provider ON DOMAIN_P Typename IS security_label */
+#line 6432 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on domain"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 43998 "preproc.c"
+ break;
+
+ case 966: /* SecLabelStmt: SECURITY LABEL opt_provider ON AGGREGATE aggregate_with_argtypes IS security_label */
+#line 6436 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on aggregate"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 44006 "preproc.c"
+ break;
+
+ case 967: /* SecLabelStmt: SECURITY LABEL opt_provider ON FUNCTION function_with_argtypes IS security_label */
+#line 6440 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on function"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 44014 "preproc.c"
+ break;
+
+ case 968: /* SecLabelStmt: SECURITY LABEL opt_provider ON LARGE_P OBJECT_P NumericOnly IS security_label */
+#line 6444 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-6].str),mm_strdup("on large object"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 44022 "preproc.c"
+ break;
+
+ case 969: /* SecLabelStmt: SECURITY LABEL opt_provider ON PROCEDURE function_with_argtypes IS security_label */
+#line 6448 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on procedure"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 44030 "preproc.c"
+ break;
+
+ case 970: /* SecLabelStmt: SECURITY LABEL opt_provider ON ROUTINE function_with_argtypes IS security_label */
+#line 6452 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("security label"),(yyvsp[-5].str),mm_strdup("on routine"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 44038 "preproc.c"
+ break;
+
+ case 971: /* opt_provider: FOR NonReservedWord_or_Sconst */
+#line 6460 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for"),(yyvsp[0].str));
+}
+#line 44046 "preproc.c"
+ break;
+
+ case 972: /* opt_provider: %empty */
+#line 6464 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44053 "preproc.c"
+ break;
+
+ case 973: /* security_label: ecpg_sconst */
+#line 6471 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44061 "preproc.c"
+ break;
+
+ case 974: /* security_label: NULL_P */
+#line 6475 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 44069 "preproc.c"
+ break;
+
+ case 975: /* FetchStmt: FETCH fetch_args */
+#line 6483 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("fetch"),(yyvsp[0].str));
+}
+#line 44077 "preproc.c"
+ break;
+
+ case 976: /* FetchStmt: MOVE fetch_args */
+#line 6487 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("move"),(yyvsp[0].str));
+}
+#line 44085 "preproc.c"
+ break;
+
+ case 977: /* FetchStmt: FETCH fetch_args ecpg_fetch_into */
+#line 6491 "preproc.y"
+ {
+ (yyval.str) = cat2_str(mm_strdup("fetch"), (yyvsp[-1].str));
+ }
+#line 44093 "preproc.c"
+ break;
+
+ case 978: /* FetchStmt: FETCH FORWARD cursor_name opt_ecpg_fetch_into */
+#line 6495 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[-1].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("fetch forward"), cursor_marker);
+ }
+#line 44106 "preproc.c"
+ break;
+
+ case 979: /* FetchStmt: FETCH FORWARD from_in cursor_name opt_ecpg_fetch_into */
+#line 6504 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[-1].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("fetch forward from"), cursor_marker);
+ }
+#line 44119 "preproc.c"
+ break;
+
+ case 980: /* FetchStmt: FETCH BACKWARD cursor_name opt_ecpg_fetch_into */
+#line 6513 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[-1].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("fetch backward"), cursor_marker);
+ }
+#line 44132 "preproc.c"
+ break;
+
+ case 981: /* FetchStmt: FETCH BACKWARD from_in cursor_name opt_ecpg_fetch_into */
+#line 6522 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[-1].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+#line 44145 "preproc.c"
+ break;
+
+ case 982: /* FetchStmt: MOVE FORWARD cursor_name */
+#line 6531 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+#line 44158 "preproc.c"
+ break;
+
+ case 983: /* FetchStmt: MOVE FORWARD from_in cursor_name */
+#line 6540 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+#line 44171 "preproc.c"
+ break;
+
+ case 984: /* FetchStmt: MOVE BACKWARD cursor_name */
+#line 6549 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+#line 44184 "preproc.c"
+ break;
+
+ case 985: /* FetchStmt: MOVE BACKWARD from_in cursor_name */
+#line 6558 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ (yyval.str) = cat_str(2, mm_strdup("move backward from"), cursor_marker);
+ }
+#line 44197 "preproc.c"
+ break;
+
+ case 986: /* fetch_args: cursor_name */
+#line 6571 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44215 "preproc.c"
+ break;
+
+ case 987: /* fetch_args: from_in cursor_name */
+#line 6585 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44233 "preproc.c"
+ break;
+
+ case 988: /* fetch_args: NEXT opt_from_in cursor_name */
+#line 6599 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("next"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44251 "preproc.c"
+ break;
+
+ case 989: /* fetch_args: PRIOR opt_from_in cursor_name */
+#line 6613 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("prior"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44269 "preproc.c"
+ break;
+
+ case 990: /* fetch_args: FIRST_P opt_from_in cursor_name */
+#line 6627 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("first"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44287 "preproc.c"
+ break;
+
+ case 991: /* fetch_args: LAST_P opt_from_in cursor_name */
+#line 6641 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("last"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44305 "preproc.c"
+ break;
+
+ case 992: /* fetch_args: ABSOLUTE_P SignedIconst opt_from_in cursor_name */
+#line 6655 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+ if ((yyvsp[-2].str)[0] == '$')
+ {
+ free((yyvsp[-2].str));
+ (yyvsp[-2].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(4,mm_strdup("absolute"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44328 "preproc.c"
+ break;
+
+ case 993: /* fetch_args: RELATIVE_P SignedIconst opt_from_in cursor_name */
+#line 6674 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+ if ((yyvsp[-2].str)[0] == '$')
+ {
+ free((yyvsp[-2].str));
+ (yyvsp[-2].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(4,mm_strdup("relative"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44351 "preproc.c"
+ break;
+
+ case 994: /* fetch_args: SignedIconst opt_from_in cursor_name */
+#line 6693 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+ if ((yyvsp[-2].str)[0] == '$')
+ {
+ free((yyvsp[-2].str));
+ (yyvsp[-2].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44374 "preproc.c"
+ break;
+
+ case 995: /* fetch_args: ALL opt_from_in cursor_name */
+#line 6712 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44392 "preproc.c"
+ break;
+
+ case 996: /* fetch_args: FORWARD SignedIconst opt_from_in cursor_name */
+#line 6726 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+ if ((yyvsp[-2].str)[0] == '$')
+ {
+ free((yyvsp[-2].str));
+ (yyvsp[-2].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(4,mm_strdup("forward"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44415 "preproc.c"
+ break;
+
+ case 997: /* fetch_args: FORWARD ALL opt_from_in cursor_name */
+#line 6745 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("forward all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44433 "preproc.c"
+ break;
+
+ case 998: /* fetch_args: BACKWARD SignedIconst opt_from_in cursor_name */
+#line 6759 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+ if ((yyvsp[-2].str)[0] == '$')
+ {
+ free((yyvsp[-2].str));
+ (yyvsp[-2].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(4,mm_strdup("backward"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44456 "preproc.c"
+ break;
+
+ case 999: /* fetch_args: BACKWARD ALL opt_from_in cursor_name */
+#line 6778 "preproc.y"
+ {
+ struct cursor *ptr = add_additional_variables((yyvsp[0].str), false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = cat_str(3,mm_strdup("backward all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44474 "preproc.c"
+ break;
+
+ case 1000: /* from_in: FROM */
+#line 6796 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 44482 "preproc.c"
+ break;
+
+ case 1001: /* from_in: IN_P */
+#line 6800 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 44490 "preproc.c"
+ break;
+
+ case 1002: /* opt_from_in: from_in */
+#line 6808 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44498 "preproc.c"
+ break;
+
+ case 1003: /* opt_from_in: %empty */
+#line 6812 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44505 "preproc.c"
+ break;
+
+ case 1004: /* GrantStmt: GRANT privileges ON privilege_target TO grantee_list opt_grant_grant_option opt_granted_by */
+#line 6819 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("grant"),(yyvsp[-6].str),mm_strdup("on"),(yyvsp[-4].str),mm_strdup("to"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44513 "preproc.c"
+ break;
+
+ case 1005: /* RevokeStmt: REVOKE privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior */
+#line 6827 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("revoke"),(yyvsp[-6].str),mm_strdup("on"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44521 "preproc.c"
+ break;
+
+ case 1006: /* RevokeStmt: REVOKE GRANT OPTION FOR privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior */
+#line 6831 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("revoke grant option for"),(yyvsp[-6].str),mm_strdup("on"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44529 "preproc.c"
+ break;
+
+ case 1007: /* privileges: privilege_list */
+#line 6839 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44537 "preproc.c"
+ break;
+
+ case 1008: /* privileges: ALL */
+#line 6843 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 44545 "preproc.c"
+ break;
+
+ case 1009: /* privileges: ALL PRIVILEGES */
+#line 6847 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all privileges");
+}
+#line 44553 "preproc.c"
+ break;
+
+ case 1010: /* privileges: ALL '(' columnList ')' */
+#line 6851 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("all ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 44561 "preproc.c"
+ break;
+
+ case 1011: /* privileges: ALL PRIVILEGES '(' columnList ')' */
+#line 6855 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("all privileges ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 44569 "preproc.c"
+ break;
+
+ case 1012: /* privilege_list: privilege */
+#line 6863 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44577 "preproc.c"
+ break;
+
+ case 1013: /* privilege_list: privilege_list ',' privilege */
+#line 6867 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44585 "preproc.c"
+ break;
+
+ case 1014: /* privilege: SELECT opt_column_list */
+#line 6875 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("select"),(yyvsp[0].str));
+}
+#line 44593 "preproc.c"
+ break;
+
+ case 1015: /* privilege: REFERENCES opt_column_list */
+#line 6879 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("references"),(yyvsp[0].str));
+}
+#line 44601 "preproc.c"
+ break;
+
+ case 1016: /* privilege: CREATE opt_column_list */
+#line 6883 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("create"),(yyvsp[0].str));
+}
+#line 44609 "preproc.c"
+ break;
+
+ case 1017: /* privilege: ColId opt_column_list */
+#line 6887 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44617 "preproc.c"
+ break;
+
+ case 1018: /* privilege_target: qualified_name_list */
+#line 6895 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44625 "preproc.c"
+ break;
+
+ case 1019: /* privilege_target: TABLE qualified_name_list */
+#line 6899 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 44633 "preproc.c"
+ break;
+
+ case 1020: /* privilege_target: SEQUENCE qualified_name_list */
+#line 6903 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sequence"),(yyvsp[0].str));
+}
+#line 44641 "preproc.c"
+ break;
+
+ case 1021: /* privilege_target: FOREIGN DATA_P WRAPPER name_list */
+#line 6907 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("foreign data wrapper"),(yyvsp[0].str));
+}
+#line 44649 "preproc.c"
+ break;
+
+ case 1022: /* privilege_target: FOREIGN SERVER name_list */
+#line 6911 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("foreign server"),(yyvsp[0].str));
+}
+#line 44657 "preproc.c"
+ break;
+
+ case 1023: /* privilege_target: FUNCTION function_with_argtypes_list */
+#line 6915 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("function"),(yyvsp[0].str));
+}
+#line 44665 "preproc.c"
+ break;
+
+ case 1024: /* privilege_target: PROCEDURE function_with_argtypes_list */
+#line 6919 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("procedure"),(yyvsp[0].str));
+}
+#line 44673 "preproc.c"
+ break;
+
+ case 1025: /* privilege_target: ROUTINE function_with_argtypes_list */
+#line 6923 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("routine"),(yyvsp[0].str));
+}
+#line 44681 "preproc.c"
+ break;
+
+ case 1026: /* privilege_target: DATABASE name_list */
+#line 6927 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("database"),(yyvsp[0].str));
+}
+#line 44689 "preproc.c"
+ break;
+
+ case 1027: /* privilege_target: DOMAIN_P any_name_list */
+#line 6931 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("domain"),(yyvsp[0].str));
+}
+#line 44697 "preproc.c"
+ break;
+
+ case 1028: /* privilege_target: LANGUAGE name_list */
+#line 6935 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 44705 "preproc.c"
+ break;
+
+ case 1029: /* privilege_target: LARGE_P OBJECT_P NumericOnly_list */
+#line 6939 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("large object"),(yyvsp[0].str));
+}
+#line 44713 "preproc.c"
+ break;
+
+ case 1030: /* privilege_target: SCHEMA name_list */
+#line 6943 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 44721 "preproc.c"
+ break;
+
+ case 1031: /* privilege_target: TABLESPACE name_list */
+#line 6947 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("tablespace"),(yyvsp[0].str));
+}
+#line 44729 "preproc.c"
+ break;
+
+ case 1032: /* privilege_target: TYPE_P any_name_list */
+#line 6951 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("type"),(yyvsp[0].str));
+}
+#line 44737 "preproc.c"
+ break;
+
+ case 1033: /* privilege_target: ALL TABLES IN_P SCHEMA name_list */
+#line 6955 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all tables in schema"),(yyvsp[0].str));
+}
+#line 44745 "preproc.c"
+ break;
+
+ case 1034: /* privilege_target: ALL SEQUENCES IN_P SCHEMA name_list */
+#line 6959 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all sequences in schema"),(yyvsp[0].str));
+}
+#line 44753 "preproc.c"
+ break;
+
+ case 1035: /* privilege_target: ALL FUNCTIONS IN_P SCHEMA name_list */
+#line 6963 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all functions in schema"),(yyvsp[0].str));
+}
+#line 44761 "preproc.c"
+ break;
+
+ case 1036: /* privilege_target: ALL PROCEDURES IN_P SCHEMA name_list */
+#line 6967 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all procedures in schema"),(yyvsp[0].str));
+}
+#line 44769 "preproc.c"
+ break;
+
+ case 1037: /* privilege_target: ALL ROUTINES IN_P SCHEMA name_list */
+#line 6971 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all routines in schema"),(yyvsp[0].str));
+}
+#line 44777 "preproc.c"
+ break;
+
+ case 1038: /* grantee_list: grantee */
+#line 6979 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44785 "preproc.c"
+ break;
+
+ case 1039: /* grantee_list: grantee_list ',' grantee */
+#line 6983 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44793 "preproc.c"
+ break;
+
+ case 1040: /* grantee: RoleSpec */
+#line 6991 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44801 "preproc.c"
+ break;
+
+ case 1041: /* grantee: GROUP_P RoleSpec */
+#line 6995 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("group"),(yyvsp[0].str));
+}
+#line 44809 "preproc.c"
+ break;
+
+ case 1042: /* opt_grant_grant_option: WITH GRANT OPTION */
+#line 7003 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with grant option");
+}
+#line 44817 "preproc.c"
+ break;
+
+ case 1043: /* opt_grant_grant_option: %empty */
+#line 7007 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44824 "preproc.c"
+ break;
+
+ case 1044: /* GrantRoleStmt: GRANT privilege_list TO role_list opt_grant_admin_option opt_granted_by */
+#line 7014 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("grant"),(yyvsp[-4].str),mm_strdup("to"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44832 "preproc.c"
+ break;
+
+ case 1045: /* RevokeRoleStmt: REVOKE privilege_list FROM role_list opt_granted_by opt_drop_behavior */
+#line 7022 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("revoke"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44840 "preproc.c"
+ break;
+
+ case 1046: /* RevokeRoleStmt: REVOKE ADMIN OPTION FOR privilege_list FROM role_list opt_granted_by opt_drop_behavior */
+#line 7026 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("revoke admin option for"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44848 "preproc.c"
+ break;
+
+ case 1047: /* opt_grant_admin_option: WITH ADMIN OPTION */
+#line 7034 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with admin option");
+}
+#line 44856 "preproc.c"
+ break;
+
+ case 1048: /* opt_grant_admin_option: %empty */
+#line 7038 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44863 "preproc.c"
+ break;
+
+ case 1049: /* opt_granted_by: GRANTED BY RoleSpec */
+#line 7045 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("granted by"),(yyvsp[0].str));
+}
+#line 44871 "preproc.c"
+ break;
+
+ case 1050: /* opt_granted_by: %empty */
+#line 7049 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44878 "preproc.c"
+ break;
+
+ case 1051: /* AlterDefaultPrivilegesStmt: ALTER DEFAULT PRIVILEGES DefACLOptionList DefACLAction */
+#line 7056 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter default privileges"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44886 "preproc.c"
+ break;
+
+ case 1052: /* DefACLOptionList: DefACLOptionList DefACLOption */
+#line 7064 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44894 "preproc.c"
+ break;
+
+ case 1053: /* DefACLOptionList: %empty */
+#line 7068 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 44901 "preproc.c"
+ break;
+
+ case 1054: /* DefACLOption: IN_P SCHEMA name_list */
+#line 7075 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in schema"),(yyvsp[0].str));
+}
+#line 44909 "preproc.c"
+ break;
+
+ case 1055: /* DefACLOption: FOR ROLE role_list */
+#line 7079 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for role"),(yyvsp[0].str));
+}
+#line 44917 "preproc.c"
+ break;
+
+ case 1056: /* DefACLOption: FOR USER role_list */
+#line 7083 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for user"),(yyvsp[0].str));
+}
+#line 44925 "preproc.c"
+ break;
+
+ case 1057: /* DefACLAction: GRANT privileges ON defacl_privilege_target TO grantee_list opt_grant_grant_option */
+#line 7091 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("grant"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("to"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44933 "preproc.c"
+ break;
+
+ case 1058: /* DefACLAction: REVOKE privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior */
+#line 7095 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("revoke"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("from"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44941 "preproc.c"
+ break;
+
+ case 1059: /* DefACLAction: REVOKE GRANT OPTION FOR privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior */
+#line 7099 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("revoke grant option for"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("from"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44949 "preproc.c"
+ break;
+
+ case 1060: /* defacl_privilege_target: TABLES */
+#line 7107 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tables");
+}
+#line 44957 "preproc.c"
+ break;
+
+ case 1061: /* defacl_privilege_target: FUNCTIONS */
+#line 7111 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("functions");
+}
+#line 44965 "preproc.c"
+ break;
+
+ case 1062: /* defacl_privilege_target: ROUTINES */
+#line 7115 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("routines");
+}
+#line 44973 "preproc.c"
+ break;
+
+ case 1063: /* defacl_privilege_target: SEQUENCES */
+#line 7119 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequences");
+}
+#line 44981 "preproc.c"
+ break;
+
+ case 1064: /* defacl_privilege_target: TYPES_P */
+#line 7123 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("types");
+}
+#line 44989 "preproc.c"
+ break;
+
+ case 1065: /* defacl_privilege_target: SCHEMAS */
+#line 7127 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schemas");
+}
+#line 44997 "preproc.c"
+ break;
+
+ case 1066: /* IndexStmt: CREATE opt_unique INDEX opt_concurrently opt_index_name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause */
+#line 7135 "preproc.y"
+ {
+ (yyval.str) = cat_str(15,mm_strdup("create"),(yyvsp[-13].str),mm_strdup("index"),(yyvsp[-11].str),(yyvsp[-10].str),mm_strdup("on"),(yyvsp[-8].str),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45005 "preproc.c"
+ break;
+
+ case 1067: /* IndexStmt: CREATE opt_unique INDEX opt_concurrently IF_P NOT EXISTS name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause */
+#line 7139 "preproc.y"
+ {
+ (yyval.str) = cat_str(16,mm_strdup("create"),(yyvsp[-16].str),mm_strdup("index"),(yyvsp[-14].str),mm_strdup("if not exists"),(yyvsp[-10].str),mm_strdup("on"),(yyvsp[-8].str),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45013 "preproc.c"
+ break;
+
+ case 1068: /* opt_unique: UNIQUE */
+#line 7147 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unique");
+}
+#line 45021 "preproc.c"
+ break;
+
+ case 1069: /* opt_unique: %empty */
+#line 7151 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45028 "preproc.c"
+ break;
+
+ case 1070: /* opt_concurrently: CONCURRENTLY */
+#line 7158 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("concurrently");
+}
+#line 45036 "preproc.c"
+ break;
+
+ case 1071: /* opt_concurrently: %empty */
+#line 7162 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45043 "preproc.c"
+ break;
+
+ case 1072: /* opt_index_name: name */
+#line 7169 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45051 "preproc.c"
+ break;
+
+ case 1073: /* opt_index_name: %empty */
+#line 7173 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45058 "preproc.c"
+ break;
+
+ case 1074: /* access_method_clause: USING name */
+#line 7180 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 45066 "preproc.c"
+ break;
+
+ case 1075: /* access_method_clause: %empty */
+#line 7184 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45073 "preproc.c"
+ break;
+
+ case 1076: /* index_params: index_elem */
+#line 7191 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45081 "preproc.c"
+ break;
+
+ case 1077: /* index_params: index_params ',' index_elem */
+#line 7195 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45089 "preproc.c"
+ break;
+
+ case 1078: /* index_elem_options: opt_collate opt_class opt_asc_desc opt_nulls_order */
+#line 7203 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45097 "preproc.c"
+ break;
+
+ case 1079: /* index_elem_options: opt_collate any_name reloptions opt_asc_desc opt_nulls_order */
+#line 7207 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45105 "preproc.c"
+ break;
+
+ case 1080: /* index_elem: ColId index_elem_options */
+#line 7215 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45113 "preproc.c"
+ break;
+
+ case 1081: /* index_elem: func_expr_windowless index_elem_options */
+#line 7219 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45121 "preproc.c"
+ break;
+
+ case 1082: /* index_elem: '(' a_expr ')' index_elem_options */
+#line 7223 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 45129 "preproc.c"
+ break;
+
+ case 1083: /* opt_include: INCLUDE '(' index_including_params ')' */
+#line 7231 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("include ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45137 "preproc.c"
+ break;
+
+ case 1084: /* opt_include: %empty */
+#line 7235 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45144 "preproc.c"
+ break;
+
+ case 1085: /* index_including_params: index_elem */
+#line 7242 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45152 "preproc.c"
+ break;
+
+ case 1086: /* index_including_params: index_including_params ',' index_elem */
+#line 7246 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45160 "preproc.c"
+ break;
+
+ case 1087: /* opt_collate: COLLATE any_name */
+#line 7254 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 45168 "preproc.c"
+ break;
+
+ case 1088: /* opt_collate: %empty */
+#line 7258 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45175 "preproc.c"
+ break;
+
+ case 1089: /* opt_class: any_name */
+#line 7265 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45183 "preproc.c"
+ break;
+
+ case 1090: /* opt_class: %empty */
+#line 7269 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45190 "preproc.c"
+ break;
+
+ case 1091: /* opt_asc_desc: ASC */
+#line 7276 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asc");
+}
+#line 45198 "preproc.c"
+ break;
+
+ case 1092: /* opt_asc_desc: DESC */
+#line 7280 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("desc");
+}
+#line 45206 "preproc.c"
+ break;
+
+ case 1093: /* opt_asc_desc: %empty */
+#line 7284 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45213 "preproc.c"
+ break;
+
+ case 1094: /* opt_nulls_order: NULLS_LA FIRST_P */
+#line 7291 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nulls first");
+}
+#line 45221 "preproc.c"
+ break;
+
+ case 1095: /* opt_nulls_order: NULLS_LA LAST_P */
+#line 7295 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nulls last");
+}
+#line 45229 "preproc.c"
+ break;
+
+ case 1096: /* opt_nulls_order: %empty */
+#line 7299 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45236 "preproc.c"
+ break;
+
+ case 1097: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS func_return opt_createfunc_opt_list opt_routine_body */
+#line 7306 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create"),(yyvsp[-7].str),mm_strdup("function"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("returns"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45244 "preproc.c"
+ break;
+
+ case 1098: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS TABLE '(' table_func_column_list ')' opt_createfunc_opt_list opt_routine_body */
+#line 7310 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("create"),(yyvsp[-10].str),mm_strdup("function"),(yyvsp[-8].str),(yyvsp[-7].str),mm_strdup("returns table ("),(yyvsp[-3].str),mm_strdup(")"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45252 "preproc.c"
+ break;
+
+ case 1099: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body */
+#line 7314 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create"),(yyvsp[-5].str),mm_strdup("function"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45260 "preproc.c"
+ break;
+
+ case 1100: /* CreateFunctionStmt: CREATE opt_or_replace PROCEDURE func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body */
+#line 7318 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create"),(yyvsp[-5].str),mm_strdup("procedure"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45268 "preproc.c"
+ break;
+
+ case 1101: /* opt_or_replace: OR REPLACE */
+#line 7326 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("or replace");
+}
+#line 45276 "preproc.c"
+ break;
+
+ case 1102: /* opt_or_replace: %empty */
+#line 7330 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45283 "preproc.c"
+ break;
+
+ case 1103: /* func_args: '(' func_args_list ')' */
+#line 7337 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45291 "preproc.c"
+ break;
+
+ case 1104: /* func_args: '(' ')' */
+#line 7341 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 45299 "preproc.c"
+ break;
+
+ case 1105: /* func_args_list: func_arg */
+#line 7349 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45307 "preproc.c"
+ break;
+
+ case 1106: /* func_args_list: func_args_list ',' func_arg */
+#line 7353 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45315 "preproc.c"
+ break;
+
+ case 1107: /* function_with_argtypes_list: function_with_argtypes */
+#line 7361 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45323 "preproc.c"
+ break;
+
+ case 1108: /* function_with_argtypes_list: function_with_argtypes_list ',' function_with_argtypes */
+#line 7365 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45331 "preproc.c"
+ break;
+
+ case 1109: /* function_with_argtypes: func_name func_args */
+#line 7373 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45339 "preproc.c"
+ break;
+
+ case 1110: /* function_with_argtypes: type_func_name_keyword */
+#line 7377 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45347 "preproc.c"
+ break;
+
+ case 1111: /* function_with_argtypes: ColId */
+#line 7381 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45355 "preproc.c"
+ break;
+
+ case 1112: /* function_with_argtypes: ColId indirection */
+#line 7385 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45363 "preproc.c"
+ break;
+
+ case 1113: /* func_args_with_defaults: '(' func_args_with_defaults_list ')' */
+#line 7393 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45371 "preproc.c"
+ break;
+
+ case 1114: /* func_args_with_defaults: '(' ')' */
+#line 7397 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 45379 "preproc.c"
+ break;
+
+ case 1115: /* func_args_with_defaults_list: func_arg_with_default */
+#line 7405 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45387 "preproc.c"
+ break;
+
+ case 1116: /* func_args_with_defaults_list: func_args_with_defaults_list ',' func_arg_with_default */
+#line 7409 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45395 "preproc.c"
+ break;
+
+ case 1117: /* func_arg: arg_class param_name func_type */
+#line 7417 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45403 "preproc.c"
+ break;
+
+ case 1118: /* func_arg: param_name arg_class func_type */
+#line 7421 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45411 "preproc.c"
+ break;
+
+ case 1119: /* func_arg: param_name func_type */
+#line 7425 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45419 "preproc.c"
+ break;
+
+ case 1120: /* func_arg: arg_class func_type */
+#line 7429 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45427 "preproc.c"
+ break;
+
+ case 1121: /* func_arg: func_type */
+#line 7433 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45435 "preproc.c"
+ break;
+
+ case 1122: /* arg_class: IN_P */
+#line 7441 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 45443 "preproc.c"
+ break;
+
+ case 1123: /* arg_class: OUT_P */
+#line 7445 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("out");
+}
+#line 45451 "preproc.c"
+ break;
+
+ case 1124: /* arg_class: INOUT */
+#line 7449 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inout");
+}
+#line 45459 "preproc.c"
+ break;
+
+ case 1125: /* arg_class: IN_P OUT_P */
+#line 7453 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("in out");
+}
+#line 45467 "preproc.c"
+ break;
+
+ case 1126: /* arg_class: VARIADIC */
+#line 7457 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("variadic");
+}
+#line 45475 "preproc.c"
+ break;
+
+ case 1127: /* param_name: type_function_name */
+#line 7465 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45483 "preproc.c"
+ break;
+
+ case 1128: /* func_return: func_type */
+#line 7473 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45491 "preproc.c"
+ break;
+
+ case 1129: /* func_type: Typename */
+#line 7481 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45499 "preproc.c"
+ break;
+
+ case 1130: /* func_type: type_function_name attrs '%' TYPE_P */
+#line 7485 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("% type"));
+}
+#line 45507 "preproc.c"
+ break;
+
+ case 1131: /* func_type: SETOF type_function_name attrs '%' TYPE_P */
+#line 7489 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("setof"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("% type"));
+}
+#line 45515 "preproc.c"
+ break;
+
+ case 1132: /* func_arg_with_default: func_arg */
+#line 7497 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45523 "preproc.c"
+ break;
+
+ case 1133: /* func_arg_with_default: func_arg DEFAULT a_expr */
+#line 7501 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("default"),(yyvsp[0].str));
+}
+#line 45531 "preproc.c"
+ break;
+
+ case 1134: /* func_arg_with_default: func_arg '=' a_expr */
+#line 7505 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 45539 "preproc.c"
+ break;
+
+ case 1135: /* aggr_arg: func_arg */
+#line 7513 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45548 "preproc.c"
+ break;
+
+ case 1136: /* aggr_args: '(' '*' ')' */
+#line 7522 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("( * )");
+}
+#line 45556 "preproc.c"
+ break;
+
+ case 1137: /* aggr_args: '(' aggr_args_list ')' */
+#line 7526 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45564 "preproc.c"
+ break;
+
+ case 1138: /* aggr_args: '(' ORDER BY aggr_args_list ')' */
+#line 7530 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("( order by"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45572 "preproc.c"
+ break;
+
+ case 1139: /* aggr_args: '(' aggr_args_list ORDER BY aggr_args_list ')' */
+#line 7534 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-4].str),mm_strdup("order by"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45580 "preproc.c"
+ break;
+
+ case 1140: /* aggr_args_list: aggr_arg */
+#line 7542 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45588 "preproc.c"
+ break;
+
+ case 1141: /* aggr_args_list: aggr_args_list ',' aggr_arg */
+#line 7546 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45596 "preproc.c"
+ break;
+
+ case 1142: /* aggregate_with_argtypes: func_name aggr_args */
+#line 7554 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45604 "preproc.c"
+ break;
+
+ case 1143: /* aggregate_with_argtypes_list: aggregate_with_argtypes */
+#line 7562 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45612 "preproc.c"
+ break;
+
+ case 1144: /* aggregate_with_argtypes_list: aggregate_with_argtypes_list ',' aggregate_with_argtypes */
+#line 7566 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45620 "preproc.c"
+ break;
+
+ case 1145: /* opt_createfunc_opt_list: createfunc_opt_list */
+#line 7574 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45628 "preproc.c"
+ break;
+
+ case 1146: /* opt_createfunc_opt_list: %empty */
+#line 7578 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45635 "preproc.c"
+ break;
+
+ case 1147: /* createfunc_opt_list: createfunc_opt_item */
+#line 7585 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45643 "preproc.c"
+ break;
+
+ case 1148: /* createfunc_opt_list: createfunc_opt_list createfunc_opt_item */
+#line 7589 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45651 "preproc.c"
+ break;
+
+ case 1149: /* common_func_opt_item: CALLED ON NULL_P INPUT_P */
+#line 7597 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("called on null input");
+}
+#line 45659 "preproc.c"
+ break;
+
+ case 1150: /* common_func_opt_item: RETURNS NULL_P ON NULL_P INPUT_P */
+#line 7601 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("returns null on null input");
+}
+#line 45667 "preproc.c"
+ break;
+
+ case 1151: /* common_func_opt_item: STRICT_P */
+#line 7605 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strict");
+}
+#line 45675 "preproc.c"
+ break;
+
+ case 1152: /* common_func_opt_item: IMMUTABLE */
+#line 7609 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immutable");
+}
+#line 45683 "preproc.c"
+ break;
+
+ case 1153: /* common_func_opt_item: STABLE */
+#line 7613 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stable");
+}
+#line 45691 "preproc.c"
+ break;
+
+ case 1154: /* common_func_opt_item: VOLATILE */
+#line 7617 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("volatile");
+}
+#line 45699 "preproc.c"
+ break;
+
+ case 1155: /* common_func_opt_item: EXTERNAL SECURITY DEFINER */
+#line 7621 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("external security definer");
+}
+#line 45707 "preproc.c"
+ break;
+
+ case 1156: /* common_func_opt_item: EXTERNAL SECURITY INVOKER */
+#line 7625 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("external security invoker");
+}
+#line 45715 "preproc.c"
+ break;
+
+ case 1157: /* common_func_opt_item: SECURITY DEFINER */
+#line 7629 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("security definer");
+}
+#line 45723 "preproc.c"
+ break;
+
+ case 1158: /* common_func_opt_item: SECURITY INVOKER */
+#line 7633 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("security invoker");
+}
+#line 45731 "preproc.c"
+ break;
+
+ case 1159: /* common_func_opt_item: LEAKPROOF */
+#line 7637 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("leakproof");
+}
+#line 45739 "preproc.c"
+ break;
+
+ case 1160: /* common_func_opt_item: NOT LEAKPROOF */
+#line 7641 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not leakproof");
+}
+#line 45747 "preproc.c"
+ break;
+
+ case 1161: /* common_func_opt_item: COST NumericOnly */
+#line 7645 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cost"),(yyvsp[0].str));
+}
+#line 45755 "preproc.c"
+ break;
+
+ case 1162: /* common_func_opt_item: ROWS NumericOnly */
+#line 7649 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("rows"),(yyvsp[0].str));
+}
+#line 45763 "preproc.c"
+ break;
+
+ case 1163: /* common_func_opt_item: SUPPORT any_name */
+#line 7653 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("support"),(yyvsp[0].str));
+}
+#line 45771 "preproc.c"
+ break;
+
+ case 1164: /* common_func_opt_item: FunctionSetResetClause */
+#line 7657 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45779 "preproc.c"
+ break;
+
+ case 1165: /* common_func_opt_item: PARALLEL ColId */
+#line 7661 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("parallel"),(yyvsp[0].str));
+}
+#line 45787 "preproc.c"
+ break;
+
+ case 1166: /* createfunc_opt_item: AS func_as */
+#line 7669 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 45795 "preproc.c"
+ break;
+
+ case 1167: /* createfunc_opt_item: LANGUAGE NonReservedWord_or_Sconst */
+#line 7673 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 45803 "preproc.c"
+ break;
+
+ case 1168: /* createfunc_opt_item: TRANSFORM transform_type_list */
+#line 7677 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transform"),(yyvsp[0].str));
+}
+#line 45811 "preproc.c"
+ break;
+
+ case 1169: /* createfunc_opt_item: WINDOW */
+#line 7681 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("window");
+}
+#line 45819 "preproc.c"
+ break;
+
+ case 1170: /* createfunc_opt_item: common_func_opt_item */
+#line 7685 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45827 "preproc.c"
+ break;
+
+ case 1171: /* func_as: ecpg_sconst */
+#line 7693 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45835 "preproc.c"
+ break;
+
+ case 1172: /* func_as: ecpg_sconst ',' ecpg_sconst */
+#line 7697 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45843 "preproc.c"
+ break;
+
+ case 1173: /* ReturnStmt: RETURN a_expr */
+#line 7705 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("return"),(yyvsp[0].str));
+}
+#line 45851 "preproc.c"
+ break;
+
+ case 1174: /* opt_routine_body: ReturnStmt */
+#line 7713 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45859 "preproc.c"
+ break;
+
+ case 1175: /* opt_routine_body: BEGIN_P ATOMIC routine_body_stmt_list END_P */
+#line 7717 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("begin atomic"),(yyvsp[-1].str),mm_strdup("end"));
+}
+#line 45867 "preproc.c"
+ break;
+
+ case 1176: /* opt_routine_body: %empty */
+#line 7721 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45874 "preproc.c"
+ break;
+
+ case 1177: /* routine_body_stmt_list: routine_body_stmt_list routine_body_stmt ';' */
+#line 7728 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(";"));
+}
+#line 45882 "preproc.c"
+ break;
+
+ case 1178: /* routine_body_stmt_list: %empty */
+#line 7732 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45889 "preproc.c"
+ break;
+
+ case 1179: /* routine_body_stmt: stmt */
+#line 7739 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45897 "preproc.c"
+ break;
+
+ case 1180: /* routine_body_stmt: ReturnStmt */
+#line 7743 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45905 "preproc.c"
+ break;
+
+ case 1181: /* transform_type_list: FOR TYPE_P Typename */
+#line 7751 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for type"),(yyvsp[0].str));
+}
+#line 45913 "preproc.c"
+ break;
+
+ case 1182: /* transform_type_list: transform_type_list ',' FOR TYPE_P Typename */
+#line 7755 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup(", for type"),(yyvsp[0].str));
+}
+#line 45921 "preproc.c"
+ break;
+
+ case 1183: /* opt_definition: WITH definition */
+#line 7763 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 45929 "preproc.c"
+ break;
+
+ case 1184: /* opt_definition: %empty */
+#line 7767 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 45936 "preproc.c"
+ break;
+
+ case 1185: /* table_func_column: param_name func_type */
+#line 7774 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45944 "preproc.c"
+ break;
+
+ case 1186: /* table_func_column_list: table_func_column */
+#line 7782 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45952 "preproc.c"
+ break;
+
+ case 1187: /* table_func_column_list: table_func_column_list ',' table_func_column */
+#line 7786 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45960 "preproc.c"
+ break;
+
+ case 1188: /* AlterFunctionStmt: ALTER FUNCTION function_with_argtypes alterfunc_opt_list opt_restrict */
+#line 7794 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45968 "preproc.c"
+ break;
+
+ case 1189: /* AlterFunctionStmt: ALTER PROCEDURE function_with_argtypes alterfunc_opt_list opt_restrict */
+#line 7798 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45976 "preproc.c"
+ break;
+
+ case 1190: /* AlterFunctionStmt: ALTER ROUTINE function_with_argtypes alterfunc_opt_list opt_restrict */
+#line 7802 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45984 "preproc.c"
+ break;
+
+ case 1191: /* alterfunc_opt_list: common_func_opt_item */
+#line 7810 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45992 "preproc.c"
+ break;
+
+ case 1192: /* alterfunc_opt_list: alterfunc_opt_list common_func_opt_item */
+#line 7814 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46000 "preproc.c"
+ break;
+
+ case 1193: /* opt_restrict: RESTRICT */
+#line 7822 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 46008 "preproc.c"
+ break;
+
+ case 1194: /* opt_restrict: %empty */
+#line 7826 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46015 "preproc.c"
+ break;
+
+ case 1195: /* RemoveFuncStmt: DROP FUNCTION function_with_argtypes_list opt_drop_behavior */
+#line 7833 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop function"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46023 "preproc.c"
+ break;
+
+ case 1196: /* RemoveFuncStmt: DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior */
+#line 7837 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop function if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46031 "preproc.c"
+ break;
+
+ case 1197: /* RemoveFuncStmt: DROP PROCEDURE function_with_argtypes_list opt_drop_behavior */
+#line 7841 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop procedure"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46039 "preproc.c"
+ break;
+
+ case 1198: /* RemoveFuncStmt: DROP PROCEDURE IF_P EXISTS function_with_argtypes_list opt_drop_behavior */
+#line 7845 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop procedure if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46047 "preproc.c"
+ break;
+
+ case 1199: /* RemoveFuncStmt: DROP ROUTINE function_with_argtypes_list opt_drop_behavior */
+#line 7849 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop routine"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46055 "preproc.c"
+ break;
+
+ case 1200: /* RemoveFuncStmt: DROP ROUTINE IF_P EXISTS function_with_argtypes_list opt_drop_behavior */
+#line 7853 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop routine if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46063 "preproc.c"
+ break;
+
+ case 1201: /* RemoveAggrStmt: DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior */
+#line 7861 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop aggregate"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46071 "preproc.c"
+ break;
+
+ case 1202: /* RemoveAggrStmt: DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior */
+#line 7865 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop aggregate if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46079 "preproc.c"
+ break;
+
+ case 1203: /* RemoveOperStmt: DROP OPERATOR operator_with_argtypes_list opt_drop_behavior */
+#line 7873 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop operator"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46087 "preproc.c"
+ break;
+
+ case 1204: /* RemoveOperStmt: DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior */
+#line 7877 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop operator if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46095 "preproc.c"
+ break;
+
+ case 1205: /* oper_argtypes: '(' Typename ')' */
+#line 7885 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 46103 "preproc.c"
+ break;
+
+ case 1206: /* oper_argtypes: '(' Typename ',' Typename ')' */
+#line 7889 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 46111 "preproc.c"
+ break;
+
+ case 1207: /* oper_argtypes: '(' NONE ',' Typename ')' */
+#line 7893 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("( none ,"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 46119 "preproc.c"
+ break;
+
+ case 1208: /* oper_argtypes: '(' Typename ',' NONE ')' */
+#line 7897 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-3].str),mm_strdup(", none )"));
+}
+#line 46127 "preproc.c"
+ break;
+
+ case 1209: /* any_operator: all_Op */
+#line 7905 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46135 "preproc.c"
+ break;
+
+ case 1210: /* any_operator: ColId '.' any_operator */
+#line 7909 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 46143 "preproc.c"
+ break;
+
+ case 1211: /* operator_with_argtypes_list: operator_with_argtypes */
+#line 7917 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46151 "preproc.c"
+ break;
+
+ case 1212: /* operator_with_argtypes_list: operator_with_argtypes_list ',' operator_with_argtypes */
+#line 7921 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 46159 "preproc.c"
+ break;
+
+ case 1213: /* operator_with_argtypes: any_operator oper_argtypes */
+#line 7929 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46167 "preproc.c"
+ break;
+
+ case 1214: /* DoStmt: DO dostmt_opt_list */
+#line 7937 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("do"),(yyvsp[0].str));
+}
+#line 46175 "preproc.c"
+ break;
+
+ case 1215: /* dostmt_opt_list: dostmt_opt_item */
+#line 7945 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46183 "preproc.c"
+ break;
+
+ case 1216: /* dostmt_opt_list: dostmt_opt_list dostmt_opt_item */
+#line 7949 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46191 "preproc.c"
+ break;
+
+ case 1217: /* dostmt_opt_item: ecpg_sconst */
+#line 7957 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46199 "preproc.c"
+ break;
+
+ case 1218: /* dostmt_opt_item: LANGUAGE NonReservedWord_or_Sconst */
+#line 7961 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 46207 "preproc.c"
+ break;
+
+ case 1219: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITH FUNCTION function_with_argtypes cast_context */
+#line 7969 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create cast ("),(yyvsp[-7].str),mm_strdup("as"),(yyvsp[-5].str),mm_strdup(") with function"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46215 "preproc.c"
+ break;
+
+ case 1220: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITHOUT FUNCTION cast_context */
+#line 7973 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create cast ("),(yyvsp[-6].str),mm_strdup("as"),(yyvsp[-4].str),mm_strdup(") without function"),(yyvsp[0].str));
+}
+#line 46223 "preproc.c"
+ break;
+
+ case 1221: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITH INOUT cast_context */
+#line 7977 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create cast ("),(yyvsp[-6].str),mm_strdup("as"),(yyvsp[-4].str),mm_strdup(") with inout"),(yyvsp[0].str));
+}
+#line 46231 "preproc.c"
+ break;
+
+ case 1222: /* cast_context: AS IMPLICIT_P */
+#line 7985 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("as implicit");
+}
+#line 46239 "preproc.c"
+ break;
+
+ case 1223: /* cast_context: AS ASSIGNMENT */
+#line 7989 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("as assignment");
+}
+#line 46247 "preproc.c"
+ break;
+
+ case 1224: /* cast_context: %empty */
+#line 7993 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46254 "preproc.c"
+ break;
+
+ case 1225: /* DropCastStmt: DROP CAST opt_if_exists '(' Typename AS Typename ')' opt_drop_behavior */
+#line 8000 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("drop cast"),(yyvsp[-6].str),mm_strdup("("),(yyvsp[-4].str),mm_strdup("as"),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 46262 "preproc.c"
+ break;
+
+ case 1226: /* opt_if_exists: IF_P EXISTS */
+#line 8008 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("if exists");
+}
+#line 46270 "preproc.c"
+ break;
+
+ case 1227: /* opt_if_exists: %empty */
+#line 8012 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46277 "preproc.c"
+ break;
+
+ case 1228: /* CreateTransformStmt: CREATE opt_or_replace TRANSFORM FOR Typename LANGUAGE name '(' transform_element_list ')' */
+#line 8019 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create"),(yyvsp[-8].str),mm_strdup("transform for"),(yyvsp[-5].str),mm_strdup("language"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 46285 "preproc.c"
+ break;
+
+ case 1229: /* transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes */
+#line 8027 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("from sql with function"),(yyvsp[-6].str),mm_strdup(", to sql with function"),(yyvsp[0].str));
+}
+#line 46293 "preproc.c"
+ break;
+
+ case 1230: /* transform_element_list: TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes */
+#line 8031 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("to sql with function"),(yyvsp[-6].str),mm_strdup(", from sql with function"),(yyvsp[0].str));
+}
+#line 46301 "preproc.c"
+ break;
+
+ case 1231: /* transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes */
+#line 8035 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from sql with function"),(yyvsp[0].str));
+}
+#line 46309 "preproc.c"
+ break;
+
+ case 1232: /* transform_element_list: TO SQL_P WITH FUNCTION function_with_argtypes */
+#line 8039 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to sql with function"),(yyvsp[0].str));
+}
+#line 46317 "preproc.c"
+ break;
+
+ case 1233: /* DropTransformStmt: DROP TRANSFORM opt_if_exists FOR Typename LANGUAGE name opt_drop_behavior */
+#line 8047 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("drop transform"),(yyvsp[-5].str),mm_strdup("for"),(yyvsp[-3].str),mm_strdup("language"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46325 "preproc.c"
+ break;
+
+ case 1234: /* ReindexStmt: REINDEX reindex_target_type opt_concurrently qualified_name */
+#line 8055 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reindex"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46333 "preproc.c"
+ break;
+
+ case 1235: /* ReindexStmt: REINDEX reindex_target_multitable opt_concurrently name */
+#line 8059 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reindex"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46341 "preproc.c"
+ break;
+
+ case 1236: /* ReindexStmt: REINDEX '(' utility_option_list ')' reindex_target_type opt_concurrently qualified_name */
+#line 8063 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("reindex ("),(yyvsp[-4].str),mm_strdup(")"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46349 "preproc.c"
+ break;
+
+ case 1237: /* ReindexStmt: REINDEX '(' utility_option_list ')' reindex_target_multitable opt_concurrently name */
+#line 8067 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("reindex ("),(yyvsp[-4].str),mm_strdup(")"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46357 "preproc.c"
+ break;
+
+ case 1238: /* reindex_target_type: INDEX */
+#line 8075 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 46365 "preproc.c"
+ break;
+
+ case 1239: /* reindex_target_type: TABLE */
+#line 8079 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 46373 "preproc.c"
+ break;
+
+ case 1240: /* reindex_target_multitable: SCHEMA */
+#line 8087 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 46381 "preproc.c"
+ break;
+
+ case 1241: /* reindex_target_multitable: SYSTEM_P */
+#line 8091 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 46389 "preproc.c"
+ break;
+
+ case 1242: /* reindex_target_multitable: DATABASE */
+#line 8095 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 46397 "preproc.c"
+ break;
+
+ case 1243: /* AlterTblSpcStmt: ALTER TABLESPACE name SET reloptions */
+#line 8103 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 46405 "preproc.c"
+ break;
+
+ case 1244: /* AlterTblSpcStmt: ALTER TABLESPACE name RESET reloptions */
+#line 8107 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-2].str),mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 46413 "preproc.c"
+ break;
+
+ case 1245: /* RenameStmt: ALTER AGGREGATE aggregate_with_argtypes RENAME TO name */
+#line 8115 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46421 "preproc.c"
+ break;
+
+ case 1246: /* RenameStmt: ALTER COLLATION any_name RENAME TO name */
+#line 8119 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46429 "preproc.c"
+ break;
+
+ case 1247: /* RenameStmt: ALTER CONVERSION_P any_name RENAME TO name */
+#line 8123 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46437 "preproc.c"
+ break;
+
+ case 1248: /* RenameStmt: ALTER DATABASE name RENAME TO name */
+#line 8127 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46445 "preproc.c"
+ break;
+
+ case 1249: /* RenameStmt: ALTER DOMAIN_P any_name RENAME TO name */
+#line 8131 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46453 "preproc.c"
+ break;
+
+ case 1250: /* RenameStmt: ALTER DOMAIN_P any_name RENAME CONSTRAINT name TO name */
+#line 8135 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter domain"),(yyvsp[-5].str),mm_strdup("rename constraint"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46461 "preproc.c"
+ break;
+
+ case 1251: /* RenameStmt: ALTER FOREIGN DATA_P WRAPPER name RENAME TO name */
+#line 8139 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46469 "preproc.c"
+ break;
+
+ case 1252: /* RenameStmt: ALTER FUNCTION function_with_argtypes RENAME TO name */
+#line 8143 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46477 "preproc.c"
+ break;
+
+ case 1253: /* RenameStmt: ALTER GROUP_P RoleId RENAME TO RoleId */
+#line 8147 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter group"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46485 "preproc.c"
+ break;
+
+ case 1254: /* RenameStmt: ALTER opt_procedural LANGUAGE name RENAME TO name */
+#line 8151 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter"),(yyvsp[-5].str),mm_strdup("language"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46493 "preproc.c"
+ break;
+
+ case 1255: /* RenameStmt: ALTER OPERATOR CLASS any_name USING name RENAME TO name */
+#line 8155 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator class"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46501 "preproc.c"
+ break;
+
+ case 1256: /* RenameStmt: ALTER OPERATOR FAMILY any_name USING name RENAME TO name */
+#line 8159 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator family"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46509 "preproc.c"
+ break;
+
+ case 1257: /* RenameStmt: ALTER POLICY name ON qualified_name RENAME TO name */
+#line 8163 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter policy"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46517 "preproc.c"
+ break;
+
+ case 1258: /* RenameStmt: ALTER POLICY IF_P EXISTS name ON qualified_name RENAME TO name */
+#line 8167 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter policy if exists"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46525 "preproc.c"
+ break;
+
+ case 1259: /* RenameStmt: ALTER PROCEDURE function_with_argtypes RENAME TO name */
+#line 8171 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46533 "preproc.c"
+ break;
+
+ case 1260: /* RenameStmt: ALTER PUBLICATION name RENAME TO name */
+#line 8175 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46541 "preproc.c"
+ break;
+
+ case 1261: /* RenameStmt: ALTER ROUTINE function_with_argtypes RENAME TO name */
+#line 8179 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46549 "preproc.c"
+ break;
+
+ case 1262: /* RenameStmt: ALTER SCHEMA name RENAME TO name */
+#line 8183 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter schema"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46557 "preproc.c"
+ break;
+
+ case 1263: /* RenameStmt: ALTER SERVER name RENAME TO name */
+#line 8187 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46565 "preproc.c"
+ break;
+
+ case 1264: /* RenameStmt: ALTER SUBSCRIPTION name RENAME TO name */
+#line 8191 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46573 "preproc.c"
+ break;
+
+ case 1265: /* RenameStmt: ALTER TABLE relation_expr RENAME TO name */
+#line 8195 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46581 "preproc.c"
+ break;
+
+ case 1266: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME TO name */
+#line 8199 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46589 "preproc.c"
+ break;
+
+ case 1267: /* RenameStmt: ALTER SEQUENCE qualified_name RENAME TO name */
+#line 8203 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46597 "preproc.c"
+ break;
+
+ case 1268: /* RenameStmt: ALTER SEQUENCE IF_P EXISTS qualified_name RENAME TO name */
+#line 8207 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46605 "preproc.c"
+ break;
+
+ case 1269: /* RenameStmt: ALTER VIEW qualified_name RENAME TO name */
+#line 8211 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46613 "preproc.c"
+ break;
+
+ case 1270: /* RenameStmt: ALTER VIEW IF_P EXISTS qualified_name RENAME TO name */
+#line 8215 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46621 "preproc.c"
+ break;
+
+ case 1271: /* RenameStmt: ALTER MATERIALIZED VIEW qualified_name RENAME TO name */
+#line 8219 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46629 "preproc.c"
+ break;
+
+ case 1272: /* RenameStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME TO name */
+#line 8223 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46637 "preproc.c"
+ break;
+
+ case 1273: /* RenameStmt: ALTER INDEX qualified_name RENAME TO name */
+#line 8227 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter index"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46645 "preproc.c"
+ break;
+
+ case 1274: /* RenameStmt: ALTER INDEX IF_P EXISTS qualified_name RENAME TO name */
+#line 8231 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter index if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46653 "preproc.c"
+ break;
+
+ case 1275: /* RenameStmt: ALTER FOREIGN TABLE relation_expr RENAME TO name */
+#line 8235 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46661 "preproc.c"
+ break;
+
+ case 1276: /* RenameStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME TO name */
+#line 8239 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46669 "preproc.c"
+ break;
+
+ case 1277: /* RenameStmt: ALTER TABLE relation_expr RENAME opt_column name TO name */
+#line 8243 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter table"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46677 "preproc.c"
+ break;
+
+ case 1278: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name */
+#line 8247 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter table if exists"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46685 "preproc.c"
+ break;
+
+ case 1279: /* RenameStmt: ALTER VIEW qualified_name RENAME opt_column name TO name */
+#line 8251 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter view"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46693 "preproc.c"
+ break;
+
+ case 1280: /* RenameStmt: ALTER VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name */
+#line 8255 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter view if exists"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46701 "preproc.c"
+ break;
+
+ case 1281: /* RenameStmt: ALTER MATERIALIZED VIEW qualified_name RENAME opt_column name TO name */
+#line 8259 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter materialized view"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46709 "preproc.c"
+ break;
+
+ case 1282: /* RenameStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name */
+#line 8263 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter materialized view if exists"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46717 "preproc.c"
+ break;
+
+ case 1283: /* RenameStmt: ALTER TABLE relation_expr RENAME CONSTRAINT name TO name */
+#line 8267 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter table"),(yyvsp[-5].str),mm_strdup("rename constraint"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46725 "preproc.c"
+ break;
+
+ case 1284: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME CONSTRAINT name TO name */
+#line 8271 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter table if exists"),(yyvsp[-5].str),mm_strdup("rename constraint"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46733 "preproc.c"
+ break;
+
+ case 1285: /* RenameStmt: ALTER FOREIGN TABLE relation_expr RENAME opt_column name TO name */
+#line 8275 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter foreign table"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46741 "preproc.c"
+ break;
+
+ case 1286: /* RenameStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name */
+#line 8279 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter foreign table if exists"),(yyvsp[-5].str),mm_strdup("rename"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46749 "preproc.c"
+ break;
+
+ case 1287: /* RenameStmt: ALTER RULE name ON qualified_name RENAME TO name */
+#line 8283 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter rule"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46757 "preproc.c"
+ break;
+
+ case 1288: /* RenameStmt: ALTER TRIGGER name ON qualified_name RENAME TO name */
+#line 8287 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter trigger"),(yyvsp[-5].str),mm_strdup("on"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46765 "preproc.c"
+ break;
+
+ case 1289: /* RenameStmt: ALTER EVENT TRIGGER name RENAME TO name */
+#line 8291 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter event trigger"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46773 "preproc.c"
+ break;
+
+ case 1290: /* RenameStmt: ALTER ROLE RoleId RENAME TO RoleId */
+#line 8295 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46781 "preproc.c"
+ break;
+
+ case 1291: /* RenameStmt: ALTER USER RoleId RENAME TO RoleId */
+#line 8299 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46789 "preproc.c"
+ break;
+
+ case 1292: /* RenameStmt: ALTER TABLESPACE name RENAME TO name */
+#line 8303 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46797 "preproc.c"
+ break;
+
+ case 1293: /* RenameStmt: ALTER STATISTICS any_name RENAME TO name */
+#line 8307 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46805 "preproc.c"
+ break;
+
+ case 1294: /* RenameStmt: ALTER TEXT_P SEARCH PARSER any_name RENAME TO name */
+#line 8311 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search parser"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46813 "preproc.c"
+ break;
+
+ case 1295: /* RenameStmt: ALTER TEXT_P SEARCH DICTIONARY any_name RENAME TO name */
+#line 8315 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46821 "preproc.c"
+ break;
+
+ case 1296: /* RenameStmt: ALTER TEXT_P SEARCH TEMPLATE any_name RENAME TO name */
+#line 8319 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search template"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46829 "preproc.c"
+ break;
+
+ case 1297: /* RenameStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name RENAME TO name */
+#line 8323 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46837 "preproc.c"
+ break;
+
+ case 1298: /* RenameStmt: ALTER TYPE_P any_name RENAME TO name */
+#line 8327 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 46845 "preproc.c"
+ break;
+
+ case 1299: /* RenameStmt: ALTER TYPE_P any_name RENAME ATTRIBUTE name TO name opt_drop_behavior */
+#line 8331 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter type"),(yyvsp[-6].str),mm_strdup("rename attribute"),(yyvsp[-3].str),mm_strdup("to"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46853 "preproc.c"
+ break;
+
+ case 1300: /* opt_column: COLUMN */
+#line 8339 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 46861 "preproc.c"
+ break;
+
+ case 1301: /* opt_column: %empty */
+#line 8343 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46868 "preproc.c"
+ break;
+
+ case 1302: /* opt_set_data: SET DATA_P */
+#line 8350 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set data");
+}
+#line 46876 "preproc.c"
+ break;
+
+ case 1303: /* opt_set_data: %empty */
+#line 8354 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46883 "preproc.c"
+ break;
+
+ case 1304: /* AlterObjectDependsStmt: ALTER FUNCTION function_with_argtypes opt_no DEPENDS ON EXTENSION name */
+#line 8361 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter function"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46891 "preproc.c"
+ break;
+
+ case 1305: /* AlterObjectDependsStmt: ALTER PROCEDURE function_with_argtypes opt_no DEPENDS ON EXTENSION name */
+#line 8365 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter procedure"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46899 "preproc.c"
+ break;
+
+ case 1306: /* AlterObjectDependsStmt: ALTER ROUTINE function_with_argtypes opt_no DEPENDS ON EXTENSION name */
+#line 8369 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter routine"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46907 "preproc.c"
+ break;
+
+ case 1307: /* AlterObjectDependsStmt: ALTER TRIGGER name ON qualified_name opt_no DEPENDS ON EXTENSION name */
+#line 8373 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("alter trigger"),(yyvsp[-7].str),mm_strdup("on"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46915 "preproc.c"
+ break;
+
+ case 1308: /* AlterObjectDependsStmt: ALTER MATERIALIZED VIEW qualified_name opt_no DEPENDS ON EXTENSION name */
+#line 8377 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter materialized view"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46923 "preproc.c"
+ break;
+
+ case 1309: /* AlterObjectDependsStmt: ALTER INDEX qualified_name opt_no DEPENDS ON EXTENSION name */
+#line 8381 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter index"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 46931 "preproc.c"
+ break;
+
+ case 1310: /* opt_no: NO */
+#line 8389 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no");
+}
+#line 46939 "preproc.c"
+ break;
+
+ case 1311: /* opt_no: %empty */
+#line 8393 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 46946 "preproc.c"
+ break;
+
+ case 1312: /* AlterObjectSchemaStmt: ALTER AGGREGATE aggregate_with_argtypes SET SCHEMA name */
+#line 8400 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46954 "preproc.c"
+ break;
+
+ case 1313: /* AlterObjectSchemaStmt: ALTER COLLATION any_name SET SCHEMA name */
+#line 8404 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46962 "preproc.c"
+ break;
+
+ case 1314: /* AlterObjectSchemaStmt: ALTER CONVERSION_P any_name SET SCHEMA name */
+#line 8408 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46970 "preproc.c"
+ break;
+
+ case 1315: /* AlterObjectSchemaStmt: ALTER DOMAIN_P any_name SET SCHEMA name */
+#line 8412 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46978 "preproc.c"
+ break;
+
+ case 1316: /* AlterObjectSchemaStmt: ALTER EXTENSION name SET SCHEMA name */
+#line 8416 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter extension"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46986 "preproc.c"
+ break;
+
+ case 1317: /* AlterObjectSchemaStmt: ALTER FUNCTION function_with_argtypes SET SCHEMA name */
+#line 8420 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 46994 "preproc.c"
+ break;
+
+ case 1318: /* AlterObjectSchemaStmt: ALTER OPERATOR operator_with_argtypes SET SCHEMA name */
+#line 8424 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter operator"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47002 "preproc.c"
+ break;
+
+ case 1319: /* AlterObjectSchemaStmt: ALTER OPERATOR CLASS any_name USING name SET SCHEMA name */
+#line 8428 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator class"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47010 "preproc.c"
+ break;
+
+ case 1320: /* AlterObjectSchemaStmt: ALTER OPERATOR FAMILY any_name USING name SET SCHEMA name */
+#line 8432 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator family"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47018 "preproc.c"
+ break;
+
+ case 1321: /* AlterObjectSchemaStmt: ALTER PROCEDURE function_with_argtypes SET SCHEMA name */
+#line 8436 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47026 "preproc.c"
+ break;
+
+ case 1322: /* AlterObjectSchemaStmt: ALTER ROUTINE function_with_argtypes SET SCHEMA name */
+#line 8440 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47034 "preproc.c"
+ break;
+
+ case 1323: /* AlterObjectSchemaStmt: ALTER TABLE relation_expr SET SCHEMA name */
+#line 8444 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47042 "preproc.c"
+ break;
+
+ case 1324: /* AlterObjectSchemaStmt: ALTER TABLE IF_P EXISTS relation_expr SET SCHEMA name */
+#line 8448 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47050 "preproc.c"
+ break;
+
+ case 1325: /* AlterObjectSchemaStmt: ALTER STATISTICS any_name SET SCHEMA name */
+#line 8452 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47058 "preproc.c"
+ break;
+
+ case 1326: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH PARSER any_name SET SCHEMA name */
+#line 8456 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search parser"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47066 "preproc.c"
+ break;
+
+ case 1327: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH DICTIONARY any_name SET SCHEMA name */
+#line 8460 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47074 "preproc.c"
+ break;
+
+ case 1328: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH TEMPLATE any_name SET SCHEMA name */
+#line 8464 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search template"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47082 "preproc.c"
+ break;
+
+ case 1329: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name SET SCHEMA name */
+#line 8468 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47090 "preproc.c"
+ break;
+
+ case 1330: /* AlterObjectSchemaStmt: ALTER SEQUENCE qualified_name SET SCHEMA name */
+#line 8472 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47098 "preproc.c"
+ break;
+
+ case 1331: /* AlterObjectSchemaStmt: ALTER SEQUENCE IF_P EXISTS qualified_name SET SCHEMA name */
+#line 8476 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47106 "preproc.c"
+ break;
+
+ case 1332: /* AlterObjectSchemaStmt: ALTER VIEW qualified_name SET SCHEMA name */
+#line 8480 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47114 "preproc.c"
+ break;
+
+ case 1333: /* AlterObjectSchemaStmt: ALTER VIEW IF_P EXISTS qualified_name SET SCHEMA name */
+#line 8484 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47122 "preproc.c"
+ break;
+
+ case 1334: /* AlterObjectSchemaStmt: ALTER MATERIALIZED VIEW qualified_name SET SCHEMA name */
+#line 8488 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47130 "preproc.c"
+ break;
+
+ case 1335: /* AlterObjectSchemaStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name SET SCHEMA name */
+#line 8492 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47138 "preproc.c"
+ break;
+
+ case 1336: /* AlterObjectSchemaStmt: ALTER FOREIGN TABLE relation_expr SET SCHEMA name */
+#line 8496 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47146 "preproc.c"
+ break;
+
+ case 1337: /* AlterObjectSchemaStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr SET SCHEMA name */
+#line 8500 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47154 "preproc.c"
+ break;
+
+ case 1338: /* AlterObjectSchemaStmt: ALTER TYPE_P any_name SET SCHEMA name */
+#line 8504 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 47162 "preproc.c"
+ break;
+
+ case 1339: /* AlterOperatorStmt: ALTER OPERATOR operator_with_argtypes SET '(' operator_def_list ')' */
+#line 8512 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter operator"),(yyvsp[-4].str),mm_strdup("set ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47170 "preproc.c"
+ break;
+
+ case 1340: /* operator_def_list: operator_def_elem */
+#line 8520 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47178 "preproc.c"
+ break;
+
+ case 1341: /* operator_def_list: operator_def_list ',' operator_def_elem */
+#line 8524 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47186 "preproc.c"
+ break;
+
+ case 1342: /* operator_def_elem: ColLabel '=' NONE */
+#line 8532 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("= none"));
+}
+#line 47194 "preproc.c"
+ break;
+
+ case 1343: /* operator_def_elem: ColLabel '=' operator_def_arg */
+#line 8536 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 47202 "preproc.c"
+ break;
+
+ case 1344: /* operator_def_arg: func_type */
+#line 8544 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47210 "preproc.c"
+ break;
+
+ case 1345: /* operator_def_arg: reserved_keyword */
+#line 8548 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47218 "preproc.c"
+ break;
+
+ case 1346: /* operator_def_arg: qual_all_Op */
+#line 8552 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47226 "preproc.c"
+ break;
+
+ case 1347: /* operator_def_arg: NumericOnly */
+#line 8556 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47234 "preproc.c"
+ break;
+
+ case 1348: /* operator_def_arg: ecpg_sconst */
+#line 8560 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47242 "preproc.c"
+ break;
+
+ case 1349: /* AlterTypeStmt: ALTER TYPE_P any_name SET '(' operator_def_list ')' */
+#line 8568 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter type"),(yyvsp[-4].str),mm_strdup("set ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47250 "preproc.c"
+ break;
+
+ case 1350: /* AlterOwnerStmt: ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec */
+#line 8576 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47258 "preproc.c"
+ break;
+
+ case 1351: /* AlterOwnerStmt: ALTER COLLATION any_name OWNER TO RoleSpec */
+#line 8580 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47266 "preproc.c"
+ break;
+
+ case 1352: /* AlterOwnerStmt: ALTER CONVERSION_P any_name OWNER TO RoleSpec */
+#line 8584 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47274 "preproc.c"
+ break;
+
+ case 1353: /* AlterOwnerStmt: ALTER DATABASE name OWNER TO RoleSpec */
+#line 8588 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47282 "preproc.c"
+ break;
+
+ case 1354: /* AlterOwnerStmt: ALTER DOMAIN_P any_name OWNER TO RoleSpec */
+#line 8592 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47290 "preproc.c"
+ break;
+
+ case 1355: /* AlterOwnerStmt: ALTER FUNCTION function_with_argtypes OWNER TO RoleSpec */
+#line 8596 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47298 "preproc.c"
+ break;
+
+ case 1356: /* AlterOwnerStmt: ALTER opt_procedural LANGUAGE name OWNER TO RoleSpec */
+#line 8600 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter"),(yyvsp[-5].str),mm_strdup("language"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47306 "preproc.c"
+ break;
+
+ case 1357: /* AlterOwnerStmt: ALTER LARGE_P OBJECT_P NumericOnly OWNER TO RoleSpec */
+#line 8604 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter large object"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47314 "preproc.c"
+ break;
+
+ case 1358: /* AlterOwnerStmt: ALTER OPERATOR operator_with_argtypes OWNER TO RoleSpec */
+#line 8608 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter operator"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47322 "preproc.c"
+ break;
+
+ case 1359: /* AlterOwnerStmt: ALTER OPERATOR CLASS any_name USING name OWNER TO RoleSpec */
+#line 8612 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator class"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47330 "preproc.c"
+ break;
+
+ case 1360: /* AlterOwnerStmt: ALTER OPERATOR FAMILY any_name USING name OWNER TO RoleSpec */
+#line 8616 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter operator family"),(yyvsp[-5].str),mm_strdup("using"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47338 "preproc.c"
+ break;
+
+ case 1361: /* AlterOwnerStmt: ALTER PROCEDURE function_with_argtypes OWNER TO RoleSpec */
+#line 8620 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47346 "preproc.c"
+ break;
+
+ case 1362: /* AlterOwnerStmt: ALTER ROUTINE function_with_argtypes OWNER TO RoleSpec */
+#line 8624 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47354 "preproc.c"
+ break;
+
+ case 1363: /* AlterOwnerStmt: ALTER SCHEMA name OWNER TO RoleSpec */
+#line 8628 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter schema"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47362 "preproc.c"
+ break;
+
+ case 1364: /* AlterOwnerStmt: ALTER TYPE_P any_name OWNER TO RoleSpec */
+#line 8632 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47370 "preproc.c"
+ break;
+
+ case 1365: /* AlterOwnerStmt: ALTER TABLESPACE name OWNER TO RoleSpec */
+#line 8636 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47378 "preproc.c"
+ break;
+
+ case 1366: /* AlterOwnerStmt: ALTER STATISTICS any_name OWNER TO RoleSpec */
+#line 8640 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47386 "preproc.c"
+ break;
+
+ case 1367: /* AlterOwnerStmt: ALTER TEXT_P SEARCH DICTIONARY any_name OWNER TO RoleSpec */
+#line 8644 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47394 "preproc.c"
+ break;
+
+ case 1368: /* AlterOwnerStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name OWNER TO RoleSpec */
+#line 8648 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47402 "preproc.c"
+ break;
+
+ case 1369: /* AlterOwnerStmt: ALTER FOREIGN DATA_P WRAPPER name OWNER TO RoleSpec */
+#line 8652 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47410 "preproc.c"
+ break;
+
+ case 1370: /* AlterOwnerStmt: ALTER SERVER name OWNER TO RoleSpec */
+#line 8656 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47418 "preproc.c"
+ break;
+
+ case 1371: /* AlterOwnerStmt: ALTER EVENT TRIGGER name OWNER TO RoleSpec */
+#line 8660 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter event trigger"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47426 "preproc.c"
+ break;
+
+ case 1372: /* AlterOwnerStmt: ALTER PUBLICATION name OWNER TO RoleSpec */
+#line 8664 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47434 "preproc.c"
+ break;
+
+ case 1373: /* AlterOwnerStmt: ALTER SUBSCRIPTION name OWNER TO RoleSpec */
+#line 8668 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 47442 "preproc.c"
+ break;
+
+ case 1374: /* CreatePublicationStmt: CREATE PUBLICATION name opt_publication_for_tables opt_definition */
+#line 8676 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create publication"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47450 "preproc.c"
+ break;
+
+ case 1375: /* opt_publication_for_tables: publication_for_tables */
+#line 8684 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47458 "preproc.c"
+ break;
+
+ case 1376: /* opt_publication_for_tables: %empty */
+#line 8688 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 47465 "preproc.c"
+ break;
+
+ case 1377: /* publication_for_tables: FOR TABLE relation_expr_list */
+#line 8695 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for table"),(yyvsp[0].str));
+}
+#line 47473 "preproc.c"
+ break;
+
+ case 1378: /* publication_for_tables: FOR ALL TABLES */
+#line 8699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for all tables");
+}
+#line 47481 "preproc.c"
+ break;
+
+ case 1379: /* AlterPublicationStmt: ALTER PUBLICATION name SET definition */
+#line 8707 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 47489 "preproc.c"
+ break;
+
+ case 1380: /* AlterPublicationStmt: ALTER PUBLICATION name ADD_P TABLE relation_expr_list */
+#line 8711 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("add table"),(yyvsp[0].str));
+}
+#line 47497 "preproc.c"
+ break;
+
+ case 1381: /* AlterPublicationStmt: ALTER PUBLICATION name SET TABLE relation_expr_list */
+#line 8715 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("set table"),(yyvsp[0].str));
+}
+#line 47505 "preproc.c"
+ break;
+
+ case 1382: /* AlterPublicationStmt: ALTER PUBLICATION name DROP TABLE relation_expr_list */
+#line 8719 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("drop table"),(yyvsp[0].str));
+}
+#line 47513 "preproc.c"
+ break;
+
+ case 1383: /* CreateSubscriptionStmt: CREATE SUBSCRIPTION name CONNECTION ecpg_sconst PUBLICATION name_list opt_definition */
+#line 8727 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("create subscription"),(yyvsp[-5].str),mm_strdup("connection"),(yyvsp[-3].str),mm_strdup("publication"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47521 "preproc.c"
+ break;
+
+ case 1384: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name SET definition */
+#line 8735 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 47529 "preproc.c"
+ break;
+
+ case 1385: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name CONNECTION ecpg_sconst */
+#line 8739 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-2].str),mm_strdup("connection"),(yyvsp[0].str));
+}
+#line 47537 "preproc.c"
+ break;
+
+ case 1386: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name REFRESH PUBLICATION opt_definition */
+#line 8743 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("refresh publication"),(yyvsp[0].str));
+}
+#line 47545 "preproc.c"
+ break;
+
+ case 1387: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name ADD_P PUBLICATION name_list opt_definition */
+#line 8747 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter subscription"),(yyvsp[-4].str),mm_strdup("add publication"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47553 "preproc.c"
+ break;
+
+ case 1388: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name DROP PUBLICATION name_list opt_definition */
+#line 8751 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter subscription"),(yyvsp[-4].str),mm_strdup("drop publication"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47561 "preproc.c"
+ break;
+
+ case 1389: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name SET PUBLICATION name_list opt_definition */
+#line 8755 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter subscription"),(yyvsp[-4].str),mm_strdup("set publication"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47569 "preproc.c"
+ break;
+
+ case 1390: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name ENABLE_P */
+#line 8759 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter subscription"),(yyvsp[-1].str),mm_strdup("enable"));
+}
+#line 47577 "preproc.c"
+ break;
+
+ case 1391: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name DISABLE_P */
+#line 8763 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter subscription"),(yyvsp[-1].str),mm_strdup("disable"));
+}
+#line 47585 "preproc.c"
+ break;
+
+ case 1392: /* DropSubscriptionStmt: DROP SUBSCRIPTION name opt_drop_behavior */
+#line 8771 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop subscription"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47593 "preproc.c"
+ break;
+
+ case 1393: /* DropSubscriptionStmt: DROP SUBSCRIPTION IF_P EXISTS name opt_drop_behavior */
+#line 8775 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop subscription if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47601 "preproc.c"
+ break;
+
+ case 1394: /* RuleStmt: CREATE opt_or_replace RULE name AS ON event TO qualified_name where_clause DO opt_instead RuleActionList */
+#line 8783 "preproc.y"
+ {
+ (yyval.str) = cat_str(12,mm_strdup("create"),(yyvsp[-11].str),mm_strdup("rule"),(yyvsp[-9].str),mm_strdup("as on"),(yyvsp[-6].str),mm_strdup("to"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("do"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47609 "preproc.c"
+ break;
+
+ case 1395: /* RuleActionList: NOTHING */
+#line 8791 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 47617 "preproc.c"
+ break;
+
+ case 1396: /* RuleActionList: RuleActionStmt */
+#line 8795 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47625 "preproc.c"
+ break;
+
+ case 1397: /* RuleActionList: '(' RuleActionMulti ')' */
+#line 8799 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47633 "preproc.c"
+ break;
+
+ case 1398: /* RuleActionMulti: RuleActionMulti ';' RuleActionStmtOrEmpty */
+#line 8807 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(";"),(yyvsp[0].str));
+}
+#line 47641 "preproc.c"
+ break;
+
+ case 1399: /* RuleActionMulti: RuleActionStmtOrEmpty */
+#line 8811 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47649 "preproc.c"
+ break;
+
+ case 1400: /* RuleActionStmt: SelectStmt */
+#line 8819 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47657 "preproc.c"
+ break;
+
+ case 1401: /* RuleActionStmt: InsertStmt */
+#line 8823 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47665 "preproc.c"
+ break;
+
+ case 1402: /* RuleActionStmt: UpdateStmt */
+#line 8827 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47673 "preproc.c"
+ break;
+
+ case 1403: /* RuleActionStmt: DeleteStmt */
+#line 8831 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47681 "preproc.c"
+ break;
+
+ case 1404: /* RuleActionStmt: NotifyStmt */
+#line 8835 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47689 "preproc.c"
+ break;
+
+ case 1405: /* RuleActionStmtOrEmpty: RuleActionStmt */
+#line 8843 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47697 "preproc.c"
+ break;
+
+ case 1406: /* RuleActionStmtOrEmpty: %empty */
+#line 8847 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 47704 "preproc.c"
+ break;
+
+ case 1407: /* event: SELECT */
+#line 8854 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 47712 "preproc.c"
+ break;
+
+ case 1408: /* event: UPDATE */
+#line 8858 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 47720 "preproc.c"
+ break;
+
+ case 1409: /* event: DELETE_P */
+#line 8862 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 47728 "preproc.c"
+ break;
+
+ case 1410: /* event: INSERT */
+#line 8866 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 47736 "preproc.c"
+ break;
+
+ case 1411: /* opt_instead: INSTEAD */
+#line 8874 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("instead");
+}
+#line 47744 "preproc.c"
+ break;
+
+ case 1412: /* opt_instead: ALSO */
+#line 8878 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("also");
+}
+#line 47752 "preproc.c"
+ break;
+
+ case 1413: /* opt_instead: %empty */
+#line 8882 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 47759 "preproc.c"
+ break;
+
+ case 1414: /* NotifyStmt: NOTIFY ColId notify_payload */
+#line 8889 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("notify"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47767 "preproc.c"
+ break;
+
+ case 1415: /* notify_payload: ',' ecpg_sconst */
+#line 8897 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup(","),(yyvsp[0].str));
+}
+#line 47775 "preproc.c"
+ break;
+
+ case 1416: /* notify_payload: %empty */
+#line 8901 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 47782 "preproc.c"
+ break;
+
+ case 1417: /* ListenStmt: LISTEN ColId */
+#line 8908 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("listen"),(yyvsp[0].str));
+}
+#line 47790 "preproc.c"
+ break;
+
+ case 1418: /* UnlistenStmt: UNLISTEN ColId */
+#line 8916 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("unlisten"),(yyvsp[0].str));
+}
+#line 47798 "preproc.c"
+ break;
+
+ case 1419: /* UnlistenStmt: UNLISTEN '*' */
+#line 8920 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlisten *");
+}
+#line 47806 "preproc.c"
+ break;
+
+ case 1420: /* TransactionStmt: ABORT_P opt_transaction opt_transaction_chain */
+#line 8928 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("abort"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47814 "preproc.c"
+ break;
+
+ case 1421: /* TransactionStmt: START TRANSACTION transaction_mode_list_or_empty */
+#line 8932 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("start transaction"),(yyvsp[0].str));
+}
+#line 47822 "preproc.c"
+ break;
+
+ case 1422: /* TransactionStmt: COMMIT opt_transaction opt_transaction_chain */
+#line 8936 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("commit"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47830 "preproc.c"
+ break;
+
+ case 1423: /* TransactionStmt: ROLLBACK opt_transaction opt_transaction_chain */
+#line 8940 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rollback"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47838 "preproc.c"
+ break;
+
+ case 1424: /* TransactionStmt: SAVEPOINT ColId */
+#line 8944 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("savepoint"),(yyvsp[0].str));
+}
+#line 47846 "preproc.c"
+ break;
+
+ case 1425: /* TransactionStmt: RELEASE SAVEPOINT ColId */
+#line 8948 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("release savepoint"),(yyvsp[0].str));
+}
+#line 47854 "preproc.c"
+ break;
+
+ case 1426: /* TransactionStmt: RELEASE ColId */
+#line 8952 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("release"),(yyvsp[0].str));
+}
+#line 47862 "preproc.c"
+ break;
+
+ case 1427: /* TransactionStmt: ROLLBACK opt_transaction TO SAVEPOINT ColId */
+#line 8956 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rollback"),(yyvsp[-3].str),mm_strdup("to savepoint"),(yyvsp[0].str));
+}
+#line 47870 "preproc.c"
+ break;
+
+ case 1428: /* TransactionStmt: ROLLBACK opt_transaction TO ColId */
+#line 8960 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rollback"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 47878 "preproc.c"
+ break;
+
+ case 1429: /* TransactionStmt: PREPARE TRANSACTION ecpg_sconst */
+#line 8964 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("prepare transaction"),(yyvsp[0].str));
+}
+#line 47886 "preproc.c"
+ break;
+
+ case 1430: /* TransactionStmt: COMMIT PREPARED ecpg_sconst */
+#line 8968 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("commit prepared"),(yyvsp[0].str));
+}
+#line 47894 "preproc.c"
+ break;
+
+ case 1431: /* TransactionStmt: ROLLBACK PREPARED ecpg_sconst */
+#line 8972 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("rollback prepared"),(yyvsp[0].str));
+}
+#line 47902 "preproc.c"
+ break;
+
+ case 1432: /* TransactionStmtLegacy: BEGIN_P opt_transaction transaction_mode_list_or_empty */
+#line 8980 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("begin"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47910 "preproc.c"
+ break;
+
+ case 1433: /* TransactionStmtLegacy: END_P opt_transaction opt_transaction_chain */
+#line 8984 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("end"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47918 "preproc.c"
+ break;
+
+ case 1434: /* opt_transaction: WORK */
+#line 8992 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("work");
+}
+#line 47926 "preproc.c"
+ break;
+
+ case 1435: /* opt_transaction: TRANSACTION */
+#line 8996 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transaction");
+}
+#line 47934 "preproc.c"
+ break;
+
+ case 1436: /* opt_transaction: %empty */
+#line 9000 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 47941 "preproc.c"
+ break;
+
+ case 1437: /* transaction_mode_item: ISOLATION LEVEL iso_level */
+#line 9007 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("isolation level"),(yyvsp[0].str));
+}
+#line 47949 "preproc.c"
+ break;
+
+ case 1438: /* transaction_mode_item: READ ONLY */
+#line 9011 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read only");
+}
+#line 47957 "preproc.c"
+ break;
+
+ case 1439: /* transaction_mode_item: READ WRITE */
+#line 9015 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read write");
+}
+#line 47965 "preproc.c"
+ break;
+
+ case 1440: /* transaction_mode_item: DEFERRABLE */
+#line 9019 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 47973 "preproc.c"
+ break;
+
+ case 1441: /* transaction_mode_item: NOT DEFERRABLE */
+#line 9023 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 47981 "preproc.c"
+ break;
+
+ case 1442: /* transaction_mode_list: transaction_mode_item */
+#line 9031 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47989 "preproc.c"
+ break;
+
+ case 1443: /* transaction_mode_list: transaction_mode_list ',' transaction_mode_item */
+#line 9035 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47997 "preproc.c"
+ break;
+
+ case 1444: /* transaction_mode_list: transaction_mode_list transaction_mode_item */
+#line 9039 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48005 "preproc.c"
+ break;
+
+ case 1445: /* transaction_mode_list_or_empty: transaction_mode_list */
+#line 9047 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48013 "preproc.c"
+ break;
+
+ case 1446: /* transaction_mode_list_or_empty: %empty */
+#line 9051 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48020 "preproc.c"
+ break;
+
+ case 1447: /* opt_transaction_chain: AND CHAIN */
+#line 9058 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("and chain");
+}
+#line 48028 "preproc.c"
+ break;
+
+ case 1448: /* opt_transaction_chain: AND NO CHAIN */
+#line 9062 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("and no chain");
+}
+#line 48036 "preproc.c"
+ break;
+
+ case 1449: /* opt_transaction_chain: %empty */
+#line 9066 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48043 "preproc.c"
+ break;
+
+ case 1450: /* ViewStmt: CREATE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option */
+#line 9073 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create"),(yyvsp[-7].str),mm_strdup("view"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48051 "preproc.c"
+ break;
+
+ case 1451: /* ViewStmt: CREATE OR REPLACE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option */
+#line 9077 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create or replace"),(yyvsp[-7].str),mm_strdup("view"),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48059 "preproc.c"
+ break;
+
+ case 1452: /* ViewStmt: CREATE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option */
+#line 9081 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(11,mm_strdup("create"),(yyvsp[-10].str),mm_strdup("recursive view"),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48068 "preproc.c"
+ break;
+
+ case 1453: /* ViewStmt: CREATE OR REPLACE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option */
+#line 9086 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(11,mm_strdup("create or replace"),(yyvsp[-10].str),mm_strdup("recursive view"),(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(")"),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48077 "preproc.c"
+ break;
+
+ case 1454: /* opt_check_option: WITH CHECK OPTION */
+#line 9095 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with check option");
+}
+#line 48085 "preproc.c"
+ break;
+
+ case 1455: /* opt_check_option: WITH CASCADED CHECK OPTION */
+#line 9099 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with cascaded check option");
+}
+#line 48093 "preproc.c"
+ break;
+
+ case 1456: /* opt_check_option: WITH LOCAL CHECK OPTION */
+#line 9103 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with local check option");
+}
+#line 48101 "preproc.c"
+ break;
+
+ case 1457: /* opt_check_option: %empty */
+#line 9107 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48108 "preproc.c"
+ break;
+
+ case 1458: /* LoadStmt: LOAD file_name */
+#line 9114 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("load"),(yyvsp[0].str));
+}
+#line 48116 "preproc.c"
+ break;
+
+ case 1459: /* CreatedbStmt: CREATE DATABASE name opt_with createdb_opt_list */
+#line 9122 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create database"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48124 "preproc.c"
+ break;
+
+ case 1460: /* createdb_opt_list: createdb_opt_items */
+#line 9130 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48132 "preproc.c"
+ break;
+
+ case 1461: /* createdb_opt_list: %empty */
+#line 9134 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48139 "preproc.c"
+ break;
+
+ case 1462: /* createdb_opt_items: createdb_opt_item */
+#line 9141 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48147 "preproc.c"
+ break;
+
+ case 1463: /* createdb_opt_items: createdb_opt_items createdb_opt_item */
+#line 9145 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48155 "preproc.c"
+ break;
+
+ case 1464: /* createdb_opt_item: createdb_opt_name opt_equal SignedIconst */
+#line 9153 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48163 "preproc.c"
+ break;
+
+ case 1465: /* createdb_opt_item: createdb_opt_name opt_equal opt_boolean_or_string */
+#line 9157 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48171 "preproc.c"
+ break;
+
+ case 1466: /* createdb_opt_item: createdb_opt_name opt_equal DEFAULT */
+#line 9161 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("default"));
+}
+#line 48179 "preproc.c"
+ break;
+
+ case 1467: /* createdb_opt_name: ecpg_ident */
+#line 9169 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48187 "preproc.c"
+ break;
+
+ case 1468: /* createdb_opt_name: CONNECTION LIMIT */
+#line 9173 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("connection limit");
+}
+#line 48195 "preproc.c"
+ break;
+
+ case 1469: /* createdb_opt_name: ENCODING */
+#line 9177 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("encoding");
+}
+#line 48203 "preproc.c"
+ break;
+
+ case 1470: /* createdb_opt_name: LOCATION */
+#line 9181 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("location");
+}
+#line 48211 "preproc.c"
+ break;
+
+ case 1471: /* createdb_opt_name: OWNER */
+#line 9185 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("owner");
+}
+#line 48219 "preproc.c"
+ break;
+
+ case 1472: /* createdb_opt_name: TABLESPACE */
+#line 9189 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 48227 "preproc.c"
+ break;
+
+ case 1473: /* createdb_opt_name: TEMPLATE */
+#line 9193 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("template");
+}
+#line 48235 "preproc.c"
+ break;
+
+ case 1474: /* opt_equal: '=' */
+#line 9201 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("=");
+}
+#line 48243 "preproc.c"
+ break;
+
+ case 1475: /* opt_equal: %empty */
+#line 9205 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48250 "preproc.c"
+ break;
+
+ case 1476: /* AlterDatabaseStmt: ALTER DATABASE name WITH createdb_opt_list */
+#line 9212 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-2].str),mm_strdup("with"),(yyvsp[0].str));
+}
+#line 48258 "preproc.c"
+ break;
+
+ case 1477: /* AlterDatabaseStmt: ALTER DATABASE name createdb_opt_list */
+#line 9216 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter database"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48266 "preproc.c"
+ break;
+
+ case 1478: /* AlterDatabaseStmt: ALTER DATABASE name SET TABLESPACE name */
+#line 9220 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("set tablespace"),(yyvsp[0].str));
+}
+#line 48274 "preproc.c"
+ break;
+
+ case 1479: /* AlterDatabaseSetStmt: ALTER DATABASE name SetResetClause */
+#line 9228 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter database"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48282 "preproc.c"
+ break;
+
+ case 1480: /* DropdbStmt: DROP DATABASE name */
+#line 9236 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop database"),(yyvsp[0].str));
+}
+#line 48290 "preproc.c"
+ break;
+
+ case 1481: /* DropdbStmt: DROP DATABASE IF_P EXISTS name */
+#line 9240 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop database if exists"),(yyvsp[0].str));
+}
+#line 48298 "preproc.c"
+ break;
+
+ case 1482: /* DropdbStmt: DROP DATABASE name opt_with '(' drop_option_list ')' */
+#line 9244 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("drop database"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48306 "preproc.c"
+ break;
+
+ case 1483: /* DropdbStmt: DROP DATABASE IF_P EXISTS name opt_with '(' drop_option_list ')' */
+#line 9248 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("drop database if exists"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48314 "preproc.c"
+ break;
+
+ case 1484: /* drop_option_list: drop_option */
+#line 9256 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48322 "preproc.c"
+ break;
+
+ case 1485: /* drop_option_list: drop_option_list ',' drop_option */
+#line 9260 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48330 "preproc.c"
+ break;
+
+ case 1486: /* drop_option: FORCE */
+#line 9268 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("force");
+}
+#line 48338 "preproc.c"
+ break;
+
+ case 1487: /* AlterCollationStmt: ALTER COLLATION any_name REFRESH VERSION_P */
+#line 9276 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter collation"),(yyvsp[-2].str),mm_strdup("refresh version"));
+}
+#line 48346 "preproc.c"
+ break;
+
+ case 1488: /* AlterSystemStmt: ALTER SYSTEM_P SET generic_set */
+#line 9284 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("alter system set"),(yyvsp[0].str));
+}
+#line 48354 "preproc.c"
+ break;
+
+ case 1489: /* AlterSystemStmt: ALTER SYSTEM_P RESET generic_reset */
+#line 9288 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("alter system reset"),(yyvsp[0].str));
+}
+#line 48362 "preproc.c"
+ break;
+
+ case 1490: /* CreateDomainStmt: CREATE DOMAIN_P any_name opt_as Typename ColQualList */
+#line 9296 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create domain"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48370 "preproc.c"
+ break;
+
+ case 1491: /* AlterDomainStmt: ALTER DOMAIN_P any_name alter_column_default */
+#line 9304 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48378 "preproc.c"
+ break;
+
+ case 1492: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP NOT NULL_P */
+#line 9308 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("drop not null"));
+}
+#line 48386 "preproc.c"
+ break;
+
+ case 1493: /* AlterDomainStmt: ALTER DOMAIN_P any_name SET NOT NULL_P */
+#line 9312 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("set not null"));
+}
+#line 48394 "preproc.c"
+ break;
+
+ case 1494: /* AlterDomainStmt: ALTER DOMAIN_P any_name ADD_P TableConstraint */
+#line 9316 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-2].str),mm_strdup("add"),(yyvsp[0].str));
+}
+#line 48402 "preproc.c"
+ break;
+
+ case 1495: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior */
+#line 9320 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter domain"),(yyvsp[-4].str),mm_strdup("drop constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48410 "preproc.c"
+ break;
+
+ case 1496: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior */
+#line 9324 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter domain"),(yyvsp[-6].str),mm_strdup("drop constraint if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48418 "preproc.c"
+ break;
+
+ case 1497: /* AlterDomainStmt: ALTER DOMAIN_P any_name VALIDATE CONSTRAINT name */
+#line 9328 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("validate constraint"),(yyvsp[0].str));
+}
+#line 48426 "preproc.c"
+ break;
+
+ case 1498: /* opt_as: AS */
+#line 9336 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("as");
+}
+#line 48434 "preproc.c"
+ break;
+
+ case 1499: /* opt_as: %empty */
+#line 9340 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48441 "preproc.c"
+ break;
+
+ case 1500: /* AlterTSDictionaryStmt: ALTER TEXT_P SEARCH DICTIONARY any_name definition */
+#line 9347 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter text search dictionary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48449 "preproc.c"
+ break;
+
+ case 1501: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ADD_P MAPPING FOR name_list any_with any_name_list */
+#line 9355 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter text search configuration"),(yyvsp[-6].str),mm_strdup("add mapping for"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48457 "preproc.c"
+ break;
+
+ case 1502: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list any_with any_name_list */
+#line 9359 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter text search configuration"),(yyvsp[-6].str),mm_strdup("alter mapping for"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48465 "preproc.c"
+ break;
+
+ case 1503: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING REPLACE any_name any_with any_name */
+#line 9363 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter text search configuration"),(yyvsp[-6].str),mm_strdup("alter mapping replace"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48473 "preproc.c"
+ break;
+
+ case 1504: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list REPLACE any_name any_with any_name */
+#line 9367 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("alter text search configuration"),(yyvsp[-8].str),mm_strdup("alter mapping for"),(yyvsp[-4].str),mm_strdup("replace"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48481 "preproc.c"
+ break;
+
+ case 1505: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING FOR name_list */
+#line 9371 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-4].str),mm_strdup("drop mapping for"),(yyvsp[0].str));
+}
+#line 48489 "preproc.c"
+ break;
+
+ case 1506: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING IF_P EXISTS FOR name_list */
+#line 9375 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-6].str),mm_strdup("drop mapping if exists for"),(yyvsp[0].str));
+}
+#line 48497 "preproc.c"
+ break;
+
+ case 1507: /* any_with: WITH */
+#line 9383 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 48505 "preproc.c"
+ break;
+
+ case 1508: /* any_with: WITH_LA */
+#line 9387 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 48513 "preproc.c"
+ break;
+
+ case 1509: /* CreateConversionStmt: CREATE opt_default CONVERSION_P any_name FOR ecpg_sconst TO ecpg_sconst FROM any_name */
+#line 9395 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("create"),(yyvsp[-8].str),mm_strdup("conversion"),(yyvsp[-6].str),mm_strdup("for"),(yyvsp[-4].str),mm_strdup("to"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 48521 "preproc.c"
+ break;
+
+ case 1510: /* ClusterStmt: CLUSTER opt_verbose qualified_name cluster_index_specification */
+#line 9403 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("cluster"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48529 "preproc.c"
+ break;
+
+ case 1511: /* ClusterStmt: CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification */
+#line 9407 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("cluster ("),(yyvsp[-3].str),mm_strdup(")"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48537 "preproc.c"
+ break;
+
+ case 1512: /* ClusterStmt: CLUSTER opt_verbose */
+#line 9411 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cluster"),(yyvsp[0].str));
+}
+#line 48545 "preproc.c"
+ break;
+
+ case 1513: /* ClusterStmt: CLUSTER opt_verbose name ON qualified_name */
+#line 9415 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("cluster"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("on"),(yyvsp[0].str));
+}
+#line 48553 "preproc.c"
+ break;
+
+ case 1514: /* cluster_index_specification: USING name */
+#line 9423 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 48561 "preproc.c"
+ break;
+
+ case 1515: /* cluster_index_specification: %empty */
+#line 9427 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48568 "preproc.c"
+ break;
+
+ case 1516: /* VacuumStmt: VACUUM opt_full opt_freeze opt_verbose opt_analyze opt_vacuum_relation_list */
+#line 9434 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("vacuum"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48576 "preproc.c"
+ break;
+
+ case 1517: /* VacuumStmt: VACUUM '(' utility_option_list ')' opt_vacuum_relation_list */
+#line 9438 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("vacuum ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 48584 "preproc.c"
+ break;
+
+ case 1518: /* AnalyzeStmt: analyze_keyword opt_verbose opt_vacuum_relation_list */
+#line 9446 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48592 "preproc.c"
+ break;
+
+ case 1519: /* AnalyzeStmt: analyze_keyword '(' utility_option_list ')' opt_vacuum_relation_list */
+#line 9450 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 48600 "preproc.c"
+ break;
+
+ case 1520: /* utility_option_list: utility_option_elem */
+#line 9458 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48608 "preproc.c"
+ break;
+
+ case 1521: /* utility_option_list: utility_option_list ',' utility_option_elem */
+#line 9462 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48616 "preproc.c"
+ break;
+
+ case 1522: /* analyze_keyword: ANALYZE */
+#line 9470 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyze");
+}
+#line 48624 "preproc.c"
+ break;
+
+ case 1523: /* analyze_keyword: ANALYSE */
+#line 9474 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyse");
+}
+#line 48632 "preproc.c"
+ break;
+
+ case 1524: /* utility_option_elem: utility_option_name utility_option_arg */
+#line 9482 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48640 "preproc.c"
+ break;
+
+ case 1525: /* utility_option_name: NonReservedWord */
+#line 9490 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48648 "preproc.c"
+ break;
+
+ case 1526: /* utility_option_name: analyze_keyword */
+#line 9494 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48656 "preproc.c"
+ break;
+
+ case 1527: /* utility_option_arg: opt_boolean_or_string */
+#line 9502 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48664 "preproc.c"
+ break;
+
+ case 1528: /* utility_option_arg: NumericOnly */
+#line 9506 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48672 "preproc.c"
+ break;
+
+ case 1529: /* utility_option_arg: %empty */
+#line 9510 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48679 "preproc.c"
+ break;
+
+ case 1530: /* opt_analyze: analyze_keyword */
+#line 9517 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48687 "preproc.c"
+ break;
+
+ case 1531: /* opt_analyze: %empty */
+#line 9521 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48694 "preproc.c"
+ break;
+
+ case 1532: /* opt_verbose: VERBOSE */
+#line 9528 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 48702 "preproc.c"
+ break;
+
+ case 1533: /* opt_verbose: %empty */
+#line 9532 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48709 "preproc.c"
+ break;
+
+ case 1534: /* opt_full: FULL */
+#line 9539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 48717 "preproc.c"
+ break;
+
+ case 1535: /* opt_full: %empty */
+#line 9543 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48724 "preproc.c"
+ break;
+
+ case 1536: /* opt_freeze: FREEZE */
+#line 9550 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 48732 "preproc.c"
+ break;
+
+ case 1537: /* opt_freeze: %empty */
+#line 9554 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48739 "preproc.c"
+ break;
+
+ case 1538: /* opt_name_list: '(' name_list ')' */
+#line 9561 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48747 "preproc.c"
+ break;
+
+ case 1539: /* opt_name_list: %empty */
+#line 9565 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48754 "preproc.c"
+ break;
+
+ case 1540: /* vacuum_relation: qualified_name opt_name_list */
+#line 9572 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48762 "preproc.c"
+ break;
+
+ case 1541: /* vacuum_relation_list: vacuum_relation */
+#line 9580 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48770 "preproc.c"
+ break;
+
+ case 1542: /* vacuum_relation_list: vacuum_relation_list ',' vacuum_relation */
+#line 9584 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48778 "preproc.c"
+ break;
+
+ case 1543: /* opt_vacuum_relation_list: vacuum_relation_list */
+#line 9592 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48786 "preproc.c"
+ break;
+
+ case 1544: /* opt_vacuum_relation_list: %empty */
+#line 9596 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48793 "preproc.c"
+ break;
+
+ case 1545: /* ExplainStmt: EXPLAIN ExplainableStmt */
+#line 9603 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("explain"),(yyvsp[0].str));
+}
+#line 48801 "preproc.c"
+ break;
+
+ case 1546: /* ExplainStmt: EXPLAIN analyze_keyword opt_verbose ExplainableStmt */
+#line 9607 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("explain"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48809 "preproc.c"
+ break;
+
+ case 1547: /* ExplainStmt: EXPLAIN VERBOSE ExplainableStmt */
+#line 9611 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("explain verbose"),(yyvsp[0].str));
+}
+#line 48817 "preproc.c"
+ break;
+
+ case 1548: /* ExplainStmt: EXPLAIN '(' utility_option_list ')' ExplainableStmt */
+#line 9615 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("explain ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 48825 "preproc.c"
+ break;
+
+ case 1549: /* ExplainableStmt: SelectStmt */
+#line 9623 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48833 "preproc.c"
+ break;
+
+ case 1550: /* ExplainableStmt: InsertStmt */
+#line 9627 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48841 "preproc.c"
+ break;
+
+ case 1551: /* ExplainableStmt: UpdateStmt */
+#line 9631 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48849 "preproc.c"
+ break;
+
+ case 1552: /* ExplainableStmt: DeleteStmt */
+#line 9635 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48857 "preproc.c"
+ break;
+
+ case 1553: /* ExplainableStmt: DeclareCursorStmt */
+#line 9639 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48865 "preproc.c"
+ break;
+
+ case 1554: /* ExplainableStmt: CreateAsStmt */
+#line 9643 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48873 "preproc.c"
+ break;
+
+ case 1555: /* ExplainableStmt: CreateMatViewStmt */
+#line 9647 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48881 "preproc.c"
+ break;
+
+ case 1556: /* ExplainableStmt: RefreshMatViewStmt */
+#line 9651 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48889 "preproc.c"
+ break;
+
+ case 1557: /* ExplainableStmt: ExecuteStmt */
+#line 9655 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].exec).name;
+ }
+#line 48897 "preproc.c"
+ break;
+
+ case 1558: /* PrepareStmt: PREPARE prepared_name prep_type_clause AS PreparableStmt */
+#line 9663 "preproc.y"
+ {
+ (yyval.prep).name = (yyvsp[-3].str);
+ (yyval.prep).type = (yyvsp[-2].str);
+ (yyval.prep).stmt = (yyvsp[0].str);
+ }
+#line 48907 "preproc.c"
+ break;
+
+ case 1559: /* PrepareStmt: PREPARE prepared_name FROM execstring */
+#line 9669 "preproc.y"
+ {
+ (yyval.prep).name = (yyvsp[-2].str);
+ (yyval.prep).type = NULL;
+ (yyval.prep).stmt = (yyvsp[0].str);
+ }
+#line 48917 "preproc.c"
+ break;
+
+ case 1560: /* prep_type_clause: '(' type_list ')' */
+#line 9679 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48925 "preproc.c"
+ break;
+
+ case 1561: /* prep_type_clause: %empty */
+#line 9683 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 48932 "preproc.c"
+ break;
+
+ case 1562: /* PreparableStmt: SelectStmt */
+#line 9690 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48940 "preproc.c"
+ break;
+
+ case 1563: /* PreparableStmt: InsertStmt */
+#line 9694 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48948 "preproc.c"
+ break;
+
+ case 1564: /* PreparableStmt: UpdateStmt */
+#line 9698 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48956 "preproc.c"
+ break;
+
+ case 1565: /* PreparableStmt: DeleteStmt */
+#line 9702 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48964 "preproc.c"
+ break;
+
+ case 1566: /* ExecuteStmt: EXECUTE prepared_name execute_param_clause execute_rest */
+#line 9710 "preproc.y"
+ {
+ (yyval.exec).name = (yyvsp[-2].str);
+ (yyval.exec).type = (yyvsp[-1].str);
+ }
+#line 48973 "preproc.c"
+ break;
+
+ case 1567: /* ExecuteStmt: CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest */
+#line 9715 "preproc.y"
+ {
+ (yyval.exec).name = cat_str(8,mm_strdup("create"),(yyvsp[-8].str),mm_strdup("table"),(yyvsp[-6].str),mm_strdup("as execute"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str));
+ }
+#line 48981 "preproc.c"
+ break;
+
+ case 1568: /* ExecuteStmt: CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest */
+#line 9719 "preproc.y"
+ {
+ (yyval.exec).name = cat_str(8,mm_strdup("create"),(yyvsp[-11].str),mm_strdup("table if not exists"),(yyvsp[-6].str),mm_strdup("as execute"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str));
+ }
+#line 48989 "preproc.c"
+ break;
+
+ case 1569: /* execute_param_clause: '(' expr_list ')' */
+#line 9727 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48997 "preproc.c"
+ break;
+
+ case 1570: /* execute_param_clause: %empty */
+#line 9731 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49004 "preproc.c"
+ break;
+
+ case 1571: /* InsertStmt: opt_with_clause INSERT INTO insert_target insert_rest opt_on_conflict returning_clause */
+#line 9738 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-6].str),mm_strdup("insert into"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49012 "preproc.c"
+ break;
+
+ case 1572: /* insert_target: qualified_name */
+#line 9746 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49020 "preproc.c"
+ break;
+
+ case 1573: /* insert_target: qualified_name AS ColId */
+#line 9750 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 49028 "preproc.c"
+ break;
+
+ case 1574: /* insert_rest: SelectStmt */
+#line 9758 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49036 "preproc.c"
+ break;
+
+ case 1575: /* insert_rest: OVERRIDING override_kind VALUE_P SelectStmt */
+#line 9762 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("overriding"),(yyvsp[-2].str),mm_strdup("value"),(yyvsp[0].str));
+}
+#line 49044 "preproc.c"
+ break;
+
+ case 1576: /* insert_rest: '(' insert_column_list ')' SelectStmt */
+#line 9766 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49052 "preproc.c"
+ break;
+
+ case 1577: /* insert_rest: '(' insert_column_list ')' OVERRIDING override_kind VALUE_P SelectStmt */
+#line 9770 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("("),(yyvsp[-5].str),mm_strdup(") overriding"),(yyvsp[-2].str),mm_strdup("value"),(yyvsp[0].str));
+}
+#line 49060 "preproc.c"
+ break;
+
+ case 1578: /* insert_rest: DEFAULT VALUES */
+#line 9774 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default values");
+}
+#line 49068 "preproc.c"
+ break;
+
+ case 1579: /* override_kind: USER */
+#line 9782 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 49076 "preproc.c"
+ break;
+
+ case 1580: /* override_kind: SYSTEM_P */
+#line 9786 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 49084 "preproc.c"
+ break;
+
+ case 1581: /* insert_column_list: insert_column_item */
+#line 9794 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49092 "preproc.c"
+ break;
+
+ case 1582: /* insert_column_list: insert_column_list ',' insert_column_item */
+#line 9798 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49100 "preproc.c"
+ break;
+
+ case 1583: /* insert_column_item: ColId opt_indirection */
+#line 9806 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49108 "preproc.c"
+ break;
+
+ case 1584: /* opt_on_conflict: ON CONFLICT opt_conf_expr DO UPDATE SET set_clause_list where_clause */
+#line 9814 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("on conflict"),(yyvsp[-5].str),mm_strdup("do update set"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49116 "preproc.c"
+ break;
+
+ case 1585: /* opt_on_conflict: ON CONFLICT opt_conf_expr DO NOTHING */
+#line 9818 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("on conflict"),(yyvsp[-2].str),mm_strdup("do nothing"));
+}
+#line 49124 "preproc.c"
+ break;
+
+ case 1586: /* opt_on_conflict: %empty */
+#line 9822 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49131 "preproc.c"
+ break;
+
+ case 1587: /* opt_conf_expr: '(' index_params ')' where_clause */
+#line 9829 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49139 "preproc.c"
+ break;
+
+ case 1588: /* opt_conf_expr: ON CONSTRAINT name */
+#line 9833 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on constraint"),(yyvsp[0].str));
+}
+#line 49147 "preproc.c"
+ break;
+
+ case 1589: /* opt_conf_expr: %empty */
+#line 9837 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49154 "preproc.c"
+ break;
+
+ case 1590: /* returning_clause: RETURNING target_list opt_ecpg_into */
+#line 9844 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("returning"),(yyvsp[-1].str));
+}
+#line 49162 "preproc.c"
+ break;
+
+ case 1591: /* returning_clause: %empty */
+#line 9848 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49169 "preproc.c"
+ break;
+
+ case 1592: /* DeleteStmt: opt_with_clause DELETE_P FROM relation_expr_opt_alias using_clause where_or_current_clause returning_clause */
+#line 9855 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-6].str),mm_strdup("delete from"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49177 "preproc.c"
+ break;
+
+ case 1593: /* using_clause: USING from_list */
+#line 9863 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 49185 "preproc.c"
+ break;
+
+ case 1594: /* using_clause: %empty */
+#line 9867 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49192 "preproc.c"
+ break;
+
+ case 1595: /* LockStmt: LOCK_P opt_table relation_expr_list opt_lock opt_nowait */
+#line 9874 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("lock"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49200 "preproc.c"
+ break;
+
+ case 1596: /* opt_lock: IN_P lock_type MODE */
+#line 9882 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("in"),(yyvsp[-1].str),mm_strdup("mode"));
+}
+#line 49208 "preproc.c"
+ break;
+
+ case 1597: /* opt_lock: %empty */
+#line 9886 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49215 "preproc.c"
+ break;
+
+ case 1598: /* lock_type: ACCESS SHARE */
+#line 9893 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("access share");
+}
+#line 49223 "preproc.c"
+ break;
+
+ case 1599: /* lock_type: ROW SHARE */
+#line 9897 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row share");
+}
+#line 49231 "preproc.c"
+ break;
+
+ case 1600: /* lock_type: ROW EXCLUSIVE */
+#line 9901 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row exclusive");
+}
+#line 49239 "preproc.c"
+ break;
+
+ case 1601: /* lock_type: SHARE UPDATE EXCLUSIVE */
+#line 9905 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("share update exclusive");
+}
+#line 49247 "preproc.c"
+ break;
+
+ case 1602: /* lock_type: SHARE */
+#line 9909 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("share");
+}
+#line 49255 "preproc.c"
+ break;
+
+ case 1603: /* lock_type: SHARE ROW EXCLUSIVE */
+#line 9913 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("share row exclusive");
+}
+#line 49263 "preproc.c"
+ break;
+
+ case 1604: /* lock_type: EXCLUSIVE */
+#line 9917 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclusive");
+}
+#line 49271 "preproc.c"
+ break;
+
+ case 1605: /* lock_type: ACCESS EXCLUSIVE */
+#line 9921 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("access exclusive");
+}
+#line 49279 "preproc.c"
+ break;
+
+ case 1606: /* opt_nowait: NOWAIT */
+#line 9929 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 49287 "preproc.c"
+ break;
+
+ case 1607: /* opt_nowait: %empty */
+#line 9933 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49294 "preproc.c"
+ break;
+
+ case 1608: /* opt_nowait_or_skip: NOWAIT */
+#line 9940 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 49302 "preproc.c"
+ break;
+
+ case 1609: /* opt_nowait_or_skip: SKIP LOCKED */
+#line 9944 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("skip locked");
+}
+#line 49310 "preproc.c"
+ break;
+
+ case 1610: /* opt_nowait_or_skip: %empty */
+#line 9948 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49317 "preproc.c"
+ break;
+
+ case 1611: /* UpdateStmt: opt_with_clause UPDATE relation_expr_opt_alias SET set_clause_list from_clause where_or_current_clause returning_clause */
+#line 9955 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,(yyvsp[-7].str),mm_strdup("update"),(yyvsp[-5].str),mm_strdup("set"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49325 "preproc.c"
+ break;
+
+ case 1612: /* set_clause_list: set_clause */
+#line 9963 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49333 "preproc.c"
+ break;
+
+ case 1613: /* set_clause_list: set_clause_list ',' set_clause */
+#line 9967 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49341 "preproc.c"
+ break;
+
+ case 1614: /* set_clause: set_target '=' a_expr */
+#line 9975 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 49349 "preproc.c"
+ break;
+
+ case 1615: /* set_clause: '(' set_target_list ')' '=' a_expr */
+#line 9979 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-3].str),mm_strdup(") ="),(yyvsp[0].str));
+}
+#line 49357 "preproc.c"
+ break;
+
+ case 1616: /* set_target: ColId opt_indirection */
+#line 9987 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49365 "preproc.c"
+ break;
+
+ case 1617: /* set_target_list: set_target */
+#line 9995 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49373 "preproc.c"
+ break;
+
+ case 1618: /* set_target_list: set_target_list ',' set_target */
+#line 9999 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49381 "preproc.c"
+ break;
+
+ case 1619: /* DeclareCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR SelectStmt */
+#line 10007 "preproc.y"
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = (yyvsp[-5].str)[0] == ':' ? mm_strdup("$0") : mm_strdup((yyvsp[-5].str));
+ char *comment, *c1, *c2;
+ int (* strcmp_fn)(const char *, const char *) = (((yyvsp[-5].str)[0] == ':' || (yyvsp[-5].str)[0] == '"') ? strcmp : pg_strcasecmp);
+
+ if (INFORMIX_MODE && pg_strcasecmp((yyvsp[-5].str), "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn((yyvsp[-5].str), ptr->name) == 0)
+ {
+ if ((yyvsp[-5].str)[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", (yyvsp[-5].str)+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", (yyvsp[-5].str));
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ this->next = cur;
+ this->name = (yyvsp[-5].str);
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->opened = false;
+ this->command = cat_str(7, mm_strdup("declare"), cursor_marker, (yyvsp[-4].str), mm_strdup("cursor"), (yyvsp[-2].str), mm_strdup("for"), (yyvsp[0].str));
+ this->argsinsert = argsinsert;
+ this->argsinsert_oos = NULL;
+ this->argsresult = argsresult;
+ this->argsresult_oos = NULL;
+ argsinsert = argsresult = NULL;
+ cur = this;
+
+ c1 = mm_strdup(this->command);
+ if ((c2 = strstr(c1, "*/")) != NULL)
+ {
+ /* We put this text into a comment, so we better remove [*][/]. */
+ c2[0] = '.';
+ c2[1] = '.';
+ }
+ comment = cat_str(3, mm_strdup("/*"), c1, mm_strdup("*/"));
+
+ (yyval.str) = cat2_str(adjust_outofscope_cursor_vars(this), comment);
+ }
+#line 49432 "preproc.c"
+ break;
+
+ case 1620: /* cursor_name: name */
+#line 10058 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49440 "preproc.c"
+ break;
+
+ case 1621: /* cursor_name: char_civar */
+#line 10062 "preproc.y"
+ {
+ char *curname = mm_alloc(strlen((yyvsp[0].str)) + 2);
+ sprintf(curname, ":%s", (yyvsp[0].str));
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = curname;
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 49452 "preproc.c"
+ break;
+
+ case 1622: /* cursor_options: %empty */
+#line 10074 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49459 "preproc.c"
+ break;
+
+ case 1623: /* cursor_options: cursor_options NO SCROLL */
+#line 10077 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("no scroll"));
+}
+#line 49467 "preproc.c"
+ break;
+
+ case 1624: /* cursor_options: cursor_options SCROLL */
+#line 10081 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("scroll"));
+}
+#line 49475 "preproc.c"
+ break;
+
+ case 1625: /* cursor_options: cursor_options BINARY */
+#line 10085 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("binary"));
+}
+#line 49483 "preproc.c"
+ break;
+
+ case 1626: /* cursor_options: cursor_options ASENSITIVE */
+#line 10089 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("asensitive"));
+}
+#line 49491 "preproc.c"
+ break;
+
+ case 1627: /* cursor_options: cursor_options INSENSITIVE */
+#line 10093 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("insensitive"));
+}
+#line 49499 "preproc.c"
+ break;
+
+ case 1628: /* opt_hold: %empty */
+#line 10101 "preproc.y"
+ {
+ if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
+ (yyval.str) = mm_strdup("with hold");
+ else
+ (yyval.str) = EMPTY;
+ }
+#line 49510 "preproc.c"
+ break;
+
+ case 1629: /* opt_hold: WITH HOLD */
+#line 10108 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with hold");
+}
+#line 49518 "preproc.c"
+ break;
+
+ case 1630: /* opt_hold: WITHOUT HOLD */
+#line 10112 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("without hold");
+}
+#line 49526 "preproc.c"
+ break;
+
+ case 1631: /* SelectStmt: select_no_parens */
+#line 10120 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49534 "preproc.c"
+ break;
+
+ case 1632: /* SelectStmt: select_with_parens */
+#line 10124 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49542 "preproc.c"
+ break;
+
+ case 1633: /* select_with_parens: '(' select_no_parens ')' */
+#line 10132 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49550 "preproc.c"
+ break;
+
+ case 1634: /* select_with_parens: '(' select_with_parens ')' */
+#line 10136 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49558 "preproc.c"
+ break;
+
+ case 1635: /* select_no_parens: simple_select */
+#line 10144 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49566 "preproc.c"
+ break;
+
+ case 1636: /* select_no_parens: select_clause sort_clause */
+#line 10148 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49574 "preproc.c"
+ break;
+
+ case 1637: /* select_no_parens: select_clause opt_sort_clause for_locking_clause opt_select_limit */
+#line 10152 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49582 "preproc.c"
+ break;
+
+ case 1638: /* select_no_parens: select_clause opt_sort_clause select_limit opt_for_locking_clause */
+#line 10156 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49590 "preproc.c"
+ break;
+
+ case 1639: /* select_no_parens: with_clause select_clause */
+#line 10160 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49598 "preproc.c"
+ break;
+
+ case 1640: /* select_no_parens: with_clause select_clause sort_clause */
+#line 10164 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49606 "preproc.c"
+ break;
+
+ case 1641: /* select_no_parens: with_clause select_clause opt_sort_clause for_locking_clause opt_select_limit */
+#line 10168 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49614 "preproc.c"
+ break;
+
+ case 1642: /* select_no_parens: with_clause select_clause opt_sort_clause select_limit opt_for_locking_clause */
+#line 10172 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49622 "preproc.c"
+ break;
+
+ case 1643: /* select_clause: simple_select */
+#line 10180 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49630 "preproc.c"
+ break;
+
+ case 1644: /* select_clause: select_with_parens */
+#line 10184 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49638 "preproc.c"
+ break;
+
+ case 1645: /* simple_select: SELECT opt_all_clause opt_target_list into_clause from_clause where_clause group_clause having_clause window_clause */
+#line 10192 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("select"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49646 "preproc.c"
+ break;
+
+ case 1646: /* simple_select: SELECT distinct_clause target_list into_clause from_clause where_clause group_clause having_clause window_clause */
+#line 10196 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,mm_strdup("select"),(yyvsp[-7].str),(yyvsp[-6].str),(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49654 "preproc.c"
+ break;
+
+ case 1647: /* simple_select: values_clause */
+#line 10200 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49662 "preproc.c"
+ break;
+
+ case 1648: /* simple_select: TABLE relation_expr */
+#line 10204 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 49670 "preproc.c"
+ break;
+
+ case 1649: /* simple_select: select_clause UNION set_quantifier select_clause */
+#line 10208 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("union"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49678 "preproc.c"
+ break;
+
+ case 1650: /* simple_select: select_clause INTERSECT set_quantifier select_clause */
+#line 10212 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("intersect"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49686 "preproc.c"
+ break;
+
+ case 1651: /* simple_select: select_clause EXCEPT set_quantifier select_clause */
+#line 10216 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("except"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49694 "preproc.c"
+ break;
+
+ case 1652: /* with_clause: WITH cte_list */
+#line 10224 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 49702 "preproc.c"
+ break;
+
+ case 1653: /* with_clause: WITH_LA cte_list */
+#line 10228 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 49710 "preproc.c"
+ break;
+
+ case 1654: /* with_clause: WITH RECURSIVE cte_list */
+#line 10232 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with recursive"),(yyvsp[0].str));
+}
+#line 49718 "preproc.c"
+ break;
+
+ case 1655: /* cte_list: common_table_expr */
+#line 10240 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49726 "preproc.c"
+ break;
+
+ case 1656: /* cte_list: cte_list ',' common_table_expr */
+#line 10244 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49734 "preproc.c"
+ break;
+
+ case 1657: /* common_table_expr: name opt_name_list AS opt_materialized '(' PreparableStmt ')' opt_search_clause opt_cycle_clause */
+#line 10252 "preproc.y"
+ {
+ (yyval.str) = cat_str(9,(yyvsp[-8].str),(yyvsp[-7].str),mm_strdup("as"),(yyvsp[-5].str),mm_strdup("("),(yyvsp[-3].str),mm_strdup(")"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49742 "preproc.c"
+ break;
+
+ case 1658: /* opt_materialized: MATERIALIZED */
+#line 10260 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("materialized");
+}
+#line 49750 "preproc.c"
+ break;
+
+ case 1659: /* opt_materialized: NOT MATERIALIZED */
+#line 10264 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not materialized");
+}
+#line 49758 "preproc.c"
+ break;
+
+ case 1660: /* opt_materialized: %empty */
+#line 10268 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49765 "preproc.c"
+ break;
+
+ case 1661: /* opt_search_clause: SEARCH DEPTH FIRST_P BY columnList SET ColId */
+#line 10275 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("search depth first by"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 49773 "preproc.c"
+ break;
+
+ case 1662: /* opt_search_clause: SEARCH BREADTH FIRST_P BY columnList SET ColId */
+#line 10279 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("search breadth first by"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 49781 "preproc.c"
+ break;
+
+ case 1663: /* opt_search_clause: %empty */
+#line 10283 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49788 "preproc.c"
+ break;
+
+ case 1664: /* opt_cycle_clause: CYCLE columnList SET ColId TO AexprConst DEFAULT AexprConst USING ColId */
+#line 10290 "preproc.y"
+ {
+ (yyval.str) = cat_str(10,mm_strdup("cycle"),(yyvsp[-8].str),mm_strdup("set"),(yyvsp[-6].str),mm_strdup("to"),(yyvsp[-4].str),mm_strdup("default"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 49796 "preproc.c"
+ break;
+
+ case 1665: /* opt_cycle_clause: CYCLE columnList SET ColId USING ColId */
+#line 10294 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("cycle"),(yyvsp[-4].str),mm_strdup("set"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 49804 "preproc.c"
+ break;
+
+ case 1666: /* opt_cycle_clause: %empty */
+#line 10298 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49811 "preproc.c"
+ break;
+
+ case 1667: /* opt_with_clause: with_clause */
+#line 10305 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49819 "preproc.c"
+ break;
+
+ case 1668: /* opt_with_clause: %empty */
+#line 10309 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49826 "preproc.c"
+ break;
+
+ case 1669: /* into_clause: INTO OptTempTableName */
+#line 10316 "preproc.y"
+ {
+ FoundInto = 1;
+ (yyval.str)= cat2_str(mm_strdup("into"), (yyvsp[0].str));
+ }
+#line 49835 "preproc.c"
+ break;
+
+ case 1670: /* into_clause: ecpg_into */
+#line 10320 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 49841 "preproc.c"
+ break;
+
+ case 1671: /* into_clause: %empty */
+#line 10322 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49848 "preproc.c"
+ break;
+
+ case 1672: /* OptTempTableName: TEMPORARY opt_table qualified_name */
+#line 10329 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49856 "preproc.c"
+ break;
+
+ case 1673: /* OptTempTableName: TEMP opt_table qualified_name */
+#line 10333 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49864 "preproc.c"
+ break;
+
+ case 1674: /* OptTempTableName: LOCAL TEMPORARY opt_table qualified_name */
+#line 10337 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("local temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49872 "preproc.c"
+ break;
+
+ case 1675: /* OptTempTableName: LOCAL TEMP opt_table qualified_name */
+#line 10341 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("local temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49880 "preproc.c"
+ break;
+
+ case 1676: /* OptTempTableName: GLOBAL TEMPORARY opt_table qualified_name */
+#line 10345 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("global temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49888 "preproc.c"
+ break;
+
+ case 1677: /* OptTempTableName: GLOBAL TEMP opt_table qualified_name */
+#line 10349 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("global temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49896 "preproc.c"
+ break;
+
+ case 1678: /* OptTempTableName: UNLOGGED opt_table qualified_name */
+#line 10353 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unlogged"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49904 "preproc.c"
+ break;
+
+ case 1679: /* OptTempTableName: TABLE qualified_name */
+#line 10357 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 49912 "preproc.c"
+ break;
+
+ case 1680: /* OptTempTableName: qualified_name */
+#line 10361 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49920 "preproc.c"
+ break;
+
+ case 1681: /* opt_table: TABLE */
+#line 10369 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 49928 "preproc.c"
+ break;
+
+ case 1682: /* opt_table: %empty */
+#line 10373 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49935 "preproc.c"
+ break;
+
+ case 1683: /* set_quantifier: ALL */
+#line 10380 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 49943 "preproc.c"
+ break;
+
+ case 1684: /* set_quantifier: DISTINCT */
+#line 10384 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 49951 "preproc.c"
+ break;
+
+ case 1685: /* set_quantifier: %empty */
+#line 10388 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49958 "preproc.c"
+ break;
+
+ case 1686: /* distinct_clause: DISTINCT */
+#line 10395 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 49966 "preproc.c"
+ break;
+
+ case 1687: /* distinct_clause: DISTINCT ON '(' expr_list ')' */
+#line 10399 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("distinct on ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49974 "preproc.c"
+ break;
+
+ case 1688: /* opt_all_clause: ALL */
+#line 10407 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 49982 "preproc.c"
+ break;
+
+ case 1689: /* opt_all_clause: %empty */
+#line 10411 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 49989 "preproc.c"
+ break;
+
+ case 1690: /* opt_sort_clause: sort_clause */
+#line 10418 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49997 "preproc.c"
+ break;
+
+ case 1691: /* opt_sort_clause: %empty */
+#line 10422 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50004 "preproc.c"
+ break;
+
+ case 1692: /* sort_clause: ORDER BY sortby_list */
+#line 10429 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("order by"),(yyvsp[0].str));
+}
+#line 50012 "preproc.c"
+ break;
+
+ case 1693: /* sortby_list: sortby */
+#line 10437 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50020 "preproc.c"
+ break;
+
+ case 1694: /* sortby_list: sortby_list ',' sortby */
+#line 10441 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 50028 "preproc.c"
+ break;
+
+ case 1695: /* sortby: a_expr USING qual_all_Op opt_nulls_order */
+#line 10449 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50036 "preproc.c"
+ break;
+
+ case 1696: /* sortby: a_expr opt_asc_desc opt_nulls_order */
+#line 10453 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50044 "preproc.c"
+ break;
+
+ case 1697: /* select_limit: limit_clause offset_clause */
+#line 10461 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50052 "preproc.c"
+ break;
+
+ case 1698: /* select_limit: offset_clause limit_clause */
+#line 10465 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50060 "preproc.c"
+ break;
+
+ case 1699: /* select_limit: limit_clause */
+#line 10469 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50068 "preproc.c"
+ break;
+
+ case 1700: /* select_limit: offset_clause */
+#line 10473 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50076 "preproc.c"
+ break;
+
+ case 1701: /* opt_select_limit: select_limit */
+#line 10481 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50084 "preproc.c"
+ break;
+
+ case 1702: /* opt_select_limit: %empty */
+#line 10485 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50091 "preproc.c"
+ break;
+
+ case 1703: /* limit_clause: LIMIT select_limit_value */
+#line 10492 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("limit"),(yyvsp[0].str));
+}
+#line 50099 "preproc.c"
+ break;
+
+ case 1704: /* limit_clause: LIMIT select_limit_value ',' select_offset_value */
+#line 10496 "preproc.y"
+ {
+ mmerror(PARSE_ERROR, ET_WARNING, "no longer supported LIMIT #,# syntax passed to server");
+ (yyval.str) = cat_str(4, mm_strdup("limit"), (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str));
+ }
+#line 50108 "preproc.c"
+ break;
+
+ case 1705: /* limit_clause: FETCH first_or_next select_fetch_first_value row_or_rows ONLY */
+#line 10501 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("fetch"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("only"));
+}
+#line 50116 "preproc.c"
+ break;
+
+ case 1706: /* limit_clause: FETCH first_or_next select_fetch_first_value row_or_rows WITH TIES */
+#line 10505 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("fetch"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("with ties"));
+}
+#line 50124 "preproc.c"
+ break;
+
+ case 1707: /* limit_clause: FETCH first_or_next row_or_rows ONLY */
+#line 10509 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("fetch"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("only"));
+}
+#line 50132 "preproc.c"
+ break;
+
+ case 1708: /* limit_clause: FETCH first_or_next row_or_rows WITH TIES */
+#line 10513 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("fetch"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("with ties"));
+}
+#line 50140 "preproc.c"
+ break;
+
+ case 1709: /* offset_clause: OFFSET select_offset_value */
+#line 10521 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("offset"),(yyvsp[0].str));
+}
+#line 50148 "preproc.c"
+ break;
+
+ case 1710: /* offset_clause: OFFSET select_fetch_first_value row_or_rows */
+#line 10525 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("offset"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50156 "preproc.c"
+ break;
+
+ case 1711: /* select_limit_value: a_expr */
+#line 10533 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50164 "preproc.c"
+ break;
+
+ case 1712: /* select_limit_value: ALL */
+#line 10537 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 50172 "preproc.c"
+ break;
+
+ case 1713: /* select_offset_value: a_expr */
+#line 10545 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50180 "preproc.c"
+ break;
+
+ case 1714: /* select_fetch_first_value: c_expr */
+#line 10553 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50188 "preproc.c"
+ break;
+
+ case 1715: /* select_fetch_first_value: '+' I_or_F_const */
+#line 10557 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 50196 "preproc.c"
+ break;
+
+ case 1716: /* select_fetch_first_value: '-' I_or_F_const */
+#line 10561 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 50204 "preproc.c"
+ break;
+
+ case 1717: /* I_or_F_const: Iconst */
+#line 10569 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50212 "preproc.c"
+ break;
+
+ case 1718: /* I_or_F_const: ecpg_fconst */
+#line 10573 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50220 "preproc.c"
+ break;
+
+ case 1719: /* row_or_rows: ROW */
+#line 10581 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 50228 "preproc.c"
+ break;
+
+ case 1720: /* row_or_rows: ROWS */
+#line 10585 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rows");
+}
+#line 50236 "preproc.c"
+ break;
+
+ case 1721: /* first_or_next: FIRST_P */
+#line 10593 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("first");
+}
+#line 50244 "preproc.c"
+ break;
+
+ case 1722: /* first_or_next: NEXT */
+#line 10597 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("next");
+}
+#line 50252 "preproc.c"
+ break;
+
+ case 1723: /* group_clause: GROUP_P BY set_quantifier group_by_list */
+#line 10605 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("group by"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50260 "preproc.c"
+ break;
+
+ case 1724: /* group_clause: %empty */
+#line 10609 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50267 "preproc.c"
+ break;
+
+ case 1725: /* group_by_list: group_by_item */
+#line 10616 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50275 "preproc.c"
+ break;
+
+ case 1726: /* group_by_list: group_by_list ',' group_by_item */
+#line 10620 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 50283 "preproc.c"
+ break;
+
+ case 1727: /* group_by_item: a_expr */
+#line 10628 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50291 "preproc.c"
+ break;
+
+ case 1728: /* group_by_item: empty_grouping_set */
+#line 10632 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50299 "preproc.c"
+ break;
+
+ case 1729: /* group_by_item: cube_clause */
+#line 10636 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50307 "preproc.c"
+ break;
+
+ case 1730: /* group_by_item: rollup_clause */
+#line 10640 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50315 "preproc.c"
+ break;
+
+ case 1731: /* group_by_item: grouping_sets_clause */
+#line 10644 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50323 "preproc.c"
+ break;
+
+ case 1732: /* empty_grouping_set: '(' ')' */
+#line 10652 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 50331 "preproc.c"
+ break;
+
+ case 1733: /* rollup_clause: ROLLUP '(' expr_list ')' */
+#line 10660 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rollup ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50339 "preproc.c"
+ break;
+
+ case 1734: /* cube_clause: CUBE '(' expr_list ')' */
+#line 10668 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("cube ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50347 "preproc.c"
+ break;
+
+ case 1735: /* grouping_sets_clause: GROUPING SETS '(' group_by_list ')' */
+#line 10676 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("grouping sets ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50355 "preproc.c"
+ break;
+
+ case 1736: /* having_clause: HAVING a_expr */
+#line 10684 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("having"),(yyvsp[0].str));
+}
+#line 50363 "preproc.c"
+ break;
+
+ case 1737: /* having_clause: %empty */
+#line 10688 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50370 "preproc.c"
+ break;
+
+ case 1738: /* for_locking_clause: for_locking_items */
+#line 10695 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50378 "preproc.c"
+ break;
+
+ case 1739: /* for_locking_clause: FOR READ ONLY */
+#line 10699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for read only");
+}
+#line 50386 "preproc.c"
+ break;
+
+ case 1740: /* opt_for_locking_clause: for_locking_clause */
+#line 10707 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50394 "preproc.c"
+ break;
+
+ case 1741: /* opt_for_locking_clause: %empty */
+#line 10711 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50401 "preproc.c"
+ break;
+
+ case 1742: /* for_locking_items: for_locking_item */
+#line 10718 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50409 "preproc.c"
+ break;
+
+ case 1743: /* for_locking_items: for_locking_items for_locking_item */
+#line 10722 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50417 "preproc.c"
+ break;
+
+ case 1744: /* for_locking_item: for_locking_strength locked_rels_list opt_nowait_or_skip */
+#line 10730 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50425 "preproc.c"
+ break;
+
+ case 1745: /* for_locking_strength: FOR UPDATE */
+#line 10738 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for update");
+}
+#line 50433 "preproc.c"
+ break;
+
+ case 1746: /* for_locking_strength: FOR NO KEY UPDATE */
+#line 10742 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for no key update");
+}
+#line 50441 "preproc.c"
+ break;
+
+ case 1747: /* for_locking_strength: FOR SHARE */
+#line 10746 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for share");
+}
+#line 50449 "preproc.c"
+ break;
+
+ case 1748: /* for_locking_strength: FOR KEY SHARE */
+#line 10750 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for key share");
+}
+#line 50457 "preproc.c"
+ break;
+
+ case 1749: /* locked_rels_list: OF qualified_name_list */
+#line 10758 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("of"),(yyvsp[0].str));
+}
+#line 50465 "preproc.c"
+ break;
+
+ case 1750: /* locked_rels_list: %empty */
+#line 10762 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50472 "preproc.c"
+ break;
+
+ case 1751: /* values_clause: VALUES '(' expr_list ')' */
+#line 10769 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("values ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50480 "preproc.c"
+ break;
+
+ case 1752: /* values_clause: values_clause ',' '(' expr_list ')' */
+#line 10773 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup(", ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50488 "preproc.c"
+ break;
+
+ case 1753: /* from_clause: FROM from_list */
+#line 10781 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 50496 "preproc.c"
+ break;
+
+ case 1754: /* from_clause: %empty */
+#line 10785 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50503 "preproc.c"
+ break;
+
+ case 1755: /* from_list: table_ref */
+#line 10792 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50511 "preproc.c"
+ break;
+
+ case 1756: /* from_list: from_list ',' table_ref */
+#line 10796 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 50519 "preproc.c"
+ break;
+
+ case 1757: /* table_ref: relation_expr opt_alias_clause */
+#line 10804 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50527 "preproc.c"
+ break;
+
+ case 1758: /* table_ref: relation_expr opt_alias_clause tablesample_clause */
+#line 10808 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50535 "preproc.c"
+ break;
+
+ case 1759: /* table_ref: func_table func_alias_clause */
+#line 10812 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50543 "preproc.c"
+ break;
+
+ case 1760: /* table_ref: LATERAL_P func_table func_alias_clause */
+#line 10816 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("lateral"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50551 "preproc.c"
+ break;
+
+ case 1761: /* table_ref: xmltable opt_alias_clause */
+#line 10820 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50559 "preproc.c"
+ break;
+
+ case 1762: /* table_ref: LATERAL_P xmltable opt_alias_clause */
+#line 10824 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("lateral"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50567 "preproc.c"
+ break;
+
+ case 1763: /* table_ref: select_with_parens opt_alias_clause */
+#line 10828 "preproc.y"
+ {
+ if ((yyvsp[0].str) == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50578 "preproc.c"
+ break;
+
+ case 1764: /* table_ref: LATERAL_P select_with_parens opt_alias_clause */
+#line 10835 "preproc.y"
+ {
+ if ((yyvsp[0].str) == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+
+ (yyval.str) = cat_str(3,mm_strdup("lateral"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50589 "preproc.c"
+ break;
+
+ case 1765: /* table_ref: joined_table */
+#line 10842 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50597 "preproc.c"
+ break;
+
+ case 1766: /* table_ref: '(' joined_table ')' alias_clause */
+#line 10846 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 50605 "preproc.c"
+ break;
+
+ case 1767: /* joined_table: '(' joined_table ')' */
+#line 10854 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50613 "preproc.c"
+ break;
+
+ case 1768: /* joined_table: table_ref CROSS JOIN table_ref */
+#line 10858 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("cross join"),(yyvsp[0].str));
+}
+#line 50621 "preproc.c"
+ break;
+
+ case 1769: /* joined_table: table_ref join_type JOIN table_ref join_qual */
+#line 10862 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("join"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50629 "preproc.c"
+ break;
+
+ case 1770: /* joined_table: table_ref JOIN table_ref join_qual */
+#line 10866 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("join"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50637 "preproc.c"
+ break;
+
+ case 1771: /* joined_table: table_ref NATURAL join_type JOIN table_ref */
+#line 10870 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("natural"),(yyvsp[-2].str),mm_strdup("join"),(yyvsp[0].str));
+}
+#line 50645 "preproc.c"
+ break;
+
+ case 1772: /* joined_table: table_ref NATURAL JOIN table_ref */
+#line 10874 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("natural join"),(yyvsp[0].str));
+}
+#line 50653 "preproc.c"
+ break;
+
+ case 1773: /* alias_clause: AS ColId '(' name_list ')' */
+#line 10882 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("as"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50661 "preproc.c"
+ break;
+
+ case 1774: /* alias_clause: AS ColId */
+#line 10886 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 50669 "preproc.c"
+ break;
+
+ case 1775: /* alias_clause: ColId '(' name_list ')' */
+#line 10890 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50677 "preproc.c"
+ break;
+
+ case 1776: /* alias_clause: ColId */
+#line 10894 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50685 "preproc.c"
+ break;
+
+ case 1777: /* opt_alias_clause: alias_clause */
+#line 10902 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50693 "preproc.c"
+ break;
+
+ case 1778: /* opt_alias_clause: %empty */
+#line 10906 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50700 "preproc.c"
+ break;
+
+ case 1779: /* opt_alias_clause_for_join_using: AS ColId */
+#line 10913 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 50708 "preproc.c"
+ break;
+
+ case 1780: /* opt_alias_clause_for_join_using: %empty */
+#line 10917 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50715 "preproc.c"
+ break;
+
+ case 1781: /* func_alias_clause: alias_clause */
+#line 10924 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50723 "preproc.c"
+ break;
+
+ case 1782: /* func_alias_clause: AS '(' TableFuncElementList ')' */
+#line 10928 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50731 "preproc.c"
+ break;
+
+ case 1783: /* func_alias_clause: AS ColId '(' TableFuncElementList ')' */
+#line 10932 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("as"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50739 "preproc.c"
+ break;
+
+ case 1784: /* func_alias_clause: ColId '(' TableFuncElementList ')' */
+#line 10936 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50747 "preproc.c"
+ break;
+
+ case 1785: /* func_alias_clause: %empty */
+#line 10940 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50754 "preproc.c"
+ break;
+
+ case 1786: /* join_type: FULL opt_outer */
+#line 10947 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("full"),(yyvsp[0].str));
+}
+#line 50762 "preproc.c"
+ break;
+
+ case 1787: /* join_type: LEFT opt_outer */
+#line 10951 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("left"),(yyvsp[0].str));
+}
+#line 50770 "preproc.c"
+ break;
+
+ case 1788: /* join_type: RIGHT opt_outer */
+#line 10955 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("right"),(yyvsp[0].str));
+}
+#line 50778 "preproc.c"
+ break;
+
+ case 1789: /* join_type: INNER_P */
+#line 10959 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inner");
+}
+#line 50786 "preproc.c"
+ break;
+
+ case 1790: /* opt_outer: OUTER_P */
+#line 10967 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("outer");
+}
+#line 50794 "preproc.c"
+ break;
+
+ case 1791: /* opt_outer: %empty */
+#line 10971 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50801 "preproc.c"
+ break;
+
+ case 1792: /* join_qual: USING '(' name_list ')' opt_alias_clause_for_join_using */
+#line 10978 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("using ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 50809 "preproc.c"
+ break;
+
+ case 1793: /* join_qual: ON a_expr */
+#line 10982 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on"),(yyvsp[0].str));
+}
+#line 50817 "preproc.c"
+ break;
+
+ case 1794: /* relation_expr: qualified_name */
+#line 10990 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50825 "preproc.c"
+ break;
+
+ case 1795: /* relation_expr: qualified_name '*' */
+#line 10994 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("*"));
+}
+#line 50833 "preproc.c"
+ break;
+
+ case 1796: /* relation_expr: ONLY qualified_name */
+#line 10998 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("only"),(yyvsp[0].str));
+}
+#line 50841 "preproc.c"
+ break;
+
+ case 1797: /* relation_expr: ONLY '(' qualified_name ')' */
+#line 11002 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("only ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50849 "preproc.c"
+ break;
+
+ case 1798: /* relation_expr_list: relation_expr */
+#line 11010 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50857 "preproc.c"
+ break;
+
+ case 1799: /* relation_expr_list: relation_expr_list ',' relation_expr */
+#line 11014 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 50865 "preproc.c"
+ break;
+
+ case 1800: /* relation_expr_opt_alias: relation_expr */
+#line 11022 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50873 "preproc.c"
+ break;
+
+ case 1801: /* relation_expr_opt_alias: relation_expr ColId */
+#line 11026 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50881 "preproc.c"
+ break;
+
+ case 1802: /* relation_expr_opt_alias: relation_expr AS ColId */
+#line 11030 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 50889 "preproc.c"
+ break;
+
+ case 1803: /* tablesample_clause: TABLESAMPLE func_name '(' expr_list ')' opt_repeatable_clause */
+#line 11038 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("tablesample"),(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 50897 "preproc.c"
+ break;
+
+ case 1804: /* opt_repeatable_clause: REPEATABLE '(' a_expr ')' */
+#line 11046 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("repeatable ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50905 "preproc.c"
+ break;
+
+ case 1805: /* opt_repeatable_clause: %empty */
+#line 11050 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50912 "preproc.c"
+ break;
+
+ case 1806: /* func_table: func_expr_windowless opt_ordinality */
+#line 11057 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50920 "preproc.c"
+ break;
+
+ case 1807: /* func_table: ROWS FROM '(' rowsfrom_list ')' opt_ordinality */
+#line 11061 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rows from ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 50928 "preproc.c"
+ break;
+
+ case 1808: /* rowsfrom_item: func_expr_windowless opt_col_def_list */
+#line 11069 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50936 "preproc.c"
+ break;
+
+ case 1809: /* rowsfrom_list: rowsfrom_item */
+#line 11077 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50944 "preproc.c"
+ break;
+
+ case 1810: /* rowsfrom_list: rowsfrom_list ',' rowsfrom_item */
+#line 11081 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 50952 "preproc.c"
+ break;
+
+ case 1811: /* opt_col_def_list: AS '(' TableFuncElementList ')' */
+#line 11089 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50960 "preproc.c"
+ break;
+
+ case 1812: /* opt_col_def_list: %empty */
+#line 11093 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50967 "preproc.c"
+ break;
+
+ case 1813: /* opt_ordinality: WITH_LA ORDINALITY */
+#line 11100 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with ordinality");
+}
+#line 50975 "preproc.c"
+ break;
+
+ case 1814: /* opt_ordinality: %empty */
+#line 11104 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50982 "preproc.c"
+ break;
+
+ case 1815: /* where_clause: WHERE a_expr */
+#line 11111 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("where"),(yyvsp[0].str));
+}
+#line 50990 "preproc.c"
+ break;
+
+ case 1816: /* where_clause: %empty */
+#line 11115 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 50997 "preproc.c"
+ break;
+
+ case 1817: /* where_or_current_clause: WHERE a_expr */
+#line 11122 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("where"),(yyvsp[0].str));
+}
+#line 51005 "preproc.c"
+ break;
+
+ case 1818: /* where_or_current_clause: WHERE CURRENT_P OF cursor_name */
+#line 11126 "preproc.y"
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ (yyval.str) = cat_str(2,mm_strdup("where current of"), cursor_marker);
+ }
+#line 51014 "preproc.c"
+ break;
+
+ case 1819: /* where_or_current_clause: %empty */
+#line 11131 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51021 "preproc.c"
+ break;
+
+ case 1820: /* OptTableFuncElementList: TableFuncElementList */
+#line 11138 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51029 "preproc.c"
+ break;
+
+ case 1821: /* OptTableFuncElementList: %empty */
+#line 11142 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51036 "preproc.c"
+ break;
+
+ case 1822: /* TableFuncElementList: TableFuncElement */
+#line 11149 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51044 "preproc.c"
+ break;
+
+ case 1823: /* TableFuncElementList: TableFuncElementList ',' TableFuncElement */
+#line 11153 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 51052 "preproc.c"
+ break;
+
+ case 1824: /* TableFuncElement: ColId Typename opt_collate_clause */
+#line 11161 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51060 "preproc.c"
+ break;
+
+ case 1825: /* xmltable: XMLTABLE '(' c_expr xmlexists_argument COLUMNS xmltable_column_list ')' */
+#line 11169 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmltable ("),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("columns"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51068 "preproc.c"
+ break;
+
+ case 1826: /* xmltable: XMLTABLE '(' XMLNAMESPACES '(' xml_namespace_list ')' ',' c_expr xmlexists_argument COLUMNS xmltable_column_list ')' */
+#line 11173 "preproc.y"
+ {
+ (yyval.str) = cat_str(8,mm_strdup("xmltable ( xmlnamespaces ("),(yyvsp[-7].str),mm_strdup(") ,"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("columns"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51076 "preproc.c"
+ break;
+
+ case 1827: /* xmltable_column_list: xmltable_column_el */
+#line 11181 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51084 "preproc.c"
+ break;
+
+ case 1828: /* xmltable_column_list: xmltable_column_list ',' xmltable_column_el */
+#line 11185 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 51092 "preproc.c"
+ break;
+
+ case 1829: /* xmltable_column_el: ColId Typename */
+#line 11193 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51100 "preproc.c"
+ break;
+
+ case 1830: /* xmltable_column_el: ColId Typename xmltable_column_option_list */
+#line 11197 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51108 "preproc.c"
+ break;
+
+ case 1831: /* xmltable_column_el: ColId FOR ORDINALITY */
+#line 11201 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("for ordinality"));
+}
+#line 51116 "preproc.c"
+ break;
+
+ case 1832: /* xmltable_column_option_list: xmltable_column_option_el */
+#line 11209 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51124 "preproc.c"
+ break;
+
+ case 1833: /* xmltable_column_option_list: xmltable_column_option_list xmltable_column_option_el */
+#line 11213 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51132 "preproc.c"
+ break;
+
+ case 1834: /* xmltable_column_option_el: ecpg_ident b_expr */
+#line 11221 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51140 "preproc.c"
+ break;
+
+ case 1835: /* xmltable_column_option_el: DEFAULT b_expr */
+#line 11225 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 51148 "preproc.c"
+ break;
+
+ case 1836: /* xmltable_column_option_el: NOT NULL_P */
+#line 11229 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not null");
+}
+#line 51156 "preproc.c"
+ break;
+
+ case 1837: /* xmltable_column_option_el: NULL_P */
+#line 11233 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 51164 "preproc.c"
+ break;
+
+ case 1838: /* xml_namespace_list: xml_namespace_el */
+#line 11241 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51172 "preproc.c"
+ break;
+
+ case 1839: /* xml_namespace_list: xml_namespace_list ',' xml_namespace_el */
+#line 11245 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 51180 "preproc.c"
+ break;
+
+ case 1840: /* xml_namespace_el: b_expr AS ColLabel */
+#line 11253 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 51188 "preproc.c"
+ break;
+
+ case 1841: /* xml_namespace_el: DEFAULT b_expr */
+#line 11257 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 51196 "preproc.c"
+ break;
+
+ case 1842: /* Typename: SimpleTypename opt_array_bounds */
+#line 11265 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].index).str); }
+#line 51202 "preproc.c"
+ break;
+
+ case 1843: /* Typename: SETOF SimpleTypename opt_array_bounds */
+#line 11267 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("setof"), (yyvsp[-1].str), (yyvsp[0].index).str); }
+#line 51208 "preproc.c"
+ break;
+
+ case 1844: /* Typename: SimpleTypename ARRAY '[' Iconst ']' */
+#line 11269 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("array ["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 51216 "preproc.c"
+ break;
+
+ case 1845: /* Typename: SETOF SimpleTypename ARRAY '[' Iconst ']' */
+#line 11273 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("setof"),(yyvsp[-4].str),mm_strdup("array ["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 51224 "preproc.c"
+ break;
+
+ case 1846: /* Typename: SimpleTypename ARRAY */
+#line 11277 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("array"));
+}
+#line 51232 "preproc.c"
+ break;
+
+ case 1847: /* Typename: SETOF SimpleTypename ARRAY */
+#line 11281 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("setof"),(yyvsp[-1].str),mm_strdup("array"));
+}
+#line 51240 "preproc.c"
+ break;
+
+ case 1848: /* opt_array_bounds: opt_array_bounds '[' ']' */
+#line 11289 "preproc.y"
+ {
+ (yyval.index).index1 = (yyvsp[-2].index).index1;
+ (yyval.index).index2 = (yyvsp[-2].index).index2;
+ if (strcmp((yyval.index).index1, "-1") == 0)
+ (yyval.index).index1 = mm_strdup("0");
+ else if (strcmp((yyvsp[-2].index).index2, "-1") == 0)
+ (yyval.index).index2 = mm_strdup("0");
+ (yyval.index).str = cat_str(2, (yyvsp[-2].index).str, mm_strdup("[]"));
+ }
+#line 51254 "preproc.c"
+ break;
+
+ case 1849: /* opt_array_bounds: opt_array_bounds '[' Iresult ']' */
+#line 11299 "preproc.y"
+ {
+ (yyval.index).index1 = (yyvsp[-3].index).index1;
+ (yyval.index).index2 = (yyvsp[-3].index).index2;
+ if (strcmp((yyvsp[-3].index).index1, "-1") == 0)
+ (yyval.index).index1 = mm_strdup((yyvsp[-1].str));
+ else if (strcmp((yyvsp[-3].index).index2, "-1") == 0)
+ (yyval.index).index2 = mm_strdup((yyvsp[-1].str));
+ (yyval.index).str = cat_str(4, (yyvsp[-3].index).str, mm_strdup("["), (yyvsp[-1].str), mm_strdup("]"));
+ }
+#line 51268 "preproc.c"
+ break;
+
+ case 1850: /* opt_array_bounds: %empty */
+#line 11309 "preproc.y"
+ {
+ (yyval.index).index1 = mm_strdup("-1");
+ (yyval.index).index2 = mm_strdup("-1");
+ (yyval.index).str= EMPTY;
+ }
+#line 51278 "preproc.c"
+ break;
+
+ case 1851: /* SimpleTypename: GenericType */
+#line 11319 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51286 "preproc.c"
+ break;
+
+ case 1852: /* SimpleTypename: Numeric */
+#line 11323 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51294 "preproc.c"
+ break;
+
+ case 1853: /* SimpleTypename: Bit */
+#line 11327 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51302 "preproc.c"
+ break;
+
+ case 1854: /* SimpleTypename: Character */
+#line 11331 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51310 "preproc.c"
+ break;
+
+ case 1855: /* SimpleTypename: ConstDatetime */
+#line 11335 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51318 "preproc.c"
+ break;
+
+ case 1856: /* SimpleTypename: ConstInterval opt_interval */
+#line 11339 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51326 "preproc.c"
+ break;
+
+ case 1857: /* SimpleTypename: ConstInterval '(' Iconst ')' */
+#line 11343 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51334 "preproc.c"
+ break;
+
+ case 1858: /* ConstTypename: Numeric */
+#line 11351 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51342 "preproc.c"
+ break;
+
+ case 1859: /* ConstTypename: ConstBit */
+#line 11355 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51350 "preproc.c"
+ break;
+
+ case 1860: /* ConstTypename: ConstCharacter */
+#line 11359 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51358 "preproc.c"
+ break;
+
+ case 1861: /* ConstTypename: ConstDatetime */
+#line 11363 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51366 "preproc.c"
+ break;
+
+ case 1862: /* GenericType: type_function_name opt_type_modifiers */
+#line 11371 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51374 "preproc.c"
+ break;
+
+ case 1863: /* GenericType: type_function_name attrs opt_type_modifiers */
+#line 11375 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51382 "preproc.c"
+ break;
+
+ case 1864: /* opt_type_modifiers: '(' expr_list ')' */
+#line 11383 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51390 "preproc.c"
+ break;
+
+ case 1865: /* opt_type_modifiers: %empty */
+#line 11387 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51397 "preproc.c"
+ break;
+
+ case 1866: /* Numeric: INT_P */
+#line 11394 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("int");
+}
+#line 51405 "preproc.c"
+ break;
+
+ case 1867: /* Numeric: INTEGER */
+#line 11398 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("integer");
+}
+#line 51413 "preproc.c"
+ break;
+
+ case 1868: /* Numeric: SMALLINT */
+#line 11402 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("smallint");
+}
+#line 51421 "preproc.c"
+ break;
+
+ case 1869: /* Numeric: BIGINT */
+#line 11406 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("bigint");
+}
+#line 51429 "preproc.c"
+ break;
+
+ case 1870: /* Numeric: REAL */
+#line 11410 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("real");
+}
+#line 51437 "preproc.c"
+ break;
+
+ case 1871: /* Numeric: FLOAT_P opt_float */
+#line 11414 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("float"),(yyvsp[0].str));
+}
+#line 51445 "preproc.c"
+ break;
+
+ case 1872: /* Numeric: DOUBLE_P PRECISION */
+#line 11418 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("double precision");
+}
+#line 51453 "preproc.c"
+ break;
+
+ case 1873: /* Numeric: DECIMAL_P opt_type_modifiers */
+#line 11422 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("decimal"),(yyvsp[0].str));
+}
+#line 51461 "preproc.c"
+ break;
+
+ case 1874: /* Numeric: DEC opt_type_modifiers */
+#line 11426 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("dec"),(yyvsp[0].str));
+}
+#line 51469 "preproc.c"
+ break;
+
+ case 1875: /* Numeric: NUMERIC opt_type_modifiers */
+#line 11430 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("numeric"),(yyvsp[0].str));
+}
+#line 51477 "preproc.c"
+ break;
+
+ case 1876: /* Numeric: BOOLEAN_P */
+#line 11434 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("boolean");
+}
+#line 51485 "preproc.c"
+ break;
+
+ case 1877: /* opt_float: '(' Iconst ')' */
+#line 11442 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51493 "preproc.c"
+ break;
+
+ case 1878: /* opt_float: %empty */
+#line 11446 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51500 "preproc.c"
+ break;
+
+ case 1879: /* Bit: BitWithLength */
+#line 11453 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51508 "preproc.c"
+ break;
+
+ case 1880: /* Bit: BitWithoutLength */
+#line 11457 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51516 "preproc.c"
+ break;
+
+ case 1881: /* ConstBit: BitWithLength */
+#line 11465 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51524 "preproc.c"
+ break;
+
+ case 1882: /* ConstBit: BitWithoutLength */
+#line 11469 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51532 "preproc.c"
+ break;
+
+ case 1883: /* BitWithLength: BIT opt_varying '(' expr_list ')' */
+#line 11477 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("bit"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51540 "preproc.c"
+ break;
+
+ case 1884: /* BitWithoutLength: BIT opt_varying */
+#line 11485 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("bit"),(yyvsp[0].str));
+}
+#line 51548 "preproc.c"
+ break;
+
+ case 1885: /* Character: CharacterWithLength */
+#line 11493 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51556 "preproc.c"
+ break;
+
+ case 1886: /* Character: CharacterWithoutLength */
+#line 11497 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51564 "preproc.c"
+ break;
+
+ case 1887: /* ConstCharacter: CharacterWithLength */
+#line 11505 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51572 "preproc.c"
+ break;
+
+ case 1888: /* ConstCharacter: CharacterWithoutLength */
+#line 11509 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51580 "preproc.c"
+ break;
+
+ case 1889: /* CharacterWithLength: character '(' Iconst ')' */
+#line 11517 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51588 "preproc.c"
+ break;
+
+ case 1890: /* CharacterWithoutLength: character */
+#line 11525 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51596 "preproc.c"
+ break;
+
+ case 1891: /* character: CHARACTER opt_varying */
+#line 11533 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("character"),(yyvsp[0].str));
+}
+#line 51604 "preproc.c"
+ break;
+
+ case 1892: /* character: CHAR_P opt_varying */
+#line 11537 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("char"),(yyvsp[0].str));
+}
+#line 51612 "preproc.c"
+ break;
+
+ case 1893: /* character: VARCHAR */
+#line 11541 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("varchar");
+}
+#line 51620 "preproc.c"
+ break;
+
+ case 1894: /* character: NATIONAL CHARACTER opt_varying */
+#line 11545 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("national character"),(yyvsp[0].str));
+}
+#line 51628 "preproc.c"
+ break;
+
+ case 1895: /* character: NATIONAL CHAR_P opt_varying */
+#line 11549 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("national char"),(yyvsp[0].str));
+}
+#line 51636 "preproc.c"
+ break;
+
+ case 1896: /* character: NCHAR opt_varying */
+#line 11553 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("nchar"),(yyvsp[0].str));
+}
+#line 51644 "preproc.c"
+ break;
+
+ case 1897: /* opt_varying: VARYING */
+#line 11561 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("varying");
+}
+#line 51652 "preproc.c"
+ break;
+
+ case 1898: /* opt_varying: %empty */
+#line 11565 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51659 "preproc.c"
+ break;
+
+ case 1899: /* ConstDatetime: TIMESTAMP '(' Iconst ')' opt_timezone */
+#line 11572 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("timestamp ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 51667 "preproc.c"
+ break;
+
+ case 1900: /* ConstDatetime: TIMESTAMP opt_timezone */
+#line 11576 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("timestamp"),(yyvsp[0].str));
+}
+#line 51675 "preproc.c"
+ break;
+
+ case 1901: /* ConstDatetime: TIME '(' Iconst ')' opt_timezone */
+#line 11580 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("time ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 51683 "preproc.c"
+ break;
+
+ case 1902: /* ConstDatetime: TIME opt_timezone */
+#line 11584 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("time"),(yyvsp[0].str));
+}
+#line 51691 "preproc.c"
+ break;
+
+ case 1903: /* ConstInterval: INTERVAL */
+#line 11592 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("interval");
+}
+#line 51699 "preproc.c"
+ break;
+
+ case 1904: /* opt_timezone: WITH_LA TIME ZONE */
+#line 11600 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with time zone");
+}
+#line 51707 "preproc.c"
+ break;
+
+ case 1905: /* opt_timezone: WITHOUT TIME ZONE */
+#line 11604 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("without time zone");
+}
+#line 51715 "preproc.c"
+ break;
+
+ case 1906: /* opt_timezone: %empty */
+#line 11608 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51722 "preproc.c"
+ break;
+
+ case 1907: /* opt_interval: YEAR_P */
+#line 11615 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("year");
+}
+#line 51730 "preproc.c"
+ break;
+
+ case 1908: /* opt_interval: MONTH_P */
+#line 11619 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("month");
+}
+#line 51738 "preproc.c"
+ break;
+
+ case 1909: /* opt_interval: DAY_P */
+#line 11623 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("day");
+}
+#line 51746 "preproc.c"
+ break;
+
+ case 1910: /* opt_interval: HOUR_P */
+#line 11627 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("hour");
+}
+#line 51754 "preproc.c"
+ break;
+
+ case 1911: /* opt_interval: MINUTE_P */
+#line 11631 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("minute");
+}
+#line 51762 "preproc.c"
+ break;
+
+ case 1912: /* opt_interval: interval_second */
+#line 11635 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51770 "preproc.c"
+ break;
+
+ case 1913: /* opt_interval: YEAR_P TO MONTH_P */
+#line 11639 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("year to month");
+}
+#line 51778 "preproc.c"
+ break;
+
+ case 1914: /* opt_interval: DAY_P TO HOUR_P */
+#line 11643 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("day to hour");
+}
+#line 51786 "preproc.c"
+ break;
+
+ case 1915: /* opt_interval: DAY_P TO MINUTE_P */
+#line 11647 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("day to minute");
+}
+#line 51794 "preproc.c"
+ break;
+
+ case 1916: /* opt_interval: DAY_P TO interval_second */
+#line 11651 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("day to"),(yyvsp[0].str));
+}
+#line 51802 "preproc.c"
+ break;
+
+ case 1917: /* opt_interval: HOUR_P TO MINUTE_P */
+#line 11655 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("hour to minute");
+}
+#line 51810 "preproc.c"
+ break;
+
+ case 1918: /* opt_interval: HOUR_P TO interval_second */
+#line 11659 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("hour to"),(yyvsp[0].str));
+}
+#line 51818 "preproc.c"
+ break;
+
+ case 1919: /* opt_interval: MINUTE_P TO interval_second */
+#line 11663 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("minute to"),(yyvsp[0].str));
+}
+#line 51826 "preproc.c"
+ break;
+
+ case 1920: /* opt_interval: %empty */
+#line 11667 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 51833 "preproc.c"
+ break;
+
+ case 1921: /* interval_second: SECOND_P */
+#line 11674 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("second");
+}
+#line 51841 "preproc.c"
+ break;
+
+ case 1922: /* interval_second: SECOND_P '(' Iconst ')' */
+#line 11678 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("second ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51849 "preproc.c"
+ break;
+
+ case 1923: /* a_expr: c_expr */
+#line 11686 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51857 "preproc.c"
+ break;
+
+ case 1924: /* a_expr: a_expr TYPECAST Typename */
+#line 11690 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("::"),(yyvsp[0].str));
+}
+#line 51865 "preproc.c"
+ break;
+
+ case 1925: /* a_expr: a_expr COLLATE any_name */
+#line 11694 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 51873 "preproc.c"
+ break;
+
+ case 1926: /* a_expr: a_expr AT TIME ZONE a_expr */
+#line 11698 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("at time zone"),(yyvsp[0].str));
+}
+#line 51881 "preproc.c"
+ break;
+
+ case 1927: /* a_expr: '+' a_expr */
+#line 11702 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 51889 "preproc.c"
+ break;
+
+ case 1928: /* a_expr: '-' a_expr */
+#line 11706 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 51897 "preproc.c"
+ break;
+
+ case 1929: /* a_expr: a_expr '+' a_expr */
+#line 11710 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("+"),(yyvsp[0].str));
+}
+#line 51905 "preproc.c"
+ break;
+
+ case 1930: /* a_expr: a_expr '-' a_expr */
+#line 11714 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("-"),(yyvsp[0].str));
+}
+#line 51913 "preproc.c"
+ break;
+
+ case 1931: /* a_expr: a_expr '*' a_expr */
+#line 11718 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("*"),(yyvsp[0].str));
+}
+#line 51921 "preproc.c"
+ break;
+
+ case 1932: /* a_expr: a_expr '/' a_expr */
+#line 11722 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("/"),(yyvsp[0].str));
+}
+#line 51929 "preproc.c"
+ break;
+
+ case 1933: /* a_expr: a_expr '%' a_expr */
+#line 11726 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("%"),(yyvsp[0].str));
+}
+#line 51937 "preproc.c"
+ break;
+
+ case 1934: /* a_expr: a_expr '^' a_expr */
+#line 11730 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("^"),(yyvsp[0].str));
+}
+#line 51945 "preproc.c"
+ break;
+
+ case 1935: /* a_expr: a_expr '<' a_expr */
+#line 11734 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<"),(yyvsp[0].str));
+}
+#line 51953 "preproc.c"
+ break;
+
+ case 1936: /* a_expr: a_expr '>' a_expr */
+#line 11738 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">"),(yyvsp[0].str));
+}
+#line 51961 "preproc.c"
+ break;
+
+ case 1937: /* a_expr: a_expr '=' a_expr */
+#line 11742 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 51969 "preproc.c"
+ break;
+
+ case 1938: /* a_expr: a_expr LESS_EQUALS a_expr */
+#line 11746 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<="),(yyvsp[0].str));
+}
+#line 51977 "preproc.c"
+ break;
+
+ case 1939: /* a_expr: a_expr GREATER_EQUALS a_expr */
+#line 11750 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">="),(yyvsp[0].str));
+}
+#line 51985 "preproc.c"
+ break;
+
+ case 1940: /* a_expr: a_expr NOT_EQUALS a_expr */
+#line 11754 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<>"),(yyvsp[0].str));
+}
+#line 51993 "preproc.c"
+ break;
+
+ case 1941: /* a_expr: a_expr qual_Op a_expr */
+#line 11758 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52001 "preproc.c"
+ break;
+
+ case 1942: /* a_expr: qual_Op a_expr */
+#line 11762 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52009 "preproc.c"
+ break;
+
+ case 1943: /* a_expr: a_expr AND a_expr */
+#line 11766 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 52017 "preproc.c"
+ break;
+
+ case 1944: /* a_expr: a_expr OR a_expr */
+#line 11770 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("or"),(yyvsp[0].str));
+}
+#line 52025 "preproc.c"
+ break;
+
+ case 1945: /* a_expr: NOT a_expr */
+#line 11774 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("not"),(yyvsp[0].str));
+}
+#line 52033 "preproc.c"
+ break;
+
+ case 1946: /* a_expr: NOT_LA a_expr */
+#line 11778 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("not"),(yyvsp[0].str));
+}
+#line 52041 "preproc.c"
+ break;
+
+ case 1947: /* a_expr: a_expr LIKE a_expr */
+#line 11782 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("like"),(yyvsp[0].str));
+}
+#line 52049 "preproc.c"
+ break;
+
+ case 1948: /* a_expr: a_expr LIKE a_expr ESCAPE a_expr */
+#line 11786 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("like"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52057 "preproc.c"
+ break;
+
+ case 1949: /* a_expr: a_expr NOT_LA LIKE a_expr */
+#line 11790 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not like"),(yyvsp[0].str));
+}
+#line 52065 "preproc.c"
+ break;
+
+ case 1950: /* a_expr: a_expr NOT_LA LIKE a_expr ESCAPE a_expr */
+#line 11794 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("not like"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52073 "preproc.c"
+ break;
+
+ case 1951: /* a_expr: a_expr ILIKE a_expr */
+#line 11798 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("ilike"),(yyvsp[0].str));
+}
+#line 52081 "preproc.c"
+ break;
+
+ case 1952: /* a_expr: a_expr ILIKE a_expr ESCAPE a_expr */
+#line 11802 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("ilike"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52089 "preproc.c"
+ break;
+
+ case 1953: /* a_expr: a_expr NOT_LA ILIKE a_expr */
+#line 11806 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not ilike"),(yyvsp[0].str));
+}
+#line 52097 "preproc.c"
+ break;
+
+ case 1954: /* a_expr: a_expr NOT_LA ILIKE a_expr ESCAPE a_expr */
+#line 11810 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("not ilike"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52105 "preproc.c"
+ break;
+
+ case 1955: /* a_expr: a_expr SIMILAR TO a_expr */
+#line 11814 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("similar to"),(yyvsp[0].str));
+}
+#line 52113 "preproc.c"
+ break;
+
+ case 1956: /* a_expr: a_expr SIMILAR TO a_expr ESCAPE a_expr */
+#line 11818 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("similar to"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52121 "preproc.c"
+ break;
+
+ case 1957: /* a_expr: a_expr NOT_LA SIMILAR TO a_expr */
+#line 11822 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("not similar to"),(yyvsp[0].str));
+}
+#line 52129 "preproc.c"
+ break;
+
+ case 1958: /* a_expr: a_expr NOT_LA SIMILAR TO a_expr ESCAPE a_expr */
+#line 11826 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-6].str),mm_strdup("not similar to"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 52137 "preproc.c"
+ break;
+
+ case 1959: /* a_expr: a_expr IS NULL_P */
+#line 11830 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is null"));
+}
+#line 52145 "preproc.c"
+ break;
+
+ case 1960: /* a_expr: a_expr ISNULL */
+#line 11834 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("isnull"));
+}
+#line 52153 "preproc.c"
+ break;
+
+ case 1961: /* a_expr: a_expr IS NOT NULL_P */
+#line 11838 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not null"));
+}
+#line 52161 "preproc.c"
+ break;
+
+ case 1962: /* a_expr: a_expr NOTNULL */
+#line 11842 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("notnull"));
+}
+#line 52169 "preproc.c"
+ break;
+
+ case 1963: /* a_expr: row OVERLAPS row */
+#line 11846 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("overlaps"),(yyvsp[0].str));
+}
+#line 52177 "preproc.c"
+ break;
+
+ case 1964: /* a_expr: a_expr IS TRUE_P */
+#line 11850 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is true"));
+}
+#line 52185 "preproc.c"
+ break;
+
+ case 1965: /* a_expr: a_expr IS NOT TRUE_P */
+#line 11854 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not true"));
+}
+#line 52193 "preproc.c"
+ break;
+
+ case 1966: /* a_expr: a_expr IS FALSE_P */
+#line 11858 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is false"));
+}
+#line 52201 "preproc.c"
+ break;
+
+ case 1967: /* a_expr: a_expr IS NOT FALSE_P */
+#line 11862 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not false"));
+}
+#line 52209 "preproc.c"
+ break;
+
+ case 1968: /* a_expr: a_expr IS UNKNOWN */
+#line 11866 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is unknown"));
+}
+#line 52217 "preproc.c"
+ break;
+
+ case 1969: /* a_expr: a_expr IS NOT UNKNOWN */
+#line 11870 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not unknown"));
+}
+#line 52225 "preproc.c"
+ break;
+
+ case 1970: /* a_expr: a_expr IS DISTINCT FROM a_expr */
+#line 11874 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("is distinct from"),(yyvsp[0].str));
+}
+#line 52233 "preproc.c"
+ break;
+
+ case 1971: /* a_expr: a_expr IS NOT DISTINCT FROM a_expr */
+#line 11878 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-5].str),mm_strdup("is not distinct from"),(yyvsp[0].str));
+}
+#line 52241 "preproc.c"
+ break;
+
+ case 1972: /* a_expr: a_expr BETWEEN opt_asymmetric b_expr AND a_expr */
+#line 11882 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),mm_strdup("between"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 52249 "preproc.c"
+ break;
+
+ case 1973: /* a_expr: a_expr NOT_LA BETWEEN opt_asymmetric b_expr AND a_expr */
+#line 11886 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-6].str),mm_strdup("not between"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 52257 "preproc.c"
+ break;
+
+ case 1974: /* a_expr: a_expr BETWEEN SYMMETRIC b_expr AND a_expr */
+#line 11890 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("between symmetric"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 52265 "preproc.c"
+ break;
+
+ case 1975: /* a_expr: a_expr NOT_LA BETWEEN SYMMETRIC b_expr AND a_expr */
+#line 11894 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-6].str),mm_strdup("not between symmetric"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 52273 "preproc.c"
+ break;
+
+ case 1976: /* a_expr: a_expr IN_P in_expr */
+#line 11898 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("in"),(yyvsp[0].str));
+}
+#line 52281 "preproc.c"
+ break;
+
+ case 1977: /* a_expr: a_expr NOT_LA IN_P in_expr */
+#line 11902 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not in"),(yyvsp[0].str));
+}
+#line 52289 "preproc.c"
+ break;
+
+ case 1978: /* a_expr: a_expr subquery_Op sub_type select_with_parens */
+#line 11906 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52297 "preproc.c"
+ break;
+
+ case 1979: /* a_expr: a_expr subquery_Op sub_type '(' a_expr ')' */
+#line 11910 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52305 "preproc.c"
+ break;
+
+ case 1980: /* a_expr: UNIQUE select_with_parens */
+#line 11914 "preproc.y"
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("unique"),(yyvsp[0].str));
+}
+#line 52314 "preproc.c"
+ break;
+
+ case 1981: /* a_expr: a_expr IS DOCUMENT_P */
+#line 11919 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is document"));
+}
+#line 52322 "preproc.c"
+ break;
+
+ case 1982: /* a_expr: a_expr IS NOT DOCUMENT_P */
+#line 11923 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not document"));
+}
+#line 52330 "preproc.c"
+ break;
+
+ case 1983: /* a_expr: a_expr IS NORMALIZED */
+#line 11927 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is normalized"));
+}
+#line 52338 "preproc.c"
+ break;
+
+ case 1984: /* a_expr: a_expr IS unicode_normal_form NORMALIZED */
+#line 11931 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("is"),(yyvsp[-1].str),mm_strdup("normalized"));
+}
+#line 52346 "preproc.c"
+ break;
+
+ case 1985: /* a_expr: a_expr IS NOT NORMALIZED */
+#line 11935 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not normalized"));
+}
+#line 52354 "preproc.c"
+ break;
+
+ case 1986: /* a_expr: a_expr IS NOT unicode_normal_form NORMALIZED */
+#line 11939 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("is not"),(yyvsp[-1].str),mm_strdup("normalized"));
+}
+#line 52362 "preproc.c"
+ break;
+
+ case 1987: /* a_expr: DEFAULT */
+#line 11943 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 52370 "preproc.c"
+ break;
+
+ case 1988: /* b_expr: c_expr */
+#line 11951 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52378 "preproc.c"
+ break;
+
+ case 1989: /* b_expr: b_expr TYPECAST Typename */
+#line 11955 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("::"),(yyvsp[0].str));
+}
+#line 52386 "preproc.c"
+ break;
+
+ case 1990: /* b_expr: '+' b_expr */
+#line 11959 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 52394 "preproc.c"
+ break;
+
+ case 1991: /* b_expr: '-' b_expr */
+#line 11963 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 52402 "preproc.c"
+ break;
+
+ case 1992: /* b_expr: b_expr '+' b_expr */
+#line 11967 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("+"),(yyvsp[0].str));
+}
+#line 52410 "preproc.c"
+ break;
+
+ case 1993: /* b_expr: b_expr '-' b_expr */
+#line 11971 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("-"),(yyvsp[0].str));
+}
+#line 52418 "preproc.c"
+ break;
+
+ case 1994: /* b_expr: b_expr '*' b_expr */
+#line 11975 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("*"),(yyvsp[0].str));
+}
+#line 52426 "preproc.c"
+ break;
+
+ case 1995: /* b_expr: b_expr '/' b_expr */
+#line 11979 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("/"),(yyvsp[0].str));
+}
+#line 52434 "preproc.c"
+ break;
+
+ case 1996: /* b_expr: b_expr '%' b_expr */
+#line 11983 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("%"),(yyvsp[0].str));
+}
+#line 52442 "preproc.c"
+ break;
+
+ case 1997: /* b_expr: b_expr '^' b_expr */
+#line 11987 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("^"),(yyvsp[0].str));
+}
+#line 52450 "preproc.c"
+ break;
+
+ case 1998: /* b_expr: b_expr '<' b_expr */
+#line 11991 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<"),(yyvsp[0].str));
+}
+#line 52458 "preproc.c"
+ break;
+
+ case 1999: /* b_expr: b_expr '>' b_expr */
+#line 11995 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">"),(yyvsp[0].str));
+}
+#line 52466 "preproc.c"
+ break;
+
+ case 2000: /* b_expr: b_expr '=' b_expr */
+#line 11999 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 52474 "preproc.c"
+ break;
+
+ case 2001: /* b_expr: b_expr LESS_EQUALS b_expr */
+#line 12003 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<="),(yyvsp[0].str));
+}
+#line 52482 "preproc.c"
+ break;
+
+ case 2002: /* b_expr: b_expr GREATER_EQUALS b_expr */
+#line 12007 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">="),(yyvsp[0].str));
+}
+#line 52490 "preproc.c"
+ break;
+
+ case 2003: /* b_expr: b_expr NOT_EQUALS b_expr */
+#line 12011 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<>"),(yyvsp[0].str));
+}
+#line 52498 "preproc.c"
+ break;
+
+ case 2004: /* b_expr: b_expr qual_Op b_expr */
+#line 12015 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52506 "preproc.c"
+ break;
+
+ case 2005: /* b_expr: qual_Op b_expr */
+#line 12019 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52514 "preproc.c"
+ break;
+
+ case 2006: /* b_expr: b_expr IS DISTINCT FROM b_expr */
+#line 12023 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("is distinct from"),(yyvsp[0].str));
+}
+#line 52522 "preproc.c"
+ break;
+
+ case 2007: /* b_expr: b_expr IS NOT DISTINCT FROM b_expr */
+#line 12027 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-5].str),mm_strdup("is not distinct from"),(yyvsp[0].str));
+}
+#line 52530 "preproc.c"
+ break;
+
+ case 2008: /* b_expr: b_expr IS DOCUMENT_P */
+#line 12031 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is document"));
+}
+#line 52538 "preproc.c"
+ break;
+
+ case 2009: /* b_expr: b_expr IS NOT DOCUMENT_P */
+#line 12035 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not document"));
+}
+#line 52546 "preproc.c"
+ break;
+
+ case 2010: /* c_expr: columnref */
+#line 12043 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52554 "preproc.c"
+ break;
+
+ case 2011: /* c_expr: AexprConst */
+#line 12047 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52562 "preproc.c"
+ break;
+
+ case 2012: /* c_expr: ecpg_param opt_indirection */
+#line 12051 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52570 "preproc.c"
+ break;
+
+ case 2013: /* c_expr: '(' a_expr ')' opt_indirection */
+#line 12055 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 52578 "preproc.c"
+ break;
+
+ case 2014: /* c_expr: case_expr */
+#line 12059 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52586 "preproc.c"
+ break;
+
+ case 2015: /* c_expr: func_expr */
+#line 12063 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52594 "preproc.c"
+ break;
+
+ case 2016: /* c_expr: select_with_parens */
+#line 12067 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52602 "preproc.c"
+ break;
+
+ case 2017: /* c_expr: select_with_parens indirection */
+#line 12071 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52610 "preproc.c"
+ break;
+
+ case 2018: /* c_expr: EXISTS select_with_parens */
+#line 12075 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("exists"),(yyvsp[0].str));
+}
+#line 52618 "preproc.c"
+ break;
+
+ case 2019: /* c_expr: ARRAY select_with_parens */
+#line 12079 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("array"),(yyvsp[0].str));
+}
+#line 52626 "preproc.c"
+ break;
+
+ case 2020: /* c_expr: ARRAY array_expr */
+#line 12083 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("array"),(yyvsp[0].str));
+}
+#line 52634 "preproc.c"
+ break;
+
+ case 2021: /* c_expr: explicit_row */
+#line 12087 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52642 "preproc.c"
+ break;
+
+ case 2022: /* c_expr: implicit_row */
+#line 12091 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52650 "preproc.c"
+ break;
+
+ case 2023: /* c_expr: GROUPING '(' expr_list ')' */
+#line 12095 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("grouping ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52658 "preproc.c"
+ break;
+
+ case 2024: /* func_application: func_name '(' ')' */
+#line 12103 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("( )"));
+}
+#line 52666 "preproc.c"
+ break;
+
+ case 2025: /* func_application: func_name '(' func_arg_list opt_sort_clause ')' */
+#line 12107 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52674 "preproc.c"
+ break;
+
+ case 2026: /* func_application: func_name '(' VARIADIC func_arg_expr opt_sort_clause ')' */
+#line 12111 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( variadic"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52682 "preproc.c"
+ break;
+
+ case 2027: /* func_application: func_name '(' func_arg_list ',' VARIADIC func_arg_expr opt_sort_clause ')' */
+#line 12115 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,(yyvsp[-7].str),mm_strdup("("),(yyvsp[-5].str),mm_strdup(", variadic"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52690 "preproc.c"
+ break;
+
+ case 2028: /* func_application: func_name '(' ALL func_arg_list opt_sort_clause ')' */
+#line 12119 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( all"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52698 "preproc.c"
+ break;
+
+ case 2029: /* func_application: func_name '(' DISTINCT func_arg_list opt_sort_clause ')' */
+#line 12123 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( distinct"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52706 "preproc.c"
+ break;
+
+ case 2030: /* func_application: func_name '(' '*' ')' */
+#line 12127 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("( * )"));
+}
+#line 52714 "preproc.c"
+ break;
+
+ case 2031: /* func_expr: func_application within_group_clause filter_clause over_clause */
+#line 12135 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52722 "preproc.c"
+ break;
+
+ case 2032: /* func_expr: func_expr_common_subexpr */
+#line 12139 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52730 "preproc.c"
+ break;
+
+ case 2033: /* func_expr_windowless: func_application */
+#line 12147 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52738 "preproc.c"
+ break;
+
+ case 2034: /* func_expr_windowless: func_expr_common_subexpr */
+#line 12151 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52746 "preproc.c"
+ break;
+
+ case 2035: /* func_expr_common_subexpr: COLLATION FOR '(' a_expr ')' */
+#line 12159 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("collation for ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52754 "preproc.c"
+ break;
+
+ case 2036: /* func_expr_common_subexpr: CURRENT_DATE */
+#line 12163 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_date");
+}
+#line 52762 "preproc.c"
+ break;
+
+ case 2037: /* func_expr_common_subexpr: CURRENT_TIME */
+#line 12167 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_time");
+}
+#line 52770 "preproc.c"
+ break;
+
+ case 2038: /* func_expr_common_subexpr: CURRENT_TIME '(' Iconst ')' */
+#line 12171 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("current_time ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52778 "preproc.c"
+ break;
+
+ case 2039: /* func_expr_common_subexpr: CURRENT_TIMESTAMP */
+#line 12175 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_timestamp");
+}
+#line 52786 "preproc.c"
+ break;
+
+ case 2040: /* func_expr_common_subexpr: CURRENT_TIMESTAMP '(' Iconst ')' */
+#line 12179 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("current_timestamp ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52794 "preproc.c"
+ break;
+
+ case 2041: /* func_expr_common_subexpr: LOCALTIME */
+#line 12183 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtime");
+}
+#line 52802 "preproc.c"
+ break;
+
+ case 2042: /* func_expr_common_subexpr: LOCALTIME '(' Iconst ')' */
+#line 12187 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("localtime ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52810 "preproc.c"
+ break;
+
+ case 2043: /* func_expr_common_subexpr: LOCALTIMESTAMP */
+#line 12191 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtimestamp");
+}
+#line 52818 "preproc.c"
+ break;
+
+ case 2044: /* func_expr_common_subexpr: LOCALTIMESTAMP '(' Iconst ')' */
+#line 12195 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("localtimestamp ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52826 "preproc.c"
+ break;
+
+ case 2045: /* func_expr_common_subexpr: CURRENT_ROLE */
+#line 12199 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 52834 "preproc.c"
+ break;
+
+ case 2046: /* func_expr_common_subexpr: CURRENT_USER */
+#line 12203 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 52842 "preproc.c"
+ break;
+
+ case 2047: /* func_expr_common_subexpr: SESSION_USER */
+#line 12207 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 52850 "preproc.c"
+ break;
+
+ case 2048: /* func_expr_common_subexpr: USER */
+#line 12211 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 52858 "preproc.c"
+ break;
+
+ case 2049: /* func_expr_common_subexpr: CURRENT_CATALOG */
+#line 12215 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_catalog");
+}
+#line 52866 "preproc.c"
+ break;
+
+ case 2050: /* func_expr_common_subexpr: CURRENT_SCHEMA */
+#line 12219 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_schema");
+}
+#line 52874 "preproc.c"
+ break;
+
+ case 2051: /* func_expr_common_subexpr: CAST '(' a_expr AS Typename ')' */
+#line 12223 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("cast ("),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52882 "preproc.c"
+ break;
+
+ case 2052: /* func_expr_common_subexpr: EXTRACT '(' extract_list ')' */
+#line 12227 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("extract ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52890 "preproc.c"
+ break;
+
+ case 2053: /* func_expr_common_subexpr: NORMALIZE '(' a_expr ')' */
+#line 12231 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("normalize ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52898 "preproc.c"
+ break;
+
+ case 2054: /* func_expr_common_subexpr: NORMALIZE '(' a_expr ',' unicode_normal_form ')' */
+#line 12235 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("normalize ("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52906 "preproc.c"
+ break;
+
+ case 2055: /* func_expr_common_subexpr: OVERLAY '(' overlay_list ')' */
+#line 12239 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("overlay ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52914 "preproc.c"
+ break;
+
+ case 2056: /* func_expr_common_subexpr: OVERLAY '(' func_arg_list_opt ')' */
+#line 12243 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("overlay ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52922 "preproc.c"
+ break;
+
+ case 2057: /* func_expr_common_subexpr: POSITION '(' position_list ')' */
+#line 12247 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("position ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52930 "preproc.c"
+ break;
+
+ case 2058: /* func_expr_common_subexpr: SUBSTRING '(' substr_list ')' */
+#line 12251 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("substring ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52938 "preproc.c"
+ break;
+
+ case 2059: /* func_expr_common_subexpr: SUBSTRING '(' func_arg_list_opt ')' */
+#line 12255 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("substring ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52946 "preproc.c"
+ break;
+
+ case 2060: /* func_expr_common_subexpr: TREAT '(' a_expr AS Typename ')' */
+#line 12259 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("treat ("),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52954 "preproc.c"
+ break;
+
+ case 2061: /* func_expr_common_subexpr: TRIM '(' BOTH trim_list ')' */
+#line 12263 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( both"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52962 "preproc.c"
+ break;
+
+ case 2062: /* func_expr_common_subexpr: TRIM '(' LEADING trim_list ')' */
+#line 12267 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( leading"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52970 "preproc.c"
+ break;
+
+ case 2063: /* func_expr_common_subexpr: TRIM '(' TRAILING trim_list ')' */
+#line 12271 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( trailing"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52978 "preproc.c"
+ break;
+
+ case 2064: /* func_expr_common_subexpr: TRIM '(' trim_list ')' */
+#line 12275 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52986 "preproc.c"
+ break;
+
+ case 2065: /* func_expr_common_subexpr: NULLIF '(' a_expr ',' a_expr ')' */
+#line 12279 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("nullif ("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52994 "preproc.c"
+ break;
+
+ case 2066: /* func_expr_common_subexpr: COALESCE '(' expr_list ')' */
+#line 12283 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("coalesce ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53002 "preproc.c"
+ break;
+
+ case 2067: /* func_expr_common_subexpr: GREATEST '(' expr_list ')' */
+#line 12287 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("greatest ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53010 "preproc.c"
+ break;
+
+ case 2068: /* func_expr_common_subexpr: LEAST '(' expr_list ')' */
+#line 12291 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("least ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53018 "preproc.c"
+ break;
+
+ case 2069: /* func_expr_common_subexpr: XMLCONCAT '(' expr_list ')' */
+#line 12295 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlconcat ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53026 "preproc.c"
+ break;
+
+ case 2070: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ')' */
+#line 12299 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlelement ( name"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53034 "preproc.c"
+ break;
+
+ case 2071: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ')' */
+#line 12303 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlelement ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53042 "preproc.c"
+ break;
+
+ case 2072: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' expr_list ')' */
+#line 12307 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlelement ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53050 "preproc.c"
+ break;
+
+ case 2073: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ',' expr_list ')' */
+#line 12311 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,mm_strdup("xmlelement ( name"),(yyvsp[-5].str),mm_strdup(","),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53058 "preproc.c"
+ break;
+
+ case 2074: /* func_expr_common_subexpr: XMLEXISTS '(' c_expr xmlexists_argument ')' */
+#line 12315 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("xmlexists ("),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53066 "preproc.c"
+ break;
+
+ case 2075: /* func_expr_common_subexpr: XMLFOREST '(' xml_attribute_list ')' */
+#line 12319 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlforest ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53074 "preproc.c"
+ break;
+
+ case 2076: /* func_expr_common_subexpr: XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')' */
+#line 12323 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlparse ("),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53082 "preproc.c"
+ break;
+
+ case 2077: /* func_expr_common_subexpr: XMLPI '(' NAME_P ColLabel ')' */
+#line 12327 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlpi ( name"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53090 "preproc.c"
+ break;
+
+ case 2078: /* func_expr_common_subexpr: XMLPI '(' NAME_P ColLabel ',' a_expr ')' */
+#line 12331 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlpi ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53098 "preproc.c"
+ break;
+
+ case 2079: /* func_expr_common_subexpr: XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')' */
+#line 12335 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmlroot ("),(yyvsp[-4].str),mm_strdup(","),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53106 "preproc.c"
+ break;
+
+ case 2080: /* func_expr_common_subexpr: XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')' */
+#line 12339 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmlserialize ("),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53114 "preproc.c"
+ break;
+
+ case 2081: /* xml_root_version: VERSION_P a_expr */
+#line 12347 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 53122 "preproc.c"
+ break;
+
+ case 2082: /* xml_root_version: VERSION_P NO VALUE_P */
+#line 12351 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("version no value");
+}
+#line 53130 "preproc.c"
+ break;
+
+ case 2083: /* opt_xml_root_standalone: ',' STANDALONE_P YES_P */
+#line 12359 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(", standalone yes");
+}
+#line 53138 "preproc.c"
+ break;
+
+ case 2084: /* opt_xml_root_standalone: ',' STANDALONE_P NO */
+#line 12363 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(", standalone no");
+}
+#line 53146 "preproc.c"
+ break;
+
+ case 2085: /* opt_xml_root_standalone: ',' STANDALONE_P NO VALUE_P */
+#line 12367 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(", standalone no value");
+}
+#line 53154 "preproc.c"
+ break;
+
+ case 2086: /* opt_xml_root_standalone: %empty */
+#line 12371 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53161 "preproc.c"
+ break;
+
+ case 2087: /* xml_attributes: XMLATTRIBUTES '(' xml_attribute_list ')' */
+#line 12378 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlattributes ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53169 "preproc.c"
+ break;
+
+ case 2088: /* xml_attribute_list: xml_attribute_el */
+#line 12386 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53177 "preproc.c"
+ break;
+
+ case 2089: /* xml_attribute_list: xml_attribute_list ',' xml_attribute_el */
+#line 12390 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53185 "preproc.c"
+ break;
+
+ case 2090: /* xml_attribute_el: a_expr AS ColLabel */
+#line 12398 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 53193 "preproc.c"
+ break;
+
+ case 2091: /* xml_attribute_el: a_expr */
+#line 12402 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53201 "preproc.c"
+ break;
+
+ case 2092: /* document_or_content: DOCUMENT_P */
+#line 12410 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("document");
+}
+#line 53209 "preproc.c"
+ break;
+
+ case 2093: /* document_or_content: CONTENT_P */
+#line 12414 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("content");
+}
+#line 53217 "preproc.c"
+ break;
+
+ case 2094: /* xml_whitespace_option: PRESERVE WHITESPACE_P */
+#line 12422 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("preserve whitespace");
+}
+#line 53225 "preproc.c"
+ break;
+
+ case 2095: /* xml_whitespace_option: STRIP_P WHITESPACE_P */
+#line 12426 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strip whitespace");
+}
+#line 53233 "preproc.c"
+ break;
+
+ case 2096: /* xml_whitespace_option: %empty */
+#line 12430 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53240 "preproc.c"
+ break;
+
+ case 2097: /* xmlexists_argument: PASSING c_expr */
+#line 12437 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("passing"),(yyvsp[0].str));
+}
+#line 53248 "preproc.c"
+ break;
+
+ case 2098: /* xmlexists_argument: PASSING c_expr xml_passing_mech */
+#line 12441 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("passing"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53256 "preproc.c"
+ break;
+
+ case 2099: /* xmlexists_argument: PASSING xml_passing_mech c_expr */
+#line 12445 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("passing"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53264 "preproc.c"
+ break;
+
+ case 2100: /* xmlexists_argument: PASSING xml_passing_mech c_expr xml_passing_mech */
+#line 12449 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("passing"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53272 "preproc.c"
+ break;
+
+ case 2101: /* xml_passing_mech: BY REF */
+#line 12457 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by ref");
+}
+#line 53280 "preproc.c"
+ break;
+
+ case 2102: /* xml_passing_mech: BY VALUE_P */
+#line 12461 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by value");
+}
+#line 53288 "preproc.c"
+ break;
+
+ case 2103: /* within_group_clause: WITHIN GROUP_P '(' sort_clause ')' */
+#line 12469 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("within group ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53296 "preproc.c"
+ break;
+
+ case 2104: /* within_group_clause: %empty */
+#line 12473 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53303 "preproc.c"
+ break;
+
+ case 2105: /* filter_clause: FILTER '(' WHERE a_expr ')' */
+#line 12480 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("filter ( where"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53311 "preproc.c"
+ break;
+
+ case 2106: /* filter_clause: %empty */
+#line 12484 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53318 "preproc.c"
+ break;
+
+ case 2107: /* window_clause: WINDOW window_definition_list */
+#line 12491 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("window"),(yyvsp[0].str));
+}
+#line 53326 "preproc.c"
+ break;
+
+ case 2108: /* window_clause: %empty */
+#line 12495 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53333 "preproc.c"
+ break;
+
+ case 2109: /* window_definition_list: window_definition */
+#line 12502 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53341 "preproc.c"
+ break;
+
+ case 2110: /* window_definition_list: window_definition_list ',' window_definition */
+#line 12506 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53349 "preproc.c"
+ break;
+
+ case 2111: /* window_definition: ColId AS window_specification */
+#line 12514 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 53357 "preproc.c"
+ break;
+
+ case 2112: /* over_clause: OVER window_specification */
+#line 12522 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("over"),(yyvsp[0].str));
+}
+#line 53365 "preproc.c"
+ break;
+
+ case 2113: /* over_clause: OVER ColId */
+#line 12526 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("over"),(yyvsp[0].str));
+}
+#line 53373 "preproc.c"
+ break;
+
+ case 2114: /* over_clause: %empty */
+#line 12530 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53380 "preproc.c"
+ break;
+
+ case 2115: /* window_specification: '(' opt_existing_window_name opt_partition_clause opt_sort_clause opt_frame_clause ')' */
+#line 12537 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,mm_strdup("("),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53388 "preproc.c"
+ break;
+
+ case 2116: /* opt_existing_window_name: ColId */
+#line 12545 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53396 "preproc.c"
+ break;
+
+ case 2117: /* opt_existing_window_name: %empty */
+#line 12549 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53403 "preproc.c"
+ break;
+
+ case 2118: /* opt_partition_clause: PARTITION BY expr_list */
+#line 12556 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("partition by"),(yyvsp[0].str));
+}
+#line 53411 "preproc.c"
+ break;
+
+ case 2119: /* opt_partition_clause: %empty */
+#line 12560 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53418 "preproc.c"
+ break;
+
+ case 2120: /* opt_frame_clause: RANGE frame_extent opt_window_exclusion_clause */
+#line 12567 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("range"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53426 "preproc.c"
+ break;
+
+ case 2121: /* opt_frame_clause: ROWS frame_extent opt_window_exclusion_clause */
+#line 12571 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rows"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53434 "preproc.c"
+ break;
+
+ case 2122: /* opt_frame_clause: GROUPS frame_extent opt_window_exclusion_clause */
+#line 12575 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("groups"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 53442 "preproc.c"
+ break;
+
+ case 2123: /* opt_frame_clause: %empty */
+#line 12579 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53449 "preproc.c"
+ break;
+
+ case 2124: /* frame_extent: frame_bound */
+#line 12586 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53457 "preproc.c"
+ break;
+
+ case 2125: /* frame_extent: BETWEEN frame_bound AND frame_bound */
+#line 12590 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("between"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 53465 "preproc.c"
+ break;
+
+ case 2126: /* frame_bound: UNBOUNDED PRECEDING */
+#line 12598 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unbounded preceding");
+}
+#line 53473 "preproc.c"
+ break;
+
+ case 2127: /* frame_bound: UNBOUNDED FOLLOWING */
+#line 12602 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unbounded following");
+}
+#line 53481 "preproc.c"
+ break;
+
+ case 2128: /* frame_bound: CURRENT_P ROW */
+#line 12606 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current row");
+}
+#line 53489 "preproc.c"
+ break;
+
+ case 2129: /* frame_bound: a_expr PRECEDING */
+#line 12610 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("preceding"));
+}
+#line 53497 "preproc.c"
+ break;
+
+ case 2130: /* frame_bound: a_expr FOLLOWING */
+#line 12614 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("following"));
+}
+#line 53505 "preproc.c"
+ break;
+
+ case 2131: /* opt_window_exclusion_clause: EXCLUDE CURRENT_P ROW */
+#line 12622 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude current row");
+}
+#line 53513 "preproc.c"
+ break;
+
+ case 2132: /* opt_window_exclusion_clause: EXCLUDE GROUP_P */
+#line 12626 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude group");
+}
+#line 53521 "preproc.c"
+ break;
+
+ case 2133: /* opt_window_exclusion_clause: EXCLUDE TIES */
+#line 12630 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude ties");
+}
+#line 53529 "preproc.c"
+ break;
+
+ case 2134: /* opt_window_exclusion_clause: EXCLUDE NO OTHERS */
+#line 12634 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude no others");
+}
+#line 53537 "preproc.c"
+ break;
+
+ case 2135: /* opt_window_exclusion_clause: %empty */
+#line 12638 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53544 "preproc.c"
+ break;
+
+ case 2136: /* row: ROW '(' expr_list ')' */
+#line 12645 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("row ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53552 "preproc.c"
+ break;
+
+ case 2137: /* row: ROW '(' ')' */
+#line 12649 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row ( )");
+}
+#line 53560 "preproc.c"
+ break;
+
+ case 2138: /* row: '(' expr_list ',' a_expr ')' */
+#line 12653 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53568 "preproc.c"
+ break;
+
+ case 2139: /* explicit_row: ROW '(' expr_list ')' */
+#line 12661 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("row ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53576 "preproc.c"
+ break;
+
+ case 2140: /* explicit_row: ROW '(' ')' */
+#line 12665 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row ( )");
+}
+#line 53584 "preproc.c"
+ break;
+
+ case 2141: /* implicit_row: '(' expr_list ',' a_expr ')' */
+#line 12673 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53592 "preproc.c"
+ break;
+
+ case 2142: /* sub_type: ANY */
+#line 12681 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("any");
+}
+#line 53600 "preproc.c"
+ break;
+
+ case 2143: /* sub_type: SOME */
+#line 12685 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("some");
+}
+#line 53608 "preproc.c"
+ break;
+
+ case 2144: /* sub_type: ALL */
+#line 12689 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 53616 "preproc.c"
+ break;
+
+ case 2145: /* all_Op: Op */
+#line 12697 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53624 "preproc.c"
+ break;
+
+ case 2146: /* all_Op: MathOp */
+#line 12701 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53632 "preproc.c"
+ break;
+
+ case 2147: /* MathOp: '+' */
+#line 12709 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("+");
+}
+#line 53640 "preproc.c"
+ break;
+
+ case 2148: /* MathOp: '-' */
+#line 12713 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("-");
+}
+#line 53648 "preproc.c"
+ break;
+
+ case 2149: /* MathOp: '*' */
+#line 12717 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 53656 "preproc.c"
+ break;
+
+ case 2150: /* MathOp: '/' */
+#line 12721 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("/");
+}
+#line 53664 "preproc.c"
+ break;
+
+ case 2151: /* MathOp: '%' */
+#line 12725 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("%");
+}
+#line 53672 "preproc.c"
+ break;
+
+ case 2152: /* MathOp: '^' */
+#line 12729 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("^");
+}
+#line 53680 "preproc.c"
+ break;
+
+ case 2153: /* MathOp: '<' */
+#line 12733 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("<");
+}
+#line 53688 "preproc.c"
+ break;
+
+ case 2154: /* MathOp: '>' */
+#line 12737 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(">");
+}
+#line 53696 "preproc.c"
+ break;
+
+ case 2155: /* MathOp: '=' */
+#line 12741 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("=");
+}
+#line 53704 "preproc.c"
+ break;
+
+ case 2156: /* MathOp: LESS_EQUALS */
+#line 12745 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("<=");
+}
+#line 53712 "preproc.c"
+ break;
+
+ case 2157: /* MathOp: GREATER_EQUALS */
+#line 12749 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(">=");
+}
+#line 53720 "preproc.c"
+ break;
+
+ case 2158: /* MathOp: NOT_EQUALS */
+#line 12753 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("<>");
+}
+#line 53728 "preproc.c"
+ break;
+
+ case 2159: /* qual_Op: Op */
+#line 12761 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53736 "preproc.c"
+ break;
+
+ case 2160: /* qual_Op: OPERATOR '(' any_operator ')' */
+#line 12765 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53744 "preproc.c"
+ break;
+
+ case 2161: /* qual_all_Op: all_Op */
+#line 12773 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53752 "preproc.c"
+ break;
+
+ case 2162: /* qual_all_Op: OPERATOR '(' any_operator ')' */
+#line 12777 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53760 "preproc.c"
+ break;
+
+ case 2163: /* subquery_Op: all_Op */
+#line 12785 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53768 "preproc.c"
+ break;
+
+ case 2164: /* subquery_Op: OPERATOR '(' any_operator ')' */
+#line 12789 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 53776 "preproc.c"
+ break;
+
+ case 2165: /* subquery_Op: LIKE */
+#line 12793 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("like");
+}
+#line 53784 "preproc.c"
+ break;
+
+ case 2166: /* subquery_Op: NOT_LA LIKE */
+#line 12797 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not like");
+}
+#line 53792 "preproc.c"
+ break;
+
+ case 2167: /* subquery_Op: ILIKE */
+#line 12801 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ilike");
+}
+#line 53800 "preproc.c"
+ break;
+
+ case 2168: /* subquery_Op: NOT_LA ILIKE */
+#line 12805 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not ilike");
+}
+#line 53808 "preproc.c"
+ break;
+
+ case 2169: /* expr_list: a_expr */
+#line 12813 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53816 "preproc.c"
+ break;
+
+ case 2170: /* expr_list: expr_list ',' a_expr */
+#line 12817 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53824 "preproc.c"
+ break;
+
+ case 2171: /* func_arg_list: func_arg_expr */
+#line 12825 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53832 "preproc.c"
+ break;
+
+ case 2172: /* func_arg_list: func_arg_list ',' func_arg_expr */
+#line 12829 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53840 "preproc.c"
+ break;
+
+ case 2173: /* func_arg_expr: a_expr */
+#line 12837 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53848 "preproc.c"
+ break;
+
+ case 2174: /* func_arg_expr: param_name COLON_EQUALS a_expr */
+#line 12841 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(":="),(yyvsp[0].str));
+}
+#line 53856 "preproc.c"
+ break;
+
+ case 2175: /* func_arg_expr: param_name EQUALS_GREATER a_expr */
+#line 12845 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("=>"),(yyvsp[0].str));
+}
+#line 53864 "preproc.c"
+ break;
+
+ case 2176: /* func_arg_list_opt: func_arg_list */
+#line 12853 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53872 "preproc.c"
+ break;
+
+ case 2177: /* func_arg_list_opt: %empty */
+#line 12857 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 53879 "preproc.c"
+ break;
+
+ case 2178: /* type_list: Typename */
+#line 12864 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53887 "preproc.c"
+ break;
+
+ case 2179: /* type_list: type_list ',' Typename */
+#line 12868 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53895 "preproc.c"
+ break;
+
+ case 2180: /* array_expr: '[' expr_list ']' */
+#line 12876 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 53903 "preproc.c"
+ break;
+
+ case 2181: /* array_expr: '[' array_expr_list ']' */
+#line 12880 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 53911 "preproc.c"
+ break;
+
+ case 2182: /* array_expr: '[' ']' */
+#line 12884 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("[ ]");
+}
+#line 53919 "preproc.c"
+ break;
+
+ case 2183: /* array_expr_list: array_expr */
+#line 12892 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53927 "preproc.c"
+ break;
+
+ case 2184: /* array_expr_list: array_expr_list ',' array_expr */
+#line 12896 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53935 "preproc.c"
+ break;
+
+ case 2185: /* extract_list: extract_arg FROM a_expr */
+#line 12904 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 53943 "preproc.c"
+ break;
+
+ case 2186: /* extract_arg: ecpg_ident */
+#line 12912 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53951 "preproc.c"
+ break;
+
+ case 2187: /* extract_arg: YEAR_P */
+#line 12916 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("year");
+}
+#line 53959 "preproc.c"
+ break;
+
+ case 2188: /* extract_arg: MONTH_P */
+#line 12920 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("month");
+}
+#line 53967 "preproc.c"
+ break;
+
+ case 2189: /* extract_arg: DAY_P */
+#line 12924 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("day");
+}
+#line 53975 "preproc.c"
+ break;
+
+ case 2190: /* extract_arg: HOUR_P */
+#line 12928 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("hour");
+}
+#line 53983 "preproc.c"
+ break;
+
+ case 2191: /* extract_arg: MINUTE_P */
+#line 12932 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("minute");
+}
+#line 53991 "preproc.c"
+ break;
+
+ case 2192: /* extract_arg: SECOND_P */
+#line 12936 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("second");
+}
+#line 53999 "preproc.c"
+ break;
+
+ case 2193: /* extract_arg: ecpg_sconst */
+#line 12940 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54007 "preproc.c"
+ break;
+
+ case 2194: /* unicode_normal_form: NFC */
+#line 12948 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfc");
+}
+#line 54015 "preproc.c"
+ break;
+
+ case 2195: /* unicode_normal_form: NFD */
+#line 12952 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfd");
+}
+#line 54023 "preproc.c"
+ break;
+
+ case 2196: /* unicode_normal_form: NFKC */
+#line 12956 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkc");
+}
+#line 54031 "preproc.c"
+ break;
+
+ case 2197: /* unicode_normal_form: NFKD */
+#line 12960 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkd");
+}
+#line 54039 "preproc.c"
+ break;
+
+ case 2198: /* overlay_list: a_expr PLACING a_expr FROM a_expr FOR a_expr */
+#line 12968 "preproc.y"
+ {
+ (yyval.str) = cat_str(7,(yyvsp[-6].str),mm_strdup("placing"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),mm_strdup("for"),(yyvsp[0].str));
+}
+#line 54047 "preproc.c"
+ break;
+
+ case 2199: /* overlay_list: a_expr PLACING a_expr FROM a_expr */
+#line 12972 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("placing"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 54055 "preproc.c"
+ break;
+
+ case 2200: /* position_list: b_expr IN_P b_expr */
+#line 12980 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("in"),(yyvsp[0].str));
+}
+#line 54063 "preproc.c"
+ break;
+
+ case 2201: /* substr_list: a_expr FROM a_expr FOR a_expr */
+#line 12988 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),mm_strdup("for"),(yyvsp[0].str));
+}
+#line 54071 "preproc.c"
+ break;
+
+ case 2202: /* substr_list: a_expr FOR a_expr FROM a_expr */
+#line 12992 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("for"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 54079 "preproc.c"
+ break;
+
+ case 2203: /* substr_list: a_expr FROM a_expr */
+#line 12996 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 54087 "preproc.c"
+ break;
+
+ case 2204: /* substr_list: a_expr FOR a_expr */
+#line 13000 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("for"),(yyvsp[0].str));
+}
+#line 54095 "preproc.c"
+ break;
+
+ case 2205: /* substr_list: a_expr SIMILAR a_expr ESCAPE a_expr */
+#line 13004 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("similar"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 54103 "preproc.c"
+ break;
+
+ case 2206: /* trim_list: a_expr FROM expr_list */
+#line 13012 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 54111 "preproc.c"
+ break;
+
+ case 2207: /* trim_list: FROM expr_list */
+#line 13016 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 54119 "preproc.c"
+ break;
+
+ case 2208: /* trim_list: expr_list */
+#line 13020 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54127 "preproc.c"
+ break;
+
+ case 2209: /* in_expr: select_with_parens */
+#line 13028 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54135 "preproc.c"
+ break;
+
+ case 2210: /* in_expr: '(' expr_list ')' */
+#line 13032 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 54143 "preproc.c"
+ break;
+
+ case 2211: /* case_expr: CASE case_arg when_clause_list case_default END_P */
+#line 13040 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("case"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("end"));
+}
+#line 54151 "preproc.c"
+ break;
+
+ case 2212: /* when_clause_list: when_clause */
+#line 13048 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54159 "preproc.c"
+ break;
+
+ case 2213: /* when_clause_list: when_clause_list when_clause */
+#line 13052 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54167 "preproc.c"
+ break;
+
+ case 2214: /* when_clause: WHEN a_expr THEN a_expr */
+#line 13060 "preproc.y"
+ {
+ (yyval.str) = cat_str(4,mm_strdup("when"),(yyvsp[-2].str),mm_strdup("then"),(yyvsp[0].str));
+}
+#line 54175 "preproc.c"
+ break;
+
+ case 2215: /* case_default: ELSE a_expr */
+#line 13068 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("else"),(yyvsp[0].str));
+}
+#line 54183 "preproc.c"
+ break;
+
+ case 2216: /* case_default: %empty */
+#line 13072 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54190 "preproc.c"
+ break;
+
+ case 2217: /* case_arg: a_expr */
+#line 13079 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54198 "preproc.c"
+ break;
+
+ case 2218: /* case_arg: %empty */
+#line 13083 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54205 "preproc.c"
+ break;
+
+ case 2219: /* columnref: ColId */
+#line 13090 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54213 "preproc.c"
+ break;
+
+ case 2220: /* columnref: ColId indirection */
+#line 13094 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54221 "preproc.c"
+ break;
+
+ case 2221: /* indirection_el: '.' attr_name */
+#line 13102 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("."),(yyvsp[0].str));
+}
+#line 54229 "preproc.c"
+ break;
+
+ case 2222: /* indirection_el: '.' '*' */
+#line 13106 "preproc.y"
+ {
+ (yyval.str) = mm_strdup(". *");
+}
+#line 54237 "preproc.c"
+ break;
+
+ case 2223: /* indirection_el: '[' a_expr ']' */
+#line 13110 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 54245 "preproc.c"
+ break;
+
+ case 2224: /* indirection_el: '[' opt_slice_bound ':' opt_slice_bound ']' */
+#line 13114 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,mm_strdup("["),(yyvsp[-3].str),mm_strdup(":"),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 54253 "preproc.c"
+ break;
+
+ case 2225: /* opt_slice_bound: a_expr */
+#line 13122 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54261 "preproc.c"
+ break;
+
+ case 2226: /* opt_slice_bound: %empty */
+#line 13126 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54268 "preproc.c"
+ break;
+
+ case 2227: /* indirection: indirection_el */
+#line 13133 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54276 "preproc.c"
+ break;
+
+ case 2228: /* indirection: indirection indirection_el */
+#line 13137 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54284 "preproc.c"
+ break;
+
+ case 2229: /* opt_indirection: %empty */
+#line 13145 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54291 "preproc.c"
+ break;
+
+ case 2230: /* opt_indirection: opt_indirection indirection_el */
+#line 13148 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54299 "preproc.c"
+ break;
+
+ case 2231: /* opt_asymmetric: ASYMMETRIC */
+#line 13156 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asymmetric");
+}
+#line 54307 "preproc.c"
+ break;
+
+ case 2232: /* opt_asymmetric: %empty */
+#line 13160 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54314 "preproc.c"
+ break;
+
+ case 2233: /* opt_target_list: target_list */
+#line 13167 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54322 "preproc.c"
+ break;
+
+ case 2234: /* opt_target_list: %empty */
+#line 13171 "preproc.y"
+ {
+ (yyval.str)=EMPTY; }
+#line 54329 "preproc.c"
+ break;
+
+ case 2235: /* target_list: target_el */
+#line 13178 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54337 "preproc.c"
+ break;
+
+ case 2236: /* target_list: target_list ',' target_el */
+#line 13182 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 54345 "preproc.c"
+ break;
+
+ case 2237: /* target_el: a_expr AS ColLabel */
+#line 13190 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 54353 "preproc.c"
+ break;
+
+ case 2238: /* target_el: a_expr BareColLabel */
+#line 13194 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54361 "preproc.c"
+ break;
+
+ case 2239: /* target_el: a_expr */
+#line 13198 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54369 "preproc.c"
+ break;
+
+ case 2240: /* target_el: '*' */
+#line 13202 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 54377 "preproc.c"
+ break;
+
+ case 2241: /* qualified_name_list: qualified_name */
+#line 13210 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54385 "preproc.c"
+ break;
+
+ case 2242: /* qualified_name_list: qualified_name_list ',' qualified_name */
+#line 13214 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 54393 "preproc.c"
+ break;
+
+ case 2243: /* qualified_name: ColId */
+#line 13222 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54401 "preproc.c"
+ break;
+
+ case 2244: /* qualified_name: ColId indirection */
+#line 13226 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54409 "preproc.c"
+ break;
+
+ case 2245: /* name_list: name */
+#line 13234 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54417 "preproc.c"
+ break;
+
+ case 2246: /* name_list: name_list ',' name */
+#line 13238 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 54425 "preproc.c"
+ break;
+
+ case 2247: /* name: ColId */
+#line 13246 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54433 "preproc.c"
+ break;
+
+ case 2248: /* attr_name: ColLabel */
+#line 13254 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54441 "preproc.c"
+ break;
+
+ case 2249: /* file_name: ecpg_sconst */
+#line 13262 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54449 "preproc.c"
+ break;
+
+ case 2250: /* func_name: type_function_name */
+#line 13270 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54457 "preproc.c"
+ break;
+
+ case 2251: /* func_name: ColId indirection */
+#line 13274 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54465 "preproc.c"
+ break;
+
+ case 2252: /* AexprConst: Iconst */
+#line 13282 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54473 "preproc.c"
+ break;
+
+ case 2253: /* AexprConst: ecpg_fconst */
+#line 13286 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54481 "preproc.c"
+ break;
+
+ case 2254: /* AexprConst: ecpg_sconst */
+#line 13290 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54489 "preproc.c"
+ break;
+
+ case 2255: /* AexprConst: ecpg_bconst */
+#line 13294 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54497 "preproc.c"
+ break;
+
+ case 2256: /* AexprConst: ecpg_xconst */
+#line 13298 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54505 "preproc.c"
+ break;
+
+ case 2257: /* AexprConst: func_name ecpg_sconst */
+#line 13302 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54513 "preproc.c"
+ break;
+
+ case 2258: /* AexprConst: func_name '(' func_arg_list opt_sort_clause ')' ecpg_sconst */
+#line 13306 "preproc.y"
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),mm_strdup("("),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 54521 "preproc.c"
+ break;
+
+ case 2259: /* AexprConst: ConstTypename ecpg_sconst */
+#line 13310 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54529 "preproc.c"
+ break;
+
+ case 2260: /* AexprConst: ConstInterval ecpg_sconst opt_interval */
+#line 13314 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 54537 "preproc.c"
+ break;
+
+ case 2261: /* AexprConst: ConstInterval '(' Iconst ')' ecpg_sconst */
+#line 13318 "preproc.y"
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 54545 "preproc.c"
+ break;
+
+ case 2262: /* AexprConst: TRUE_P */
+#line 13322 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 54553 "preproc.c"
+ break;
+
+ case 2263: /* AexprConst: FALSE_P */
+#line 13326 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 54561 "preproc.c"
+ break;
+
+ case 2264: /* AexprConst: NULL_P */
+#line 13330 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 54569 "preproc.c"
+ break;
+
+ case 2265: /* AexprConst: civar */
+#line 13333 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 54575 "preproc.c"
+ break;
+
+ case 2266: /* AexprConst: civarind */
+#line 13334 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 54581 "preproc.c"
+ break;
+
+ case 2267: /* Iconst: ICONST */
+#line 13340 "preproc.y"
+ { (yyval.str) = make_name(); }
+#line 54587 "preproc.c"
+ break;
+
+ case 2268: /* SignedIconst: Iconst */
+#line 13346 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54595 "preproc.c"
+ break;
+
+ case 2269: /* SignedIconst: civar */
+#line 13349 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 54601 "preproc.c"
+ break;
+
+ case 2270: /* SignedIconst: '+' Iconst */
+#line 13351 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 54609 "preproc.c"
+ break;
+
+ case 2271: /* SignedIconst: '-' Iconst */
+#line 13355 "preproc.y"
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 54617 "preproc.c"
+ break;
+
+ case 2272: /* RoleId: RoleSpec */
+#line 13363 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54625 "preproc.c"
+ break;
+
+ case 2273: /* RoleSpec: NonReservedWord */
+#line 13371 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54633 "preproc.c"
+ break;
+
+ case 2274: /* RoleSpec: CURRENT_ROLE */
+#line 13375 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 54641 "preproc.c"
+ break;
+
+ case 2275: /* RoleSpec: CURRENT_USER */
+#line 13379 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 54649 "preproc.c"
+ break;
+
+ case 2276: /* RoleSpec: SESSION_USER */
+#line 13383 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 54657 "preproc.c"
+ break;
+
+ case 2277: /* role_list: RoleSpec */
+#line 13391 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54665 "preproc.c"
+ break;
+
+ case 2278: /* role_list: role_list ',' RoleSpec */
+#line 13395 "preproc.y"
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 54673 "preproc.c"
+ break;
+
+ case 2279: /* NonReservedWord: ecpg_ident */
+#line 13403 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54681 "preproc.c"
+ break;
+
+ case 2280: /* NonReservedWord: unreserved_keyword */
+#line 13407 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54689 "preproc.c"
+ break;
+
+ case 2281: /* NonReservedWord: col_name_keyword */
+#line 13411 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54697 "preproc.c"
+ break;
+
+ case 2282: /* NonReservedWord: type_func_name_keyword */
+#line 13415 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54705 "preproc.c"
+ break;
+
+ case 2283: /* BareColLabel: ecpg_ident */
+#line 13423 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54713 "preproc.c"
+ break;
+
+ case 2284: /* BareColLabel: bare_label_keyword */
+#line 13427 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 54721 "preproc.c"
+ break;
+
+ case 2285: /* unreserved_keyword: ABORT_P */
+#line 13435 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("abort");
+}
+#line 54729 "preproc.c"
+ break;
+
+ case 2286: /* unreserved_keyword: ABSOLUTE_P */
+#line 13439 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("absolute");
+}
+#line 54737 "preproc.c"
+ break;
+
+ case 2287: /* unreserved_keyword: ACCESS */
+#line 13443 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("access");
+}
+#line 54745 "preproc.c"
+ break;
+
+ case 2288: /* unreserved_keyword: ACTION */
+#line 13447 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("action");
+}
+#line 54753 "preproc.c"
+ break;
+
+ case 2289: /* unreserved_keyword: ADD_P */
+#line 13451 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("add");
+}
+#line 54761 "preproc.c"
+ break;
+
+ case 2290: /* unreserved_keyword: ADMIN */
+#line 13455 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("admin");
+}
+#line 54769 "preproc.c"
+ break;
+
+ case 2291: /* unreserved_keyword: AFTER */
+#line 13459 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("after");
+}
+#line 54777 "preproc.c"
+ break;
+
+ case 2292: /* unreserved_keyword: AGGREGATE */
+#line 13463 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("aggregate");
+}
+#line 54785 "preproc.c"
+ break;
+
+ case 2293: /* unreserved_keyword: ALSO */
+#line 13467 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("also");
+}
+#line 54793 "preproc.c"
+ break;
+
+ case 2294: /* unreserved_keyword: ALTER */
+#line 13471 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("alter");
+}
+#line 54801 "preproc.c"
+ break;
+
+ case 2295: /* unreserved_keyword: ALWAYS */
+#line 13475 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("always");
+}
+#line 54809 "preproc.c"
+ break;
+
+ case 2296: /* unreserved_keyword: ASENSITIVE */
+#line 13479 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asensitive");
+}
+#line 54817 "preproc.c"
+ break;
+
+ case 2297: /* unreserved_keyword: ASSERTION */
+#line 13483 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("assertion");
+}
+#line 54825 "preproc.c"
+ break;
+
+ case 2298: /* unreserved_keyword: ASSIGNMENT */
+#line 13487 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("assignment");
+}
+#line 54833 "preproc.c"
+ break;
+
+ case 2299: /* unreserved_keyword: AT */
+#line 13491 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("at");
+}
+#line 54841 "preproc.c"
+ break;
+
+ case 2300: /* unreserved_keyword: ATOMIC */
+#line 13495 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("atomic");
+}
+#line 54849 "preproc.c"
+ break;
+
+ case 2301: /* unreserved_keyword: ATTACH */
+#line 13499 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("attach");
+}
+#line 54857 "preproc.c"
+ break;
+
+ case 2302: /* unreserved_keyword: ATTRIBUTE */
+#line 13503 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("attribute");
+}
+#line 54865 "preproc.c"
+ break;
+
+ case 2303: /* unreserved_keyword: BACKWARD */
+#line 13507 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("backward");
+}
+#line 54873 "preproc.c"
+ break;
+
+ case 2304: /* unreserved_keyword: BEFORE */
+#line 13511 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("before");
+}
+#line 54881 "preproc.c"
+ break;
+
+ case 2305: /* unreserved_keyword: BEGIN_P */
+#line 13515 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("begin");
+}
+#line 54889 "preproc.c"
+ break;
+
+ case 2306: /* unreserved_keyword: BREADTH */
+#line 13519 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("breadth");
+}
+#line 54897 "preproc.c"
+ break;
+
+ case 2307: /* unreserved_keyword: BY */
+#line 13523 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by");
+}
+#line 54905 "preproc.c"
+ break;
+
+ case 2308: /* unreserved_keyword: CACHE */
+#line 13527 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cache");
+}
+#line 54913 "preproc.c"
+ break;
+
+ case 2309: /* unreserved_keyword: CALL */
+#line 13531 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("call");
+}
+#line 54921 "preproc.c"
+ break;
+
+ case 2310: /* unreserved_keyword: CALLED */
+#line 13535 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("called");
+}
+#line 54929 "preproc.c"
+ break;
+
+ case 2311: /* unreserved_keyword: CASCADE */
+#line 13539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 54937 "preproc.c"
+ break;
+
+ case 2312: /* unreserved_keyword: CASCADED */
+#line 13543 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascaded");
+}
+#line 54945 "preproc.c"
+ break;
+
+ case 2313: /* unreserved_keyword: CATALOG_P */
+#line 13547 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("catalog");
+}
+#line 54953 "preproc.c"
+ break;
+
+ case 2314: /* unreserved_keyword: CHAIN */
+#line 13551 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("chain");
+}
+#line 54961 "preproc.c"
+ break;
+
+ case 2315: /* unreserved_keyword: CHARACTERISTICS */
+#line 13555 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("characteristics");
+}
+#line 54969 "preproc.c"
+ break;
+
+ case 2316: /* unreserved_keyword: CHECKPOINT */
+#line 13559 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("checkpoint");
+}
+#line 54977 "preproc.c"
+ break;
+
+ case 2317: /* unreserved_keyword: CLASS */
+#line 13563 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("class");
+}
+#line 54985 "preproc.c"
+ break;
+
+ case 2318: /* unreserved_keyword: CLOSE */
+#line 13567 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("close");
+}
+#line 54993 "preproc.c"
+ break;
+
+ case 2319: /* unreserved_keyword: CLUSTER */
+#line 13571 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cluster");
+}
+#line 55001 "preproc.c"
+ break;
+
+ case 2320: /* unreserved_keyword: COLUMNS */
+#line 13575 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("columns");
+}
+#line 55009 "preproc.c"
+ break;
+
+ case 2321: /* unreserved_keyword: COMMENT */
+#line 13579 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("comment");
+}
+#line 55017 "preproc.c"
+ break;
+
+ case 2322: /* unreserved_keyword: COMMENTS */
+#line 13583 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("comments");
+}
+#line 55025 "preproc.c"
+ break;
+
+ case 2323: /* unreserved_keyword: COMMIT */
+#line 13587 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("commit");
+}
+#line 55033 "preproc.c"
+ break;
+
+ case 2324: /* unreserved_keyword: COMMITTED */
+#line 13591 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("committed");
+}
+#line 55041 "preproc.c"
+ break;
+
+ case 2325: /* unreserved_keyword: COMPRESSION */
+#line 13595 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("compression");
+}
+#line 55049 "preproc.c"
+ break;
+
+ case 2326: /* unreserved_keyword: CONFIGURATION */
+#line 13599 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("configuration");
+}
+#line 55057 "preproc.c"
+ break;
+
+ case 2327: /* unreserved_keyword: CONFLICT */
+#line 13603 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("conflict");
+}
+#line 55065 "preproc.c"
+ break;
+
+ case 2328: /* unreserved_keyword: CONSTRAINTS */
+#line 13607 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("constraints");
+}
+#line 55073 "preproc.c"
+ break;
+
+ case 2329: /* unreserved_keyword: CONTENT_P */
+#line 13611 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("content");
+}
+#line 55081 "preproc.c"
+ break;
+
+ case 2330: /* unreserved_keyword: CONTINUE_P */
+#line 13615 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("continue");
+}
+#line 55089 "preproc.c"
+ break;
+
+ case 2331: /* unreserved_keyword: CONVERSION_P */
+#line 13619 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 55097 "preproc.c"
+ break;
+
+ case 2332: /* unreserved_keyword: COPY */
+#line 13623 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("copy");
+}
+#line 55105 "preproc.c"
+ break;
+
+ case 2333: /* unreserved_keyword: COST */
+#line 13627 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cost");
+}
+#line 55113 "preproc.c"
+ break;
+
+ case 2334: /* unreserved_keyword: CSV */
+#line 13631 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("csv");
+}
+#line 55121 "preproc.c"
+ break;
+
+ case 2335: /* unreserved_keyword: CUBE */
+#line 13635 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cube");
+}
+#line 55129 "preproc.c"
+ break;
+
+ case 2336: /* unreserved_keyword: CURSOR */
+#line 13639 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cursor");
+}
+#line 55137 "preproc.c"
+ break;
+
+ case 2337: /* unreserved_keyword: CYCLE */
+#line 13643 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cycle");
+}
+#line 55145 "preproc.c"
+ break;
+
+ case 2338: /* unreserved_keyword: DATA_P */
+#line 13647 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("data");
+}
+#line 55153 "preproc.c"
+ break;
+
+ case 2339: /* unreserved_keyword: DATABASE */
+#line 13651 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 55161 "preproc.c"
+ break;
+
+ case 2340: /* unreserved_keyword: DEALLOCATE */
+#line 13655 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deallocate");
+}
+#line 55169 "preproc.c"
+ break;
+
+ case 2341: /* unreserved_keyword: DECLARE */
+#line 13659 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("declare");
+}
+#line 55177 "preproc.c"
+ break;
+
+ case 2342: /* unreserved_keyword: DEFAULTS */
+#line 13663 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("defaults");
+}
+#line 55185 "preproc.c"
+ break;
+
+ case 2343: /* unreserved_keyword: DEFERRED */
+#line 13667 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferred");
+}
+#line 55193 "preproc.c"
+ break;
+
+ case 2344: /* unreserved_keyword: DEFINER */
+#line 13671 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("definer");
+}
+#line 55201 "preproc.c"
+ break;
+
+ case 2345: /* unreserved_keyword: DELETE_P */
+#line 13675 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 55209 "preproc.c"
+ break;
+
+ case 2346: /* unreserved_keyword: DELIMITER */
+#line 13679 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delimiter");
+}
+#line 55217 "preproc.c"
+ break;
+
+ case 2347: /* unreserved_keyword: DELIMITERS */
+#line 13683 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delimiters");
+}
+#line 55225 "preproc.c"
+ break;
+
+ case 2348: /* unreserved_keyword: DEPENDS */
+#line 13687 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("depends");
+}
+#line 55233 "preproc.c"
+ break;
+
+ case 2349: /* unreserved_keyword: DEPTH */
+#line 13691 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("depth");
+}
+#line 55241 "preproc.c"
+ break;
+
+ case 2350: /* unreserved_keyword: DETACH */
+#line 13695 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("detach");
+}
+#line 55249 "preproc.c"
+ break;
+
+ case 2351: /* unreserved_keyword: DICTIONARY */
+#line 13699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("dictionary");
+}
+#line 55257 "preproc.c"
+ break;
+
+ case 2352: /* unreserved_keyword: DISABLE_P */
+#line 13703 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable");
+}
+#line 55265 "preproc.c"
+ break;
+
+ case 2353: /* unreserved_keyword: DISCARD */
+#line 13707 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard");
+}
+#line 55273 "preproc.c"
+ break;
+
+ case 2354: /* unreserved_keyword: DOCUMENT_P */
+#line 13711 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("document");
+}
+#line 55281 "preproc.c"
+ break;
+
+ case 2355: /* unreserved_keyword: DOMAIN_P */
+#line 13715 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("domain");
+}
+#line 55289 "preproc.c"
+ break;
+
+ case 2356: /* unreserved_keyword: DOUBLE_P */
+#line 13719 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("double");
+}
+#line 55297 "preproc.c"
+ break;
+
+ case 2357: /* unreserved_keyword: DROP */
+#line 13723 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("drop");
+}
+#line 55305 "preproc.c"
+ break;
+
+ case 2358: /* unreserved_keyword: EACH */
+#line 13727 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("each");
+}
+#line 55313 "preproc.c"
+ break;
+
+ case 2359: /* unreserved_keyword: ENABLE_P */
+#line 13731 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable");
+}
+#line 55321 "preproc.c"
+ break;
+
+ case 2360: /* unreserved_keyword: ENCODING */
+#line 13735 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("encoding");
+}
+#line 55329 "preproc.c"
+ break;
+
+ case 2361: /* unreserved_keyword: ENCRYPTED */
+#line 13739 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("encrypted");
+}
+#line 55337 "preproc.c"
+ break;
+
+ case 2362: /* unreserved_keyword: ENUM_P */
+#line 13743 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enum");
+}
+#line 55345 "preproc.c"
+ break;
+
+ case 2363: /* unreserved_keyword: ESCAPE */
+#line 13747 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("escape");
+}
+#line 55353 "preproc.c"
+ break;
+
+ case 2364: /* unreserved_keyword: EVENT */
+#line 13751 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("event");
+}
+#line 55361 "preproc.c"
+ break;
+
+ case 2365: /* unreserved_keyword: EXCLUDE */
+#line 13755 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude");
+}
+#line 55369 "preproc.c"
+ break;
+
+ case 2366: /* unreserved_keyword: EXCLUDING */
+#line 13759 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("excluding");
+}
+#line 55377 "preproc.c"
+ break;
+
+ case 2367: /* unreserved_keyword: EXCLUSIVE */
+#line 13763 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclusive");
+}
+#line 55385 "preproc.c"
+ break;
+
+ case 2368: /* unreserved_keyword: EXECUTE */
+#line 13767 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("execute");
+}
+#line 55393 "preproc.c"
+ break;
+
+ case 2369: /* unreserved_keyword: EXPLAIN */
+#line 13771 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("explain");
+}
+#line 55401 "preproc.c"
+ break;
+
+ case 2370: /* unreserved_keyword: EXPRESSION */
+#line 13775 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("expression");
+}
+#line 55409 "preproc.c"
+ break;
+
+ case 2371: /* unreserved_keyword: EXTENSION */
+#line 13779 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 55417 "preproc.c"
+ break;
+
+ case 2372: /* unreserved_keyword: EXTERNAL */
+#line 13783 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("external");
+}
+#line 55425 "preproc.c"
+ break;
+
+ case 2373: /* unreserved_keyword: FAMILY */
+#line 13787 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("family");
+}
+#line 55433 "preproc.c"
+ break;
+
+ case 2374: /* unreserved_keyword: FILTER */
+#line 13791 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("filter");
+}
+#line 55441 "preproc.c"
+ break;
+
+ case 2375: /* unreserved_keyword: FINALIZE */
+#line 13795 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("finalize");
+}
+#line 55449 "preproc.c"
+ break;
+
+ case 2376: /* unreserved_keyword: FIRST_P */
+#line 13799 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("first");
+}
+#line 55457 "preproc.c"
+ break;
+
+ case 2377: /* unreserved_keyword: FOLLOWING */
+#line 13803 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("following");
+}
+#line 55465 "preproc.c"
+ break;
+
+ case 2378: /* unreserved_keyword: FORCE */
+#line 13807 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("force");
+}
+#line 55473 "preproc.c"
+ break;
+
+ case 2379: /* unreserved_keyword: FORWARD */
+#line 13811 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("forward");
+}
+#line 55481 "preproc.c"
+ break;
+
+ case 2380: /* unreserved_keyword: FUNCTION */
+#line 13815 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("function");
+}
+#line 55489 "preproc.c"
+ break;
+
+ case 2381: /* unreserved_keyword: FUNCTIONS */
+#line 13819 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("functions");
+}
+#line 55497 "preproc.c"
+ break;
+
+ case 2382: /* unreserved_keyword: GENERATED */
+#line 13823 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("generated");
+}
+#line 55505 "preproc.c"
+ break;
+
+ case 2383: /* unreserved_keyword: GLOBAL */
+#line 13827 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("global");
+}
+#line 55513 "preproc.c"
+ break;
+
+ case 2384: /* unreserved_keyword: GRANTED */
+#line 13831 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("granted");
+}
+#line 55521 "preproc.c"
+ break;
+
+ case 2385: /* unreserved_keyword: GROUPS */
+#line 13835 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("groups");
+}
+#line 55529 "preproc.c"
+ break;
+
+ case 2386: /* unreserved_keyword: HANDLER */
+#line 13839 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("handler");
+}
+#line 55537 "preproc.c"
+ break;
+
+ case 2387: /* unreserved_keyword: HEADER_P */
+#line 13843 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("header");
+}
+#line 55545 "preproc.c"
+ break;
+
+ case 2388: /* unreserved_keyword: HOLD */
+#line 13847 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("hold");
+}
+#line 55553 "preproc.c"
+ break;
+
+ case 2389: /* unreserved_keyword: IDENTITY_P */
+#line 13851 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("identity");
+}
+#line 55561 "preproc.c"
+ break;
+
+ case 2390: /* unreserved_keyword: IF_P */
+#line 13855 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("if");
+}
+#line 55569 "preproc.c"
+ break;
+
+ case 2391: /* unreserved_keyword: IMMEDIATE */
+#line 13859 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immediate");
+}
+#line 55577 "preproc.c"
+ break;
+
+ case 2392: /* unreserved_keyword: IMMUTABLE */
+#line 13863 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immutable");
+}
+#line 55585 "preproc.c"
+ break;
+
+ case 2393: /* unreserved_keyword: IMPLICIT_P */
+#line 13867 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("implicit");
+}
+#line 55593 "preproc.c"
+ break;
+
+ case 2394: /* unreserved_keyword: IMPORT_P */
+#line 13871 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("import");
+}
+#line 55601 "preproc.c"
+ break;
+
+ case 2395: /* unreserved_keyword: INCLUDE */
+#line 13875 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("include");
+}
+#line 55609 "preproc.c"
+ break;
+
+ case 2396: /* unreserved_keyword: INCLUDING */
+#line 13879 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("including");
+}
+#line 55617 "preproc.c"
+ break;
+
+ case 2397: /* unreserved_keyword: INCREMENT */
+#line 13883 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("increment");
+}
+#line 55625 "preproc.c"
+ break;
+
+ case 2398: /* unreserved_keyword: INDEX */
+#line 13887 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 55633 "preproc.c"
+ break;
+
+ case 2399: /* unreserved_keyword: INDEXES */
+#line 13891 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("indexes");
+}
+#line 55641 "preproc.c"
+ break;
+
+ case 2400: /* unreserved_keyword: INHERIT */
+#line 13895 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inherit");
+}
+#line 55649 "preproc.c"
+ break;
+
+ case 2401: /* unreserved_keyword: INHERITS */
+#line 13899 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inherits");
+}
+#line 55657 "preproc.c"
+ break;
+
+ case 2402: /* unreserved_keyword: INLINE_P */
+#line 13903 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inline");
+}
+#line 55665 "preproc.c"
+ break;
+
+ case 2403: /* unreserved_keyword: INSENSITIVE */
+#line 13907 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insensitive");
+}
+#line 55673 "preproc.c"
+ break;
+
+ case 2404: /* unreserved_keyword: INSERT */
+#line 13911 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 55681 "preproc.c"
+ break;
+
+ case 2405: /* unreserved_keyword: INSTEAD */
+#line 13915 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("instead");
+}
+#line 55689 "preproc.c"
+ break;
+
+ case 2406: /* unreserved_keyword: INVOKER */
+#line 13919 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("invoker");
+}
+#line 55697 "preproc.c"
+ break;
+
+ case 2407: /* unreserved_keyword: ISOLATION */
+#line 13923 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("isolation");
+}
+#line 55705 "preproc.c"
+ break;
+
+ case 2408: /* unreserved_keyword: KEY */
+#line 13927 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("key");
+}
+#line 55713 "preproc.c"
+ break;
+
+ case 2409: /* unreserved_keyword: LABEL */
+#line 13931 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("label");
+}
+#line 55721 "preproc.c"
+ break;
+
+ case 2410: /* unreserved_keyword: LANGUAGE */
+#line 13935 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("language");
+}
+#line 55729 "preproc.c"
+ break;
+
+ case 2411: /* unreserved_keyword: LARGE_P */
+#line 13939 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("large");
+}
+#line 55737 "preproc.c"
+ break;
+
+ case 2412: /* unreserved_keyword: LAST_P */
+#line 13943 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("last");
+}
+#line 55745 "preproc.c"
+ break;
+
+ case 2413: /* unreserved_keyword: LEAKPROOF */
+#line 13947 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("leakproof");
+}
+#line 55753 "preproc.c"
+ break;
+
+ case 2414: /* unreserved_keyword: LEVEL */
+#line 13951 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("level");
+}
+#line 55761 "preproc.c"
+ break;
+
+ case 2415: /* unreserved_keyword: LISTEN */
+#line 13955 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("listen");
+}
+#line 55769 "preproc.c"
+ break;
+
+ case 2416: /* unreserved_keyword: LOAD */
+#line 13959 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("load");
+}
+#line 55777 "preproc.c"
+ break;
+
+ case 2417: /* unreserved_keyword: LOCAL */
+#line 13963 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("local");
+}
+#line 55785 "preproc.c"
+ break;
+
+ case 2418: /* unreserved_keyword: LOCATION */
+#line 13967 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("location");
+}
+#line 55793 "preproc.c"
+ break;
+
+ case 2419: /* unreserved_keyword: LOCK_P */
+#line 13971 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("lock");
+}
+#line 55801 "preproc.c"
+ break;
+
+ case 2420: /* unreserved_keyword: LOCKED */
+#line 13975 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("locked");
+}
+#line 55809 "preproc.c"
+ break;
+
+ case 2421: /* unreserved_keyword: LOGGED */
+#line 13979 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("logged");
+}
+#line 55817 "preproc.c"
+ break;
+
+ case 2422: /* unreserved_keyword: MAPPING */
+#line 13983 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("mapping");
+}
+#line 55825 "preproc.c"
+ break;
+
+ case 2423: /* unreserved_keyword: MATCH */
+#line 13987 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("match");
+}
+#line 55833 "preproc.c"
+ break;
+
+ case 2424: /* unreserved_keyword: MATERIALIZED */
+#line 13991 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("materialized");
+}
+#line 55841 "preproc.c"
+ break;
+
+ case 2425: /* unreserved_keyword: MAXVALUE */
+#line 13995 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("maxvalue");
+}
+#line 55849 "preproc.c"
+ break;
+
+ case 2426: /* unreserved_keyword: METHOD */
+#line 13999 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("method");
+}
+#line 55857 "preproc.c"
+ break;
+
+ case 2427: /* unreserved_keyword: MINVALUE */
+#line 14003 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("minvalue");
+}
+#line 55865 "preproc.c"
+ break;
+
+ case 2428: /* unreserved_keyword: MODE */
+#line 14007 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("mode");
+}
+#line 55873 "preproc.c"
+ break;
+
+ case 2429: /* unreserved_keyword: MOVE */
+#line 14011 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("move");
+}
+#line 55881 "preproc.c"
+ break;
+
+ case 2430: /* unreserved_keyword: NAME_P */
+#line 14015 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("name");
+}
+#line 55889 "preproc.c"
+ break;
+
+ case 2431: /* unreserved_keyword: NAMES */
+#line 14019 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("names");
+}
+#line 55897 "preproc.c"
+ break;
+
+ case 2432: /* unreserved_keyword: NEW */
+#line 14023 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("new");
+}
+#line 55905 "preproc.c"
+ break;
+
+ case 2433: /* unreserved_keyword: NEXT */
+#line 14027 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("next");
+}
+#line 55913 "preproc.c"
+ break;
+
+ case 2434: /* unreserved_keyword: NFC */
+#line 14031 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfc");
+}
+#line 55921 "preproc.c"
+ break;
+
+ case 2435: /* unreserved_keyword: NFD */
+#line 14035 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfd");
+}
+#line 55929 "preproc.c"
+ break;
+
+ case 2436: /* unreserved_keyword: NFKC */
+#line 14039 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkc");
+}
+#line 55937 "preproc.c"
+ break;
+
+ case 2437: /* unreserved_keyword: NFKD */
+#line 14043 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkd");
+}
+#line 55945 "preproc.c"
+ break;
+
+ case 2438: /* unreserved_keyword: NO */
+#line 14047 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no");
+}
+#line 55953 "preproc.c"
+ break;
+
+ case 2439: /* unreserved_keyword: NORMALIZED */
+#line 14051 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("normalized");
+}
+#line 55961 "preproc.c"
+ break;
+
+ case 2440: /* unreserved_keyword: NOTHING */
+#line 14055 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 55969 "preproc.c"
+ break;
+
+ case 2441: /* unreserved_keyword: NOTIFY */
+#line 14059 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("notify");
+}
+#line 55977 "preproc.c"
+ break;
+
+ case 2442: /* unreserved_keyword: NOWAIT */
+#line 14063 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 55985 "preproc.c"
+ break;
+
+ case 2443: /* unreserved_keyword: NULLS_P */
+#line 14067 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nulls");
+}
+#line 55993 "preproc.c"
+ break;
+
+ case 2444: /* unreserved_keyword: OBJECT_P */
+#line 14071 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("object");
+}
+#line 56001 "preproc.c"
+ break;
+
+ case 2445: /* unreserved_keyword: OF */
+#line 14075 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("of");
+}
+#line 56009 "preproc.c"
+ break;
+
+ case 2446: /* unreserved_keyword: OFF */
+#line 14079 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("off");
+}
+#line 56017 "preproc.c"
+ break;
+
+ case 2447: /* unreserved_keyword: OIDS */
+#line 14083 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("oids");
+}
+#line 56025 "preproc.c"
+ break;
+
+ case 2448: /* unreserved_keyword: OLD */
+#line 14087 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("old");
+}
+#line 56033 "preproc.c"
+ break;
+
+ case 2449: /* unreserved_keyword: OPERATOR */
+#line 14091 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("operator");
+}
+#line 56041 "preproc.c"
+ break;
+
+ case 2450: /* unreserved_keyword: OPTION */
+#line 14095 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("option");
+}
+#line 56049 "preproc.c"
+ break;
+
+ case 2451: /* unreserved_keyword: OPTIONS */
+#line 14099 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("options");
+}
+#line 56057 "preproc.c"
+ break;
+
+ case 2452: /* unreserved_keyword: ORDINALITY */
+#line 14103 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ordinality");
+}
+#line 56065 "preproc.c"
+ break;
+
+ case 2453: /* unreserved_keyword: OTHERS */
+#line 14107 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("others");
+}
+#line 56073 "preproc.c"
+ break;
+
+ case 2454: /* unreserved_keyword: OVER */
+#line 14111 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("over");
+}
+#line 56081 "preproc.c"
+ break;
+
+ case 2455: /* unreserved_keyword: OVERRIDING */
+#line 14115 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("overriding");
+}
+#line 56089 "preproc.c"
+ break;
+
+ case 2456: /* unreserved_keyword: OWNED */
+#line 14119 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("owned");
+}
+#line 56097 "preproc.c"
+ break;
+
+ case 2457: /* unreserved_keyword: OWNER */
+#line 14123 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("owner");
+}
+#line 56105 "preproc.c"
+ break;
+
+ case 2458: /* unreserved_keyword: PARALLEL */
+#line 14127 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("parallel");
+}
+#line 56113 "preproc.c"
+ break;
+
+ case 2459: /* unreserved_keyword: PARSER */
+#line 14131 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("parser");
+}
+#line 56121 "preproc.c"
+ break;
+
+ case 2460: /* unreserved_keyword: PARTIAL */
+#line 14135 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("partial");
+}
+#line 56129 "preproc.c"
+ break;
+
+ case 2461: /* unreserved_keyword: PARTITION */
+#line 14139 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("partition");
+}
+#line 56137 "preproc.c"
+ break;
+
+ case 2462: /* unreserved_keyword: PASSING */
+#line 14143 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("passing");
+}
+#line 56145 "preproc.c"
+ break;
+
+ case 2463: /* unreserved_keyword: PASSWORD */
+#line 14147 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("password");
+}
+#line 56153 "preproc.c"
+ break;
+
+ case 2464: /* unreserved_keyword: PLANS */
+#line 14151 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("plans");
+}
+#line 56161 "preproc.c"
+ break;
+
+ case 2465: /* unreserved_keyword: POLICY */
+#line 14155 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("policy");
+}
+#line 56169 "preproc.c"
+ break;
+
+ case 2466: /* unreserved_keyword: PRECEDING */
+#line 14159 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("preceding");
+}
+#line 56177 "preproc.c"
+ break;
+
+ case 2467: /* unreserved_keyword: PREPARE */
+#line 14163 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prepare");
+}
+#line 56185 "preproc.c"
+ break;
+
+ case 2468: /* unreserved_keyword: PREPARED */
+#line 14167 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prepared");
+}
+#line 56193 "preproc.c"
+ break;
+
+ case 2469: /* unreserved_keyword: PRESERVE */
+#line 14171 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("preserve");
+}
+#line 56201 "preproc.c"
+ break;
+
+ case 2470: /* unreserved_keyword: PRIOR */
+#line 14175 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prior");
+}
+#line 56209 "preproc.c"
+ break;
+
+ case 2471: /* unreserved_keyword: PRIVILEGES */
+#line 14179 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("privileges");
+}
+#line 56217 "preproc.c"
+ break;
+
+ case 2472: /* unreserved_keyword: PROCEDURAL */
+#line 14183 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedural");
+}
+#line 56225 "preproc.c"
+ break;
+
+ case 2473: /* unreserved_keyword: PROCEDURE */
+#line 14187 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedure");
+}
+#line 56233 "preproc.c"
+ break;
+
+ case 2474: /* unreserved_keyword: PROCEDURES */
+#line 14191 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedures");
+}
+#line 56241 "preproc.c"
+ break;
+
+ case 2475: /* unreserved_keyword: PROGRAM */
+#line 14195 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("program");
+}
+#line 56249 "preproc.c"
+ break;
+
+ case 2476: /* unreserved_keyword: PUBLICATION */
+#line 14199 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 56257 "preproc.c"
+ break;
+
+ case 2477: /* unreserved_keyword: QUOTE */
+#line 14203 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("quote");
+}
+#line 56265 "preproc.c"
+ break;
+
+ case 2478: /* unreserved_keyword: RANGE */
+#line 14207 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("range");
+}
+#line 56273 "preproc.c"
+ break;
+
+ case 2479: /* unreserved_keyword: READ */
+#line 14211 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read");
+}
+#line 56281 "preproc.c"
+ break;
+
+ case 2480: /* unreserved_keyword: REASSIGN */
+#line 14215 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reassign");
+}
+#line 56289 "preproc.c"
+ break;
+
+ case 2481: /* unreserved_keyword: RECHECK */
+#line 14219 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("recheck");
+}
+#line 56297 "preproc.c"
+ break;
+
+ case 2482: /* unreserved_keyword: RECURSIVE */
+#line 14223 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("recursive");
+}
+#line 56305 "preproc.c"
+ break;
+
+ case 2483: /* unreserved_keyword: REF */
+#line 14227 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ref");
+}
+#line 56313 "preproc.c"
+ break;
+
+ case 2484: /* unreserved_keyword: REFERENCING */
+#line 14231 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("referencing");
+}
+#line 56321 "preproc.c"
+ break;
+
+ case 2485: /* unreserved_keyword: REFRESH */
+#line 14235 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("refresh");
+}
+#line 56329 "preproc.c"
+ break;
+
+ case 2486: /* unreserved_keyword: REINDEX */
+#line 14239 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reindex");
+}
+#line 56337 "preproc.c"
+ break;
+
+ case 2487: /* unreserved_keyword: RELATIVE_P */
+#line 14243 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("relative");
+}
+#line 56345 "preproc.c"
+ break;
+
+ case 2488: /* unreserved_keyword: RELEASE */
+#line 14247 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("release");
+}
+#line 56353 "preproc.c"
+ break;
+
+ case 2489: /* unreserved_keyword: RENAME */
+#line 14251 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rename");
+}
+#line 56361 "preproc.c"
+ break;
+
+ case 2490: /* unreserved_keyword: REPEATABLE */
+#line 14255 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("repeatable");
+}
+#line 56369 "preproc.c"
+ break;
+
+ case 2491: /* unreserved_keyword: REPLACE */
+#line 14259 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("replace");
+}
+#line 56377 "preproc.c"
+ break;
+
+ case 2492: /* unreserved_keyword: REPLICA */
+#line 14263 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("replica");
+}
+#line 56385 "preproc.c"
+ break;
+
+ case 2493: /* unreserved_keyword: RESET */
+#line 14267 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reset");
+}
+#line 56393 "preproc.c"
+ break;
+
+ case 2494: /* unreserved_keyword: RESTART */
+#line 14271 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 56401 "preproc.c"
+ break;
+
+ case 2495: /* unreserved_keyword: RESTRICT */
+#line 14275 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 56409 "preproc.c"
+ break;
+
+ case 2496: /* unreserved_keyword: RETURN */
+#line 14279 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("return");
+}
+#line 56417 "preproc.c"
+ break;
+
+ case 2497: /* unreserved_keyword: RETURNS */
+#line 14283 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("returns");
+}
+#line 56425 "preproc.c"
+ break;
+
+ case 2498: /* unreserved_keyword: REVOKE */
+#line 14287 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("revoke");
+}
+#line 56433 "preproc.c"
+ break;
+
+ case 2499: /* unreserved_keyword: ROLE */
+#line 14291 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 56441 "preproc.c"
+ break;
+
+ case 2500: /* unreserved_keyword: ROLLBACK */
+#line 14295 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rollback");
+}
+#line 56449 "preproc.c"
+ break;
+
+ case 2501: /* unreserved_keyword: ROLLUP */
+#line 14299 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rollup");
+}
+#line 56457 "preproc.c"
+ break;
+
+ case 2502: /* unreserved_keyword: ROUTINE */
+#line 14303 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("routine");
+}
+#line 56465 "preproc.c"
+ break;
+
+ case 2503: /* unreserved_keyword: ROUTINES */
+#line 14307 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("routines");
+}
+#line 56473 "preproc.c"
+ break;
+
+ case 2504: /* unreserved_keyword: ROWS */
+#line 14311 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rows");
+}
+#line 56481 "preproc.c"
+ break;
+
+ case 2505: /* unreserved_keyword: RULE */
+#line 14315 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rule");
+}
+#line 56489 "preproc.c"
+ break;
+
+ case 2506: /* unreserved_keyword: SAVEPOINT */
+#line 14319 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("savepoint");
+}
+#line 56497 "preproc.c"
+ break;
+
+ case 2507: /* unreserved_keyword: SCHEMA */
+#line 14323 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 56505 "preproc.c"
+ break;
+
+ case 2508: /* unreserved_keyword: SCHEMAS */
+#line 14327 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schemas");
+}
+#line 56513 "preproc.c"
+ break;
+
+ case 2509: /* unreserved_keyword: SCROLL */
+#line 14331 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("scroll");
+}
+#line 56521 "preproc.c"
+ break;
+
+ case 2510: /* unreserved_keyword: SEARCH */
+#line 14335 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("search");
+}
+#line 56529 "preproc.c"
+ break;
+
+ case 2511: /* unreserved_keyword: SECURITY */
+#line 14339 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("security");
+}
+#line 56537 "preproc.c"
+ break;
+
+ case 2512: /* unreserved_keyword: SEQUENCE */
+#line 14343 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 56545 "preproc.c"
+ break;
+
+ case 2513: /* unreserved_keyword: SEQUENCES */
+#line 14347 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequences");
+}
+#line 56553 "preproc.c"
+ break;
+
+ case 2514: /* unreserved_keyword: SERIALIZABLE */
+#line 14351 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("serializable");
+}
+#line 56561 "preproc.c"
+ break;
+
+ case 2515: /* unreserved_keyword: SERVER */
+#line 14355 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 56569 "preproc.c"
+ break;
+
+ case 2516: /* unreserved_keyword: SESSION */
+#line 14359 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session");
+}
+#line 56577 "preproc.c"
+ break;
+
+ case 2517: /* unreserved_keyword: SET */
+#line 14363 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set");
+}
+#line 56585 "preproc.c"
+ break;
+
+ case 2518: /* unreserved_keyword: SETS */
+#line 14367 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sets");
+}
+#line 56593 "preproc.c"
+ break;
+
+ case 2519: /* unreserved_keyword: SHARE */
+#line 14371 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("share");
+}
+#line 56601 "preproc.c"
+ break;
+
+ case 2520: /* unreserved_keyword: SHOW */
+#line 14375 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("show");
+}
+#line 56609 "preproc.c"
+ break;
+
+ case 2521: /* unreserved_keyword: SIMPLE */
+#line 14379 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("simple");
+}
+#line 56617 "preproc.c"
+ break;
+
+ case 2522: /* unreserved_keyword: SKIP */
+#line 14383 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("skip");
+}
+#line 56625 "preproc.c"
+ break;
+
+ case 2523: /* unreserved_keyword: SNAPSHOT */
+#line 14387 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("snapshot");
+}
+#line 56633 "preproc.c"
+ break;
+
+ case 2524: /* unreserved_keyword: SQL_P */
+#line 14391 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sql");
+}
+#line 56641 "preproc.c"
+ break;
+
+ case 2525: /* unreserved_keyword: STABLE */
+#line 14395 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stable");
+}
+#line 56649 "preproc.c"
+ break;
+
+ case 2526: /* unreserved_keyword: STANDALONE_P */
+#line 14399 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("standalone");
+}
+#line 56657 "preproc.c"
+ break;
+
+ case 2527: /* unreserved_keyword: START */
+#line 14403 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("start");
+}
+#line 56665 "preproc.c"
+ break;
+
+ case 2528: /* unreserved_keyword: STATEMENT */
+#line 14407 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statement");
+}
+#line 56673 "preproc.c"
+ break;
+
+ case 2529: /* unreserved_keyword: STATISTICS */
+#line 14411 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 56681 "preproc.c"
+ break;
+
+ case 2530: /* unreserved_keyword: STDIN */
+#line 14415 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdin");
+}
+#line 56689 "preproc.c"
+ break;
+
+ case 2531: /* unreserved_keyword: STDOUT */
+#line 14419 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdout");
+}
+#line 56697 "preproc.c"
+ break;
+
+ case 2532: /* unreserved_keyword: STORAGE */
+#line 14423 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("storage");
+}
+#line 56705 "preproc.c"
+ break;
+
+ case 2533: /* unreserved_keyword: STORED */
+#line 14427 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stored");
+}
+#line 56713 "preproc.c"
+ break;
+
+ case 2534: /* unreserved_keyword: STRICT_P */
+#line 14431 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strict");
+}
+#line 56721 "preproc.c"
+ break;
+
+ case 2535: /* unreserved_keyword: STRIP_P */
+#line 14435 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strip");
+}
+#line 56729 "preproc.c"
+ break;
+
+ case 2536: /* unreserved_keyword: SUBSCRIPTION */
+#line 14439 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 56737 "preproc.c"
+ break;
+
+ case 2537: /* unreserved_keyword: SUPPORT */
+#line 14443 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("support");
+}
+#line 56745 "preproc.c"
+ break;
+
+ case 2538: /* unreserved_keyword: SYSID */
+#line 14447 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sysid");
+}
+#line 56753 "preproc.c"
+ break;
+
+ case 2539: /* unreserved_keyword: SYSTEM_P */
+#line 14451 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 56761 "preproc.c"
+ break;
+
+ case 2540: /* unreserved_keyword: TABLES */
+#line 14455 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tables");
+}
+#line 56769 "preproc.c"
+ break;
+
+ case 2541: /* unreserved_keyword: TABLESPACE */
+#line 14459 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 56777 "preproc.c"
+ break;
+
+ case 2542: /* unreserved_keyword: TEMP */
+#line 14463 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temp");
+}
+#line 56785 "preproc.c"
+ break;
+
+ case 2543: /* unreserved_keyword: TEMPLATE */
+#line 14467 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("template");
+}
+#line 56793 "preproc.c"
+ break;
+
+ case 2544: /* unreserved_keyword: TEMPORARY */
+#line 14471 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temporary");
+}
+#line 56801 "preproc.c"
+ break;
+
+ case 2545: /* unreserved_keyword: TEXT_P */
+#line 14475 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text");
+}
+#line 56809 "preproc.c"
+ break;
+
+ case 2546: /* unreserved_keyword: TIES */
+#line 14479 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ties");
+}
+#line 56817 "preproc.c"
+ break;
+
+ case 2547: /* unreserved_keyword: TRANSACTION */
+#line 14483 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transaction");
+}
+#line 56825 "preproc.c"
+ break;
+
+ case 2548: /* unreserved_keyword: TRANSFORM */
+#line 14487 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transform");
+}
+#line 56833 "preproc.c"
+ break;
+
+ case 2549: /* unreserved_keyword: TRIGGER */
+#line 14491 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trigger");
+}
+#line 56841 "preproc.c"
+ break;
+
+ case 2550: /* unreserved_keyword: TRUNCATE */
+#line 14495 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("truncate");
+}
+#line 56849 "preproc.c"
+ break;
+
+ case 2551: /* unreserved_keyword: TRUSTED */
+#line 14499 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trusted");
+}
+#line 56857 "preproc.c"
+ break;
+
+ case 2552: /* unreserved_keyword: TYPE_P */
+#line 14503 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("type");
+}
+#line 56865 "preproc.c"
+ break;
+
+ case 2553: /* unreserved_keyword: TYPES_P */
+#line 14507 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("types");
+}
+#line 56873 "preproc.c"
+ break;
+
+ case 2554: /* unreserved_keyword: UESCAPE */
+#line 14511 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("uescape");
+}
+#line 56881 "preproc.c"
+ break;
+
+ case 2555: /* unreserved_keyword: UNBOUNDED */
+#line 14515 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unbounded");
+}
+#line 56889 "preproc.c"
+ break;
+
+ case 2556: /* unreserved_keyword: UNCOMMITTED */
+#line 14519 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("uncommitted");
+}
+#line 56897 "preproc.c"
+ break;
+
+ case 2557: /* unreserved_keyword: UNENCRYPTED */
+#line 14523 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unencrypted");
+}
+#line 56905 "preproc.c"
+ break;
+
+ case 2558: /* unreserved_keyword: UNKNOWN */
+#line 14527 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unknown");
+}
+#line 56913 "preproc.c"
+ break;
+
+ case 2559: /* unreserved_keyword: UNLISTEN */
+#line 14531 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlisten");
+}
+#line 56921 "preproc.c"
+ break;
+
+ case 2560: /* unreserved_keyword: UNLOGGED */
+#line 14535 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 56929 "preproc.c"
+ break;
+
+ case 2561: /* unreserved_keyword: UNTIL */
+#line 14539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("until");
+}
+#line 56937 "preproc.c"
+ break;
+
+ case 2562: /* unreserved_keyword: UPDATE */
+#line 14543 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 56945 "preproc.c"
+ break;
+
+ case 2563: /* unreserved_keyword: VACUUM */
+#line 14547 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("vacuum");
+}
+#line 56953 "preproc.c"
+ break;
+
+ case 2564: /* unreserved_keyword: VALID */
+#line 14551 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("valid");
+}
+#line 56961 "preproc.c"
+ break;
+
+ case 2565: /* unreserved_keyword: VALIDATE */
+#line 14555 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("validate");
+}
+#line 56969 "preproc.c"
+ break;
+
+ case 2566: /* unreserved_keyword: VALIDATOR */
+#line 14559 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("validator");
+}
+#line 56977 "preproc.c"
+ break;
+
+ case 2567: /* unreserved_keyword: VALUE_P */
+#line 14563 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("value");
+}
+#line 56985 "preproc.c"
+ break;
+
+ case 2568: /* unreserved_keyword: VARYING */
+#line 14567 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("varying");
+}
+#line 56993 "preproc.c"
+ break;
+
+ case 2569: /* unreserved_keyword: VERSION_P */
+#line 14571 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("version");
+}
+#line 57001 "preproc.c"
+ break;
+
+ case 2570: /* unreserved_keyword: VIEW */
+#line 14575 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 57009 "preproc.c"
+ break;
+
+ case 2571: /* unreserved_keyword: VIEWS */
+#line 14579 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("views");
+}
+#line 57017 "preproc.c"
+ break;
+
+ case 2572: /* unreserved_keyword: VOLATILE */
+#line 14583 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("volatile");
+}
+#line 57025 "preproc.c"
+ break;
+
+ case 2573: /* unreserved_keyword: WHITESPACE_P */
+#line 14587 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("whitespace");
+}
+#line 57033 "preproc.c"
+ break;
+
+ case 2574: /* unreserved_keyword: WITHIN */
+#line 14591 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("within");
+}
+#line 57041 "preproc.c"
+ break;
+
+ case 2575: /* unreserved_keyword: WITHOUT */
+#line 14595 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("without");
+}
+#line 57049 "preproc.c"
+ break;
+
+ case 2576: /* unreserved_keyword: WORK */
+#line 14599 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("work");
+}
+#line 57057 "preproc.c"
+ break;
+
+ case 2577: /* unreserved_keyword: WRAPPER */
+#line 14603 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("wrapper");
+}
+#line 57065 "preproc.c"
+ break;
+
+ case 2578: /* unreserved_keyword: WRITE */
+#line 14607 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("write");
+}
+#line 57073 "preproc.c"
+ break;
+
+ case 2579: /* unreserved_keyword: XML_P */
+#line 14611 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xml");
+}
+#line 57081 "preproc.c"
+ break;
+
+ case 2580: /* unreserved_keyword: YES_P */
+#line 14615 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("yes");
+}
+#line 57089 "preproc.c"
+ break;
+
+ case 2581: /* unreserved_keyword: ZONE */
+#line 14619 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("zone");
+}
+#line 57097 "preproc.c"
+ break;
+
+ case 2582: /* col_name_keyword: BETWEEN */
+#line 14627 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("between");
+}
+#line 57105 "preproc.c"
+ break;
+
+ case 2583: /* col_name_keyword: BIGINT */
+#line 14631 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("bigint");
+}
+#line 57113 "preproc.c"
+ break;
+
+ case 2584: /* col_name_keyword: BIT */
+#line 14635 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("bit");
+}
+#line 57121 "preproc.c"
+ break;
+
+ case 2585: /* col_name_keyword: BOOLEAN_P */
+#line 14639 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("boolean");
+}
+#line 57129 "preproc.c"
+ break;
+
+ case 2586: /* col_name_keyword: CHARACTER */
+#line 14643 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("character");
+}
+#line 57137 "preproc.c"
+ break;
+
+ case 2587: /* col_name_keyword: COALESCE */
+#line 14647 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("coalesce");
+}
+#line 57145 "preproc.c"
+ break;
+
+ case 2588: /* col_name_keyword: DEC */
+#line 14651 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("dec");
+}
+#line 57153 "preproc.c"
+ break;
+
+ case 2589: /* col_name_keyword: DECIMAL_P */
+#line 14655 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("decimal");
+}
+#line 57161 "preproc.c"
+ break;
+
+ case 2590: /* col_name_keyword: EXISTS */
+#line 14659 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exists");
+}
+#line 57169 "preproc.c"
+ break;
+
+ case 2591: /* col_name_keyword: EXTRACT */
+#line 14663 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("extract");
+}
+#line 57177 "preproc.c"
+ break;
+
+ case 2592: /* col_name_keyword: FLOAT_P */
+#line 14667 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("float");
+}
+#line 57185 "preproc.c"
+ break;
+
+ case 2593: /* col_name_keyword: GREATEST */
+#line 14671 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("greatest");
+}
+#line 57193 "preproc.c"
+ break;
+
+ case 2594: /* col_name_keyword: GROUPING */
+#line 14675 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("grouping");
+}
+#line 57201 "preproc.c"
+ break;
+
+ case 2595: /* col_name_keyword: INOUT */
+#line 14679 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inout");
+}
+#line 57209 "preproc.c"
+ break;
+
+ case 2596: /* col_name_keyword: INTEGER */
+#line 14683 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("integer");
+}
+#line 57217 "preproc.c"
+ break;
+
+ case 2597: /* col_name_keyword: INTERVAL */
+#line 14687 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("interval");
+}
+#line 57225 "preproc.c"
+ break;
+
+ case 2598: /* col_name_keyword: LEAST */
+#line 14691 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("least");
+}
+#line 57233 "preproc.c"
+ break;
+
+ case 2599: /* col_name_keyword: NATIONAL */
+#line 14695 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("national");
+}
+#line 57241 "preproc.c"
+ break;
+
+ case 2600: /* col_name_keyword: NCHAR */
+#line 14699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nchar");
+}
+#line 57249 "preproc.c"
+ break;
+
+ case 2601: /* col_name_keyword: NONE */
+#line 14703 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("none");
+}
+#line 57257 "preproc.c"
+ break;
+
+ case 2602: /* col_name_keyword: NORMALIZE */
+#line 14707 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("normalize");
+}
+#line 57265 "preproc.c"
+ break;
+
+ case 2603: /* col_name_keyword: NULLIF */
+#line 14711 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nullif");
+}
+#line 57273 "preproc.c"
+ break;
+
+ case 2604: /* col_name_keyword: NUMERIC */
+#line 14715 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("numeric");
+}
+#line 57281 "preproc.c"
+ break;
+
+ case 2605: /* col_name_keyword: OUT_P */
+#line 14719 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("out");
+}
+#line 57289 "preproc.c"
+ break;
+
+ case 2606: /* col_name_keyword: OVERLAY */
+#line 14723 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("overlay");
+}
+#line 57297 "preproc.c"
+ break;
+
+ case 2607: /* col_name_keyword: POSITION */
+#line 14727 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("position");
+}
+#line 57305 "preproc.c"
+ break;
+
+ case 2608: /* col_name_keyword: PRECISION */
+#line 14731 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("precision");
+}
+#line 57313 "preproc.c"
+ break;
+
+ case 2609: /* col_name_keyword: REAL */
+#line 14735 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("real");
+}
+#line 57321 "preproc.c"
+ break;
+
+ case 2610: /* col_name_keyword: ROW */
+#line 14739 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 57329 "preproc.c"
+ break;
+
+ case 2611: /* col_name_keyword: SETOF */
+#line 14743 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("setof");
+}
+#line 57337 "preproc.c"
+ break;
+
+ case 2612: /* col_name_keyword: SMALLINT */
+#line 14747 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("smallint");
+}
+#line 57345 "preproc.c"
+ break;
+
+ case 2613: /* col_name_keyword: SUBSTRING */
+#line 14751 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("substring");
+}
+#line 57353 "preproc.c"
+ break;
+
+ case 2614: /* col_name_keyword: TIME */
+#line 14755 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("time");
+}
+#line 57361 "preproc.c"
+ break;
+
+ case 2615: /* col_name_keyword: TIMESTAMP */
+#line 14759 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("timestamp");
+}
+#line 57369 "preproc.c"
+ break;
+
+ case 2616: /* col_name_keyword: TREAT */
+#line 14763 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("treat");
+}
+#line 57377 "preproc.c"
+ break;
+
+ case 2617: /* col_name_keyword: TRIM */
+#line 14767 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trim");
+}
+#line 57385 "preproc.c"
+ break;
+
+ case 2618: /* col_name_keyword: VARCHAR */
+#line 14771 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("varchar");
+}
+#line 57393 "preproc.c"
+ break;
+
+ case 2619: /* col_name_keyword: XMLATTRIBUTES */
+#line 14775 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlattributes");
+}
+#line 57401 "preproc.c"
+ break;
+
+ case 2620: /* col_name_keyword: XMLCONCAT */
+#line 14779 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlconcat");
+}
+#line 57409 "preproc.c"
+ break;
+
+ case 2621: /* col_name_keyword: XMLELEMENT */
+#line 14783 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlelement");
+}
+#line 57417 "preproc.c"
+ break;
+
+ case 2622: /* col_name_keyword: XMLEXISTS */
+#line 14787 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlexists");
+}
+#line 57425 "preproc.c"
+ break;
+
+ case 2623: /* col_name_keyword: XMLFOREST */
+#line 14791 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlforest");
+}
+#line 57433 "preproc.c"
+ break;
+
+ case 2624: /* col_name_keyword: XMLNAMESPACES */
+#line 14795 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlnamespaces");
+}
+#line 57441 "preproc.c"
+ break;
+
+ case 2625: /* col_name_keyword: XMLPARSE */
+#line 14799 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlparse");
+}
+#line 57449 "preproc.c"
+ break;
+
+ case 2626: /* col_name_keyword: XMLPI */
+#line 14803 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlpi");
+}
+#line 57457 "preproc.c"
+ break;
+
+ case 2627: /* col_name_keyword: XMLROOT */
+#line 14807 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlroot");
+}
+#line 57465 "preproc.c"
+ break;
+
+ case 2628: /* col_name_keyword: XMLSERIALIZE */
+#line 14811 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlserialize");
+}
+#line 57473 "preproc.c"
+ break;
+
+ case 2629: /* col_name_keyword: XMLTABLE */
+#line 14815 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmltable");
+}
+#line 57481 "preproc.c"
+ break;
+
+ case 2630: /* type_func_name_keyword: AUTHORIZATION */
+#line 14823 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("authorization");
+}
+#line 57489 "preproc.c"
+ break;
+
+ case 2631: /* type_func_name_keyword: BINARY */
+#line 14827 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 57497 "preproc.c"
+ break;
+
+ case 2632: /* type_func_name_keyword: COLLATION */
+#line 14831 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 57505 "preproc.c"
+ break;
+
+ case 2633: /* type_func_name_keyword: CONCURRENTLY */
+#line 14835 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("concurrently");
+}
+#line 57513 "preproc.c"
+ break;
+
+ case 2634: /* type_func_name_keyword: CROSS */
+#line 14839 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cross");
+}
+#line 57521 "preproc.c"
+ break;
+
+ case 2635: /* type_func_name_keyword: CURRENT_SCHEMA */
+#line 14843 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_schema");
+}
+#line 57529 "preproc.c"
+ break;
+
+ case 2636: /* type_func_name_keyword: FREEZE */
+#line 14847 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 57537 "preproc.c"
+ break;
+
+ case 2637: /* type_func_name_keyword: FULL */
+#line 14851 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 57545 "preproc.c"
+ break;
+
+ case 2638: /* type_func_name_keyword: ILIKE */
+#line 14855 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ilike");
+}
+#line 57553 "preproc.c"
+ break;
+
+ case 2639: /* type_func_name_keyword: INNER_P */
+#line 14859 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inner");
+}
+#line 57561 "preproc.c"
+ break;
+
+ case 2640: /* type_func_name_keyword: IS */
+#line 14863 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("is");
+}
+#line 57569 "preproc.c"
+ break;
+
+ case 2641: /* type_func_name_keyword: ISNULL */
+#line 14867 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("isnull");
+}
+#line 57577 "preproc.c"
+ break;
+
+ case 2642: /* type_func_name_keyword: JOIN */
+#line 14871 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("join");
+}
+#line 57585 "preproc.c"
+ break;
+
+ case 2643: /* type_func_name_keyword: LEFT */
+#line 14875 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("left");
+}
+#line 57593 "preproc.c"
+ break;
+
+ case 2644: /* type_func_name_keyword: LIKE */
+#line 14879 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("like");
+}
+#line 57601 "preproc.c"
+ break;
+
+ case 2645: /* type_func_name_keyword: NATURAL */
+#line 14883 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("natural");
+}
+#line 57609 "preproc.c"
+ break;
+
+ case 2646: /* type_func_name_keyword: NOTNULL */
+#line 14887 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("notnull");
+}
+#line 57617 "preproc.c"
+ break;
+
+ case 2647: /* type_func_name_keyword: OUTER_P */
+#line 14891 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("outer");
+}
+#line 57625 "preproc.c"
+ break;
+
+ case 2648: /* type_func_name_keyword: OVERLAPS */
+#line 14895 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("overlaps");
+}
+#line 57633 "preproc.c"
+ break;
+
+ case 2649: /* type_func_name_keyword: RIGHT */
+#line 14899 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("right");
+}
+#line 57641 "preproc.c"
+ break;
+
+ case 2650: /* type_func_name_keyword: SIMILAR */
+#line 14903 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("similar");
+}
+#line 57649 "preproc.c"
+ break;
+
+ case 2651: /* type_func_name_keyword: TABLESAMPLE */
+#line 14907 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablesample");
+}
+#line 57657 "preproc.c"
+ break;
+
+ case 2652: /* type_func_name_keyword: VERBOSE */
+#line 14911 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 57665 "preproc.c"
+ break;
+
+ case 2653: /* reserved_keyword: ALL */
+#line 14919 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 57673 "preproc.c"
+ break;
+
+ case 2654: /* reserved_keyword: ANALYSE */
+#line 14923 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyse");
+}
+#line 57681 "preproc.c"
+ break;
+
+ case 2655: /* reserved_keyword: ANALYZE */
+#line 14927 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyze");
+}
+#line 57689 "preproc.c"
+ break;
+
+ case 2656: /* reserved_keyword: AND */
+#line 14931 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("and");
+}
+#line 57697 "preproc.c"
+ break;
+
+ case 2657: /* reserved_keyword: ANY */
+#line 14935 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("any");
+}
+#line 57705 "preproc.c"
+ break;
+
+ case 2658: /* reserved_keyword: ARRAY */
+#line 14939 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("array");
+}
+#line 57713 "preproc.c"
+ break;
+
+ case 2659: /* reserved_keyword: AS */
+#line 14943 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("as");
+}
+#line 57721 "preproc.c"
+ break;
+
+ case 2660: /* reserved_keyword: ASC */
+#line 14947 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asc");
+}
+#line 57729 "preproc.c"
+ break;
+
+ case 2661: /* reserved_keyword: ASYMMETRIC */
+#line 14951 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asymmetric");
+}
+#line 57737 "preproc.c"
+ break;
+
+ case 2662: /* reserved_keyword: BOTH */
+#line 14955 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("both");
+}
+#line 57745 "preproc.c"
+ break;
+
+ case 2663: /* reserved_keyword: CASE */
+#line 14959 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("case");
+}
+#line 57753 "preproc.c"
+ break;
+
+ case 2664: /* reserved_keyword: CAST */
+#line 14963 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cast");
+}
+#line 57761 "preproc.c"
+ break;
+
+ case 2665: /* reserved_keyword: CHECK */
+#line 14967 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("check");
+}
+#line 57769 "preproc.c"
+ break;
+
+ case 2666: /* reserved_keyword: COLLATE */
+#line 14971 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("collate");
+}
+#line 57777 "preproc.c"
+ break;
+
+ case 2667: /* reserved_keyword: COLUMN */
+#line 14975 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 57785 "preproc.c"
+ break;
+
+ case 2668: /* reserved_keyword: CONSTRAINT */
+#line 14979 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("constraint");
+}
+#line 57793 "preproc.c"
+ break;
+
+ case 2669: /* reserved_keyword: CREATE */
+#line 14983 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("create");
+}
+#line 57801 "preproc.c"
+ break;
+
+ case 2670: /* reserved_keyword: CURRENT_CATALOG */
+#line 14987 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_catalog");
+}
+#line 57809 "preproc.c"
+ break;
+
+ case 2671: /* reserved_keyword: CURRENT_DATE */
+#line 14991 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_date");
+}
+#line 57817 "preproc.c"
+ break;
+
+ case 2672: /* reserved_keyword: CURRENT_ROLE */
+#line 14995 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 57825 "preproc.c"
+ break;
+
+ case 2673: /* reserved_keyword: CURRENT_TIME */
+#line 14999 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_time");
+}
+#line 57833 "preproc.c"
+ break;
+
+ case 2674: /* reserved_keyword: CURRENT_TIMESTAMP */
+#line 15003 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_timestamp");
+}
+#line 57841 "preproc.c"
+ break;
+
+ case 2675: /* reserved_keyword: CURRENT_USER */
+#line 15007 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 57849 "preproc.c"
+ break;
+
+ case 2676: /* reserved_keyword: DEFAULT */
+#line 15011 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 57857 "preproc.c"
+ break;
+
+ case 2677: /* reserved_keyword: DEFERRABLE */
+#line 15015 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 57865 "preproc.c"
+ break;
+
+ case 2678: /* reserved_keyword: DESC */
+#line 15019 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("desc");
+}
+#line 57873 "preproc.c"
+ break;
+
+ case 2679: /* reserved_keyword: DISTINCT */
+#line 15023 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 57881 "preproc.c"
+ break;
+
+ case 2680: /* reserved_keyword: DO */
+#line 15027 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("do");
+}
+#line 57889 "preproc.c"
+ break;
+
+ case 2681: /* reserved_keyword: ELSE */
+#line 15031 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("else");
+}
+#line 57897 "preproc.c"
+ break;
+
+ case 2682: /* reserved_keyword: END_P */
+#line 15035 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("end");
+}
+#line 57905 "preproc.c"
+ break;
+
+ case 2683: /* reserved_keyword: EXCEPT */
+#line 15039 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("except");
+}
+#line 57913 "preproc.c"
+ break;
+
+ case 2684: /* reserved_keyword: FALSE_P */
+#line 15043 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 57921 "preproc.c"
+ break;
+
+ case 2685: /* reserved_keyword: FETCH */
+#line 15047 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("fetch");
+}
+#line 57929 "preproc.c"
+ break;
+
+ case 2686: /* reserved_keyword: FOR */
+#line 15051 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("for");
+}
+#line 57937 "preproc.c"
+ break;
+
+ case 2687: /* reserved_keyword: FOREIGN */
+#line 15055 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("foreign");
+}
+#line 57945 "preproc.c"
+ break;
+
+ case 2688: /* reserved_keyword: FROM */
+#line 15059 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 57953 "preproc.c"
+ break;
+
+ case 2689: /* reserved_keyword: GRANT */
+#line 15063 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("grant");
+}
+#line 57961 "preproc.c"
+ break;
+
+ case 2690: /* reserved_keyword: GROUP_P */
+#line 15067 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("group");
+}
+#line 57969 "preproc.c"
+ break;
+
+ case 2691: /* reserved_keyword: HAVING */
+#line 15071 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("having");
+}
+#line 57977 "preproc.c"
+ break;
+
+ case 2692: /* reserved_keyword: IN_P */
+#line 15075 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 57985 "preproc.c"
+ break;
+
+ case 2693: /* reserved_keyword: INITIALLY */
+#line 15079 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially");
+}
+#line 57993 "preproc.c"
+ break;
+
+ case 2694: /* reserved_keyword: INTERSECT */
+#line 15083 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("intersect");
+}
+#line 58001 "preproc.c"
+ break;
+
+ case 2695: /* reserved_keyword: INTO */
+#line 15087 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("into");
+}
+#line 58009 "preproc.c"
+ break;
+
+ case 2696: /* reserved_keyword: LATERAL_P */
+#line 15091 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("lateral");
+}
+#line 58017 "preproc.c"
+ break;
+
+ case 2697: /* reserved_keyword: LEADING */
+#line 15095 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("leading");
+}
+#line 58025 "preproc.c"
+ break;
+
+ case 2698: /* reserved_keyword: LIMIT */
+#line 15099 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("limit");
+}
+#line 58033 "preproc.c"
+ break;
+
+ case 2699: /* reserved_keyword: LOCALTIME */
+#line 15103 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtime");
+}
+#line 58041 "preproc.c"
+ break;
+
+ case 2700: /* reserved_keyword: LOCALTIMESTAMP */
+#line 15107 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtimestamp");
+}
+#line 58049 "preproc.c"
+ break;
+
+ case 2701: /* reserved_keyword: NOT */
+#line 15111 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not");
+}
+#line 58057 "preproc.c"
+ break;
+
+ case 2702: /* reserved_keyword: NULL_P */
+#line 15115 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 58065 "preproc.c"
+ break;
+
+ case 2703: /* reserved_keyword: OFFSET */
+#line 15119 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("offset");
+}
+#line 58073 "preproc.c"
+ break;
+
+ case 2704: /* reserved_keyword: ON */
+#line 15123 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("on");
+}
+#line 58081 "preproc.c"
+ break;
+
+ case 2705: /* reserved_keyword: ONLY */
+#line 15127 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("only");
+}
+#line 58089 "preproc.c"
+ break;
+
+ case 2706: /* reserved_keyword: OR */
+#line 15131 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("or");
+}
+#line 58097 "preproc.c"
+ break;
+
+ case 2707: /* reserved_keyword: ORDER */
+#line 15135 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("order");
+}
+#line 58105 "preproc.c"
+ break;
+
+ case 2708: /* reserved_keyword: PLACING */
+#line 15139 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("placing");
+}
+#line 58113 "preproc.c"
+ break;
+
+ case 2709: /* reserved_keyword: PRIMARY */
+#line 15143 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("primary");
+}
+#line 58121 "preproc.c"
+ break;
+
+ case 2710: /* reserved_keyword: REFERENCES */
+#line 15147 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("references");
+}
+#line 58129 "preproc.c"
+ break;
+
+ case 2711: /* reserved_keyword: RETURNING */
+#line 15151 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("returning");
+}
+#line 58137 "preproc.c"
+ break;
+
+ case 2712: /* reserved_keyword: SELECT */
+#line 15155 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 58145 "preproc.c"
+ break;
+
+ case 2713: /* reserved_keyword: SESSION_USER */
+#line 15159 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 58153 "preproc.c"
+ break;
+
+ case 2714: /* reserved_keyword: SOME */
+#line 15163 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("some");
+}
+#line 58161 "preproc.c"
+ break;
+
+ case 2715: /* reserved_keyword: SYMMETRIC */
+#line 15167 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("symmetric");
+}
+#line 58169 "preproc.c"
+ break;
+
+ case 2716: /* reserved_keyword: TABLE */
+#line 15171 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 58177 "preproc.c"
+ break;
+
+ case 2717: /* reserved_keyword: THEN */
+#line 15175 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("then");
+}
+#line 58185 "preproc.c"
+ break;
+
+ case 2718: /* reserved_keyword: TRAILING */
+#line 15179 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trailing");
+}
+#line 58193 "preproc.c"
+ break;
+
+ case 2719: /* reserved_keyword: TRUE_P */
+#line 15183 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 58201 "preproc.c"
+ break;
+
+ case 2720: /* reserved_keyword: UNIQUE */
+#line 15187 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unique");
+}
+#line 58209 "preproc.c"
+ break;
+
+ case 2721: /* reserved_keyword: USER */
+#line 15191 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 58217 "preproc.c"
+ break;
+
+ case 2722: /* reserved_keyword: USING */
+#line 15195 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("using");
+}
+#line 58225 "preproc.c"
+ break;
+
+ case 2723: /* reserved_keyword: VARIADIC */
+#line 15199 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("variadic");
+}
+#line 58233 "preproc.c"
+ break;
+
+ case 2724: /* reserved_keyword: WHEN */
+#line 15203 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("when");
+}
+#line 58241 "preproc.c"
+ break;
+
+ case 2725: /* reserved_keyword: WHERE */
+#line 15207 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("where");
+}
+#line 58249 "preproc.c"
+ break;
+
+ case 2726: /* reserved_keyword: WINDOW */
+#line 15211 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("window");
+}
+#line 58257 "preproc.c"
+ break;
+
+ case 2727: /* reserved_keyword: WITH */
+#line 15215 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 58265 "preproc.c"
+ break;
+
+ case 2728: /* bare_label_keyword: ABORT_P */
+#line 15223 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("abort");
+}
+#line 58273 "preproc.c"
+ break;
+
+ case 2729: /* bare_label_keyword: ABSOLUTE_P */
+#line 15227 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("absolute");
+}
+#line 58281 "preproc.c"
+ break;
+
+ case 2730: /* bare_label_keyword: ACCESS */
+#line 15231 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("access");
+}
+#line 58289 "preproc.c"
+ break;
+
+ case 2731: /* bare_label_keyword: ACTION */
+#line 15235 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("action");
+}
+#line 58297 "preproc.c"
+ break;
+
+ case 2732: /* bare_label_keyword: ADD_P */
+#line 15239 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("add");
+}
+#line 58305 "preproc.c"
+ break;
+
+ case 2733: /* bare_label_keyword: ADMIN */
+#line 15243 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("admin");
+}
+#line 58313 "preproc.c"
+ break;
+
+ case 2734: /* bare_label_keyword: AFTER */
+#line 15247 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("after");
+}
+#line 58321 "preproc.c"
+ break;
+
+ case 2735: /* bare_label_keyword: AGGREGATE */
+#line 15251 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("aggregate");
+}
+#line 58329 "preproc.c"
+ break;
+
+ case 2736: /* bare_label_keyword: ALL */
+#line 15255 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 58337 "preproc.c"
+ break;
+
+ case 2737: /* bare_label_keyword: ALSO */
+#line 15259 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("also");
+}
+#line 58345 "preproc.c"
+ break;
+
+ case 2738: /* bare_label_keyword: ALTER */
+#line 15263 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("alter");
+}
+#line 58353 "preproc.c"
+ break;
+
+ case 2739: /* bare_label_keyword: ALWAYS */
+#line 15267 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("always");
+}
+#line 58361 "preproc.c"
+ break;
+
+ case 2740: /* bare_label_keyword: ANALYSE */
+#line 15271 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyse");
+}
+#line 58369 "preproc.c"
+ break;
+
+ case 2741: /* bare_label_keyword: ANALYZE */
+#line 15275 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("analyze");
+}
+#line 58377 "preproc.c"
+ break;
+
+ case 2742: /* bare_label_keyword: AND */
+#line 15279 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("and");
+}
+#line 58385 "preproc.c"
+ break;
+
+ case 2743: /* bare_label_keyword: ANY */
+#line 15283 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("any");
+}
+#line 58393 "preproc.c"
+ break;
+
+ case 2744: /* bare_label_keyword: ASC */
+#line 15287 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asc");
+}
+#line 58401 "preproc.c"
+ break;
+
+ case 2745: /* bare_label_keyword: ASENSITIVE */
+#line 15291 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asensitive");
+}
+#line 58409 "preproc.c"
+ break;
+
+ case 2746: /* bare_label_keyword: ASSERTION */
+#line 15295 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("assertion");
+}
+#line 58417 "preproc.c"
+ break;
+
+ case 2747: /* bare_label_keyword: ASSIGNMENT */
+#line 15299 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("assignment");
+}
+#line 58425 "preproc.c"
+ break;
+
+ case 2748: /* bare_label_keyword: ASYMMETRIC */
+#line 15303 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("asymmetric");
+}
+#line 58433 "preproc.c"
+ break;
+
+ case 2749: /* bare_label_keyword: AT */
+#line 15307 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("at");
+}
+#line 58441 "preproc.c"
+ break;
+
+ case 2750: /* bare_label_keyword: ATOMIC */
+#line 15311 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("atomic");
+}
+#line 58449 "preproc.c"
+ break;
+
+ case 2751: /* bare_label_keyword: ATTACH */
+#line 15315 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("attach");
+}
+#line 58457 "preproc.c"
+ break;
+
+ case 2752: /* bare_label_keyword: ATTRIBUTE */
+#line 15319 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("attribute");
+}
+#line 58465 "preproc.c"
+ break;
+
+ case 2753: /* bare_label_keyword: AUTHORIZATION */
+#line 15323 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("authorization");
+}
+#line 58473 "preproc.c"
+ break;
+
+ case 2754: /* bare_label_keyword: BACKWARD */
+#line 15327 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("backward");
+}
+#line 58481 "preproc.c"
+ break;
+
+ case 2755: /* bare_label_keyword: BEFORE */
+#line 15331 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("before");
+}
+#line 58489 "preproc.c"
+ break;
+
+ case 2756: /* bare_label_keyword: BEGIN_P */
+#line 15335 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("begin");
+}
+#line 58497 "preproc.c"
+ break;
+
+ case 2757: /* bare_label_keyword: BETWEEN */
+#line 15339 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("between");
+}
+#line 58505 "preproc.c"
+ break;
+
+ case 2758: /* bare_label_keyword: BIGINT */
+#line 15343 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("bigint");
+}
+#line 58513 "preproc.c"
+ break;
+
+ case 2759: /* bare_label_keyword: BINARY */
+#line 15347 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 58521 "preproc.c"
+ break;
+
+ case 2760: /* bare_label_keyword: BIT */
+#line 15351 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("bit");
+}
+#line 58529 "preproc.c"
+ break;
+
+ case 2761: /* bare_label_keyword: BOOLEAN_P */
+#line 15355 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("boolean");
+}
+#line 58537 "preproc.c"
+ break;
+
+ case 2762: /* bare_label_keyword: BOTH */
+#line 15359 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("both");
+}
+#line 58545 "preproc.c"
+ break;
+
+ case 2763: /* bare_label_keyword: BREADTH */
+#line 15363 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("breadth");
+}
+#line 58553 "preproc.c"
+ break;
+
+ case 2764: /* bare_label_keyword: BY */
+#line 15367 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("by");
+}
+#line 58561 "preproc.c"
+ break;
+
+ case 2765: /* bare_label_keyword: CACHE */
+#line 15371 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cache");
+}
+#line 58569 "preproc.c"
+ break;
+
+ case 2766: /* bare_label_keyword: CALL */
+#line 15375 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("call");
+}
+#line 58577 "preproc.c"
+ break;
+
+ case 2767: /* bare_label_keyword: CALLED */
+#line 15379 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("called");
+}
+#line 58585 "preproc.c"
+ break;
+
+ case 2768: /* bare_label_keyword: CASCADE */
+#line 15383 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 58593 "preproc.c"
+ break;
+
+ case 2769: /* bare_label_keyword: CASCADED */
+#line 15387 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cascaded");
+}
+#line 58601 "preproc.c"
+ break;
+
+ case 2770: /* bare_label_keyword: CASE */
+#line 15391 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("case");
+}
+#line 58609 "preproc.c"
+ break;
+
+ case 2771: /* bare_label_keyword: CAST */
+#line 15395 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cast");
+}
+#line 58617 "preproc.c"
+ break;
+
+ case 2772: /* bare_label_keyword: CATALOG_P */
+#line 15399 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("catalog");
+}
+#line 58625 "preproc.c"
+ break;
+
+ case 2773: /* bare_label_keyword: CHAIN */
+#line 15403 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("chain");
+}
+#line 58633 "preproc.c"
+ break;
+
+ case 2774: /* bare_label_keyword: CHARACTERISTICS */
+#line 15407 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("characteristics");
+}
+#line 58641 "preproc.c"
+ break;
+
+ case 2775: /* bare_label_keyword: CHECK */
+#line 15411 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("check");
+}
+#line 58649 "preproc.c"
+ break;
+
+ case 2776: /* bare_label_keyword: CHECKPOINT */
+#line 15415 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("checkpoint");
+}
+#line 58657 "preproc.c"
+ break;
+
+ case 2777: /* bare_label_keyword: CLASS */
+#line 15419 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("class");
+}
+#line 58665 "preproc.c"
+ break;
+
+ case 2778: /* bare_label_keyword: CLOSE */
+#line 15423 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("close");
+}
+#line 58673 "preproc.c"
+ break;
+
+ case 2779: /* bare_label_keyword: CLUSTER */
+#line 15427 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cluster");
+}
+#line 58681 "preproc.c"
+ break;
+
+ case 2780: /* bare_label_keyword: COALESCE */
+#line 15431 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("coalesce");
+}
+#line 58689 "preproc.c"
+ break;
+
+ case 2781: /* bare_label_keyword: COLLATE */
+#line 15435 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("collate");
+}
+#line 58697 "preproc.c"
+ break;
+
+ case 2782: /* bare_label_keyword: COLLATION */
+#line 15439 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 58705 "preproc.c"
+ break;
+
+ case 2783: /* bare_label_keyword: COLUMN */
+#line 15443 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 58713 "preproc.c"
+ break;
+
+ case 2784: /* bare_label_keyword: COLUMNS */
+#line 15447 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("columns");
+}
+#line 58721 "preproc.c"
+ break;
+
+ case 2785: /* bare_label_keyword: COMMENT */
+#line 15451 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("comment");
+}
+#line 58729 "preproc.c"
+ break;
+
+ case 2786: /* bare_label_keyword: COMMENTS */
+#line 15455 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("comments");
+}
+#line 58737 "preproc.c"
+ break;
+
+ case 2787: /* bare_label_keyword: COMMIT */
+#line 15459 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("commit");
+}
+#line 58745 "preproc.c"
+ break;
+
+ case 2788: /* bare_label_keyword: COMMITTED */
+#line 15463 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("committed");
+}
+#line 58753 "preproc.c"
+ break;
+
+ case 2789: /* bare_label_keyword: COMPRESSION */
+#line 15467 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("compression");
+}
+#line 58761 "preproc.c"
+ break;
+
+ case 2790: /* bare_label_keyword: CONCURRENTLY */
+#line 15471 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("concurrently");
+}
+#line 58769 "preproc.c"
+ break;
+
+ case 2791: /* bare_label_keyword: CONFIGURATION */
+#line 15475 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("configuration");
+}
+#line 58777 "preproc.c"
+ break;
+
+ case 2792: /* bare_label_keyword: CONFLICT */
+#line 15479 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("conflict");
+}
+#line 58785 "preproc.c"
+ break;
+
+ case 2793: /* bare_label_keyword: CONNECTION */
+#line 15483 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("connection");
+}
+#line 58793 "preproc.c"
+ break;
+
+ case 2794: /* bare_label_keyword: CONSTRAINT */
+#line 15487 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("constraint");
+}
+#line 58801 "preproc.c"
+ break;
+
+ case 2795: /* bare_label_keyword: CONSTRAINTS */
+#line 15491 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("constraints");
+}
+#line 58809 "preproc.c"
+ break;
+
+ case 2796: /* bare_label_keyword: CONTENT_P */
+#line 15495 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("content");
+}
+#line 58817 "preproc.c"
+ break;
+
+ case 2797: /* bare_label_keyword: CONTINUE_P */
+#line 15499 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("continue");
+}
+#line 58825 "preproc.c"
+ break;
+
+ case 2798: /* bare_label_keyword: CONVERSION_P */
+#line 15503 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 58833 "preproc.c"
+ break;
+
+ case 2799: /* bare_label_keyword: COPY */
+#line 15507 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("copy");
+}
+#line 58841 "preproc.c"
+ break;
+
+ case 2800: /* bare_label_keyword: COST */
+#line 15511 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cost");
+}
+#line 58849 "preproc.c"
+ break;
+
+ case 2801: /* bare_label_keyword: CROSS */
+#line 15515 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cross");
+}
+#line 58857 "preproc.c"
+ break;
+
+ case 2802: /* bare_label_keyword: CSV */
+#line 15519 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("csv");
+}
+#line 58865 "preproc.c"
+ break;
+
+ case 2803: /* bare_label_keyword: CUBE */
+#line 15523 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cube");
+}
+#line 58873 "preproc.c"
+ break;
+
+ case 2804: /* bare_label_keyword: CURRENT_P */
+#line 15527 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current");
+}
+#line 58881 "preproc.c"
+ break;
+
+ case 2805: /* bare_label_keyword: CURRENT_CATALOG */
+#line 15531 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_catalog");
+}
+#line 58889 "preproc.c"
+ break;
+
+ case 2806: /* bare_label_keyword: CURRENT_DATE */
+#line 15535 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_date");
+}
+#line 58897 "preproc.c"
+ break;
+
+ case 2807: /* bare_label_keyword: CURRENT_ROLE */
+#line 15539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 58905 "preproc.c"
+ break;
+
+ case 2808: /* bare_label_keyword: CURRENT_SCHEMA */
+#line 15543 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_schema");
+}
+#line 58913 "preproc.c"
+ break;
+
+ case 2809: /* bare_label_keyword: CURRENT_TIME */
+#line 15547 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_time");
+}
+#line 58921 "preproc.c"
+ break;
+
+ case 2810: /* bare_label_keyword: CURRENT_TIMESTAMP */
+#line 15551 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_timestamp");
+}
+#line 58929 "preproc.c"
+ break;
+
+ case 2811: /* bare_label_keyword: CURRENT_USER */
+#line 15555 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 58937 "preproc.c"
+ break;
+
+ case 2812: /* bare_label_keyword: CURSOR */
+#line 15559 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cursor");
+}
+#line 58945 "preproc.c"
+ break;
+
+ case 2813: /* bare_label_keyword: CYCLE */
+#line 15563 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("cycle");
+}
+#line 58953 "preproc.c"
+ break;
+
+ case 2814: /* bare_label_keyword: DATA_P */
+#line 15567 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("data");
+}
+#line 58961 "preproc.c"
+ break;
+
+ case 2815: /* bare_label_keyword: DATABASE */
+#line 15571 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 58969 "preproc.c"
+ break;
+
+ case 2816: /* bare_label_keyword: DEALLOCATE */
+#line 15575 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deallocate");
+}
+#line 58977 "preproc.c"
+ break;
+
+ case 2817: /* bare_label_keyword: DEC */
+#line 15579 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("dec");
+}
+#line 58985 "preproc.c"
+ break;
+
+ case 2818: /* bare_label_keyword: DECIMAL_P */
+#line 15583 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("decimal");
+}
+#line 58993 "preproc.c"
+ break;
+
+ case 2819: /* bare_label_keyword: DECLARE */
+#line 15587 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("declare");
+}
+#line 59001 "preproc.c"
+ break;
+
+ case 2820: /* bare_label_keyword: DEFAULT */
+#line 15591 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 59009 "preproc.c"
+ break;
+
+ case 2821: /* bare_label_keyword: DEFAULTS */
+#line 15595 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("defaults");
+}
+#line 59017 "preproc.c"
+ break;
+
+ case 2822: /* bare_label_keyword: DEFERRABLE */
+#line 15599 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 59025 "preproc.c"
+ break;
+
+ case 2823: /* bare_label_keyword: DEFERRED */
+#line 15603 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("deferred");
+}
+#line 59033 "preproc.c"
+ break;
+
+ case 2824: /* bare_label_keyword: DEFINER */
+#line 15607 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("definer");
+}
+#line 59041 "preproc.c"
+ break;
+
+ case 2825: /* bare_label_keyword: DELETE_P */
+#line 15611 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 59049 "preproc.c"
+ break;
+
+ case 2826: /* bare_label_keyword: DELIMITER */
+#line 15615 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delimiter");
+}
+#line 59057 "preproc.c"
+ break;
+
+ case 2827: /* bare_label_keyword: DELIMITERS */
+#line 15619 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("delimiters");
+}
+#line 59065 "preproc.c"
+ break;
+
+ case 2828: /* bare_label_keyword: DEPENDS */
+#line 15623 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("depends");
+}
+#line 59073 "preproc.c"
+ break;
+
+ case 2829: /* bare_label_keyword: DEPTH */
+#line 15627 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("depth");
+}
+#line 59081 "preproc.c"
+ break;
+
+ case 2830: /* bare_label_keyword: DESC */
+#line 15631 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("desc");
+}
+#line 59089 "preproc.c"
+ break;
+
+ case 2831: /* bare_label_keyword: DETACH */
+#line 15635 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("detach");
+}
+#line 59097 "preproc.c"
+ break;
+
+ case 2832: /* bare_label_keyword: DICTIONARY */
+#line 15639 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("dictionary");
+}
+#line 59105 "preproc.c"
+ break;
+
+ case 2833: /* bare_label_keyword: DISABLE_P */
+#line 15643 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("disable");
+}
+#line 59113 "preproc.c"
+ break;
+
+ case 2834: /* bare_label_keyword: DISCARD */
+#line 15647 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("discard");
+}
+#line 59121 "preproc.c"
+ break;
+
+ case 2835: /* bare_label_keyword: DISTINCT */
+#line 15651 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 59129 "preproc.c"
+ break;
+
+ case 2836: /* bare_label_keyword: DO */
+#line 15655 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("do");
+}
+#line 59137 "preproc.c"
+ break;
+
+ case 2837: /* bare_label_keyword: DOCUMENT_P */
+#line 15659 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("document");
+}
+#line 59145 "preproc.c"
+ break;
+
+ case 2838: /* bare_label_keyword: DOMAIN_P */
+#line 15663 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("domain");
+}
+#line 59153 "preproc.c"
+ break;
+
+ case 2839: /* bare_label_keyword: DOUBLE_P */
+#line 15667 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("double");
+}
+#line 59161 "preproc.c"
+ break;
+
+ case 2840: /* bare_label_keyword: DROP */
+#line 15671 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("drop");
+}
+#line 59169 "preproc.c"
+ break;
+
+ case 2841: /* bare_label_keyword: EACH */
+#line 15675 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("each");
+}
+#line 59177 "preproc.c"
+ break;
+
+ case 2842: /* bare_label_keyword: ELSE */
+#line 15679 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("else");
+}
+#line 59185 "preproc.c"
+ break;
+
+ case 2843: /* bare_label_keyword: ENABLE_P */
+#line 15683 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enable");
+}
+#line 59193 "preproc.c"
+ break;
+
+ case 2844: /* bare_label_keyword: ENCODING */
+#line 15687 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("encoding");
+}
+#line 59201 "preproc.c"
+ break;
+
+ case 2845: /* bare_label_keyword: ENCRYPTED */
+#line 15691 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("encrypted");
+}
+#line 59209 "preproc.c"
+ break;
+
+ case 2846: /* bare_label_keyword: END_P */
+#line 15695 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("end");
+}
+#line 59217 "preproc.c"
+ break;
+
+ case 2847: /* bare_label_keyword: ENUM_P */
+#line 15699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("enum");
+}
+#line 59225 "preproc.c"
+ break;
+
+ case 2848: /* bare_label_keyword: ESCAPE */
+#line 15703 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("escape");
+}
+#line 59233 "preproc.c"
+ break;
+
+ case 2849: /* bare_label_keyword: EVENT */
+#line 15707 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("event");
+}
+#line 59241 "preproc.c"
+ break;
+
+ case 2850: /* bare_label_keyword: EXCLUDE */
+#line 15711 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclude");
+}
+#line 59249 "preproc.c"
+ break;
+
+ case 2851: /* bare_label_keyword: EXCLUDING */
+#line 15715 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("excluding");
+}
+#line 59257 "preproc.c"
+ break;
+
+ case 2852: /* bare_label_keyword: EXCLUSIVE */
+#line 15719 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exclusive");
+}
+#line 59265 "preproc.c"
+ break;
+
+ case 2853: /* bare_label_keyword: EXECUTE */
+#line 15723 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("execute");
+}
+#line 59273 "preproc.c"
+ break;
+
+ case 2854: /* bare_label_keyword: EXISTS */
+#line 15727 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("exists");
+}
+#line 59281 "preproc.c"
+ break;
+
+ case 2855: /* bare_label_keyword: EXPLAIN */
+#line 15731 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("explain");
+}
+#line 59289 "preproc.c"
+ break;
+
+ case 2856: /* bare_label_keyword: EXPRESSION */
+#line 15735 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("expression");
+}
+#line 59297 "preproc.c"
+ break;
+
+ case 2857: /* bare_label_keyword: EXTENSION */
+#line 15739 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 59305 "preproc.c"
+ break;
+
+ case 2858: /* bare_label_keyword: EXTERNAL */
+#line 15743 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("external");
+}
+#line 59313 "preproc.c"
+ break;
+
+ case 2859: /* bare_label_keyword: EXTRACT */
+#line 15747 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("extract");
+}
+#line 59321 "preproc.c"
+ break;
+
+ case 2860: /* bare_label_keyword: FALSE_P */
+#line 15751 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 59329 "preproc.c"
+ break;
+
+ case 2861: /* bare_label_keyword: FAMILY */
+#line 15755 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("family");
+}
+#line 59337 "preproc.c"
+ break;
+
+ case 2862: /* bare_label_keyword: FINALIZE */
+#line 15759 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("finalize");
+}
+#line 59345 "preproc.c"
+ break;
+
+ case 2863: /* bare_label_keyword: FIRST_P */
+#line 15763 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("first");
+}
+#line 59353 "preproc.c"
+ break;
+
+ case 2864: /* bare_label_keyword: FLOAT_P */
+#line 15767 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("float");
+}
+#line 59361 "preproc.c"
+ break;
+
+ case 2865: /* bare_label_keyword: FOLLOWING */
+#line 15771 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("following");
+}
+#line 59369 "preproc.c"
+ break;
+
+ case 2866: /* bare_label_keyword: FORCE */
+#line 15775 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("force");
+}
+#line 59377 "preproc.c"
+ break;
+
+ case 2867: /* bare_label_keyword: FOREIGN */
+#line 15779 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("foreign");
+}
+#line 59385 "preproc.c"
+ break;
+
+ case 2868: /* bare_label_keyword: FORWARD */
+#line 15783 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("forward");
+}
+#line 59393 "preproc.c"
+ break;
+
+ case 2869: /* bare_label_keyword: FREEZE */
+#line 15787 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 59401 "preproc.c"
+ break;
+
+ case 2870: /* bare_label_keyword: FULL */
+#line 15791 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 59409 "preproc.c"
+ break;
+
+ case 2871: /* bare_label_keyword: FUNCTION */
+#line 15795 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("function");
+}
+#line 59417 "preproc.c"
+ break;
+
+ case 2872: /* bare_label_keyword: FUNCTIONS */
+#line 15799 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("functions");
+}
+#line 59425 "preproc.c"
+ break;
+
+ case 2873: /* bare_label_keyword: GENERATED */
+#line 15803 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("generated");
+}
+#line 59433 "preproc.c"
+ break;
+
+ case 2874: /* bare_label_keyword: GLOBAL */
+#line 15807 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("global");
+}
+#line 59441 "preproc.c"
+ break;
+
+ case 2875: /* bare_label_keyword: GRANTED */
+#line 15811 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("granted");
+}
+#line 59449 "preproc.c"
+ break;
+
+ case 2876: /* bare_label_keyword: GREATEST */
+#line 15815 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("greatest");
+}
+#line 59457 "preproc.c"
+ break;
+
+ case 2877: /* bare_label_keyword: GROUPING */
+#line 15819 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("grouping");
+}
+#line 59465 "preproc.c"
+ break;
+
+ case 2878: /* bare_label_keyword: GROUPS */
+#line 15823 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("groups");
+}
+#line 59473 "preproc.c"
+ break;
+
+ case 2879: /* bare_label_keyword: HANDLER */
+#line 15827 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("handler");
+}
+#line 59481 "preproc.c"
+ break;
+
+ case 2880: /* bare_label_keyword: HEADER_P */
+#line 15831 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("header");
+}
+#line 59489 "preproc.c"
+ break;
+
+ case 2881: /* bare_label_keyword: HOLD */
+#line 15835 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("hold");
+}
+#line 59497 "preproc.c"
+ break;
+
+ case 2882: /* bare_label_keyword: IDENTITY_P */
+#line 15839 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("identity");
+}
+#line 59505 "preproc.c"
+ break;
+
+ case 2883: /* bare_label_keyword: IF_P */
+#line 15843 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("if");
+}
+#line 59513 "preproc.c"
+ break;
+
+ case 2884: /* bare_label_keyword: ILIKE */
+#line 15847 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ilike");
+}
+#line 59521 "preproc.c"
+ break;
+
+ case 2885: /* bare_label_keyword: IMMEDIATE */
+#line 15851 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immediate");
+}
+#line 59529 "preproc.c"
+ break;
+
+ case 2886: /* bare_label_keyword: IMMUTABLE */
+#line 15855 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("immutable");
+}
+#line 59537 "preproc.c"
+ break;
+
+ case 2887: /* bare_label_keyword: IMPLICIT_P */
+#line 15859 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("implicit");
+}
+#line 59545 "preproc.c"
+ break;
+
+ case 2888: /* bare_label_keyword: IMPORT_P */
+#line 15863 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("import");
+}
+#line 59553 "preproc.c"
+ break;
+
+ case 2889: /* bare_label_keyword: IN_P */
+#line 15867 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 59561 "preproc.c"
+ break;
+
+ case 2890: /* bare_label_keyword: INCLUDE */
+#line 15871 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("include");
+}
+#line 59569 "preproc.c"
+ break;
+
+ case 2891: /* bare_label_keyword: INCLUDING */
+#line 15875 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("including");
+}
+#line 59577 "preproc.c"
+ break;
+
+ case 2892: /* bare_label_keyword: INCREMENT */
+#line 15879 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("increment");
+}
+#line 59585 "preproc.c"
+ break;
+
+ case 2893: /* bare_label_keyword: INDEX */
+#line 15883 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 59593 "preproc.c"
+ break;
+
+ case 2894: /* bare_label_keyword: INDEXES */
+#line 15887 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("indexes");
+}
+#line 59601 "preproc.c"
+ break;
+
+ case 2895: /* bare_label_keyword: INHERIT */
+#line 15891 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inherit");
+}
+#line 59609 "preproc.c"
+ break;
+
+ case 2896: /* bare_label_keyword: INHERITS */
+#line 15895 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inherits");
+}
+#line 59617 "preproc.c"
+ break;
+
+ case 2897: /* bare_label_keyword: INITIALLY */
+#line 15899 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("initially");
+}
+#line 59625 "preproc.c"
+ break;
+
+ case 2898: /* bare_label_keyword: INLINE_P */
+#line 15903 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inline");
+}
+#line 59633 "preproc.c"
+ break;
+
+ case 2899: /* bare_label_keyword: INNER_P */
+#line 15907 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inner");
+}
+#line 59641 "preproc.c"
+ break;
+
+ case 2900: /* bare_label_keyword: INOUT */
+#line 15911 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("inout");
+}
+#line 59649 "preproc.c"
+ break;
+
+ case 2901: /* bare_label_keyword: INPUT_P */
+#line 15915 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("input");
+}
+#line 59657 "preproc.c"
+ break;
+
+ case 2902: /* bare_label_keyword: INSENSITIVE */
+#line 15919 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insensitive");
+}
+#line 59665 "preproc.c"
+ break;
+
+ case 2903: /* bare_label_keyword: INSERT */
+#line 15923 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 59673 "preproc.c"
+ break;
+
+ case 2904: /* bare_label_keyword: INSTEAD */
+#line 15927 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("instead");
+}
+#line 59681 "preproc.c"
+ break;
+
+ case 2905: /* bare_label_keyword: INT_P */
+#line 15931 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("int");
+}
+#line 59689 "preproc.c"
+ break;
+
+ case 2906: /* bare_label_keyword: INTEGER */
+#line 15935 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("integer");
+}
+#line 59697 "preproc.c"
+ break;
+
+ case 2907: /* bare_label_keyword: INTERVAL */
+#line 15939 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("interval");
+}
+#line 59705 "preproc.c"
+ break;
+
+ case 2908: /* bare_label_keyword: INVOKER */
+#line 15943 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("invoker");
+}
+#line 59713 "preproc.c"
+ break;
+
+ case 2909: /* bare_label_keyword: IS */
+#line 15947 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("is");
+}
+#line 59721 "preproc.c"
+ break;
+
+ case 2910: /* bare_label_keyword: ISOLATION */
+#line 15951 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("isolation");
+}
+#line 59729 "preproc.c"
+ break;
+
+ case 2911: /* bare_label_keyword: JOIN */
+#line 15955 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("join");
+}
+#line 59737 "preproc.c"
+ break;
+
+ case 2912: /* bare_label_keyword: KEY */
+#line 15959 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("key");
+}
+#line 59745 "preproc.c"
+ break;
+
+ case 2913: /* bare_label_keyword: LABEL */
+#line 15963 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("label");
+}
+#line 59753 "preproc.c"
+ break;
+
+ case 2914: /* bare_label_keyword: LANGUAGE */
+#line 15967 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("language");
+}
+#line 59761 "preproc.c"
+ break;
+
+ case 2915: /* bare_label_keyword: LARGE_P */
+#line 15971 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("large");
+}
+#line 59769 "preproc.c"
+ break;
+
+ case 2916: /* bare_label_keyword: LAST_P */
+#line 15975 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("last");
+}
+#line 59777 "preproc.c"
+ break;
+
+ case 2917: /* bare_label_keyword: LATERAL_P */
+#line 15979 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("lateral");
+}
+#line 59785 "preproc.c"
+ break;
+
+ case 2918: /* bare_label_keyword: LEADING */
+#line 15983 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("leading");
+}
+#line 59793 "preproc.c"
+ break;
+
+ case 2919: /* bare_label_keyword: LEAKPROOF */
+#line 15987 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("leakproof");
+}
+#line 59801 "preproc.c"
+ break;
+
+ case 2920: /* bare_label_keyword: LEAST */
+#line 15991 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("least");
+}
+#line 59809 "preproc.c"
+ break;
+
+ case 2921: /* bare_label_keyword: LEFT */
+#line 15995 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("left");
+}
+#line 59817 "preproc.c"
+ break;
+
+ case 2922: /* bare_label_keyword: LEVEL */
+#line 15999 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("level");
+}
+#line 59825 "preproc.c"
+ break;
+
+ case 2923: /* bare_label_keyword: LIKE */
+#line 16003 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("like");
+}
+#line 59833 "preproc.c"
+ break;
+
+ case 2924: /* bare_label_keyword: LISTEN */
+#line 16007 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("listen");
+}
+#line 59841 "preproc.c"
+ break;
+
+ case 2925: /* bare_label_keyword: LOAD */
+#line 16011 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("load");
+}
+#line 59849 "preproc.c"
+ break;
+
+ case 2926: /* bare_label_keyword: LOCAL */
+#line 16015 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("local");
+}
+#line 59857 "preproc.c"
+ break;
+
+ case 2927: /* bare_label_keyword: LOCALTIME */
+#line 16019 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtime");
+}
+#line 59865 "preproc.c"
+ break;
+
+ case 2928: /* bare_label_keyword: LOCALTIMESTAMP */
+#line 16023 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("localtimestamp");
+}
+#line 59873 "preproc.c"
+ break;
+
+ case 2929: /* bare_label_keyword: LOCATION */
+#line 16027 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("location");
+}
+#line 59881 "preproc.c"
+ break;
+
+ case 2930: /* bare_label_keyword: LOCK_P */
+#line 16031 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("lock");
+}
+#line 59889 "preproc.c"
+ break;
+
+ case 2931: /* bare_label_keyword: LOCKED */
+#line 16035 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("locked");
+}
+#line 59897 "preproc.c"
+ break;
+
+ case 2932: /* bare_label_keyword: LOGGED */
+#line 16039 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("logged");
+}
+#line 59905 "preproc.c"
+ break;
+
+ case 2933: /* bare_label_keyword: MAPPING */
+#line 16043 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("mapping");
+}
+#line 59913 "preproc.c"
+ break;
+
+ case 2934: /* bare_label_keyword: MATCH */
+#line 16047 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("match");
+}
+#line 59921 "preproc.c"
+ break;
+
+ case 2935: /* bare_label_keyword: MATERIALIZED */
+#line 16051 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("materialized");
+}
+#line 59929 "preproc.c"
+ break;
+
+ case 2936: /* bare_label_keyword: MAXVALUE */
+#line 16055 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("maxvalue");
+}
+#line 59937 "preproc.c"
+ break;
+
+ case 2937: /* bare_label_keyword: METHOD */
+#line 16059 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("method");
+}
+#line 59945 "preproc.c"
+ break;
+
+ case 2938: /* bare_label_keyword: MINVALUE */
+#line 16063 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("minvalue");
+}
+#line 59953 "preproc.c"
+ break;
+
+ case 2939: /* bare_label_keyword: MODE */
+#line 16067 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("mode");
+}
+#line 59961 "preproc.c"
+ break;
+
+ case 2940: /* bare_label_keyword: MOVE */
+#line 16071 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("move");
+}
+#line 59969 "preproc.c"
+ break;
+
+ case 2941: /* bare_label_keyword: NAME_P */
+#line 16075 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("name");
+}
+#line 59977 "preproc.c"
+ break;
+
+ case 2942: /* bare_label_keyword: NAMES */
+#line 16079 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("names");
+}
+#line 59985 "preproc.c"
+ break;
+
+ case 2943: /* bare_label_keyword: NATIONAL */
+#line 16083 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("national");
+}
+#line 59993 "preproc.c"
+ break;
+
+ case 2944: /* bare_label_keyword: NATURAL */
+#line 16087 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("natural");
+}
+#line 60001 "preproc.c"
+ break;
+
+ case 2945: /* bare_label_keyword: NCHAR */
+#line 16091 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nchar");
+}
+#line 60009 "preproc.c"
+ break;
+
+ case 2946: /* bare_label_keyword: NEW */
+#line 16095 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("new");
+}
+#line 60017 "preproc.c"
+ break;
+
+ case 2947: /* bare_label_keyword: NEXT */
+#line 16099 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("next");
+}
+#line 60025 "preproc.c"
+ break;
+
+ case 2948: /* bare_label_keyword: NFC */
+#line 16103 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfc");
+}
+#line 60033 "preproc.c"
+ break;
+
+ case 2949: /* bare_label_keyword: NFD */
+#line 16107 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfd");
+}
+#line 60041 "preproc.c"
+ break;
+
+ case 2950: /* bare_label_keyword: NFKC */
+#line 16111 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkc");
+}
+#line 60049 "preproc.c"
+ break;
+
+ case 2951: /* bare_label_keyword: NFKD */
+#line 16115 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nfkd");
+}
+#line 60057 "preproc.c"
+ break;
+
+ case 2952: /* bare_label_keyword: NO */
+#line 16119 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("no");
+}
+#line 60065 "preproc.c"
+ break;
+
+ case 2953: /* bare_label_keyword: NONE */
+#line 16123 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("none");
+}
+#line 60073 "preproc.c"
+ break;
+
+ case 2954: /* bare_label_keyword: NORMALIZE */
+#line 16127 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("normalize");
+}
+#line 60081 "preproc.c"
+ break;
+
+ case 2955: /* bare_label_keyword: NORMALIZED */
+#line 16131 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("normalized");
+}
+#line 60089 "preproc.c"
+ break;
+
+ case 2956: /* bare_label_keyword: NOT */
+#line 16135 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("not");
+}
+#line 60097 "preproc.c"
+ break;
+
+ case 2957: /* bare_label_keyword: NOTHING */
+#line 16139 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 60105 "preproc.c"
+ break;
+
+ case 2958: /* bare_label_keyword: NOTIFY */
+#line 16143 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("notify");
+}
+#line 60113 "preproc.c"
+ break;
+
+ case 2959: /* bare_label_keyword: NOWAIT */
+#line 16147 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 60121 "preproc.c"
+ break;
+
+ case 2960: /* bare_label_keyword: NULL_P */
+#line 16151 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 60129 "preproc.c"
+ break;
+
+ case 2961: /* bare_label_keyword: NULLIF */
+#line 16155 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nullif");
+}
+#line 60137 "preproc.c"
+ break;
+
+ case 2962: /* bare_label_keyword: NULLS_P */
+#line 16159 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("nulls");
+}
+#line 60145 "preproc.c"
+ break;
+
+ case 2963: /* bare_label_keyword: NUMERIC */
+#line 16163 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("numeric");
+}
+#line 60153 "preproc.c"
+ break;
+
+ case 2964: /* bare_label_keyword: OBJECT_P */
+#line 16167 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("object");
+}
+#line 60161 "preproc.c"
+ break;
+
+ case 2965: /* bare_label_keyword: OF */
+#line 16171 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("of");
+}
+#line 60169 "preproc.c"
+ break;
+
+ case 2966: /* bare_label_keyword: OFF */
+#line 16175 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("off");
+}
+#line 60177 "preproc.c"
+ break;
+
+ case 2967: /* bare_label_keyword: OIDS */
+#line 16179 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("oids");
+}
+#line 60185 "preproc.c"
+ break;
+
+ case 2968: /* bare_label_keyword: OLD */
+#line 16183 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("old");
+}
+#line 60193 "preproc.c"
+ break;
+
+ case 2969: /* bare_label_keyword: ONLY */
+#line 16187 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("only");
+}
+#line 60201 "preproc.c"
+ break;
+
+ case 2970: /* bare_label_keyword: OPERATOR */
+#line 16191 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("operator");
+}
+#line 60209 "preproc.c"
+ break;
+
+ case 2971: /* bare_label_keyword: OPTION */
+#line 16195 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("option");
+}
+#line 60217 "preproc.c"
+ break;
+
+ case 2972: /* bare_label_keyword: OPTIONS */
+#line 16199 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("options");
+}
+#line 60225 "preproc.c"
+ break;
+
+ case 2973: /* bare_label_keyword: OR */
+#line 16203 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("or");
+}
+#line 60233 "preproc.c"
+ break;
+
+ case 2974: /* bare_label_keyword: ORDINALITY */
+#line 16207 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ordinality");
+}
+#line 60241 "preproc.c"
+ break;
+
+ case 2975: /* bare_label_keyword: OTHERS */
+#line 16211 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("others");
+}
+#line 60249 "preproc.c"
+ break;
+
+ case 2976: /* bare_label_keyword: OUT_P */
+#line 16215 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("out");
+}
+#line 60257 "preproc.c"
+ break;
+
+ case 2977: /* bare_label_keyword: OUTER_P */
+#line 16219 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("outer");
+}
+#line 60265 "preproc.c"
+ break;
+
+ case 2978: /* bare_label_keyword: OVERLAY */
+#line 16223 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("overlay");
+}
+#line 60273 "preproc.c"
+ break;
+
+ case 2979: /* bare_label_keyword: OVERRIDING */
+#line 16227 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("overriding");
+}
+#line 60281 "preproc.c"
+ break;
+
+ case 2980: /* bare_label_keyword: OWNED */
+#line 16231 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("owned");
+}
+#line 60289 "preproc.c"
+ break;
+
+ case 2981: /* bare_label_keyword: OWNER */
+#line 16235 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("owner");
+}
+#line 60297 "preproc.c"
+ break;
+
+ case 2982: /* bare_label_keyword: PARALLEL */
+#line 16239 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("parallel");
+}
+#line 60305 "preproc.c"
+ break;
+
+ case 2983: /* bare_label_keyword: PARSER */
+#line 16243 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("parser");
+}
+#line 60313 "preproc.c"
+ break;
+
+ case 2984: /* bare_label_keyword: PARTIAL */
+#line 16247 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("partial");
+}
+#line 60321 "preproc.c"
+ break;
+
+ case 2985: /* bare_label_keyword: PARTITION */
+#line 16251 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("partition");
+}
+#line 60329 "preproc.c"
+ break;
+
+ case 2986: /* bare_label_keyword: PASSING */
+#line 16255 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("passing");
+}
+#line 60337 "preproc.c"
+ break;
+
+ case 2987: /* bare_label_keyword: PASSWORD */
+#line 16259 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("password");
+}
+#line 60345 "preproc.c"
+ break;
+
+ case 2988: /* bare_label_keyword: PLACING */
+#line 16263 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("placing");
+}
+#line 60353 "preproc.c"
+ break;
+
+ case 2989: /* bare_label_keyword: PLANS */
+#line 16267 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("plans");
+}
+#line 60361 "preproc.c"
+ break;
+
+ case 2990: /* bare_label_keyword: POLICY */
+#line 16271 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("policy");
+}
+#line 60369 "preproc.c"
+ break;
+
+ case 2991: /* bare_label_keyword: POSITION */
+#line 16275 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("position");
+}
+#line 60377 "preproc.c"
+ break;
+
+ case 2992: /* bare_label_keyword: PRECEDING */
+#line 16279 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("preceding");
+}
+#line 60385 "preproc.c"
+ break;
+
+ case 2993: /* bare_label_keyword: PREPARE */
+#line 16283 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prepare");
+}
+#line 60393 "preproc.c"
+ break;
+
+ case 2994: /* bare_label_keyword: PREPARED */
+#line 16287 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prepared");
+}
+#line 60401 "preproc.c"
+ break;
+
+ case 2995: /* bare_label_keyword: PRESERVE */
+#line 16291 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("preserve");
+}
+#line 60409 "preproc.c"
+ break;
+
+ case 2996: /* bare_label_keyword: PRIMARY */
+#line 16295 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("primary");
+}
+#line 60417 "preproc.c"
+ break;
+
+ case 2997: /* bare_label_keyword: PRIOR */
+#line 16299 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("prior");
+}
+#line 60425 "preproc.c"
+ break;
+
+ case 2998: /* bare_label_keyword: PRIVILEGES */
+#line 16303 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("privileges");
+}
+#line 60433 "preproc.c"
+ break;
+
+ case 2999: /* bare_label_keyword: PROCEDURAL */
+#line 16307 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedural");
+}
+#line 60441 "preproc.c"
+ break;
+
+ case 3000: /* bare_label_keyword: PROCEDURE */
+#line 16311 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedure");
+}
+#line 60449 "preproc.c"
+ break;
+
+ case 3001: /* bare_label_keyword: PROCEDURES */
+#line 16315 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("procedures");
+}
+#line 60457 "preproc.c"
+ break;
+
+ case 3002: /* bare_label_keyword: PROGRAM */
+#line 16319 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("program");
+}
+#line 60465 "preproc.c"
+ break;
+
+ case 3003: /* bare_label_keyword: PUBLICATION */
+#line 16323 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 60473 "preproc.c"
+ break;
+
+ case 3004: /* bare_label_keyword: QUOTE */
+#line 16327 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("quote");
+}
+#line 60481 "preproc.c"
+ break;
+
+ case 3005: /* bare_label_keyword: RANGE */
+#line 16331 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("range");
+}
+#line 60489 "preproc.c"
+ break;
+
+ case 3006: /* bare_label_keyword: READ */
+#line 16335 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("read");
+}
+#line 60497 "preproc.c"
+ break;
+
+ case 3007: /* bare_label_keyword: REAL */
+#line 16339 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("real");
+}
+#line 60505 "preproc.c"
+ break;
+
+ case 3008: /* bare_label_keyword: REASSIGN */
+#line 16343 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reassign");
+}
+#line 60513 "preproc.c"
+ break;
+
+ case 3009: /* bare_label_keyword: RECHECK */
+#line 16347 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("recheck");
+}
+#line 60521 "preproc.c"
+ break;
+
+ case 3010: /* bare_label_keyword: RECURSIVE */
+#line 16351 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("recursive");
+}
+#line 60529 "preproc.c"
+ break;
+
+ case 3011: /* bare_label_keyword: REF */
+#line 16355 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ref");
+}
+#line 60537 "preproc.c"
+ break;
+
+ case 3012: /* bare_label_keyword: REFERENCES */
+#line 16359 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("references");
+}
+#line 60545 "preproc.c"
+ break;
+
+ case 3013: /* bare_label_keyword: REFERENCING */
+#line 16363 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("referencing");
+}
+#line 60553 "preproc.c"
+ break;
+
+ case 3014: /* bare_label_keyword: REFRESH */
+#line 16367 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("refresh");
+}
+#line 60561 "preproc.c"
+ break;
+
+ case 3015: /* bare_label_keyword: REINDEX */
+#line 16371 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reindex");
+}
+#line 60569 "preproc.c"
+ break;
+
+ case 3016: /* bare_label_keyword: RELATIVE_P */
+#line 16375 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("relative");
+}
+#line 60577 "preproc.c"
+ break;
+
+ case 3017: /* bare_label_keyword: RELEASE */
+#line 16379 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("release");
+}
+#line 60585 "preproc.c"
+ break;
+
+ case 3018: /* bare_label_keyword: RENAME */
+#line 16383 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rename");
+}
+#line 60593 "preproc.c"
+ break;
+
+ case 3019: /* bare_label_keyword: REPEATABLE */
+#line 16387 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("repeatable");
+}
+#line 60601 "preproc.c"
+ break;
+
+ case 3020: /* bare_label_keyword: REPLACE */
+#line 16391 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("replace");
+}
+#line 60609 "preproc.c"
+ break;
+
+ case 3021: /* bare_label_keyword: REPLICA */
+#line 16395 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("replica");
+}
+#line 60617 "preproc.c"
+ break;
+
+ case 3022: /* bare_label_keyword: RESET */
+#line 16399 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("reset");
+}
+#line 60625 "preproc.c"
+ break;
+
+ case 3023: /* bare_label_keyword: RESTART */
+#line 16403 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 60633 "preproc.c"
+ break;
+
+ case 3024: /* bare_label_keyword: RESTRICT */
+#line 16407 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 60641 "preproc.c"
+ break;
+
+ case 3025: /* bare_label_keyword: RETURN */
+#line 16411 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("return");
+}
+#line 60649 "preproc.c"
+ break;
+
+ case 3026: /* bare_label_keyword: RETURNS */
+#line 16415 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("returns");
+}
+#line 60657 "preproc.c"
+ break;
+
+ case 3027: /* bare_label_keyword: REVOKE */
+#line 16419 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("revoke");
+}
+#line 60665 "preproc.c"
+ break;
+
+ case 3028: /* bare_label_keyword: RIGHT */
+#line 16423 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("right");
+}
+#line 60673 "preproc.c"
+ break;
+
+ case 3029: /* bare_label_keyword: ROLE */
+#line 16427 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 60681 "preproc.c"
+ break;
+
+ case 3030: /* bare_label_keyword: ROLLBACK */
+#line 16431 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rollback");
+}
+#line 60689 "preproc.c"
+ break;
+
+ case 3031: /* bare_label_keyword: ROLLUP */
+#line 16435 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rollup");
+}
+#line 60697 "preproc.c"
+ break;
+
+ case 3032: /* bare_label_keyword: ROUTINE */
+#line 16439 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("routine");
+}
+#line 60705 "preproc.c"
+ break;
+
+ case 3033: /* bare_label_keyword: ROUTINES */
+#line 16443 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("routines");
+}
+#line 60713 "preproc.c"
+ break;
+
+ case 3034: /* bare_label_keyword: ROW */
+#line 16447 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 60721 "preproc.c"
+ break;
+
+ case 3035: /* bare_label_keyword: ROWS */
+#line 16451 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rows");
+}
+#line 60729 "preproc.c"
+ break;
+
+ case 3036: /* bare_label_keyword: RULE */
+#line 16455 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("rule");
+}
+#line 60737 "preproc.c"
+ break;
+
+ case 3037: /* bare_label_keyword: SAVEPOINT */
+#line 16459 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("savepoint");
+}
+#line 60745 "preproc.c"
+ break;
+
+ case 3038: /* bare_label_keyword: SCHEMA */
+#line 16463 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 60753 "preproc.c"
+ break;
+
+ case 3039: /* bare_label_keyword: SCHEMAS */
+#line 16467 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("schemas");
+}
+#line 60761 "preproc.c"
+ break;
+
+ case 3040: /* bare_label_keyword: SCROLL */
+#line 16471 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("scroll");
+}
+#line 60769 "preproc.c"
+ break;
+
+ case 3041: /* bare_label_keyword: SEARCH */
+#line 16475 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("search");
+}
+#line 60777 "preproc.c"
+ break;
+
+ case 3042: /* bare_label_keyword: SECURITY */
+#line 16479 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("security");
+}
+#line 60785 "preproc.c"
+ break;
+
+ case 3043: /* bare_label_keyword: SELECT */
+#line 16483 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 60793 "preproc.c"
+ break;
+
+ case 3044: /* bare_label_keyword: SEQUENCE */
+#line 16487 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 60801 "preproc.c"
+ break;
+
+ case 3045: /* bare_label_keyword: SEQUENCES */
+#line 16491 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sequences");
+}
+#line 60809 "preproc.c"
+ break;
+
+ case 3046: /* bare_label_keyword: SERIALIZABLE */
+#line 16495 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("serializable");
+}
+#line 60817 "preproc.c"
+ break;
+
+ case 3047: /* bare_label_keyword: SERVER */
+#line 16499 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 60825 "preproc.c"
+ break;
+
+ case 3048: /* bare_label_keyword: SESSION */
+#line 16503 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session");
+}
+#line 60833 "preproc.c"
+ break;
+
+ case 3049: /* bare_label_keyword: SESSION_USER */
+#line 16507 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 60841 "preproc.c"
+ break;
+
+ case 3050: /* bare_label_keyword: SET */
+#line 16511 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("set");
+}
+#line 60849 "preproc.c"
+ break;
+
+ case 3051: /* bare_label_keyword: SETOF */
+#line 16515 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("setof");
+}
+#line 60857 "preproc.c"
+ break;
+
+ case 3052: /* bare_label_keyword: SETS */
+#line 16519 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sets");
+}
+#line 60865 "preproc.c"
+ break;
+
+ case 3053: /* bare_label_keyword: SHARE */
+#line 16523 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("share");
+}
+#line 60873 "preproc.c"
+ break;
+
+ case 3054: /* bare_label_keyword: SHOW */
+#line 16527 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("show");
+}
+#line 60881 "preproc.c"
+ break;
+
+ case 3055: /* bare_label_keyword: SIMILAR */
+#line 16531 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("similar");
+}
+#line 60889 "preproc.c"
+ break;
+
+ case 3056: /* bare_label_keyword: SIMPLE */
+#line 16535 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("simple");
+}
+#line 60897 "preproc.c"
+ break;
+
+ case 3057: /* bare_label_keyword: SKIP */
+#line 16539 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("skip");
+}
+#line 60905 "preproc.c"
+ break;
+
+ case 3058: /* bare_label_keyword: SMALLINT */
+#line 16543 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("smallint");
+}
+#line 60913 "preproc.c"
+ break;
+
+ case 3059: /* bare_label_keyword: SNAPSHOT */
+#line 16547 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("snapshot");
+}
+#line 60921 "preproc.c"
+ break;
+
+ case 3060: /* bare_label_keyword: SOME */
+#line 16551 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("some");
+}
+#line 60929 "preproc.c"
+ break;
+
+ case 3061: /* bare_label_keyword: SQL_P */
+#line 16555 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sql");
+}
+#line 60937 "preproc.c"
+ break;
+
+ case 3062: /* bare_label_keyword: STABLE */
+#line 16559 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stable");
+}
+#line 60945 "preproc.c"
+ break;
+
+ case 3063: /* bare_label_keyword: STANDALONE_P */
+#line 16563 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("standalone");
+}
+#line 60953 "preproc.c"
+ break;
+
+ case 3064: /* bare_label_keyword: START */
+#line 16567 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("start");
+}
+#line 60961 "preproc.c"
+ break;
+
+ case 3065: /* bare_label_keyword: STATEMENT */
+#line 16571 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statement");
+}
+#line 60969 "preproc.c"
+ break;
+
+ case 3066: /* bare_label_keyword: STATISTICS */
+#line 16575 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 60977 "preproc.c"
+ break;
+
+ case 3067: /* bare_label_keyword: STDIN */
+#line 16579 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdin");
+}
+#line 60985 "preproc.c"
+ break;
+
+ case 3068: /* bare_label_keyword: STDOUT */
+#line 16583 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stdout");
+}
+#line 60993 "preproc.c"
+ break;
+
+ case 3069: /* bare_label_keyword: STORAGE */
+#line 16587 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("storage");
+}
+#line 61001 "preproc.c"
+ break;
+
+ case 3070: /* bare_label_keyword: STORED */
+#line 16591 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("stored");
+}
+#line 61009 "preproc.c"
+ break;
+
+ case 3071: /* bare_label_keyword: STRICT_P */
+#line 16595 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strict");
+}
+#line 61017 "preproc.c"
+ break;
+
+ case 3072: /* bare_label_keyword: STRIP_P */
+#line 16599 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("strip");
+}
+#line 61025 "preproc.c"
+ break;
+
+ case 3073: /* bare_label_keyword: SUBSCRIPTION */
+#line 16603 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 61033 "preproc.c"
+ break;
+
+ case 3074: /* bare_label_keyword: SUBSTRING */
+#line 16607 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("substring");
+}
+#line 61041 "preproc.c"
+ break;
+
+ case 3075: /* bare_label_keyword: SUPPORT */
+#line 16611 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("support");
+}
+#line 61049 "preproc.c"
+ break;
+
+ case 3076: /* bare_label_keyword: SYMMETRIC */
+#line 16615 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("symmetric");
+}
+#line 61057 "preproc.c"
+ break;
+
+ case 3077: /* bare_label_keyword: SYSID */
+#line 16619 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("sysid");
+}
+#line 61065 "preproc.c"
+ break;
+
+ case 3078: /* bare_label_keyword: SYSTEM_P */
+#line 16623 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 61073 "preproc.c"
+ break;
+
+ case 3079: /* bare_label_keyword: TABLE */
+#line 16627 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 61081 "preproc.c"
+ break;
+
+ case 3080: /* bare_label_keyword: TABLES */
+#line 16631 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tables");
+}
+#line 61089 "preproc.c"
+ break;
+
+ case 3081: /* bare_label_keyword: TABLESAMPLE */
+#line 16635 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablesample");
+}
+#line 61097 "preproc.c"
+ break;
+
+ case 3082: /* bare_label_keyword: TABLESPACE */
+#line 16639 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 61105 "preproc.c"
+ break;
+
+ case 3083: /* bare_label_keyword: TEMP */
+#line 16643 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temp");
+}
+#line 61113 "preproc.c"
+ break;
+
+ case 3084: /* bare_label_keyword: TEMPLATE */
+#line 16647 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("template");
+}
+#line 61121 "preproc.c"
+ break;
+
+ case 3085: /* bare_label_keyword: TEMPORARY */
+#line 16651 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("temporary");
+}
+#line 61129 "preproc.c"
+ break;
+
+ case 3086: /* bare_label_keyword: TEXT_P */
+#line 16655 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("text");
+}
+#line 61137 "preproc.c"
+ break;
+
+ case 3087: /* bare_label_keyword: THEN */
+#line 16659 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("then");
+}
+#line 61145 "preproc.c"
+ break;
+
+ case 3088: /* bare_label_keyword: TIES */
+#line 16663 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("ties");
+}
+#line 61153 "preproc.c"
+ break;
+
+ case 3089: /* bare_label_keyword: TIME */
+#line 16667 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("time");
+}
+#line 61161 "preproc.c"
+ break;
+
+ case 3090: /* bare_label_keyword: TIMESTAMP */
+#line 16671 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("timestamp");
+}
+#line 61169 "preproc.c"
+ break;
+
+ case 3091: /* bare_label_keyword: TRAILING */
+#line 16675 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trailing");
+}
+#line 61177 "preproc.c"
+ break;
+
+ case 3092: /* bare_label_keyword: TRANSACTION */
+#line 16679 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transaction");
+}
+#line 61185 "preproc.c"
+ break;
+
+ case 3093: /* bare_label_keyword: TRANSFORM */
+#line 16683 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("transform");
+}
+#line 61193 "preproc.c"
+ break;
+
+ case 3094: /* bare_label_keyword: TREAT */
+#line 16687 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("treat");
+}
+#line 61201 "preproc.c"
+ break;
+
+ case 3095: /* bare_label_keyword: TRIGGER */
+#line 16691 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trigger");
+}
+#line 61209 "preproc.c"
+ break;
+
+ case 3096: /* bare_label_keyword: TRIM */
+#line 16695 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trim");
+}
+#line 61217 "preproc.c"
+ break;
+
+ case 3097: /* bare_label_keyword: TRUE_P */
+#line 16699 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 61225 "preproc.c"
+ break;
+
+ case 3098: /* bare_label_keyword: TRUNCATE */
+#line 16703 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("truncate");
+}
+#line 61233 "preproc.c"
+ break;
+
+ case 3099: /* bare_label_keyword: TRUSTED */
+#line 16707 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("trusted");
+}
+#line 61241 "preproc.c"
+ break;
+
+ case 3100: /* bare_label_keyword: TYPE_P */
+#line 16711 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("type");
+}
+#line 61249 "preproc.c"
+ break;
+
+ case 3101: /* bare_label_keyword: TYPES_P */
+#line 16715 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("types");
+}
+#line 61257 "preproc.c"
+ break;
+
+ case 3102: /* bare_label_keyword: UESCAPE */
+#line 16719 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("uescape");
+}
+#line 61265 "preproc.c"
+ break;
+
+ case 3103: /* bare_label_keyword: UNBOUNDED */
+#line 16723 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unbounded");
+}
+#line 61273 "preproc.c"
+ break;
+
+ case 3104: /* bare_label_keyword: UNCOMMITTED */
+#line 16727 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("uncommitted");
+}
+#line 61281 "preproc.c"
+ break;
+
+ case 3105: /* bare_label_keyword: UNENCRYPTED */
+#line 16731 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unencrypted");
+}
+#line 61289 "preproc.c"
+ break;
+
+ case 3106: /* bare_label_keyword: UNIQUE */
+#line 16735 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unique");
+}
+#line 61297 "preproc.c"
+ break;
+
+ case 3107: /* bare_label_keyword: UNKNOWN */
+#line 16739 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unknown");
+}
+#line 61305 "preproc.c"
+ break;
+
+ case 3108: /* bare_label_keyword: UNLISTEN */
+#line 16743 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlisten");
+}
+#line 61313 "preproc.c"
+ break;
+
+ case 3109: /* bare_label_keyword: UNLOGGED */
+#line 16747 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 61321 "preproc.c"
+ break;
+
+ case 3110: /* bare_label_keyword: UNTIL */
+#line 16751 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("until");
+}
+#line 61329 "preproc.c"
+ break;
+
+ case 3111: /* bare_label_keyword: UPDATE */
+#line 16755 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 61337 "preproc.c"
+ break;
+
+ case 3112: /* bare_label_keyword: USER */
+#line 16759 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 61345 "preproc.c"
+ break;
+
+ case 3113: /* bare_label_keyword: USING */
+#line 16763 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("using");
+}
+#line 61353 "preproc.c"
+ break;
+
+ case 3114: /* bare_label_keyword: VACUUM */
+#line 16767 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("vacuum");
+}
+#line 61361 "preproc.c"
+ break;
+
+ case 3115: /* bare_label_keyword: VALID */
+#line 16771 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("valid");
+}
+#line 61369 "preproc.c"
+ break;
+
+ case 3116: /* bare_label_keyword: VALIDATE */
+#line 16775 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("validate");
+}
+#line 61377 "preproc.c"
+ break;
+
+ case 3117: /* bare_label_keyword: VALIDATOR */
+#line 16779 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("validator");
+}
+#line 61385 "preproc.c"
+ break;
+
+ case 3118: /* bare_label_keyword: VALUE_P */
+#line 16783 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("value");
+}
+#line 61393 "preproc.c"
+ break;
+
+ case 3119: /* bare_label_keyword: VALUES */
+#line 16787 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("values");
+}
+#line 61401 "preproc.c"
+ break;
+
+ case 3120: /* bare_label_keyword: VARCHAR */
+#line 16791 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("varchar");
+}
+#line 61409 "preproc.c"
+ break;
+
+ case 3121: /* bare_label_keyword: VARIADIC */
+#line 16795 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("variadic");
+}
+#line 61417 "preproc.c"
+ break;
+
+ case 3122: /* bare_label_keyword: VERBOSE */
+#line 16799 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 61425 "preproc.c"
+ break;
+
+ case 3123: /* bare_label_keyword: VERSION_P */
+#line 16803 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("version");
+}
+#line 61433 "preproc.c"
+ break;
+
+ case 3124: /* bare_label_keyword: VIEW */
+#line 16807 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 61441 "preproc.c"
+ break;
+
+ case 3125: /* bare_label_keyword: VIEWS */
+#line 16811 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("views");
+}
+#line 61449 "preproc.c"
+ break;
+
+ case 3126: /* bare_label_keyword: VOLATILE */
+#line 16815 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("volatile");
+}
+#line 61457 "preproc.c"
+ break;
+
+ case 3127: /* bare_label_keyword: WHEN */
+#line 16819 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("when");
+}
+#line 61465 "preproc.c"
+ break;
+
+ case 3128: /* bare_label_keyword: WHITESPACE_P */
+#line 16823 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("whitespace");
+}
+#line 61473 "preproc.c"
+ break;
+
+ case 3129: /* bare_label_keyword: WORK */
+#line 16827 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("work");
+}
+#line 61481 "preproc.c"
+ break;
+
+ case 3130: /* bare_label_keyword: WRAPPER */
+#line 16831 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("wrapper");
+}
+#line 61489 "preproc.c"
+ break;
+
+ case 3131: /* bare_label_keyword: WRITE */
+#line 16835 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("write");
+}
+#line 61497 "preproc.c"
+ break;
+
+ case 3132: /* bare_label_keyword: XML_P */
+#line 16839 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xml");
+}
+#line 61505 "preproc.c"
+ break;
+
+ case 3133: /* bare_label_keyword: XMLATTRIBUTES */
+#line 16843 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlattributes");
+}
+#line 61513 "preproc.c"
+ break;
+
+ case 3134: /* bare_label_keyword: XMLCONCAT */
+#line 16847 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlconcat");
+}
+#line 61521 "preproc.c"
+ break;
+
+ case 3135: /* bare_label_keyword: XMLELEMENT */
+#line 16851 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlelement");
+}
+#line 61529 "preproc.c"
+ break;
+
+ case 3136: /* bare_label_keyword: XMLEXISTS */
+#line 16855 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlexists");
+}
+#line 61537 "preproc.c"
+ break;
+
+ case 3137: /* bare_label_keyword: XMLFOREST */
+#line 16859 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlforest");
+}
+#line 61545 "preproc.c"
+ break;
+
+ case 3138: /* bare_label_keyword: XMLNAMESPACES */
+#line 16863 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlnamespaces");
+}
+#line 61553 "preproc.c"
+ break;
+
+ case 3139: /* bare_label_keyword: XMLPARSE */
+#line 16867 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlparse");
+}
+#line 61561 "preproc.c"
+ break;
+
+ case 3140: /* bare_label_keyword: XMLPI */
+#line 16871 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlpi");
+}
+#line 61569 "preproc.c"
+ break;
+
+ case 3141: /* bare_label_keyword: XMLROOT */
+#line 16875 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlroot");
+}
+#line 61577 "preproc.c"
+ break;
+
+ case 3142: /* bare_label_keyword: XMLSERIALIZE */
+#line 16879 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmlserialize");
+}
+#line 61585 "preproc.c"
+ break;
+
+ case 3143: /* bare_label_keyword: XMLTABLE */
+#line 16883 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("xmltable");
+}
+#line 61593 "preproc.c"
+ break;
+
+ case 3144: /* bare_label_keyword: YES_P */
+#line 16887 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("yes");
+}
+#line 61601 "preproc.c"
+ break;
+
+ case 3145: /* bare_label_keyword: ZONE */
+#line 16891 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("zone");
+}
+#line 61609 "preproc.c"
+ break;
+
+ case 3148: /* statement: ecpgstart at toplevel_stmt ';' */
+#line 16905 "preproc.y"
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+#line 61619 "preproc.c"
+ break;
+
+ case 3149: /* statement: ecpgstart toplevel_stmt ';' */
+#line 16911 "preproc.y"
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+#line 61629 "preproc.c"
+ break;
+
+ case 3150: /* statement: ecpgstart ECPGVarDeclaration */
+#line 16917 "preproc.y"
+ {
+ fprintf(base_yyout, "%s", (yyvsp[0].str));
+ free((yyvsp[0].str));
+ output_line_number();
+ }
+#line 61639 "preproc.c"
+ break;
+
+ case 3152: /* statement: c_thing */
+#line 16923 "preproc.y"
+ { fprintf(base_yyout, "%s", (yyvsp[0].str)); free((yyvsp[0].str)); }
+#line 61645 "preproc.c"
+ break;
+
+ case 3153: /* statement: CPP_LINE */
+#line 16924 "preproc.y"
+ { fprintf(base_yyout, "%s", (yyvsp[0].str)); free((yyvsp[0].str)); }
+#line 61651 "preproc.c"
+ break;
+
+ case 3154: /* statement: '{' */
+#line 16925 "preproc.y"
+ { braces_open++; fputs("{", base_yyout); }
+#line 61657 "preproc.c"
+ break;
+
+ case 3155: /* statement: '}' */
+#line 16927 "preproc.y"
+ {
+ remove_typedefs(braces_open);
+ remove_variables(braces_open--);
+ if (braces_open == 0)
+ {
+ free(current_function);
+ current_function = NULL;
+ }
+ fputs("}", base_yyout);
+ }
+#line 61672 "preproc.c"
+ break;
+
+ case 3156: /* $@1: %empty */
+#line 16939 "preproc.y"
+ {FoundInto = 0;}
+#line 61678 "preproc.c"
+ break;
+
+ case 3157: /* CreateAsStmt: CREATE OptTemp TABLE create_as_target AS $@1 SelectStmt opt_with_data */
+#line 16940 "preproc.y"
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ (yyval.str) = cat_str(7, mm_strdup("create"), (yyvsp[-6].str), mm_strdup("table"), (yyvsp[-4].str), mm_strdup("as"), (yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 61689 "preproc.c"
+ break;
+
+ case 3158: /* $@2: %empty */
+#line 16946 "preproc.y"
+ {FoundInto = 0;}
+#line 61695 "preproc.c"
+ break;
+
+ case 3159: /* CreateAsStmt: CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS $@2 SelectStmt opt_with_data */
+#line 16947 "preproc.y"
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ (yyval.str) = cat_str(7, mm_strdup("create"), (yyvsp[-9].str), mm_strdup("table if not exists"), (yyvsp[-4].str), mm_strdup("as"), (yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 61706 "preproc.c"
+ break;
+
+ case 3160: /* at: AT connection_object */
+#line 16956 "preproc.y"
+ {
+ connection = (yyvsp[0].str);
+ /*
+ * Do we have a variable as connection target? Remove the variable
+ * from the variable list or else it will be used twice.
+ */
+ if (argsinsert != NULL)
+ argsinsert = NULL;
+ }
+#line 61720 "preproc.c"
+ break;
+
+ case 3161: /* ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user */
+#line 16971 "preproc.y"
+ { (yyval.str) = cat_str(5, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str), mm_strdup(","), (yyvsp[-1].str)); }
+#line 61726 "preproc.c"
+ break;
+
+ case 3162: /* ECPGConnect: SQL_CONNECT TO DEFAULT */
+#line 16973 "preproc.y"
+ { (yyval.str) = mm_strdup("NULL, NULL, NULL, \"DEFAULT\""); }
+#line 61732 "preproc.c"
+ break;
+
+ case 3163: /* ECPGConnect: SQL_CONNECT ora_user */
+#line 16976 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("NULL,"), (yyvsp[0].str), mm_strdup(", NULL")); }
+#line 61738 "preproc.c"
+ break;
+
+ case 3164: /* ECPGConnect: DATABASE connection_target */
+#line 16978 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[0].str), mm_strdup(", NULL, NULL, NULL")); }
+#line 61744 "preproc.c"
+ break;
+
+ case 3165: /* connection_target: opt_database_name opt_server opt_port */
+#line 16982 "preproc.y"
+ {
+ /* old style: dbname[@server][:port] */
+ if (strlen((yyvsp[-1].str)) > 0 && *((yyvsp[-1].str)) != '@')
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\", found \"%s\"", (yyvsp[-1].str));
+
+ /* C strings need to be handled differently */
+ if ((yyvsp[-2].str)[0] == '\"')
+ (yyval.str) = (yyvsp[-2].str);
+ else
+ (yyval.str) = make3_str(mm_strdup("\""), make3_str((yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)), mm_strdup("\""));
+ }
+#line 61760 "preproc.c"
+ break;
+
+ case 3166: /* connection_target: db_prefix ':' server opt_port '/' opt_database_name opt_options */
+#line 16994 "preproc.y"
+ {
+ /* new style: <tcp|unix>:postgresql://server[:port][/dbname] */
+ if (strncmp((yyvsp[-6].str), "unix:postgresql", strlen("unix:postgresql")) != 0 && strncmp((yyvsp[-6].str), "tcp:postgresql", strlen("tcp:postgresql")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported");
+
+ if (strncmp((yyvsp[-4].str), "//", strlen("//")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"://\", found \"%s\"", (yyvsp[-4].str));
+
+ if (strncmp((yyvsp[-6].str), "unix", strlen("unix")) == 0 &&
+ strncmp((yyvsp[-4].str) + strlen("//"), "localhost", strlen("localhost")) != 0 &&
+ strncmp((yyvsp[-4].str) + strlen("//"), "127.0.0.1", strlen("127.0.0.1")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "Unix-domain sockets only work on \"localhost\" but not on \"%s\"", (yyvsp[-4].str) + strlen("//"));
+
+ (yyval.str) = make3_str(make3_str(mm_strdup("\""), (yyvsp[-6].str), mm_strdup(":")), (yyvsp[-4].str), make3_str(make3_str((yyvsp[-3].str), mm_strdup("/"), (yyvsp[-1].str)), (yyvsp[0].str), mm_strdup("\"")));
+ }
+#line 61780 "preproc.c"
+ break;
+
+ case 3167: /* connection_target: char_variable */
+#line 17010 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 61788 "preproc.c"
+ break;
+
+ case 3168: /* connection_target: ecpg_sconst */
+#line 17014 "preproc.y"
+ {
+ /* We can only process double quoted strings not single quotes ones,
+ * so we change the quotes.
+ * Note, that the rule for ecpg_sconst adds these single quotes. */
+ (yyvsp[0].str)[0] = '\"';
+ (yyvsp[0].str)[strlen((yyvsp[0].str))-1] = '\"';
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 61801 "preproc.c"
+ break;
+
+ case 3169: /* opt_database_name: name */
+#line 17024 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 61807 "preproc.c"
+ break;
+
+ case 3170: /* opt_database_name: %empty */
+#line 17025 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 61813 "preproc.c"
+ break;
+
+ case 3171: /* db_prefix: ecpg_ident cvariable */
+#line 17029 "preproc.y"
+ {
+ if (strcmp((yyvsp[0].str), "postgresql") != 0 && strcmp((yyvsp[0].str), "postgres") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"postgresql\", found \"%s\"", (yyvsp[0].str));
+
+ if (strcmp((yyvsp[-1].str), "tcp") != 0 && strcmp((yyvsp[-1].str), "unix") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid connection type: %s", (yyvsp[-1].str));
+
+ (yyval.str) = make3_str((yyvsp[-1].str), mm_strdup(":"), (yyvsp[0].str));
+ }
+#line 61827 "preproc.c"
+ break;
+
+ case 3172: /* server: Op server_name */
+#line 17041 "preproc.y"
+ {
+ if (strcmp((yyvsp[-1].str), "@") != 0 && strcmp((yyvsp[-1].str), "//") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\" or \"://\", found \"%s\"", (yyvsp[-1].str));
+
+ (yyval.str) = make2_str((yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 61838 "preproc.c"
+ break;
+
+ case 3173: /* opt_server: server */
+#line 17049 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 61844 "preproc.c"
+ break;
+
+ case 3174: /* opt_server: %empty */
+#line 17050 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 61850 "preproc.c"
+ break;
+
+ case 3175: /* server_name: ColId */
+#line 17053 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 61856 "preproc.c"
+ break;
+
+ case 3176: /* server_name: ColId '.' server_name */
+#line 17054 "preproc.y"
+ { (yyval.str) = make3_str((yyvsp[-2].str), mm_strdup("."), (yyvsp[0].str)); }
+#line 61862 "preproc.c"
+ break;
+
+ case 3177: /* server_name: IP */
+#line 17055 "preproc.y"
+ { (yyval.str) = make_name(); }
+#line 61868 "preproc.c"
+ break;
+
+ case 3178: /* opt_port: ':' Iconst */
+#line 17058 "preproc.y"
+ { (yyval.str) = make2_str(mm_strdup(":"), (yyvsp[0].str)); }
+#line 61874 "preproc.c"
+ break;
+
+ case 3179: /* opt_port: %empty */
+#line 17059 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 61880 "preproc.c"
+ break;
+
+ case 3180: /* opt_connection_name: AS connection_object */
+#line 17062 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 61886 "preproc.c"
+ break;
+
+ case 3181: /* opt_connection_name: %empty */
+#line 17063 "preproc.y"
+ { (yyval.str) = mm_strdup("NULL"); }
+#line 61892 "preproc.c"
+ break;
+
+ case 3182: /* opt_user: USER ora_user */
+#line 17066 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 61898 "preproc.c"
+ break;
+
+ case 3183: /* opt_user: %empty */
+#line 17067 "preproc.y"
+ { (yyval.str) = mm_strdup("NULL, NULL"); }
+#line 61904 "preproc.c"
+ break;
+
+ case 3184: /* ora_user: user_name */
+#line 17071 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[0].str), mm_strdup(", NULL")); }
+#line 61910 "preproc.c"
+ break;
+
+ case 3185: /* ora_user: user_name '/' user_name */
+#line 17073 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 61916 "preproc.c"
+ break;
+
+ case 3186: /* ora_user: user_name SQL_IDENTIFIED BY user_name */
+#line 17075 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-3].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 61922 "preproc.c"
+ break;
+
+ case 3187: /* ora_user: user_name USING user_name */
+#line 17077 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 61928 "preproc.c"
+ break;
+
+ case 3188: /* user_name: RoleId */
+#line 17081 "preproc.y"
+ {
+ if ((yyvsp[0].str)[0] == '\"')
+ (yyval.str) = (yyvsp[0].str);
+ else
+ (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\""));
+ }
+#line 61939 "preproc.c"
+ break;
+
+ case 3189: /* user_name: ecpg_sconst */
+#line 17088 "preproc.y"
+ {
+ if ((yyvsp[0].str)[0] == '\"')
+ (yyval.str) = (yyvsp[0].str);
+ else
+ (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\""));
+ }
+#line 61950 "preproc.c"
+ break;
+
+ case 3190: /* user_name: civar */
+#line 17095 "preproc.y"
+ {
+ enum ECPGttype type = argsinsert->variable->type->type;
+
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = argsinsert->variable->type->u.element->type;
+
+ /* handle varchars */
+ if (type == ECPGt_varchar)
+ (yyval.str) = make2_str(mm_strdup(argsinsert->variable->name), mm_strdup(".arr"));
+ else
+ (yyval.str) = mm_strdup(argsinsert->variable->name);
+ }
+#line 61968 "preproc.c"
+ break;
+
+ case 3191: /* char_variable: cvariable */
+#line 17111 "preproc.y"
+ {
+ /* check if we have a string variable */
+ struct variable *p = find_variable((yyvsp[0].str));
+ enum ECPGttype type = p->type->type;
+
+ /* If we have just one character this is not a string */
+ if (atol(p->type->size) == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ else
+ {
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = p->type->u.element->type;
+
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ (yyval.str) = (yyvsp[0].str);
+ break;
+ case ECPGt_varchar:
+ (yyval.str) = make2_str((yyvsp[0].str), mm_strdup(".arr"));
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ (yyval.str) = (yyvsp[0].str);
+ break;
+ }
+ }
+ }
+#line 62004 "preproc.c"
+ break;
+
+ case 3192: /* opt_options: Op connect_options */
+#line 17145 "preproc.y"
+ {
+ if (strlen((yyvsp[-1].str)) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp((yyvsp[-1].str), "?") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", (yyvsp[-1].str));
+
+ (yyval.str) = make2_str(mm_strdup("?"), (yyvsp[0].str));
+ }
+#line 62018 "preproc.c"
+ break;
+
+ case 3193: /* opt_options: %empty */
+#line 17154 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 62024 "preproc.c"
+ break;
+
+ case 3194: /* connect_options: ColId opt_opt_value */
+#line 17158 "preproc.y"
+ {
+ (yyval.str) = make2_str((yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 62032 "preproc.c"
+ break;
+
+ case 3195: /* connect_options: ColId opt_opt_value Op connect_options */
+#line 17162 "preproc.y"
+ {
+ if (strlen((yyvsp[-1].str)) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp((yyvsp[-1].str), "&") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", (yyvsp[-1].str));
+
+ (yyval.str) = cat_str(3, make2_str((yyvsp[-3].str), (yyvsp[-2].str)), (yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 62046 "preproc.c"
+ break;
+
+ case 3196: /* opt_opt_value: %empty */
+#line 17174 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 62052 "preproc.c"
+ break;
+
+ case 3197: /* opt_opt_value: '=' Iconst */
+#line 17176 "preproc.y"
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 62058 "preproc.c"
+ break;
+
+ case 3198: /* opt_opt_value: '=' ecpg_ident */
+#line 17178 "preproc.y"
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 62064 "preproc.c"
+ break;
+
+ case 3199: /* opt_opt_value: '=' civar */
+#line 17180 "preproc.y"
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 62070 "preproc.c"
+ break;
+
+ case 3200: /* prepared_name: name */
+#line 17184 "preproc.y"
+ {
+ if ((yyvsp[0].str)[0] == '\"' && (yyvsp[0].str)[strlen((yyvsp[0].str))-1] == '\"') /* already quoted? */
+ (yyval.str) = (yyvsp[0].str);
+ else /* not quoted => convert to lowercase */
+ {
+ size_t i;
+
+ for (i = 0; i< strlen((yyvsp[0].str)); i++)
+ (yyvsp[0].str)[i] = tolower((unsigned char) (yyvsp[0].str)[i]);
+
+ (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\""));
+ }
+ }
+#line 62088 "preproc.c"
+ break;
+
+ case 3201: /* prepared_name: char_variable */
+#line 17197 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62094 "preproc.c"
+ break;
+
+ case 3202: /* ECPGDeclareStmt: DECLARE prepared_name STATEMENT */
+#line 17204 "preproc.y"
+ {
+ struct declared_list *ptr = NULL;
+ /* Check whether the declared name has been defined or not */
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp((yyvsp[-1].str), ptr->name) == 0)
+ {
+ /* re-definition is not allowed */
+ mmerror(PARSE_ERROR, ET_ERROR, "name \"%s\" is already declared", ptr->name);
+ }
+ }
+
+ /* Add a new declared name into the g_declared_list */
+ ptr = NULL;
+ ptr = (struct declared_list *)mm_alloc(sizeof(struct declared_list));
+ if (ptr)
+ {
+ /* initial definition */
+ ptr -> name = (yyvsp[-1].str);
+ if (connection)
+ ptr -> connection = mm_strdup(connection);
+ else
+ ptr -> connection = NULL;
+
+ ptr -> next = g_declared_list;
+ g_declared_list = ptr;
+ }
+
+ (yyval.str) = cat_str(3 , mm_strdup("/* declare "), mm_strdup((yyvsp[-1].str)), mm_strdup(" as an SQL identifier */"));
+ }
+#line 62129 "preproc.c"
+ break;
+
+ case 3203: /* ECPGCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR prepared_name */
+#line 17241 "preproc.y"
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = (yyvsp[-5].str)[0] == ':' ? mm_strdup("$0") : mm_strdup((yyvsp[-5].str));
+ int (* strcmp_fn)(const char *, const char *) = (((yyvsp[-5].str)[0] == ':' || (yyvsp[-5].str)[0] == '"') ? strcmp : pg_strcasecmp);
+ struct variable *thisquery = (struct variable *)mm_alloc(sizeof(struct variable));
+ char *comment;
+ char *con;
+
+ if (INFORMIX_MODE && pg_strcasecmp((yyvsp[-5].str), "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ check_declared_list((yyvsp[0].str));
+ con = connection ? connection : "NULL";
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn((yyvsp[-5].str), ptr->name) == 0)
+ {
+ /* re-definition is a bug */
+ if ((yyvsp[-5].str)[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", (yyvsp[-5].str)+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", (yyvsp[-5].str));
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ /* initial definition */
+ this->next = cur;
+ this->name = (yyvsp[-5].str);
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->command = cat_str(6, mm_strdup("declare"), cursor_marker, (yyvsp[-4].str), mm_strdup("cursor"), (yyvsp[-2].str), mm_strdup("for $1"));
+ this->argsresult = NULL;
+ this->argsresult_oos = NULL;
+
+ thisquery->type = &ecpg_query;
+ thisquery->brace_level = 0;
+ thisquery->next = NULL;
+ thisquery->name = (char *) mm_alloc(sizeof("ECPGprepared_statement(, , __LINE__)") + strlen(con) + strlen((yyvsp[0].str)));
+ sprintf(thisquery->name, "ECPGprepared_statement(%s, %s, __LINE__)", con, (yyvsp[0].str));
+
+ this->argsinsert = NULL;
+ this->argsinsert_oos = NULL;
+ if ((yyvsp[-5].str)[0] == ':')
+ {
+ struct variable *var = find_variable((yyvsp[-5].str) + 1);
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&(this->argsinsert), var, &no_indicator);
+ }
+ add_variable_to_head(&(this->argsinsert), thisquery, &no_indicator);
+
+ cur = this;
+
+ comment = cat_str(3, mm_strdup("/*"), mm_strdup(this->command), mm_strdup("*/"));
+
+ (yyval.str) = cat_str(2, adjust_outofscope_cursor_vars(this),
+ comment);
+ }
+#line 62193 "preproc.c"
+ break;
+
+ case 3204: /* ECPGExecuteImmediateStmt: EXECUTE IMMEDIATE execstring */
+#line 17303 "preproc.y"
+ {
+ /* execute immediate means prepare the statement and
+ * immediately execute it */
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 62203 "preproc.c"
+ break;
+
+ case 3206: /* single_vt_declaration: type_declaration */
+#line 17313 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62209 "preproc.c"
+ break;
+
+ case 3207: /* single_vt_declaration: var_declaration */
+#line 17314 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62215 "preproc.c"
+ break;
+
+ case 3208: /* precision: NumericOnly */
+#line 17317 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62221 "preproc.c"
+ break;
+
+ case 3209: /* opt_scale: ',' NumericOnly */
+#line 17319 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62227 "preproc.c"
+ break;
+
+ case 3210: /* opt_scale: %empty */
+#line 17320 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 62233 "preproc.c"
+ break;
+
+ case 3211: /* ecpg_interval: opt_interval */
+#line 17323 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62239 "preproc.c"
+ break;
+
+ case 3212: /* ecpg_interval: YEAR_P TO MINUTE_P */
+#line 17324 "preproc.y"
+ { (yyval.str) = mm_strdup("year to minute"); }
+#line 62245 "preproc.c"
+ break;
+
+ case 3213: /* ecpg_interval: YEAR_P TO SECOND_P */
+#line 17325 "preproc.y"
+ { (yyval.str) = mm_strdup("year to second"); }
+#line 62251 "preproc.c"
+ break;
+
+ case 3214: /* ecpg_interval: DAY_P TO DAY_P */
+#line 17326 "preproc.y"
+ { (yyval.str) = mm_strdup("day to day"); }
+#line 62257 "preproc.c"
+ break;
+
+ case 3215: /* ecpg_interval: MONTH_P TO MONTH_P */
+#line 17327 "preproc.y"
+ { (yyval.str) = mm_strdup("month to month"); }
+#line 62263 "preproc.c"
+ break;
+
+ case 3216: /* $@3: %empty */
+#line 17334 "preproc.y"
+ { fputs("/* exec sql begin declare section */", base_yyout); }
+#line 62269 "preproc.c"
+ break;
+
+ case 3217: /* ECPGDeclaration: sql_startdeclare $@3 var_type_declarations sql_enddeclare */
+#line 17336 "preproc.y"
+ {
+ fprintf(base_yyout, "%s/* exec sql end declare section */", (yyvsp[-1].str));
+ free((yyvsp[-1].str));
+ output_line_number();
+ }
+#line 62279 "preproc.c"
+ break;
+
+ case 3218: /* sql_startdeclare: ecpgstart BEGIN_P DECLARE SQL_SECTION ';' */
+#line 17343 "preproc.y"
+ {}
+#line 62285 "preproc.c"
+ break;
+
+ case 3219: /* sql_enddeclare: ecpgstart END_P DECLARE SQL_SECTION ';' */
+#line 17345 "preproc.y"
+ {}
+#line 62291 "preproc.c"
+ break;
+
+ case 3220: /* var_type_declarations: %empty */
+#line 17347 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 62297 "preproc.c"
+ break;
+
+ case 3221: /* var_type_declarations: vt_declarations */
+#line 17348 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62303 "preproc.c"
+ break;
+
+ case 3222: /* vt_declarations: single_vt_declaration */
+#line 17351 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62309 "preproc.c"
+ break;
+
+ case 3223: /* vt_declarations: CPP_LINE */
+#line 17352 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62315 "preproc.c"
+ break;
+
+ case 3224: /* vt_declarations: vt_declarations single_vt_declaration */
+#line 17353 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 62321 "preproc.c"
+ break;
+
+ case 3225: /* vt_declarations: vt_declarations CPP_LINE */
+#line 17354 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 62327 "preproc.c"
+ break;
+
+ case 3226: /* variable_declarations: var_declaration */
+#line 17357 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62333 "preproc.c"
+ break;
+
+ case 3227: /* variable_declarations: variable_declarations var_declaration */
+#line 17358 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 62339 "preproc.c"
+ break;
+
+ case 3228: /* $@4: %empty */
+#line 17362 "preproc.y"
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 62349 "preproc.c"
+ break;
+
+ case 3229: /* type_declaration: S_TYPEDEF $@4 var_type opt_pointer ECPGColLabelCommon opt_array_bounds ';' */
+#line 17368 "preproc.y"
+ {
+ add_typedef((yyvsp[-2].str), (yyvsp[-1].index).index1, (yyvsp[-1].index).index2, (yyvsp[-4].type).type_enum, (yyvsp[-4].type).type_dimension, (yyvsp[-4].type).type_index, initializer, *(yyvsp[-3].str) ? 1 : 0);
+
+ fprintf(base_yyout, "typedef %s %s %s %s;\n", (yyvsp[-4].type).type_str, *(yyvsp[-3].str) ? "*" : "", (yyvsp[-2].str), (yyvsp[-1].index).str);
+ output_line_number();
+ (yyval.str) = mm_strdup("");
+ }
+#line 62361 "preproc.c"
+ break;
+
+ case 3230: /* $@5: %empty */
+#line 17378 "preproc.y"
+ {
+ actual_type[struct_level].type_enum = (yyvsp[0].type).type_enum;
+ actual_type[struct_level].type_str = (yyvsp[0].type).type_str;
+ actual_type[struct_level].type_dimension = (yyvsp[0].type).type_dimension;
+ actual_type[struct_level].type_index = (yyvsp[0].type).type_index;
+ actual_type[struct_level].type_sizeof = (yyvsp[0].type).type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+#line 62375 "preproc.c"
+ break;
+
+ case 3231: /* var_declaration: storage_declaration var_type $@5 variable_list ';' */
+#line 17388 "preproc.y"
+ {
+ (yyval.str) = cat_str(5, actual_startline[struct_level], (yyvsp[-4].str), (yyvsp[-3].type).type_str, (yyvsp[-1].str), mm_strdup(";\n"));
+ }
+#line 62383 "preproc.c"
+ break;
+
+ case 3232: /* $@6: %empty */
+#line 17392 "preproc.y"
+ {
+ actual_type[struct_level].type_enum = (yyvsp[0].type).type_enum;
+ actual_type[struct_level].type_str = (yyvsp[0].type).type_str;
+ actual_type[struct_level].type_dimension = (yyvsp[0].type).type_dimension;
+ actual_type[struct_level].type_index = (yyvsp[0].type).type_index;
+ actual_type[struct_level].type_sizeof = (yyvsp[0].type).type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+#line 62397 "preproc.c"
+ break;
+
+ case 3233: /* var_declaration: var_type $@6 variable_list ';' */
+#line 17402 "preproc.y"
+ {
+ (yyval.str) = cat_str(4, actual_startline[struct_level], (yyvsp[-3].type).type_str, (yyvsp[-1].str), mm_strdup(";\n"));
+ }
+#line 62405 "preproc.c"
+ break;
+
+ case 3234: /* var_declaration: struct_union_type_with_symbol ';' */
+#line 17406 "preproc.y"
+ {
+ (yyval.str) = cat2_str((yyvsp[-1].str), mm_strdup(";"));
+ }
+#line 62413 "preproc.c"
+ break;
+
+ case 3235: /* opt_bit_field: ':' Iconst */
+#line 17411 "preproc.y"
+ { (yyval.str) =cat2_str(mm_strdup(":"), (yyvsp[0].str)); }
+#line 62419 "preproc.c"
+ break;
+
+ case 3236: /* opt_bit_field: %empty */
+#line 17412 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 62425 "preproc.c"
+ break;
+
+ case 3237: /* storage_declaration: storage_clause storage_modifier */
+#line 17416 "preproc.y"
+ {(yyval.str) = cat2_str ((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 62431 "preproc.c"
+ break;
+
+ case 3238: /* storage_declaration: storage_clause */
+#line 17417 "preproc.y"
+ {(yyval.str) = (yyvsp[0].str); }
+#line 62437 "preproc.c"
+ break;
+
+ case 3239: /* storage_declaration: storage_modifier */
+#line 17418 "preproc.y"
+ {(yyval.str) = (yyvsp[0].str); }
+#line 62443 "preproc.c"
+ break;
+
+ case 3240: /* storage_clause: S_EXTERN */
+#line 17421 "preproc.y"
+ { (yyval.str) = mm_strdup("extern"); }
+#line 62449 "preproc.c"
+ break;
+
+ case 3241: /* storage_clause: S_STATIC */
+#line 17422 "preproc.y"
+ { (yyval.str) = mm_strdup("static"); }
+#line 62455 "preproc.c"
+ break;
+
+ case 3242: /* storage_clause: S_REGISTER */
+#line 17423 "preproc.y"
+ { (yyval.str) = mm_strdup("register"); }
+#line 62461 "preproc.c"
+ break;
+
+ case 3243: /* storage_clause: S_AUTO */
+#line 17424 "preproc.y"
+ { (yyval.str) = mm_strdup("auto"); }
+#line 62467 "preproc.c"
+ break;
+
+ case 3244: /* storage_modifier: S_CONST */
+#line 17427 "preproc.y"
+ { (yyval.str) = mm_strdup("const"); }
+#line 62473 "preproc.c"
+ break;
+
+ case 3245: /* storage_modifier: S_VOLATILE */
+#line 17428 "preproc.y"
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 62479 "preproc.c"
+ break;
+
+ case 3246: /* var_type: simple_type */
+#line 17432 "preproc.y"
+ {
+ (yyval.type).type_enum = (yyvsp[0].type_enum);
+ (yyval.type).type_str = mm_strdup(ecpg_type_name((yyvsp[0].type_enum)));
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+#line 62491 "preproc.c"
+ break;
+
+ case 3247: /* var_type: struct_union_type */
+#line 17440 "preproc.y"
+ {
+ (yyval.type).type_str = (yyvsp[0].str);
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+
+ if (strncmp((yyvsp[0].str), "struct", sizeof("struct")-1) == 0)
+ {
+ (yyval.type).type_enum = ECPGt_struct;
+ (yyval.type).type_sizeof = ECPGstruct_sizeof;
+ }
+ else
+ {
+ (yyval.type).type_enum = ECPGt_union;
+ (yyval.type).type_sizeof = NULL;
+ }
+ }
+#line 62512 "preproc.c"
+ break;
+
+ case 3248: /* var_type: enum_type */
+#line 17457 "preproc.y"
+ {
+ (yyval.type).type_str = (yyvsp[0].str);
+ (yyval.type).type_enum = ECPGt_int;
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+#line 62524 "preproc.c"
+ break;
+
+ case 3249: /* var_type: ECPGColLabelCommon '(' precision opt_scale ')' */
+#line 17465 "preproc.y"
+ {
+ if (strcmp((yyvsp[-4].str), "numeric") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_numeric;
+ (yyval.type).type_str = mm_strdup("numeric");
+ }
+ else if (strcmp((yyvsp[-4].str), "decimal") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_decimal;
+ (yyval.type).type_str = mm_strdup("decimal");
+ }
+ else
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "only data types numeric and decimal have precision/scale argument");
+ (yyval.type).type_enum = ECPGt_numeric;
+ (yyval.type).type_str = mm_strdup("numeric");
+ }
+
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+#line 62551 "preproc.c"
+ break;
+
+ case 3250: /* var_type: ECPGColLabelCommon ecpg_interval */
+#line 17488 "preproc.y"
+ {
+ if (strlen((yyvsp[0].str)) != 0 && strcmp ((yyvsp[-1].str), "datetime") != 0 && strcmp ((yyvsp[-1].str), "interval") != 0)
+ mmerror (PARSE_ERROR, ET_ERROR, "interval specification not allowed here");
+
+ /*
+ * Check for type names that the SQL grammar treats as
+ * unreserved keywords
+ */
+ if (strcmp((yyvsp[-1].str), "varchar") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_varchar;
+ (yyval.type).type_str = EMPTY; /*mm_strdup("varchar");*/
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "bytea") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_bytea;
+ (yyval.type).type_str = EMPTY;
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "float") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_float;
+ (yyval.type).type_str = mm_strdup("float");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "double") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_double;
+ (yyval.type).type_str = mm_strdup("double");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "numeric") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_numeric;
+ (yyval.type).type_str = mm_strdup("numeric");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "decimal") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_decimal;
+ (yyval.type).type_str = mm_strdup("decimal");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "date") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_date;
+ (yyval.type).type_str = mm_strdup("date");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "timestamp") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_timestamp;
+ (yyval.type).type_str = mm_strdup("timestamp");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "interval") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_interval;
+ (yyval.type).type_str = mm_strdup("interval");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if (strcmp((yyvsp[-1].str), "datetime") == 0)
+ {
+ (yyval.type).type_enum = ECPGt_timestamp;
+ (yyval.type).type_str = mm_strdup("timestamp");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else if ((strcmp((yyvsp[-1].str), "string") == 0) && INFORMIX_MODE)
+ {
+ (yyval.type).type_enum = ECPGt_string;
+ (yyval.type).type_str = mm_strdup("char");
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = NULL;
+ }
+ else
+ {
+ /* this is for typedef'ed types */
+ struct typedefs *this = get_typedef((yyvsp[-1].str));
+
+ (yyval.type).type_str = (this->type->type_enum == ECPGt_varchar || this->type->type_enum == ECPGt_bytea) ? EMPTY : mm_strdup(this->name);
+ (yyval.type).type_enum = this->type->type_enum;
+ (yyval.type).type_dimension = this->type->type_dimension;
+ (yyval.type).type_index = this->type->type_index;
+ if (this->type->type_sizeof && strlen(this->type->type_sizeof) != 0)
+ (yyval.type).type_sizeof = this->type->type_sizeof;
+ else
+ (yyval.type).type_sizeof = cat_str(3, mm_strdup("sizeof("), mm_strdup(this->name), mm_strdup(")"));
+
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ }
+ }
+#line 62669 "preproc.c"
+ break;
+
+ case 3251: /* var_type: s_struct_union_symbol */
+#line 17602 "preproc.y"
+ {
+ /* this is for named structs/unions */
+ char *name;
+ struct typedefs *this;
+ bool forward = (forward_name != NULL && strcmp((yyvsp[0].struct_union).symbol, forward_name) == 0 && strcmp((yyvsp[0].struct_union).su, "struct") == 0);
+
+ name = cat2_str((yyvsp[0].struct_union).su, (yyvsp[0].struct_union).symbol);
+ /* Do we have a forward definition? */
+ if (!forward)
+ {
+ /* No */
+
+ this = get_typedef(name);
+ (yyval.type).type_str = mm_strdup(this->name);
+ (yyval.type).type_enum = this->type->type_enum;
+ (yyval.type).type_dimension = this->type->type_dimension;
+ (yyval.type).type_index = this->type->type_index;
+ (yyval.type).type_sizeof = this->type->type_sizeof;
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ free(name);
+ }
+ else
+ {
+ (yyval.type).type_str = name;
+ (yyval.type).type_enum = ECPGt_long;
+ (yyval.type).type_dimension = mm_strdup("-1");
+ (yyval.type).type_index = mm_strdup("-1");
+ (yyval.type).type_sizeof = mm_strdup("");
+ struct_member_list[struct_level] = NULL;
+ }
+ }
+#line 62705 "preproc.c"
+ break;
+
+ case 3252: /* enum_type: ENUM_P symbol enum_definition */
+#line 17636 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("enum"), (yyvsp[-1].str), (yyvsp[0].str)); }
+#line 62711 "preproc.c"
+ break;
+
+ case 3253: /* enum_type: ENUM_P enum_definition */
+#line 17638 "preproc.y"
+ { (yyval.str) = cat2_str(mm_strdup("enum"), (yyvsp[0].str)); }
+#line 62717 "preproc.c"
+ break;
+
+ case 3254: /* enum_type: ENUM_P symbol */
+#line 17640 "preproc.y"
+ { (yyval.str) = cat2_str(mm_strdup("enum"), (yyvsp[0].str)); }
+#line 62723 "preproc.c"
+ break;
+
+ case 3255: /* enum_definition: '{' c_list '}' */
+#line 17644 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}")); }
+#line 62729 "preproc.c"
+ break;
+
+ case 3256: /* $@7: %empty */
+#line 17647 "preproc.y"
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ forward_name = mm_strdup((yyvsp[0].struct_union).symbol);
+ }
+#line 62740 "preproc.c"
+ break;
+
+ case 3257: /* struct_union_type_with_symbol: s_struct_union_symbol $@7 '{' variable_declarations '}' */
+#line 17654 "preproc.y"
+ {
+ struct typedefs *ptr, *this;
+ struct this_type su_type;
+
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ if (strncmp((yyvsp[-4].struct_union).su, "struct", sizeof("struct")-1) == 0)
+ su_type.type_enum = ECPGt_struct;
+ else
+ su_type.type_enum = ECPGt_union;
+ su_type.type_str = cat2_str((yyvsp[-4].struct_union).su, (yyvsp[-4].struct_union).symbol);
+ free(forward_name);
+ forward_name = NULL;
+
+ /* This is essentially a typedef but needs the keyword struct/union as well.
+ * So we create the typedef for each struct definition with symbol */
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(su_type.type_str, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", su_type.type_str);
+ }
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = mm_strdup(su_type.type_str);
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = su_type.type_enum;
+ this->type->type_str = mm_strdup(su_type.type_str);
+ this->type->type_dimension = mm_strdup("-1"); /* dimension of array */
+ this->type->type_index = mm_strdup("-1"); /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = struct_member_list[struct_level];
+
+ types = this;
+ (yyval.str) = cat_str(4, su_type.type_str, mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}"));
+ }
+#line 62786 "preproc.c"
+ break;
+
+ case 3258: /* struct_union_type: struct_union_type_with_symbol */
+#line 17697 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62792 "preproc.c"
+ break;
+
+ case 3259: /* $@8: %empty */
+#line 17699 "preproc.y"
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ }
+#line 62802 "preproc.c"
+ break;
+
+ case 3260: /* struct_union_type: s_struct_union $@8 '{' variable_declarations '}' */
+#line 17705 "preproc.y"
+ {
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ (yyval.str) = cat_str(4, (yyvsp[-4].str), mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}"));
+ }
+#line 62813 "preproc.c"
+ break;
+
+ case 3261: /* s_struct_union_symbol: SQL_STRUCT symbol */
+#line 17714 "preproc.y"
+ {
+ (yyval.struct_union).su = mm_strdup("struct");
+ (yyval.struct_union).symbol = (yyvsp[0].str);
+ ECPGstruct_sizeof = cat_str(3, mm_strdup("sizeof("), cat2_str(mm_strdup((yyval.struct_union).su), mm_strdup((yyval.struct_union).symbol)), mm_strdup(")"));
+ }
+#line 62823 "preproc.c"
+ break;
+
+ case 3262: /* s_struct_union_symbol: UNION symbol */
+#line 17720 "preproc.y"
+ {
+ (yyval.struct_union).su = mm_strdup("union");
+ (yyval.struct_union).symbol = (yyvsp[0].str);
+ }
+#line 62832 "preproc.c"
+ break;
+
+ case 3263: /* s_struct_union: SQL_STRUCT */
+#line 17727 "preproc.y"
+ {
+ ECPGstruct_sizeof = mm_strdup(""); /* This must not be NULL to distinguish from simple types. */
+ (yyval.str) = mm_strdup("struct");
+ }
+#line 62841 "preproc.c"
+ break;
+
+ case 3264: /* s_struct_union: UNION */
+#line 17732 "preproc.y"
+ {
+ (yyval.str) = mm_strdup("union");
+ }
+#line 62849 "preproc.c"
+ break;
+
+ case 3265: /* simple_type: unsigned_type */
+#line 17737 "preproc.y"
+ { (yyval.type_enum)=(yyvsp[0].type_enum); }
+#line 62855 "preproc.c"
+ break;
+
+ case 3266: /* simple_type: opt_signed signed_type */
+#line 17738 "preproc.y"
+ { (yyval.type_enum)=(yyvsp[0].type_enum); }
+#line 62861 "preproc.c"
+ break;
+
+ case 3267: /* unsigned_type: SQL_UNSIGNED SQL_SHORT */
+#line 17741 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_short; }
+#line 62867 "preproc.c"
+ break;
+
+ case 3268: /* unsigned_type: SQL_UNSIGNED SQL_SHORT INT_P */
+#line 17742 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_short; }
+#line 62873 "preproc.c"
+ break;
+
+ case 3269: /* unsigned_type: SQL_UNSIGNED */
+#line 17743 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_int; }
+#line 62879 "preproc.c"
+ break;
+
+ case 3270: /* unsigned_type: SQL_UNSIGNED INT_P */
+#line 17744 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_int; }
+#line 62885 "preproc.c"
+ break;
+
+ case 3271: /* unsigned_type: SQL_UNSIGNED SQL_LONG */
+#line 17745 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_long; }
+#line 62891 "preproc.c"
+ break;
+
+ case 3272: /* unsigned_type: SQL_UNSIGNED SQL_LONG INT_P */
+#line 17746 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_long; }
+#line 62897 "preproc.c"
+ break;
+
+ case 3273: /* unsigned_type: SQL_UNSIGNED SQL_LONG SQL_LONG */
+#line 17747 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_long_long; }
+#line 62903 "preproc.c"
+ break;
+
+ case 3274: /* unsigned_type: SQL_UNSIGNED SQL_LONG SQL_LONG INT_P */
+#line 17748 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_long_long; }
+#line 62909 "preproc.c"
+ break;
+
+ case 3275: /* unsigned_type: SQL_UNSIGNED CHAR_P */
+#line 17749 "preproc.y"
+ { (yyval.type_enum) = ECPGt_unsigned_char; }
+#line 62915 "preproc.c"
+ break;
+
+ case 3276: /* signed_type: SQL_SHORT */
+#line 17752 "preproc.y"
+ { (yyval.type_enum) = ECPGt_short; }
+#line 62921 "preproc.c"
+ break;
+
+ case 3277: /* signed_type: SQL_SHORT INT_P */
+#line 17753 "preproc.y"
+ { (yyval.type_enum) = ECPGt_short; }
+#line 62927 "preproc.c"
+ break;
+
+ case 3278: /* signed_type: INT_P */
+#line 17754 "preproc.y"
+ { (yyval.type_enum) = ECPGt_int; }
+#line 62933 "preproc.c"
+ break;
+
+ case 3279: /* signed_type: SQL_LONG */
+#line 17755 "preproc.y"
+ { (yyval.type_enum) = ECPGt_long; }
+#line 62939 "preproc.c"
+ break;
+
+ case 3280: /* signed_type: SQL_LONG INT_P */
+#line 17756 "preproc.y"
+ { (yyval.type_enum) = ECPGt_long; }
+#line 62945 "preproc.c"
+ break;
+
+ case 3281: /* signed_type: SQL_LONG SQL_LONG */
+#line 17757 "preproc.y"
+ { (yyval.type_enum) = ECPGt_long_long; }
+#line 62951 "preproc.c"
+ break;
+
+ case 3282: /* signed_type: SQL_LONG SQL_LONG INT_P */
+#line 17758 "preproc.y"
+ { (yyval.type_enum) = ECPGt_long_long; }
+#line 62957 "preproc.c"
+ break;
+
+ case 3283: /* signed_type: SQL_BOOL */
+#line 17759 "preproc.y"
+ { (yyval.type_enum) = ECPGt_bool; }
+#line 62963 "preproc.c"
+ break;
+
+ case 3284: /* signed_type: CHAR_P */
+#line 17760 "preproc.y"
+ { (yyval.type_enum) = ECPGt_char; }
+#line 62969 "preproc.c"
+ break;
+
+ case 3285: /* signed_type: DOUBLE_P */
+#line 17761 "preproc.y"
+ { (yyval.type_enum) = ECPGt_double; }
+#line 62975 "preproc.c"
+ break;
+
+ case 3288: /* variable_list: variable */
+#line 17769 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 62981 "preproc.c"
+ break;
+
+ case 3289: /* variable_list: variable_list ',' variable */
+#line 17771 "preproc.y"
+ {
+ if (actual_type[struct_level].type_enum == ECPGt_varchar || actual_type[struct_level].type_enum == ECPGt_bytea)
+ (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(";"), (yyvsp[0].str));
+ else
+ (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str));
+ }
+#line 62992 "preproc.c"
+ break;
+
+ case 3290: /* variable: opt_pointer ECPGColLabel opt_array_bounds opt_bit_field opt_initializer */
+#line 17780 "preproc.y"
+ {
+ struct ECPGtype * type;
+ char *dimension = (yyvsp[-2].index).index1; /* dimension of array */
+ char *length = (yyvsp[-2].index).index2; /* length of string */
+ char *dim_str;
+ char *vcn;
+ int *varlen_type_counter;
+ char *struct_name;
+
+ adjust_array(actual_type[struct_level].type_enum, &dimension, &length, actual_type[struct_level].type_dimension, actual_type[struct_level].type_index, strlen((yyvsp[-4].str)), false);
+ switch (actual_type[struct_level].type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof), dimension);
+
+ (yyval.str) = cat_str(5, (yyvsp[-4].str), mm_strdup((yyvsp[-3].str)), (yyvsp[-2].index).str, (yyvsp[-1].str), (yyvsp[0].str));
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (actual_type[struct_level].type_enum == ECPGt_varchar)
+ {
+ varlen_type_counter = &varchar_counter;
+ struct_name = " struct varchar_";
+ }
+ else
+ {
+ varlen_type_counter = &bytea_counter;
+ struct_name = " struct bytea_";
+ }
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter), dimension);
+
+ if (strcmp(dimension, "0") == 0 || abs(atoi(dimension)) == 1)
+ dim_str=mm_strdup("");
+ else
+ dim_str=cat_str(3, mm_strdup("["), mm_strdup(dimension), mm_strdup("]"));
+ /* cannot check for atoi <= 0 because a defined constant will yield 0 here as well */
+ if (atoi(length) < 0 || strcmp(length, "0") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "pointers to varchar are not implemented");
+
+ /* make sure varchar struct name is unique by adding a unique counter to its definition */
+ vcn = (char *) mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ sprintf(vcn, "%d", *varlen_type_counter);
+ if (strcmp(dimension, "0") == 0)
+ (yyval.str) = cat_str(7, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } *"), mm_strdup((yyvsp[-3].str)), (yyvsp[-1].str), (yyvsp[0].str));
+ else
+ (yyval.str) = cat_str(8, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } "), mm_strdup((yyvsp[-3].str)), dim_str, (yyvsp[-1].str), (yyvsp[0].str));
+ (*varlen_type_counter)++;
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ {
+ int i = strlen((yyvsp[0].str));
+
+ if (atoi(length) == -1 && i > 0) /* char <var>[] = "string" */
+ {
+ /* if we have an initializer but no string size set, let's use the initializer's length */
+ free(length);
+ length = mm_alloc(i+sizeof("sizeof()"));
+ sprintf(length, "sizeof(%s)", (yyvsp[0].str)+2);
+ }
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0);
+ }
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0), dimension);
+
+ (yyval.str) = cat_str(5, (yyvsp[-4].str), mm_strdup((yyvsp[-3].str)), (yyvsp[-2].index).str, (yyvsp[-1].str), (yyvsp[0].str));
+ break;
+
+ default:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0), dimension);
+
+ (yyval.str) = cat_str(5, (yyvsp[-4].str), mm_strdup((yyvsp[-3].str)), (yyvsp[-2].index).str, (yyvsp[-1].str), (yyvsp[0].str));
+ break;
+ }
+
+ if (struct_level == 0)
+ new_variable((yyvsp[-3].str), type, braces_open);
+ else
+ ECPGmake_struct_member((yyvsp[-3].str), type, &(struct_member_list[struct_level - 1]));
+
+ free((yyvsp[-3].str));
+ }
+#line 63093 "preproc.c"
+ break;
+
+ case 3291: /* opt_initializer: %empty */
+#line 17879 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63099 "preproc.c"
+ break;
+
+ case 3292: /* opt_initializer: '=' c_term */
+#line 17881 "preproc.y"
+ {
+ initializer = 1;
+ (yyval.str) = cat2_str(mm_strdup("="), (yyvsp[0].str));
+ }
+#line 63108 "preproc.c"
+ break;
+
+ case 3293: /* opt_pointer: %empty */
+#line 17887 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63114 "preproc.c"
+ break;
+
+ case 3294: /* opt_pointer: '*' */
+#line 17888 "preproc.y"
+ { (yyval.str) = mm_strdup("*"); }
+#line 63120 "preproc.c"
+ break;
+
+ case 3295: /* opt_pointer: '*' '*' */
+#line 17889 "preproc.y"
+ { (yyval.str) = mm_strdup("**"); }
+#line 63126 "preproc.c"
+ break;
+
+ case 3296: /* ECPGDeclare: DECLARE STATEMENT ecpg_ident */
+#line 17896 "preproc.y"
+ {
+ /* this is only supported for compatibility */
+ (yyval.str) = cat_str(3, mm_strdup("/* declare statement"), (yyvsp[0].str), mm_strdup("*/"));
+ }
+#line 63135 "preproc.c"
+ break;
+
+ case 3297: /* ECPGDisconnect: SQL_DISCONNECT dis_name */
+#line 17904 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63141 "preproc.c"
+ break;
+
+ case 3298: /* dis_name: connection_object */
+#line 17907 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63147 "preproc.c"
+ break;
+
+ case 3299: /* dis_name: CURRENT_P */
+#line 17908 "preproc.y"
+ { (yyval.str) = mm_strdup("\"CURRENT\""); }
+#line 63153 "preproc.c"
+ break;
+
+ case 3300: /* dis_name: ALL */
+#line 17909 "preproc.y"
+ { (yyval.str) = mm_strdup("\"ALL\""); }
+#line 63159 "preproc.c"
+ break;
+
+ case 3301: /* dis_name: %empty */
+#line 17910 "preproc.y"
+ { (yyval.str) = mm_strdup("\"CURRENT\""); }
+#line 63165 "preproc.c"
+ break;
+
+ case 3302: /* connection_object: name */
+#line 17913 "preproc.y"
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 63171 "preproc.c"
+ break;
+
+ case 3303: /* connection_object: DEFAULT */
+#line 17914 "preproc.y"
+ { (yyval.str) = mm_strdup("\"DEFAULT\""); }
+#line 63177 "preproc.c"
+ break;
+
+ case 3304: /* connection_object: char_variable */
+#line 17915 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63183 "preproc.c"
+ break;
+
+ case 3305: /* execstring: char_variable */
+#line 17919 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63189 "preproc.c"
+ break;
+
+ case 3306: /* execstring: CSTRING */
+#line 17921 "preproc.y"
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 63195 "preproc.c"
+ break;
+
+ case 3307: /* ECPGFree: SQL_FREE cursor_name */
+#line 17928 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63201 "preproc.c"
+ break;
+
+ case 3308: /* ECPGFree: SQL_FREE ALL */
+#line 17929 "preproc.y"
+ { (yyval.str) = mm_strdup("all"); }
+#line 63207 "preproc.c"
+ break;
+
+ case 3309: /* ECPGOpen: SQL_OPEN cursor_name opt_ecpg_using */
+#line 17936 "preproc.y"
+ {
+ if ((yyvsp[-1].str)[0] == ':')
+ remove_variable_from_list(&argsinsert, find_variable((yyvsp[-1].str) + 1));
+ (yyval.str) = (yyvsp[-1].str);
+ }
+#line 63217 "preproc.c"
+ break;
+
+ case 3310: /* opt_ecpg_using: %empty */
+#line 17943 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63223 "preproc.c"
+ break;
+
+ case 3311: /* opt_ecpg_using: ecpg_using */
+#line 17944 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63229 "preproc.c"
+ break;
+
+ case 3312: /* ecpg_using: USING using_list */
+#line 17947 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63235 "preproc.c"
+ break;
+
+ case 3313: /* ecpg_using: using_descriptor */
+#line 17948 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63241 "preproc.c"
+ break;
+
+ case 3314: /* using_descriptor: USING SQL_P SQL_DESCRIPTOR quoted_ident_stringvar */
+#line 17952 "preproc.y"
+ {
+ add_variable_to_head(&argsinsert, descriptor_variable((yyvsp[0].str),0), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 63250 "preproc.c"
+ break;
+
+ case 3315: /* using_descriptor: USING SQL_DESCRIPTOR name */
+#line 17957 "preproc.y"
+ {
+ add_variable_to_head(&argsinsert, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 63259 "preproc.c"
+ break;
+
+ case 3316: /* into_descriptor: INTO SQL_P SQL_DESCRIPTOR quoted_ident_stringvar */
+#line 17964 "preproc.y"
+ {
+ add_variable_to_head(&argsresult, descriptor_variable((yyvsp[0].str),1), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 63268 "preproc.c"
+ break;
+
+ case 3317: /* into_descriptor: INTO SQL_DESCRIPTOR name */
+#line 17969 "preproc.y"
+ {
+ add_variable_to_head(&argsresult, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 63277 "preproc.c"
+ break;
+
+ case 3318: /* into_sqlda: INTO name */
+#line 17976 "preproc.y"
+ {
+ add_variable_to_head(&argsresult, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 63286 "preproc.c"
+ break;
+
+ case 3321: /* UsingValue: UsingConst */
+#line 17985 "preproc.y"
+ {
+ char *length = mm_alloc(32);
+
+ sprintf(length, "%zu", strlen((yyvsp[0].str)));
+ add_variable_to_head(&argsinsert, new_variable((yyvsp[0].str), ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+#line 63297 "preproc.c"
+ break;
+
+ case 3322: /* UsingValue: civar */
+#line 17991 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63303 "preproc.c"
+ break;
+
+ case 3323: /* UsingValue: civarind */
+#line 17992 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63309 "preproc.c"
+ break;
+
+ case 3324: /* UsingConst: Iconst */
+#line 17995 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63315 "preproc.c"
+ break;
+
+ case 3325: /* UsingConst: '+' Iconst */
+#line 17996 "preproc.y"
+ { (yyval.str) = cat_str(2, mm_strdup("+"), (yyvsp[0].str)); }
+#line 63321 "preproc.c"
+ break;
+
+ case 3326: /* UsingConst: '-' Iconst */
+#line 17997 "preproc.y"
+ { (yyval.str) = cat_str(2, mm_strdup("-"), (yyvsp[0].str)); }
+#line 63327 "preproc.c"
+ break;
+
+ case 3327: /* UsingConst: ecpg_fconst */
+#line 17998 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63333 "preproc.c"
+ break;
+
+ case 3328: /* UsingConst: '+' ecpg_fconst */
+#line 17999 "preproc.y"
+ { (yyval.str) = cat_str(2, mm_strdup("+"), (yyvsp[0].str)); }
+#line 63339 "preproc.c"
+ break;
+
+ case 3329: /* UsingConst: '-' ecpg_fconst */
+#line 18000 "preproc.y"
+ { (yyval.str) = cat_str(2, mm_strdup("-"), (yyvsp[0].str)); }
+#line 63345 "preproc.c"
+ break;
+
+ case 3330: /* UsingConst: ecpg_sconst */
+#line 18001 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63351 "preproc.c"
+ break;
+
+ case 3331: /* UsingConst: ecpg_bconst */
+#line 18002 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63357 "preproc.c"
+ break;
+
+ case 3332: /* UsingConst: ecpg_xconst */
+#line 18003 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63363 "preproc.c"
+ break;
+
+ case 3333: /* ECPGDescribe: SQL_DESCRIBE INPUT_P prepared_name using_descriptor */
+#line 18010 "preproc.y"
+ {
+ (yyval.describe).input = 1;
+ (yyval.describe).stmt_name = (yyvsp[-1].str);
+ }
+#line 63372 "preproc.c"
+ break;
+
+ case 3334: /* ECPGDescribe: SQL_DESCRIBE opt_output prepared_name using_descriptor */
+#line 18015 "preproc.y"
+ {
+ struct variable *var;
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ (yyval.describe).input = 0;
+ (yyval.describe).stmt_name = (yyvsp[-1].str);
+ }
+#line 63386 "preproc.c"
+ break;
+
+ case 3335: /* ECPGDescribe: SQL_DESCRIBE opt_output prepared_name into_descriptor */
+#line 18025 "preproc.y"
+ {
+ (yyval.describe).input = 0;
+ (yyval.describe).stmt_name = (yyvsp[-1].str);
+ }
+#line 63395 "preproc.c"
+ break;
+
+ case 3336: /* ECPGDescribe: SQL_DESCRIBE INPUT_P prepared_name into_sqlda */
+#line 18030 "preproc.y"
+ {
+ (yyval.describe).input = 1;
+ (yyval.describe).stmt_name = (yyvsp[-1].str);
+ }
+#line 63404 "preproc.c"
+ break;
+
+ case 3337: /* ECPGDescribe: SQL_DESCRIBE opt_output prepared_name into_sqlda */
+#line 18035 "preproc.y"
+ {
+ (yyval.describe).input = 0;
+ (yyval.describe).stmt_name = (yyvsp[-1].str);
+ }
+#line 63413 "preproc.c"
+ break;
+
+ case 3338: /* opt_output: SQL_OUTPUT */
+#line 18041 "preproc.y"
+ { (yyval.str) = mm_strdup("output"); }
+#line 63419 "preproc.c"
+ break;
+
+ case 3339: /* opt_output: %empty */
+#line 18042 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63425 "preproc.c"
+ break;
+
+ case 3340: /* ECPGAllocateDescr: SQL_ALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar */
+#line 18055 "preproc.y"
+ {
+ add_descriptor((yyvsp[0].str),connection);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63434 "preproc.c"
+ break;
+
+ case 3341: /* ECPGDeallocateDescr: DEALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar */
+#line 18066 "preproc.y"
+ {
+ drop_descriptor((yyvsp[0].str),connection);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63443 "preproc.c"
+ break;
+
+ case 3342: /* ECPGGetDescriptorHeader: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar ECPGGetDescHeaderItems */
+#line 18077 "preproc.y"
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 63449 "preproc.c"
+ break;
+
+ case 3345: /* ECPGGetDescHeaderItem: cvariable '=' desc_header_item */
+#line 18085 "preproc.y"
+ { push_assignment((yyvsp[-2].str), (yyvsp[0].dtype_enum)); }
+#line 63455 "preproc.c"
+ break;
+
+ case 3346: /* ECPGSetDescriptorHeader: SET SQL_DESCRIPTOR quoted_ident_stringvar ECPGSetDescHeaderItems */
+#line 18090 "preproc.y"
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 63461 "preproc.c"
+ break;
+
+ case 3349: /* ECPGSetDescHeaderItem: desc_header_item '=' IntConstVar */
+#line 18098 "preproc.y"
+ {
+ push_assignment((yyvsp[0].str), (yyvsp[-2].dtype_enum));
+ }
+#line 63469 "preproc.c"
+ break;
+
+ case 3350: /* IntConstVar: Iconst */
+#line 18104 "preproc.y"
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen((yyvsp[0].str)));
+ new_variable((yyvsp[0].str), ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63481 "preproc.c"
+ break;
+
+ case 3351: /* IntConstVar: cvariable */
+#line 18112 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63489 "preproc.c"
+ break;
+
+ case 3352: /* desc_header_item: SQL_COUNT */
+#line 18117 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_count; }
+#line 63495 "preproc.c"
+ break;
+
+ case 3353: /* ECPGGetDescriptor: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGGetDescItems */
+#line 18125 "preproc.y"
+ { (yyval.descriptor).str = (yyvsp[-1].str); (yyval.descriptor).name = (yyvsp[-3].str); }
+#line 63501 "preproc.c"
+ break;
+
+ case 3356: /* ECPGGetDescItem: cvariable '=' descriptor_item */
+#line 18132 "preproc.y"
+ { push_assignment((yyvsp[-2].str), (yyvsp[0].dtype_enum)); }
+#line 63507 "preproc.c"
+ break;
+
+ case 3357: /* ECPGSetDescriptor: SET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGSetDescItems */
+#line 18136 "preproc.y"
+ { (yyval.descriptor).str = (yyvsp[-1].str); (yyval.descriptor).name = (yyvsp[-3].str); }
+#line 63513 "preproc.c"
+ break;
+
+ case 3360: /* ECPGSetDescItem: descriptor_item '=' AllConstVar */
+#line 18144 "preproc.y"
+ {
+ push_assignment((yyvsp[0].str), (yyvsp[-2].dtype_enum));
+ }
+#line 63521 "preproc.c"
+ break;
+
+ case 3361: /* AllConstVar: ecpg_fconst */
+#line 18150 "preproc.y"
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen((yyvsp[0].str)));
+ new_variable((yyvsp[0].str), ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63533 "preproc.c"
+ break;
+
+ case 3362: /* AllConstVar: IntConstVar */
+#line 18159 "preproc.y"
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 63541 "preproc.c"
+ break;
+
+ case 3363: /* AllConstVar: '-' ecpg_fconst */
+#line 18164 "preproc.y"
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), (yyvsp[0].str));
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ (yyval.str) = var;
+ }
+#line 63554 "preproc.c"
+ break;
+
+ case 3364: /* AllConstVar: '-' Iconst */
+#line 18174 "preproc.y"
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), (yyvsp[0].str));
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ (yyval.str) = var;
+ }
+#line 63567 "preproc.c"
+ break;
+
+ case 3365: /* AllConstVar: ecpg_sconst */
+#line 18184 "preproc.y"
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = (yyvsp[0].str) + 1;
+
+ var[strlen(var) - 1] = '\0';
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ (yyval.str) = var;
+ }
+#line 63581 "preproc.c"
+ break;
+
+ case 3366: /* descriptor_item: SQL_CARDINALITY */
+#line 18195 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_cardinality; }
+#line 63587 "preproc.c"
+ break;
+
+ case 3367: /* descriptor_item: DATA_P */
+#line 18196 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_data; }
+#line 63593 "preproc.c"
+ break;
+
+ case 3368: /* descriptor_item: SQL_DATETIME_INTERVAL_CODE */
+#line 18197 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_di_code; }
+#line 63599 "preproc.c"
+ break;
+
+ case 3369: /* descriptor_item: SQL_DATETIME_INTERVAL_PRECISION */
+#line 18198 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_di_precision; }
+#line 63605 "preproc.c"
+ break;
+
+ case 3370: /* descriptor_item: SQL_INDICATOR */
+#line 18199 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_indicator; }
+#line 63611 "preproc.c"
+ break;
+
+ case 3371: /* descriptor_item: SQL_KEY_MEMBER */
+#line 18200 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_key_member; }
+#line 63617 "preproc.c"
+ break;
+
+ case 3372: /* descriptor_item: SQL_LENGTH */
+#line 18201 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_length; }
+#line 63623 "preproc.c"
+ break;
+
+ case 3373: /* descriptor_item: NAME_P */
+#line 18202 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_name; }
+#line 63629 "preproc.c"
+ break;
+
+ case 3374: /* descriptor_item: SQL_NULLABLE */
+#line 18203 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_nullable; }
+#line 63635 "preproc.c"
+ break;
+
+ case 3375: /* descriptor_item: SQL_OCTET_LENGTH */
+#line 18204 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_octet; }
+#line 63641 "preproc.c"
+ break;
+
+ case 3376: /* descriptor_item: PRECISION */
+#line 18205 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_precision; }
+#line 63647 "preproc.c"
+ break;
+
+ case 3377: /* descriptor_item: SQL_RETURNED_LENGTH */
+#line 18206 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_length; }
+#line 63653 "preproc.c"
+ break;
+
+ case 3378: /* descriptor_item: SQL_RETURNED_OCTET_LENGTH */
+#line 18207 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_ret_octet; }
+#line 63659 "preproc.c"
+ break;
+
+ case 3379: /* descriptor_item: SQL_SCALE */
+#line 18208 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_scale; }
+#line 63665 "preproc.c"
+ break;
+
+ case 3380: /* descriptor_item: TYPE_P */
+#line 18209 "preproc.y"
+ { (yyval.dtype_enum) = ECPGd_type; }
+#line 63671 "preproc.c"
+ break;
+
+ case 3381: /* ECPGSetAutocommit: SET SQL_AUTOCOMMIT '=' on_off */
+#line 18216 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63677 "preproc.c"
+ break;
+
+ case 3382: /* ECPGSetAutocommit: SET SQL_AUTOCOMMIT TO on_off */
+#line 18217 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63683 "preproc.c"
+ break;
+
+ case 3383: /* on_off: ON */
+#line 18220 "preproc.y"
+ { (yyval.str) = mm_strdup("on"); }
+#line 63689 "preproc.c"
+ break;
+
+ case 3384: /* on_off: OFF */
+#line 18221 "preproc.y"
+ { (yyval.str) = mm_strdup("off"); }
+#line 63695 "preproc.c"
+ break;
+
+ case 3385: /* ECPGSetConnection: SET CONNECTION TO connection_object */
+#line 18228 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63701 "preproc.c"
+ break;
+
+ case 3386: /* ECPGSetConnection: SET CONNECTION '=' connection_object */
+#line 18229 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63707 "preproc.c"
+ break;
+
+ case 3387: /* ECPGSetConnection: SET CONNECTION connection_object */
+#line 18230 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63713 "preproc.c"
+ break;
+
+ case 3388: /* $@9: %empty */
+#line 18237 "preproc.y"
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 63723 "preproc.c"
+ break;
+
+ case 3389: /* ECPGTypedef: TYPE_P $@9 ECPGColLabelCommon IS var_type opt_array_bounds opt_reference */
+#line 18243 "preproc.y"
+ {
+ add_typedef((yyvsp[-4].str), (yyvsp[-1].index).index1, (yyvsp[-1].index).index2, (yyvsp[-2].type).type_enum, (yyvsp[-2].type).type_dimension, (yyvsp[-2].type).type_index, initializer, *(yyvsp[0].str) ? 1 : 0);
+
+ if (auto_create_c == false)
+ (yyval.str) = cat_str(7, mm_strdup("/* exec sql type"), mm_strdup((yyvsp[-4].str)), mm_strdup("is"), mm_strdup((yyvsp[-2].type).type_str), mm_strdup((yyvsp[-1].index).str), (yyvsp[0].str), mm_strdup("*/"));
+ else
+ (yyval.str) = cat_str(6, mm_strdup("typedef "), mm_strdup((yyvsp[-2].type).type_str), *(yyvsp[0].str)?mm_strdup("*"):mm_strdup(""), mm_strdup((yyvsp[-4].str)), mm_strdup((yyvsp[-1].index).str), mm_strdup(";"));
+ }
+#line 63736 "preproc.c"
+ break;
+
+ case 3390: /* opt_reference: SQL_REFERENCE */
+#line 18253 "preproc.y"
+ { (yyval.str) = mm_strdup("reference"); }
+#line 63742 "preproc.c"
+ break;
+
+ case 3391: /* opt_reference: %empty */
+#line 18254 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 63748 "preproc.c"
+ break;
+
+ case 3392: /* $@10: %empty */
+#line 18261 "preproc.y"
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 63758 "preproc.c"
+ break;
+
+ case 3393: /* ECPGVar: SQL_VAR $@10 ColLabel IS var_type opt_array_bounds opt_reference */
+#line 18267 "preproc.y"
+ {
+ struct variable *p = find_variable((yyvsp[-4].str));
+ char *dimension = (yyvsp[-1].index).index1;
+ char *length = (yyvsp[-1].index).index2;
+ struct ECPGtype * type;
+
+ if (((yyvsp[-2].type).type_enum == ECPGt_struct ||
+ (yyvsp[-2].type).type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in EXEC SQL VAR command");
+ else
+ {
+ adjust_array((yyvsp[-2].type).type_enum, &dimension, &length, (yyvsp[-2].type).type_dimension, (yyvsp[-2].type).type_index, *(yyvsp[0].str)?1:0, false);
+
+ switch ((yyvsp[-2].type).type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], (yyvsp[-2].type).type_enum, (yyvsp[-2].type).type_str, (yyvsp[-2].type).type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], (yyvsp[-2].type).type_enum, (yyvsp[-2].type).type_str, (yyvsp[-2].type).type_sizeof), dimension);
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type((yyvsp[-2].type).type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type((yyvsp[-2].type).type_enum, length, 0), dimension);
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type((yyvsp[-2].type).type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type((yyvsp[-2].type).type_enum, length, 0), dimension);
+ break;
+
+ default:
+ if (atoi(length) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type((yyvsp[-2].type).type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type((yyvsp[-2].type).type_enum, mm_strdup("1"), 0), dimension);
+ break;
+ }
+
+ ECPGfree_type(p->type);
+ p->type = type;
+ }
+
+ (yyval.str) = cat_str(7, mm_strdup("/* exec sql var"), mm_strdup((yyvsp[-4].str)), mm_strdup("is"), mm_strdup((yyvsp[-2].type).type_str), mm_strdup((yyvsp[-1].index).str), (yyvsp[0].str), mm_strdup("*/"));
+ }
+#line 63821 "preproc.c"
+ break;
+
+ case 3394: /* ECPGWhenever: SQL_WHENEVER SQL_SQLERROR action */
+#line 18332 "preproc.y"
+ {
+ when_error.code = (yyvsp[0].action).code;
+ when_error.command = (yyvsp[0].action).command;
+ (yyval.str) = cat_str(3, mm_strdup("/* exec sql whenever sqlerror "), (yyvsp[0].action).str, mm_strdup("; */"));
+ }
+#line 63831 "preproc.c"
+ break;
+
+ case 3395: /* ECPGWhenever: SQL_WHENEVER NOT SQL_FOUND action */
+#line 18338 "preproc.y"
+ {
+ when_nf.code = (yyvsp[0].action).code;
+ when_nf.command = (yyvsp[0].action).command;
+ (yyval.str) = cat_str(3, mm_strdup("/* exec sql whenever not found "), (yyvsp[0].action).str, mm_strdup("; */"));
+ }
+#line 63841 "preproc.c"
+ break;
+
+ case 3396: /* ECPGWhenever: SQL_WHENEVER SQL_SQLWARNING action */
+#line 18344 "preproc.y"
+ {
+ when_warn.code = (yyvsp[0].action).code;
+ when_warn.command = (yyvsp[0].action).command;
+ (yyval.str) = cat_str(3, mm_strdup("/* exec sql whenever sql_warning "), (yyvsp[0].action).str, mm_strdup("; */"));
+ }
+#line 63851 "preproc.c"
+ break;
+
+ case 3397: /* action: CONTINUE_P */
+#line 18352 "preproc.y"
+ {
+ (yyval.action).code = W_NOTHING;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("continue");
+ }
+#line 63861 "preproc.c"
+ break;
+
+ case 3398: /* action: SQL_SQLPRINT */
+#line 18358 "preproc.y"
+ {
+ (yyval.action).code = W_SQLPRINT;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("sqlprint");
+ }
+#line 63871 "preproc.c"
+ break;
+
+ case 3399: /* action: SQL_STOP */
+#line 18364 "preproc.y"
+ {
+ (yyval.action).code = W_STOP;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("stop");
+ }
+#line 63881 "preproc.c"
+ break;
+
+ case 3400: /* action: SQL_GOTO name */
+#line 18370 "preproc.y"
+ {
+ (yyval.action).code = W_GOTO;
+ (yyval.action).command = mm_strdup((yyvsp[0].str));
+ (yyval.action).str = cat2_str(mm_strdup("goto "), (yyvsp[0].str));
+ }
+#line 63891 "preproc.c"
+ break;
+
+ case 3401: /* action: SQL_GO TO name */
+#line 18376 "preproc.y"
+ {
+ (yyval.action).code = W_GOTO;
+ (yyval.action).command = mm_strdup((yyvsp[0].str));
+ (yyval.action).str = cat2_str(mm_strdup("goto "), (yyvsp[0].str));
+ }
+#line 63901 "preproc.c"
+ break;
+
+ case 3402: /* action: DO name '(' c_args ')' */
+#line 18382 "preproc.y"
+ {
+ (yyval.action).code = W_DO;
+ (yyval.action).command = cat_str(4, (yyvsp[-3].str), mm_strdup("("), (yyvsp[-1].str), mm_strdup(")"));
+ (yyval.action).str = cat2_str(mm_strdup("do"), mm_strdup((yyval.action).command));
+ }
+#line 63911 "preproc.c"
+ break;
+
+ case 3403: /* action: DO SQL_BREAK */
+#line 18388 "preproc.y"
+ {
+ (yyval.action).code = W_BREAK;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("break");
+ }
+#line 63921 "preproc.c"
+ break;
+
+ case 3404: /* action: DO CONTINUE_P */
+#line 18394 "preproc.y"
+ {
+ (yyval.action).code = W_CONTINUE;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("continue");
+ }
+#line 63931 "preproc.c"
+ break;
+
+ case 3405: /* action: CALL name '(' c_args ')' */
+#line 18400 "preproc.y"
+ {
+ (yyval.action).code = W_DO;
+ (yyval.action).command = cat_str(4, (yyvsp[-3].str), mm_strdup("("), (yyvsp[-1].str), mm_strdup(")"));
+ (yyval.action).str = cat2_str(mm_strdup("call"), mm_strdup((yyval.action).command));
+ }
+#line 63941 "preproc.c"
+ break;
+
+ case 3406: /* action: CALL name */
+#line 18406 "preproc.y"
+ {
+ (yyval.action).code = W_DO;
+ (yyval.action).command = cat2_str((yyvsp[0].str), mm_strdup("()"));
+ (yyval.action).str = cat2_str(mm_strdup("call"), mm_strdup((yyval.action).command));
+ }
+#line 63951 "preproc.c"
+ break;
+
+ case 3407: /* ECPGKeywords: ECPGKeywords_vanames */
+#line 18416 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63957 "preproc.c"
+ break;
+
+ case 3408: /* ECPGKeywords: ECPGKeywords_rest */
+#line 18417 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 63963 "preproc.c"
+ break;
+
+ case 3409: /* ECPGKeywords_vanames: SQL_BREAK */
+#line 18420 "preproc.y"
+ { (yyval.str) = mm_strdup("break"); }
+#line 63969 "preproc.c"
+ break;
+
+ case 3410: /* ECPGKeywords_vanames: SQL_CARDINALITY */
+#line 18421 "preproc.y"
+ { (yyval.str) = mm_strdup("cardinality"); }
+#line 63975 "preproc.c"
+ break;
+
+ case 3411: /* ECPGKeywords_vanames: SQL_COUNT */
+#line 18422 "preproc.y"
+ { (yyval.str) = mm_strdup("count"); }
+#line 63981 "preproc.c"
+ break;
+
+ case 3412: /* ECPGKeywords_vanames: SQL_DATETIME_INTERVAL_CODE */
+#line 18423 "preproc.y"
+ { (yyval.str) = mm_strdup("datetime_interval_code"); }
+#line 63987 "preproc.c"
+ break;
+
+ case 3413: /* ECPGKeywords_vanames: SQL_DATETIME_INTERVAL_PRECISION */
+#line 18424 "preproc.y"
+ { (yyval.str) = mm_strdup("datetime_interval_precision"); }
+#line 63993 "preproc.c"
+ break;
+
+ case 3414: /* ECPGKeywords_vanames: SQL_FOUND */
+#line 18425 "preproc.y"
+ { (yyval.str) = mm_strdup("found"); }
+#line 63999 "preproc.c"
+ break;
+
+ case 3415: /* ECPGKeywords_vanames: SQL_GO */
+#line 18426 "preproc.y"
+ { (yyval.str) = mm_strdup("go"); }
+#line 64005 "preproc.c"
+ break;
+
+ case 3416: /* ECPGKeywords_vanames: SQL_GOTO */
+#line 18427 "preproc.y"
+ { (yyval.str) = mm_strdup("goto"); }
+#line 64011 "preproc.c"
+ break;
+
+ case 3417: /* ECPGKeywords_vanames: SQL_IDENTIFIED */
+#line 18428 "preproc.y"
+ { (yyval.str) = mm_strdup("identified"); }
+#line 64017 "preproc.c"
+ break;
+
+ case 3418: /* ECPGKeywords_vanames: SQL_INDICATOR */
+#line 18429 "preproc.y"
+ { (yyval.str) = mm_strdup("indicator"); }
+#line 64023 "preproc.c"
+ break;
+
+ case 3419: /* ECPGKeywords_vanames: SQL_KEY_MEMBER */
+#line 18430 "preproc.y"
+ { (yyval.str) = mm_strdup("key_member"); }
+#line 64029 "preproc.c"
+ break;
+
+ case 3420: /* ECPGKeywords_vanames: SQL_LENGTH */
+#line 18431 "preproc.y"
+ { (yyval.str) = mm_strdup("length"); }
+#line 64035 "preproc.c"
+ break;
+
+ case 3421: /* ECPGKeywords_vanames: SQL_NULLABLE */
+#line 18432 "preproc.y"
+ { (yyval.str) = mm_strdup("nullable"); }
+#line 64041 "preproc.c"
+ break;
+
+ case 3422: /* ECPGKeywords_vanames: SQL_OCTET_LENGTH */
+#line 18433 "preproc.y"
+ { (yyval.str) = mm_strdup("octet_length"); }
+#line 64047 "preproc.c"
+ break;
+
+ case 3423: /* ECPGKeywords_vanames: SQL_RETURNED_LENGTH */
+#line 18434 "preproc.y"
+ { (yyval.str) = mm_strdup("returned_length"); }
+#line 64053 "preproc.c"
+ break;
+
+ case 3424: /* ECPGKeywords_vanames: SQL_RETURNED_OCTET_LENGTH */
+#line 18435 "preproc.y"
+ { (yyval.str) = mm_strdup("returned_octet_length"); }
+#line 64059 "preproc.c"
+ break;
+
+ case 3425: /* ECPGKeywords_vanames: SQL_SCALE */
+#line 18436 "preproc.y"
+ { (yyval.str) = mm_strdup("scale"); }
+#line 64065 "preproc.c"
+ break;
+
+ case 3426: /* ECPGKeywords_vanames: SQL_SECTION */
+#line 18437 "preproc.y"
+ { (yyval.str) = mm_strdup("section"); }
+#line 64071 "preproc.c"
+ break;
+
+ case 3427: /* ECPGKeywords_vanames: SQL_SQLERROR */
+#line 18438 "preproc.y"
+ { (yyval.str) = mm_strdup("sqlerror"); }
+#line 64077 "preproc.c"
+ break;
+
+ case 3428: /* ECPGKeywords_vanames: SQL_SQLPRINT */
+#line 18439 "preproc.y"
+ { (yyval.str) = mm_strdup("sqlprint"); }
+#line 64083 "preproc.c"
+ break;
+
+ case 3429: /* ECPGKeywords_vanames: SQL_SQLWARNING */
+#line 18440 "preproc.y"
+ { (yyval.str) = mm_strdup("sqlwarning"); }
+#line 64089 "preproc.c"
+ break;
+
+ case 3430: /* ECPGKeywords_vanames: SQL_STOP */
+#line 18441 "preproc.y"
+ { (yyval.str) = mm_strdup("stop"); }
+#line 64095 "preproc.c"
+ break;
+
+ case 3431: /* ECPGKeywords_rest: SQL_CONNECT */
+#line 18444 "preproc.y"
+ { (yyval.str) = mm_strdup("connect"); }
+#line 64101 "preproc.c"
+ break;
+
+ case 3432: /* ECPGKeywords_rest: SQL_DESCRIBE */
+#line 18445 "preproc.y"
+ { (yyval.str) = mm_strdup("describe"); }
+#line 64107 "preproc.c"
+ break;
+
+ case 3433: /* ECPGKeywords_rest: SQL_DISCONNECT */
+#line 18446 "preproc.y"
+ { (yyval.str) = mm_strdup("disconnect"); }
+#line 64113 "preproc.c"
+ break;
+
+ case 3434: /* ECPGKeywords_rest: SQL_OPEN */
+#line 18447 "preproc.y"
+ { (yyval.str) = mm_strdup("open"); }
+#line 64119 "preproc.c"
+ break;
+
+ case 3435: /* ECPGKeywords_rest: SQL_VAR */
+#line 18448 "preproc.y"
+ { (yyval.str) = mm_strdup("var"); }
+#line 64125 "preproc.c"
+ break;
+
+ case 3436: /* ECPGKeywords_rest: SQL_WHENEVER */
+#line 18449 "preproc.y"
+ { (yyval.str) = mm_strdup("whenever"); }
+#line 64131 "preproc.c"
+ break;
+
+ case 3437: /* ECPGTypeName: SQL_BOOL */
+#line 18453 "preproc.y"
+ { (yyval.str) = mm_strdup("bool"); }
+#line 64137 "preproc.c"
+ break;
+
+ case 3438: /* ECPGTypeName: SQL_LONG */
+#line 18454 "preproc.y"
+ { (yyval.str) = mm_strdup("long"); }
+#line 64143 "preproc.c"
+ break;
+
+ case 3439: /* ECPGTypeName: SQL_OUTPUT */
+#line 18455 "preproc.y"
+ { (yyval.str) = mm_strdup("output"); }
+#line 64149 "preproc.c"
+ break;
+
+ case 3440: /* ECPGTypeName: SQL_SHORT */
+#line 18456 "preproc.y"
+ { (yyval.str) = mm_strdup("short"); }
+#line 64155 "preproc.c"
+ break;
+
+ case 3441: /* ECPGTypeName: SQL_STRUCT */
+#line 18457 "preproc.y"
+ { (yyval.str) = mm_strdup("struct"); }
+#line 64161 "preproc.c"
+ break;
+
+ case 3442: /* ECPGTypeName: SQL_SIGNED */
+#line 18458 "preproc.y"
+ { (yyval.str) = mm_strdup("signed"); }
+#line 64167 "preproc.c"
+ break;
+
+ case 3443: /* ECPGTypeName: SQL_UNSIGNED */
+#line 18459 "preproc.y"
+ { (yyval.str) = mm_strdup("unsigned"); }
+#line 64173 "preproc.c"
+ break;
+
+ case 3444: /* symbol: ColLabel */
+#line 18462 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64179 "preproc.c"
+ break;
+
+ case 3445: /* ECPGColId: ecpg_ident */
+#line 18465 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64185 "preproc.c"
+ break;
+
+ case 3446: /* ECPGColId: unreserved_keyword */
+#line 18466 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64191 "preproc.c"
+ break;
+
+ case 3447: /* ECPGColId: col_name_keyword */
+#line 18467 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64197 "preproc.c"
+ break;
+
+ case 3448: /* ECPGColId: ECPGunreserved_interval */
+#line 18468 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64203 "preproc.c"
+ break;
+
+ case 3449: /* ECPGColId: ECPGKeywords */
+#line 18469 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64209 "preproc.c"
+ break;
+
+ case 3450: /* ECPGColId: ECPGCKeywords */
+#line 18470 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64215 "preproc.c"
+ break;
+
+ case 3451: /* ECPGColId: CHAR_P */
+#line 18471 "preproc.y"
+ { (yyval.str) = mm_strdup("char"); }
+#line 64221 "preproc.c"
+ break;
+
+ case 3452: /* ECPGColId: VALUES */
+#line 18472 "preproc.y"
+ { (yyval.str) = mm_strdup("values"); }
+#line 64227 "preproc.c"
+ break;
+
+ case 3453: /* ColId: ecpg_ident */
+#line 18485 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64233 "preproc.c"
+ break;
+
+ case 3454: /* ColId: all_unreserved_keyword */
+#line 18486 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64239 "preproc.c"
+ break;
+
+ case 3455: /* ColId: col_name_keyword */
+#line 18487 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64245 "preproc.c"
+ break;
+
+ case 3456: /* ColId: ECPGKeywords */
+#line 18488 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64251 "preproc.c"
+ break;
+
+ case 3457: /* ColId: ECPGCKeywords */
+#line 18489 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64257 "preproc.c"
+ break;
+
+ case 3458: /* ColId: CHAR_P */
+#line 18490 "preproc.y"
+ { (yyval.str) = mm_strdup("char"); }
+#line 64263 "preproc.c"
+ break;
+
+ case 3459: /* ColId: VALUES */
+#line 18491 "preproc.y"
+ { (yyval.str) = mm_strdup("values"); }
+#line 64269 "preproc.c"
+ break;
+
+ case 3460: /* type_function_name: ecpg_ident */
+#line 18496 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64275 "preproc.c"
+ break;
+
+ case 3461: /* type_function_name: all_unreserved_keyword */
+#line 18497 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64281 "preproc.c"
+ break;
+
+ case 3462: /* type_function_name: type_func_name_keyword */
+#line 18498 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64287 "preproc.c"
+ break;
+
+ case 3463: /* type_function_name: ECPGKeywords */
+#line 18499 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64293 "preproc.c"
+ break;
+
+ case 3464: /* type_function_name: ECPGCKeywords */
+#line 18500 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64299 "preproc.c"
+ break;
+
+ case 3465: /* type_function_name: ECPGTypeName */
+#line 18501 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64305 "preproc.c"
+ break;
+
+ case 3466: /* ColLabel: ECPGColLabel */
+#line 18507 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64311 "preproc.c"
+ break;
+
+ case 3467: /* ColLabel: ECPGTypeName */
+#line 18508 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64317 "preproc.c"
+ break;
+
+ case 3468: /* ColLabel: CHAR_P */
+#line 18509 "preproc.y"
+ { (yyval.str) = mm_strdup("char"); }
+#line 64323 "preproc.c"
+ break;
+
+ case 3469: /* ColLabel: CURRENT_P */
+#line 18510 "preproc.y"
+ { (yyval.str) = mm_strdup("current"); }
+#line 64329 "preproc.c"
+ break;
+
+ case 3470: /* ColLabel: INPUT_P */
+#line 18511 "preproc.y"
+ { (yyval.str) = mm_strdup("input"); }
+#line 64335 "preproc.c"
+ break;
+
+ case 3471: /* ColLabel: INT_P */
+#line 18512 "preproc.y"
+ { (yyval.str) = mm_strdup("int"); }
+#line 64341 "preproc.c"
+ break;
+
+ case 3472: /* ColLabel: TO */
+#line 18513 "preproc.y"
+ { (yyval.str) = mm_strdup("to"); }
+#line 64347 "preproc.c"
+ break;
+
+ case 3473: /* ColLabel: UNION */
+#line 18514 "preproc.y"
+ { (yyval.str) = mm_strdup("union"); }
+#line 64353 "preproc.c"
+ break;
+
+ case 3474: /* ColLabel: VALUES */
+#line 18515 "preproc.y"
+ { (yyval.str) = mm_strdup("values"); }
+#line 64359 "preproc.c"
+ break;
+
+ case 3475: /* ColLabel: ECPGCKeywords */
+#line 18516 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64365 "preproc.c"
+ break;
+
+ case 3476: /* ColLabel: ECPGunreserved_interval */
+#line 18517 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64371 "preproc.c"
+ break;
+
+ case 3477: /* ECPGColLabel: ECPGColLabelCommon */
+#line 18520 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64377 "preproc.c"
+ break;
+
+ case 3478: /* ECPGColLabel: unreserved_keyword */
+#line 18521 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64383 "preproc.c"
+ break;
+
+ case 3479: /* ECPGColLabel: reserved_keyword */
+#line 18522 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64389 "preproc.c"
+ break;
+
+ case 3480: /* ECPGColLabel: ECPGKeywords_rest */
+#line 18523 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64395 "preproc.c"
+ break;
+
+ case 3481: /* ECPGColLabel: CONNECTION */
+#line 18524 "preproc.y"
+ { (yyval.str) = mm_strdup("connection"); }
+#line 64401 "preproc.c"
+ break;
+
+ case 3482: /* ECPGColLabelCommon: ecpg_ident */
+#line 18527 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64407 "preproc.c"
+ break;
+
+ case 3483: /* ECPGColLabelCommon: col_name_keyword */
+#line 18528 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64413 "preproc.c"
+ break;
+
+ case 3484: /* ECPGColLabelCommon: type_func_name_keyword */
+#line 18529 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64419 "preproc.c"
+ break;
+
+ case 3485: /* ECPGColLabelCommon: ECPGKeywords_vanames */
+#line 18530 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64425 "preproc.c"
+ break;
+
+ case 3486: /* ECPGCKeywords: S_AUTO */
+#line 18533 "preproc.y"
+ { (yyval.str) = mm_strdup("auto"); }
+#line 64431 "preproc.c"
+ break;
+
+ case 3487: /* ECPGCKeywords: S_CONST */
+#line 18534 "preproc.y"
+ { (yyval.str) = mm_strdup("const"); }
+#line 64437 "preproc.c"
+ break;
+
+ case 3488: /* ECPGCKeywords: S_EXTERN */
+#line 18535 "preproc.y"
+ { (yyval.str) = mm_strdup("extern"); }
+#line 64443 "preproc.c"
+ break;
+
+ case 3489: /* ECPGCKeywords: S_REGISTER */
+#line 18536 "preproc.y"
+ { (yyval.str) = mm_strdup("register"); }
+#line 64449 "preproc.c"
+ break;
+
+ case 3490: /* ECPGCKeywords: S_STATIC */
+#line 18537 "preproc.y"
+ { (yyval.str) = mm_strdup("static"); }
+#line 64455 "preproc.c"
+ break;
+
+ case 3491: /* ECPGCKeywords: S_TYPEDEF */
+#line 18538 "preproc.y"
+ { (yyval.str) = mm_strdup("typedef"); }
+#line 64461 "preproc.c"
+ break;
+
+ case 3492: /* ECPGCKeywords: S_VOLATILE */
+#line 18539 "preproc.y"
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 64467 "preproc.c"
+ break;
+
+ case 3493: /* all_unreserved_keyword: unreserved_keyword */
+#line 18556 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64473 "preproc.c"
+ break;
+
+ case 3494: /* all_unreserved_keyword: ECPGunreserved_interval */
+#line 18557 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64479 "preproc.c"
+ break;
+
+ case 3495: /* all_unreserved_keyword: CONNECTION */
+#line 18558 "preproc.y"
+ { (yyval.str) = mm_strdup("connection"); }
+#line 64485 "preproc.c"
+ break;
+
+ case 3496: /* ECPGunreserved_interval: DAY_P */
+#line 18561 "preproc.y"
+ { (yyval.str) = mm_strdup("day"); }
+#line 64491 "preproc.c"
+ break;
+
+ case 3497: /* ECPGunreserved_interval: HOUR_P */
+#line 18562 "preproc.y"
+ { (yyval.str) = mm_strdup("hour"); }
+#line 64497 "preproc.c"
+ break;
+
+ case 3498: /* ECPGunreserved_interval: MINUTE_P */
+#line 18563 "preproc.y"
+ { (yyval.str) = mm_strdup("minute"); }
+#line 64503 "preproc.c"
+ break;
+
+ case 3499: /* ECPGunreserved_interval: MONTH_P */
+#line 18564 "preproc.y"
+ { (yyval.str) = mm_strdup("month"); }
+#line 64509 "preproc.c"
+ break;
+
+ case 3500: /* ECPGunreserved_interval: SECOND_P */
+#line 18565 "preproc.y"
+ { (yyval.str) = mm_strdup("second"); }
+#line 64515 "preproc.c"
+ break;
+
+ case 3501: /* ECPGunreserved_interval: YEAR_P */
+#line 18566 "preproc.y"
+ { (yyval.str) = mm_strdup("year"); }
+#line 64521 "preproc.c"
+ break;
+
+ case 3504: /* ecpgstart: SQL_START */
+#line 18573 "preproc.y"
+ {
+ reset_variables();
+ pacounter = 1;
+ }
+#line 64530 "preproc.c"
+ break;
+
+ case 3505: /* c_args: %empty */
+#line 18579 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 64536 "preproc.c"
+ break;
+
+ case 3506: /* c_args: c_list */
+#line 18580 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64542 "preproc.c"
+ break;
+
+ case 3507: /* coutputvariable: cvariable indicator */
+#line 18584 "preproc.y"
+ { add_variable_to_head(&argsresult, find_variable((yyvsp[-1].str)), find_variable((yyvsp[0].str))); }
+#line 64548 "preproc.c"
+ break;
+
+ case 3508: /* coutputvariable: cvariable */
+#line 18586 "preproc.y"
+ { add_variable_to_head(&argsresult, find_variable((yyvsp[0].str)), &no_indicator); }
+#line 64554 "preproc.c"
+ break;
+
+ case 3509: /* civarind: cvariable indicator */
+#line 18591 "preproc.y"
+ {
+ if (find_variable((yyvsp[0].str))->type->type == ECPGt_array)
+ mmerror(PARSE_ERROR, ET_ERROR, "arrays of indicators are not allowed on input");
+
+ add_variable_to_head(&argsinsert, find_variable((yyvsp[-1].str)), find_variable((yyvsp[0].str)));
+ (yyval.str) = create_questionmarks((yyvsp[-1].str), false);
+ }
+#line 64566 "preproc.c"
+ break;
+
+ case 3510: /* char_civar: char_variable */
+#line 18601 "preproc.y"
+ {
+ char *ptr = strstr((yyvsp[0].str), ".arr");
+
+ if (ptr) /* varchar, we need the struct name here, not the struct element */
+ *ptr = '\0';
+ add_variable_to_head(&argsinsert, find_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 64579 "preproc.c"
+ break;
+
+ case 3511: /* civar: cvariable */
+#line 18612 "preproc.y"
+ {
+ add_variable_to_head(&argsinsert, find_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = create_questionmarks((yyvsp[0].str), false);
+ }
+#line 64588 "preproc.c"
+ break;
+
+ case 3512: /* indicator: cvariable */
+#line 18618 "preproc.y"
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 64594 "preproc.c"
+ break;
+
+ case 3513: /* indicator: SQL_INDICATOR cvariable */
+#line 18619 "preproc.y"
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 64600 "preproc.c"
+ break;
+
+ case 3514: /* indicator: SQL_INDICATOR name */
+#line 18620 "preproc.y"
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 64606 "preproc.c"
+ break;
+
+ case 3515: /* cvariable: CVARIABLE */
+#line 18624 "preproc.y"
+ {
+ /* As long as multidimensional arrays are not implemented we have to check for those here */
+ char *ptr = (yyvsp[0].str);
+ int brace_open=0, brace = false;
+
+ for (; *ptr; ptr++)
+ {
+ switch (*ptr)
+ {
+ case '[':
+ if (brace)
+ mmfatal(PARSE_ERROR, "multidimensional arrays for simple data types are not supported");
+ brace_open++;
+ break;
+ case ']':
+ brace_open--;
+ if (brace_open == 0)
+ brace = true;
+ break;
+ case '\t':
+ case ' ':
+ break;
+ default:
+ if (brace_open == 0)
+ brace = false;
+ break;
+ }
+ }
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 64641 "preproc.c"
+ break;
+
+ case 3516: /* ecpg_param: PARAM */
+#line 18656 "preproc.y"
+ { (yyval.str) = make_name(); }
+#line 64647 "preproc.c"
+ break;
+
+ case 3517: /* ecpg_bconst: BCONST */
+#line 18658 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64653 "preproc.c"
+ break;
+
+ case 3518: /* ecpg_fconst: FCONST */
+#line 18660 "preproc.y"
+ { (yyval.str) = make_name(); }
+#line 64659 "preproc.c"
+ break;
+
+ case 3519: /* ecpg_sconst: SCONST */
+#line 18662 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64665 "preproc.c"
+ break;
+
+ case 3520: /* ecpg_xconst: XCONST */
+#line 18664 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64671 "preproc.c"
+ break;
+
+ case 3521: /* ecpg_ident: IDENT */
+#line 18666 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64677 "preproc.c"
+ break;
+
+ case 3522: /* ecpg_ident: CSTRING */
+#line 18667 "preproc.y"
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 64683 "preproc.c"
+ break;
+
+ case 3523: /* quoted_ident_stringvar: name */
+#line 18671 "preproc.y"
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 64689 "preproc.c"
+ break;
+
+ case 3524: /* quoted_ident_stringvar: char_variable */
+#line 18673 "preproc.y"
+ { (yyval.str) = make3_str(mm_strdup("("), (yyvsp[0].str), mm_strdup(")")); }
+#line 64695 "preproc.c"
+ break;
+
+ case 3525: /* c_stuff_item: c_anything */
+#line 18680 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64701 "preproc.c"
+ break;
+
+ case 3526: /* c_stuff_item: '(' ')' */
+#line 18681 "preproc.y"
+ { (yyval.str) = mm_strdup("()"); }
+#line 64707 "preproc.c"
+ break;
+
+ case 3527: /* c_stuff_item: '(' c_stuff ')' */
+#line 18683 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("("), (yyvsp[-1].str), mm_strdup(")")); }
+#line 64713 "preproc.c"
+ break;
+
+ case 3528: /* c_stuff: c_stuff_item */
+#line 18686 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64719 "preproc.c"
+ break;
+
+ case 3529: /* c_stuff: c_stuff c_stuff_item */
+#line 18688 "preproc.y"
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 64725 "preproc.c"
+ break;
+
+ case 3530: /* c_list: c_term */
+#line 18691 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64731 "preproc.c"
+ break;
+
+ case 3531: /* c_list: c_list ',' c_term */
+#line 18692 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 64737 "preproc.c"
+ break;
+
+ case 3532: /* c_term: c_stuff */
+#line 18695 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64743 "preproc.c"
+ break;
+
+ case 3533: /* c_term: '{' c_list '}' */
+#line 18696 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}")); }
+#line 64749 "preproc.c"
+ break;
+
+ case 3534: /* c_thing: c_anything */
+#line 18699 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64755 "preproc.c"
+ break;
+
+ case 3535: /* c_thing: '(' */
+#line 18700 "preproc.y"
+ { (yyval.str) = mm_strdup("("); }
+#line 64761 "preproc.c"
+ break;
+
+ case 3536: /* c_thing: ')' */
+#line 18701 "preproc.y"
+ { (yyval.str) = mm_strdup(")"); }
+#line 64767 "preproc.c"
+ break;
+
+ case 3537: /* c_thing: ',' */
+#line 18702 "preproc.y"
+ { (yyval.str) = mm_strdup(","); }
+#line 64773 "preproc.c"
+ break;
+
+ case 3538: /* c_thing: ';' */
+#line 18703 "preproc.y"
+ { (yyval.str) = mm_strdup(";"); }
+#line 64779 "preproc.c"
+ break;
+
+ case 3539: /* c_anything: ecpg_ident */
+#line 18706 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64785 "preproc.c"
+ break;
+
+ case 3540: /* c_anything: Iconst */
+#line 18707 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64791 "preproc.c"
+ break;
+
+ case 3541: /* c_anything: ecpg_fconst */
+#line 18708 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64797 "preproc.c"
+ break;
+
+ case 3542: /* c_anything: ecpg_sconst */
+#line 18709 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 64803 "preproc.c"
+ break;
+
+ case 3543: /* c_anything: '*' */
+#line 18710 "preproc.y"
+ { (yyval.str) = mm_strdup("*"); }
+#line 64809 "preproc.c"
+ break;
+
+ case 3544: /* c_anything: '+' */
+#line 18711 "preproc.y"
+ { (yyval.str) = mm_strdup("+"); }
+#line 64815 "preproc.c"
+ break;
+
+ case 3545: /* c_anything: '-' */
+#line 18712 "preproc.y"
+ { (yyval.str) = mm_strdup("-"); }
+#line 64821 "preproc.c"
+ break;
+
+ case 3546: /* c_anything: '/' */
+#line 18713 "preproc.y"
+ { (yyval.str) = mm_strdup("/"); }
+#line 64827 "preproc.c"
+ break;
+
+ case 3547: /* c_anything: '%' */
+#line 18714 "preproc.y"
+ { (yyval.str) = mm_strdup("%"); }
+#line 64833 "preproc.c"
+ break;
+
+ case 3548: /* c_anything: NULL_P */
+#line 18715 "preproc.y"
+ { (yyval.str) = mm_strdup("NULL"); }
+#line 64839 "preproc.c"
+ break;
+
+ case 3549: /* c_anything: S_ADD */
+#line 18716 "preproc.y"
+ { (yyval.str) = mm_strdup("+="); }
+#line 64845 "preproc.c"
+ break;
+
+ case 3550: /* c_anything: S_AND */
+#line 18717 "preproc.y"
+ { (yyval.str) = mm_strdup("&&"); }
+#line 64851 "preproc.c"
+ break;
+
+ case 3551: /* c_anything: S_ANYTHING */
+#line 18718 "preproc.y"
+ { (yyval.str) = make_name(); }
+#line 64857 "preproc.c"
+ break;
+
+ case 3552: /* c_anything: S_AUTO */
+#line 18719 "preproc.y"
+ { (yyval.str) = mm_strdup("auto"); }
+#line 64863 "preproc.c"
+ break;
+
+ case 3553: /* c_anything: S_CONST */
+#line 18720 "preproc.y"
+ { (yyval.str) = mm_strdup("const"); }
+#line 64869 "preproc.c"
+ break;
+
+ case 3554: /* c_anything: S_DEC */
+#line 18721 "preproc.y"
+ { (yyval.str) = mm_strdup("--"); }
+#line 64875 "preproc.c"
+ break;
+
+ case 3555: /* c_anything: S_DIV */
+#line 18722 "preproc.y"
+ { (yyval.str) = mm_strdup("/="); }
+#line 64881 "preproc.c"
+ break;
+
+ case 3556: /* c_anything: S_DOTPOINT */
+#line 18723 "preproc.y"
+ { (yyval.str) = mm_strdup(".*"); }
+#line 64887 "preproc.c"
+ break;
+
+ case 3557: /* c_anything: S_EQUAL */
+#line 18724 "preproc.y"
+ { (yyval.str) = mm_strdup("=="); }
+#line 64893 "preproc.c"
+ break;
+
+ case 3558: /* c_anything: S_EXTERN */
+#line 18725 "preproc.y"
+ { (yyval.str) = mm_strdup("extern"); }
+#line 64899 "preproc.c"
+ break;
+
+ case 3559: /* c_anything: S_INC */
+#line 18726 "preproc.y"
+ { (yyval.str) = mm_strdup("++"); }
+#line 64905 "preproc.c"
+ break;
+
+ case 3560: /* c_anything: S_LSHIFT */
+#line 18727 "preproc.y"
+ { (yyval.str) = mm_strdup("<<"); }
+#line 64911 "preproc.c"
+ break;
+
+ case 3561: /* c_anything: S_MEMBER */
+#line 18728 "preproc.y"
+ { (yyval.str) = mm_strdup("->"); }
+#line 64917 "preproc.c"
+ break;
+
+ case 3562: /* c_anything: S_MEMPOINT */
+#line 18729 "preproc.y"
+ { (yyval.str) = mm_strdup("->*"); }
+#line 64923 "preproc.c"
+ break;
+
+ case 3563: /* c_anything: S_MOD */
+#line 18730 "preproc.y"
+ { (yyval.str) = mm_strdup("%="); }
+#line 64929 "preproc.c"
+ break;
+
+ case 3564: /* c_anything: S_MUL */
+#line 18731 "preproc.y"
+ { (yyval.str) = mm_strdup("*="); }
+#line 64935 "preproc.c"
+ break;
+
+ case 3565: /* c_anything: S_NEQUAL */
+#line 18732 "preproc.y"
+ { (yyval.str) = mm_strdup("!="); }
+#line 64941 "preproc.c"
+ break;
+
+ case 3566: /* c_anything: S_OR */
+#line 18733 "preproc.y"
+ { (yyval.str) = mm_strdup("||"); }
+#line 64947 "preproc.c"
+ break;
+
+ case 3567: /* c_anything: S_REGISTER */
+#line 18734 "preproc.y"
+ { (yyval.str) = mm_strdup("register"); }
+#line 64953 "preproc.c"
+ break;
+
+ case 3568: /* c_anything: S_RSHIFT */
+#line 18735 "preproc.y"
+ { (yyval.str) = mm_strdup(">>"); }
+#line 64959 "preproc.c"
+ break;
+
+ case 3569: /* c_anything: S_STATIC */
+#line 18736 "preproc.y"
+ { (yyval.str) = mm_strdup("static"); }
+#line 64965 "preproc.c"
+ break;
+
+ case 3570: /* c_anything: S_SUB */
+#line 18737 "preproc.y"
+ { (yyval.str) = mm_strdup("-="); }
+#line 64971 "preproc.c"
+ break;
+
+ case 3571: /* c_anything: S_TYPEDEF */
+#line 18738 "preproc.y"
+ { (yyval.str) = mm_strdup("typedef"); }
+#line 64977 "preproc.c"
+ break;
+
+ case 3572: /* c_anything: S_VOLATILE */
+#line 18739 "preproc.y"
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 64983 "preproc.c"
+ break;
+
+ case 3573: /* c_anything: SQL_BOOL */
+#line 18740 "preproc.y"
+ { (yyval.str) = mm_strdup("bool"); }
+#line 64989 "preproc.c"
+ break;
+
+ case 3574: /* c_anything: ENUM_P */
+#line 18741 "preproc.y"
+ { (yyval.str) = mm_strdup("enum"); }
+#line 64995 "preproc.c"
+ break;
+
+ case 3575: /* c_anything: HOUR_P */
+#line 18742 "preproc.y"
+ { (yyval.str) = mm_strdup("hour"); }
+#line 65001 "preproc.c"
+ break;
+
+ case 3576: /* c_anything: INT_P */
+#line 18743 "preproc.y"
+ { (yyval.str) = mm_strdup("int"); }
+#line 65007 "preproc.c"
+ break;
+
+ case 3577: /* c_anything: SQL_LONG */
+#line 18744 "preproc.y"
+ { (yyval.str) = mm_strdup("long"); }
+#line 65013 "preproc.c"
+ break;
+
+ case 3578: /* c_anything: MINUTE_P */
+#line 18745 "preproc.y"
+ { (yyval.str) = mm_strdup("minute"); }
+#line 65019 "preproc.c"
+ break;
+
+ case 3579: /* c_anything: MONTH_P */
+#line 18746 "preproc.y"
+ { (yyval.str) = mm_strdup("month"); }
+#line 65025 "preproc.c"
+ break;
+
+ case 3580: /* c_anything: SECOND_P */
+#line 18747 "preproc.y"
+ { (yyval.str) = mm_strdup("second"); }
+#line 65031 "preproc.c"
+ break;
+
+ case 3581: /* c_anything: SQL_SHORT */
+#line 18748 "preproc.y"
+ { (yyval.str) = mm_strdup("short"); }
+#line 65037 "preproc.c"
+ break;
+
+ case 3582: /* c_anything: SQL_SIGNED */
+#line 18749 "preproc.y"
+ { (yyval.str) = mm_strdup("signed"); }
+#line 65043 "preproc.c"
+ break;
+
+ case 3583: /* c_anything: SQL_STRUCT */
+#line 18750 "preproc.y"
+ { (yyval.str) = mm_strdup("struct"); }
+#line 65049 "preproc.c"
+ break;
+
+ case 3584: /* c_anything: SQL_UNSIGNED */
+#line 18751 "preproc.y"
+ { (yyval.str) = mm_strdup("unsigned"); }
+#line 65055 "preproc.c"
+ break;
+
+ case 3585: /* c_anything: YEAR_P */
+#line 18752 "preproc.y"
+ { (yyval.str) = mm_strdup("year"); }
+#line 65061 "preproc.c"
+ break;
+
+ case 3586: /* c_anything: CHAR_P */
+#line 18753 "preproc.y"
+ { (yyval.str) = mm_strdup("char"); }
+#line 65067 "preproc.c"
+ break;
+
+ case 3587: /* c_anything: FLOAT_P */
+#line 18754 "preproc.y"
+ { (yyval.str) = mm_strdup("float"); }
+#line 65073 "preproc.c"
+ break;
+
+ case 3588: /* c_anything: TO */
+#line 18755 "preproc.y"
+ { (yyval.str) = mm_strdup("to"); }
+#line 65079 "preproc.c"
+ break;
+
+ case 3589: /* c_anything: UNION */
+#line 18756 "preproc.y"
+ { (yyval.str) = mm_strdup("union"); }
+#line 65085 "preproc.c"
+ break;
+
+ case 3590: /* c_anything: VARCHAR */
+#line 18757 "preproc.y"
+ { (yyval.str) = mm_strdup("varchar"); }
+#line 65091 "preproc.c"
+ break;
+
+ case 3591: /* c_anything: '[' */
+#line 18758 "preproc.y"
+ { (yyval.str) = mm_strdup("["); }
+#line 65097 "preproc.c"
+ break;
+
+ case 3592: /* c_anything: ']' */
+#line 18759 "preproc.y"
+ { (yyval.str) = mm_strdup("]"); }
+#line 65103 "preproc.c"
+ break;
+
+ case 3593: /* c_anything: '=' */
+#line 18760 "preproc.y"
+ { (yyval.str) = mm_strdup("="); }
+#line 65109 "preproc.c"
+ break;
+
+ case 3594: /* c_anything: ':' */
+#line 18761 "preproc.y"
+ { (yyval.str) = mm_strdup(":"); }
+#line 65115 "preproc.c"
+ break;
+
+ case 3595: /* DeallocateStmt: DEALLOCATE prepared_name */
+#line 18764 "preproc.y"
+ { check_declared_list((yyvsp[0].str)); (yyval.str) = (yyvsp[0].str); }
+#line 65121 "preproc.c"
+ break;
+
+ case 3596: /* DeallocateStmt: DEALLOCATE PREPARE prepared_name */
+#line 18765 "preproc.y"
+ { check_declared_list((yyvsp[0].str)); (yyval.str) = (yyvsp[0].str); }
+#line 65127 "preproc.c"
+ break;
+
+ case 3597: /* DeallocateStmt: DEALLOCATE ALL */
+#line 18766 "preproc.y"
+ { (yyval.str) = mm_strdup("all"); }
+#line 65133 "preproc.c"
+ break;
+
+ case 3598: /* DeallocateStmt: DEALLOCATE PREPARE ALL */
+#line 18767 "preproc.y"
+ { (yyval.str) = mm_strdup("all"); }
+#line 65139 "preproc.c"
+ break;
+
+ case 3599: /* Iresult: Iconst */
+#line 18770 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65145 "preproc.c"
+ break;
+
+ case 3600: /* Iresult: '(' Iresult ')' */
+#line 18771 "preproc.y"
+ { (yyval.str) = cat_str(3, mm_strdup("("), (yyvsp[-1].str), mm_strdup(")")); }
+#line 65151 "preproc.c"
+ break;
+
+ case 3601: /* Iresult: Iresult '+' Iresult */
+#line 18772 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("+"), (yyvsp[0].str)); }
+#line 65157 "preproc.c"
+ break;
+
+ case 3602: /* Iresult: Iresult '-' Iresult */
+#line 18773 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("-"), (yyvsp[0].str)); }
+#line 65163 "preproc.c"
+ break;
+
+ case 3603: /* Iresult: Iresult '*' Iresult */
+#line 18774 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("*"), (yyvsp[0].str)); }
+#line 65169 "preproc.c"
+ break;
+
+ case 3604: /* Iresult: Iresult '/' Iresult */
+#line 18775 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("/"), (yyvsp[0].str)); }
+#line 65175 "preproc.c"
+ break;
+
+ case 3605: /* Iresult: Iresult '%' Iresult */
+#line 18776 "preproc.y"
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("%"), (yyvsp[0].str)); }
+#line 65181 "preproc.c"
+ break;
+
+ case 3606: /* Iresult: ecpg_sconst */
+#line 18777 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65187 "preproc.c"
+ break;
+
+ case 3607: /* Iresult: ColId */
+#line 18778 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65193 "preproc.c"
+ break;
+
+ case 3608: /* Iresult: ColId '(' var_type ')' */
+#line 18779 "preproc.y"
+ { if (pg_strcasecmp((yyvsp[-3].str), "sizeof") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "operator not allowed in variable definition");
+ else
+ (yyval.str) = cat_str(4, (yyvsp[-3].str), mm_strdup("("), (yyvsp[-1].type).type_str, mm_strdup(")"));
+ }
+#line 65203 "preproc.c"
+ break;
+
+ case 3609: /* execute_rest: %empty */
+#line 18786 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65209 "preproc.c"
+ break;
+
+ case 3610: /* execute_rest: ecpg_using opt_ecpg_into */
+#line 18787 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65215 "preproc.c"
+ break;
+
+ case 3611: /* execute_rest: ecpg_into ecpg_using */
+#line 18788 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65221 "preproc.c"
+ break;
+
+ case 3612: /* execute_rest: ecpg_into */
+#line 18789 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65227 "preproc.c"
+ break;
+
+ case 3613: /* ecpg_into: INTO into_list */
+#line 18792 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65233 "preproc.c"
+ break;
+
+ case 3614: /* ecpg_into: into_descriptor */
+#line 18793 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65239 "preproc.c"
+ break;
+
+ case 3615: /* opt_ecpg_into: %empty */
+#line 18796 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65245 "preproc.c"
+ break;
+
+ case 3616: /* opt_ecpg_into: ecpg_into */
+#line 18797 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65251 "preproc.c"
+ break;
+
+ case 3617: /* ecpg_fetch_into: ecpg_into */
+#line 18800 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65257 "preproc.c"
+ break;
+
+ case 3618: /* ecpg_fetch_into: using_descriptor */
+#line 18802 "preproc.y"
+ {
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 65270 "preproc.c"
+ break;
+
+ case 3619: /* opt_ecpg_fetch_into: %empty */
+#line 18812 "preproc.y"
+ { (yyval.str) = EMPTY; }
+#line 65276 "preproc.c"
+ break;
+
+ case 3620: /* opt_ecpg_fetch_into: ecpg_fetch_into */
+#line 18813 "preproc.y"
+ { (yyval.str) = (yyvsp[0].str); }
+#line 65282 "preproc.c"
+ break;
+
+
+#line 65286 "preproc.c"
+
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+
+ *++yyvsp = yyval;
+ *++yylsp = yyloc;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+ yyerror (YY_("syntax error"));
+ }
+
+ yyerror_range[1] = yylloc;
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ /* Pop stack until we find a state that shifts the error token. */
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ yyerror_range[1] = *yylsp;
+ yydestruct ("Error: popping",
+ YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ yyerror_range[2] = yylloc;
+ ++yylsp;
+ YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ goto yyreturn;
+#endif
+
+
+/*-------------------------------------------------------.
+| yyreturn -- parsing is finished, clean up and return. |
+`-------------------------------------------------------*/
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+
+ return yyresult;
+}
+
+#line 18816 "preproc.y"
+
+
+void base_yyerror(const char *error)
+{
+ /* translator: %s is typically the translation of "syntax error" */
+ mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
+ _(error), token_start ? token_start : base_yytext);
+}
+
+void parser_init(void)
+{
+ /* This function is empty. It only exists for compatibility with the backend parser right now. */
+}
diff --git a/src/interfaces/ecpg/preproc/preproc.h b/src/interfaces/ecpg/preproc/preproc.h
new file mode 100644
index 0000000..db737ec
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.h
@@ -0,0 +1,662 @@
+/* A Bison parser, made by GNU Bison 3.7.5. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+#ifndef YY_BASE_YY_PREPROC_H_INCLUDED
+# define YY_BASE_YY_PREPROC_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int base_yydebug;
+#endif
+
+/* Token kinds. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ SQL_ALLOCATE = 258, /* SQL_ALLOCATE */
+ SQL_AUTOCOMMIT = 259, /* SQL_AUTOCOMMIT */
+ SQL_BOOL = 260, /* SQL_BOOL */
+ SQL_BREAK = 261, /* SQL_BREAK */
+ SQL_CARDINALITY = 262, /* SQL_CARDINALITY */
+ SQL_CONNECT = 263, /* SQL_CONNECT */
+ SQL_COUNT = 264, /* SQL_COUNT */
+ SQL_DATETIME_INTERVAL_CODE = 265, /* SQL_DATETIME_INTERVAL_CODE */
+ SQL_DATETIME_INTERVAL_PRECISION = 266, /* SQL_DATETIME_INTERVAL_PRECISION */
+ SQL_DESCRIBE = 267, /* SQL_DESCRIBE */
+ SQL_DESCRIPTOR = 268, /* SQL_DESCRIPTOR */
+ SQL_DISCONNECT = 269, /* SQL_DISCONNECT */
+ SQL_FOUND = 270, /* SQL_FOUND */
+ SQL_FREE = 271, /* SQL_FREE */
+ SQL_GET = 272, /* SQL_GET */
+ SQL_GO = 273, /* SQL_GO */
+ SQL_GOTO = 274, /* SQL_GOTO */
+ SQL_IDENTIFIED = 275, /* SQL_IDENTIFIED */
+ SQL_INDICATOR = 276, /* SQL_INDICATOR */
+ SQL_KEY_MEMBER = 277, /* SQL_KEY_MEMBER */
+ SQL_LENGTH = 278, /* SQL_LENGTH */
+ SQL_LONG = 279, /* SQL_LONG */
+ SQL_NULLABLE = 280, /* SQL_NULLABLE */
+ SQL_OCTET_LENGTH = 281, /* SQL_OCTET_LENGTH */
+ SQL_OPEN = 282, /* SQL_OPEN */
+ SQL_OUTPUT = 283, /* SQL_OUTPUT */
+ SQL_REFERENCE = 284, /* SQL_REFERENCE */
+ SQL_RETURNED_LENGTH = 285, /* SQL_RETURNED_LENGTH */
+ SQL_RETURNED_OCTET_LENGTH = 286, /* SQL_RETURNED_OCTET_LENGTH */
+ SQL_SCALE = 287, /* SQL_SCALE */
+ SQL_SECTION = 288, /* SQL_SECTION */
+ SQL_SHORT = 289, /* SQL_SHORT */
+ SQL_SIGNED = 290, /* SQL_SIGNED */
+ SQL_SQLERROR = 291, /* SQL_SQLERROR */
+ SQL_SQLPRINT = 292, /* SQL_SQLPRINT */
+ SQL_SQLWARNING = 293, /* SQL_SQLWARNING */
+ SQL_START = 294, /* SQL_START */
+ SQL_STOP = 295, /* SQL_STOP */
+ SQL_STRUCT = 296, /* SQL_STRUCT */
+ SQL_UNSIGNED = 297, /* SQL_UNSIGNED */
+ SQL_VAR = 298, /* SQL_VAR */
+ SQL_WHENEVER = 299, /* SQL_WHENEVER */
+ S_ADD = 300, /* S_ADD */
+ S_AND = 301, /* S_AND */
+ S_ANYTHING = 302, /* S_ANYTHING */
+ S_AUTO = 303, /* S_AUTO */
+ S_CONST = 304, /* S_CONST */
+ S_DEC = 305, /* S_DEC */
+ S_DIV = 306, /* S_DIV */
+ S_DOTPOINT = 307, /* S_DOTPOINT */
+ S_EQUAL = 308, /* S_EQUAL */
+ S_EXTERN = 309, /* S_EXTERN */
+ S_INC = 310, /* S_INC */
+ S_LSHIFT = 311, /* S_LSHIFT */
+ S_MEMPOINT = 312, /* S_MEMPOINT */
+ S_MEMBER = 313, /* S_MEMBER */
+ S_MOD = 314, /* S_MOD */
+ S_MUL = 315, /* S_MUL */
+ S_NEQUAL = 316, /* S_NEQUAL */
+ S_OR = 317, /* S_OR */
+ S_REGISTER = 318, /* S_REGISTER */
+ S_RSHIFT = 319, /* S_RSHIFT */
+ S_STATIC = 320, /* S_STATIC */
+ S_SUB = 321, /* S_SUB */
+ S_VOLATILE = 322, /* S_VOLATILE */
+ S_TYPEDEF = 323, /* S_TYPEDEF */
+ CSTRING = 324, /* CSTRING */
+ CVARIABLE = 325, /* CVARIABLE */
+ CPP_LINE = 326, /* CPP_LINE */
+ IP = 327, /* IP */
+ IDENT = 328, /* IDENT */
+ UIDENT = 329, /* UIDENT */
+ FCONST = 330, /* FCONST */
+ SCONST = 331, /* SCONST */
+ USCONST = 332, /* USCONST */
+ BCONST = 333, /* BCONST */
+ XCONST = 334, /* XCONST */
+ Op = 335, /* Op */
+ ICONST = 336, /* ICONST */
+ PARAM = 337, /* PARAM */
+ TYPECAST = 338, /* TYPECAST */
+ DOT_DOT = 339, /* DOT_DOT */
+ COLON_EQUALS = 340, /* COLON_EQUALS */
+ EQUALS_GREATER = 341, /* EQUALS_GREATER */
+ LESS_EQUALS = 342, /* LESS_EQUALS */
+ GREATER_EQUALS = 343, /* GREATER_EQUALS */
+ NOT_EQUALS = 344, /* NOT_EQUALS */
+ ABORT_P = 345, /* ABORT_P */
+ ABSOLUTE_P = 346, /* ABSOLUTE_P */
+ ACCESS = 347, /* ACCESS */
+ ACTION = 348, /* ACTION */
+ ADD_P = 349, /* ADD_P */
+ ADMIN = 350, /* ADMIN */
+ AFTER = 351, /* AFTER */
+ AGGREGATE = 352, /* AGGREGATE */
+ ALL = 353, /* ALL */
+ ALSO = 354, /* ALSO */
+ ALTER = 355, /* ALTER */
+ ALWAYS = 356, /* ALWAYS */
+ ANALYSE = 357, /* ANALYSE */
+ ANALYZE = 358, /* ANALYZE */
+ AND = 359, /* AND */
+ ANY = 360, /* ANY */
+ ARRAY = 361, /* ARRAY */
+ AS = 362, /* AS */
+ ASC = 363, /* ASC */
+ ASENSITIVE = 364, /* ASENSITIVE */
+ ASSERTION = 365, /* ASSERTION */
+ ASSIGNMENT = 366, /* ASSIGNMENT */
+ ASYMMETRIC = 367, /* ASYMMETRIC */
+ ATOMIC = 368, /* ATOMIC */
+ AT = 369, /* AT */
+ ATTACH = 370, /* ATTACH */
+ ATTRIBUTE = 371, /* ATTRIBUTE */
+ AUTHORIZATION = 372, /* AUTHORIZATION */
+ BACKWARD = 373, /* BACKWARD */
+ BEFORE = 374, /* BEFORE */
+ BEGIN_P = 375, /* BEGIN_P */
+ BETWEEN = 376, /* BETWEEN */
+ BIGINT = 377, /* BIGINT */
+ BINARY = 378, /* BINARY */
+ BIT = 379, /* BIT */
+ BOOLEAN_P = 380, /* BOOLEAN_P */
+ BOTH = 381, /* BOTH */
+ BREADTH = 382, /* BREADTH */
+ BY = 383, /* BY */
+ CACHE = 384, /* CACHE */
+ CALL = 385, /* CALL */
+ CALLED = 386, /* CALLED */
+ CASCADE = 387, /* CASCADE */
+ CASCADED = 388, /* CASCADED */
+ CASE = 389, /* CASE */
+ CAST = 390, /* CAST */
+ CATALOG_P = 391, /* CATALOG_P */
+ CHAIN = 392, /* CHAIN */
+ CHAR_P = 393, /* CHAR_P */
+ CHARACTER = 394, /* CHARACTER */
+ CHARACTERISTICS = 395, /* CHARACTERISTICS */
+ CHECK = 396, /* CHECK */
+ CHECKPOINT = 397, /* CHECKPOINT */
+ CLASS = 398, /* CLASS */
+ CLOSE = 399, /* CLOSE */
+ CLUSTER = 400, /* CLUSTER */
+ COALESCE = 401, /* COALESCE */
+ COLLATE = 402, /* COLLATE */
+ COLLATION = 403, /* COLLATION */
+ COLUMN = 404, /* COLUMN */
+ COLUMNS = 405, /* COLUMNS */
+ COMMENT = 406, /* COMMENT */
+ COMMENTS = 407, /* COMMENTS */
+ COMMIT = 408, /* COMMIT */
+ COMMITTED = 409, /* COMMITTED */
+ COMPRESSION = 410, /* COMPRESSION */
+ CONCURRENTLY = 411, /* CONCURRENTLY */
+ CONFIGURATION = 412, /* CONFIGURATION */
+ CONFLICT = 413, /* CONFLICT */
+ CONNECTION = 414, /* CONNECTION */
+ CONSTRAINT = 415, /* CONSTRAINT */
+ CONSTRAINTS = 416, /* CONSTRAINTS */
+ CONTENT_P = 417, /* CONTENT_P */
+ CONTINUE_P = 418, /* CONTINUE_P */
+ CONVERSION_P = 419, /* CONVERSION_P */
+ COPY = 420, /* COPY */
+ COST = 421, /* COST */
+ CREATE = 422, /* CREATE */
+ CROSS = 423, /* CROSS */
+ CSV = 424, /* CSV */
+ CUBE = 425, /* CUBE */
+ CURRENT_P = 426, /* CURRENT_P */
+ CURRENT_CATALOG = 427, /* CURRENT_CATALOG */
+ CURRENT_DATE = 428, /* CURRENT_DATE */
+ CURRENT_ROLE = 429, /* CURRENT_ROLE */
+ CURRENT_SCHEMA = 430, /* CURRENT_SCHEMA */
+ CURRENT_TIME = 431, /* CURRENT_TIME */
+ CURRENT_TIMESTAMP = 432, /* CURRENT_TIMESTAMP */
+ CURRENT_USER = 433, /* CURRENT_USER */
+ CURSOR = 434, /* CURSOR */
+ CYCLE = 435, /* CYCLE */
+ DATA_P = 436, /* DATA_P */
+ DATABASE = 437, /* DATABASE */
+ DAY_P = 438, /* DAY_P */
+ DEALLOCATE = 439, /* DEALLOCATE */
+ DEC = 440, /* DEC */
+ DECIMAL_P = 441, /* DECIMAL_P */
+ DECLARE = 442, /* DECLARE */
+ DEFAULT = 443, /* DEFAULT */
+ DEFAULTS = 444, /* DEFAULTS */
+ DEFERRABLE = 445, /* DEFERRABLE */
+ DEFERRED = 446, /* DEFERRED */
+ DEFINER = 447, /* DEFINER */
+ DELETE_P = 448, /* DELETE_P */
+ DELIMITER = 449, /* DELIMITER */
+ DELIMITERS = 450, /* DELIMITERS */
+ DEPENDS = 451, /* DEPENDS */
+ DEPTH = 452, /* DEPTH */
+ DESC = 453, /* DESC */
+ DETACH = 454, /* DETACH */
+ DICTIONARY = 455, /* DICTIONARY */
+ DISABLE_P = 456, /* DISABLE_P */
+ DISCARD = 457, /* DISCARD */
+ DISTINCT = 458, /* DISTINCT */
+ DO = 459, /* DO */
+ DOCUMENT_P = 460, /* DOCUMENT_P */
+ DOMAIN_P = 461, /* DOMAIN_P */
+ DOUBLE_P = 462, /* DOUBLE_P */
+ DROP = 463, /* DROP */
+ EACH = 464, /* EACH */
+ ELSE = 465, /* ELSE */
+ ENABLE_P = 466, /* ENABLE_P */
+ ENCODING = 467, /* ENCODING */
+ ENCRYPTED = 468, /* ENCRYPTED */
+ END_P = 469, /* END_P */
+ ENUM_P = 470, /* ENUM_P */
+ ESCAPE = 471, /* ESCAPE */
+ EVENT = 472, /* EVENT */
+ EXCEPT = 473, /* EXCEPT */
+ EXCLUDE = 474, /* EXCLUDE */
+ EXCLUDING = 475, /* EXCLUDING */
+ EXCLUSIVE = 476, /* EXCLUSIVE */
+ EXECUTE = 477, /* EXECUTE */
+ EXISTS = 478, /* EXISTS */
+ EXPLAIN = 479, /* EXPLAIN */
+ EXPRESSION = 480, /* EXPRESSION */
+ EXTENSION = 481, /* EXTENSION */
+ EXTERNAL = 482, /* EXTERNAL */
+ EXTRACT = 483, /* EXTRACT */
+ FALSE_P = 484, /* FALSE_P */
+ FAMILY = 485, /* FAMILY */
+ FETCH = 486, /* FETCH */
+ FILTER = 487, /* FILTER */
+ FINALIZE = 488, /* FINALIZE */
+ FIRST_P = 489, /* FIRST_P */
+ FLOAT_P = 490, /* FLOAT_P */
+ FOLLOWING = 491, /* FOLLOWING */
+ FOR = 492, /* FOR */
+ FORCE = 493, /* FORCE */
+ FOREIGN = 494, /* FOREIGN */
+ FORWARD = 495, /* FORWARD */
+ FREEZE = 496, /* FREEZE */
+ FROM = 497, /* FROM */
+ FULL = 498, /* FULL */
+ FUNCTION = 499, /* FUNCTION */
+ FUNCTIONS = 500, /* FUNCTIONS */
+ GENERATED = 501, /* GENERATED */
+ GLOBAL = 502, /* GLOBAL */
+ GRANT = 503, /* GRANT */
+ GRANTED = 504, /* GRANTED */
+ GREATEST = 505, /* GREATEST */
+ GROUP_P = 506, /* GROUP_P */
+ GROUPING = 507, /* GROUPING */
+ GROUPS = 508, /* GROUPS */
+ HANDLER = 509, /* HANDLER */
+ HAVING = 510, /* HAVING */
+ HEADER_P = 511, /* HEADER_P */
+ HOLD = 512, /* HOLD */
+ HOUR_P = 513, /* HOUR_P */
+ IDENTITY_P = 514, /* IDENTITY_P */
+ IF_P = 515, /* IF_P */
+ ILIKE = 516, /* ILIKE */
+ IMMEDIATE = 517, /* IMMEDIATE */
+ IMMUTABLE = 518, /* IMMUTABLE */
+ IMPLICIT_P = 519, /* IMPLICIT_P */
+ IMPORT_P = 520, /* IMPORT_P */
+ IN_P = 521, /* IN_P */
+ INCLUDE = 522, /* INCLUDE */
+ INCLUDING = 523, /* INCLUDING */
+ INCREMENT = 524, /* INCREMENT */
+ INDEX = 525, /* INDEX */
+ INDEXES = 526, /* INDEXES */
+ INHERIT = 527, /* INHERIT */
+ INHERITS = 528, /* INHERITS */
+ INITIALLY = 529, /* INITIALLY */
+ INLINE_P = 530, /* INLINE_P */
+ INNER_P = 531, /* INNER_P */
+ INOUT = 532, /* INOUT */
+ INPUT_P = 533, /* INPUT_P */
+ INSENSITIVE = 534, /* INSENSITIVE */
+ INSERT = 535, /* INSERT */
+ INSTEAD = 536, /* INSTEAD */
+ INT_P = 537, /* INT_P */
+ INTEGER = 538, /* INTEGER */
+ INTERSECT = 539, /* INTERSECT */
+ INTERVAL = 540, /* INTERVAL */
+ INTO = 541, /* INTO */
+ INVOKER = 542, /* INVOKER */
+ IS = 543, /* IS */
+ ISNULL = 544, /* ISNULL */
+ ISOLATION = 545, /* ISOLATION */
+ JOIN = 546, /* JOIN */
+ KEY = 547, /* KEY */
+ LABEL = 548, /* LABEL */
+ LANGUAGE = 549, /* LANGUAGE */
+ LARGE_P = 550, /* LARGE_P */
+ LAST_P = 551, /* LAST_P */
+ LATERAL_P = 552, /* LATERAL_P */
+ LEADING = 553, /* LEADING */
+ LEAKPROOF = 554, /* LEAKPROOF */
+ LEAST = 555, /* LEAST */
+ LEFT = 556, /* LEFT */
+ LEVEL = 557, /* LEVEL */
+ LIKE = 558, /* LIKE */
+ LIMIT = 559, /* LIMIT */
+ LISTEN = 560, /* LISTEN */
+ LOAD = 561, /* LOAD */
+ LOCAL = 562, /* LOCAL */
+ LOCALTIME = 563, /* LOCALTIME */
+ LOCALTIMESTAMP = 564, /* LOCALTIMESTAMP */
+ LOCATION = 565, /* LOCATION */
+ LOCK_P = 566, /* LOCK_P */
+ LOCKED = 567, /* LOCKED */
+ LOGGED = 568, /* LOGGED */
+ MAPPING = 569, /* MAPPING */
+ MATCH = 570, /* MATCH */
+ MATERIALIZED = 571, /* MATERIALIZED */
+ MAXVALUE = 572, /* MAXVALUE */
+ METHOD = 573, /* METHOD */
+ MINUTE_P = 574, /* MINUTE_P */
+ MINVALUE = 575, /* MINVALUE */
+ MODE = 576, /* MODE */
+ MONTH_P = 577, /* MONTH_P */
+ MOVE = 578, /* MOVE */
+ NAME_P = 579, /* NAME_P */
+ NAMES = 580, /* NAMES */
+ NATIONAL = 581, /* NATIONAL */
+ NATURAL = 582, /* NATURAL */
+ NCHAR = 583, /* NCHAR */
+ NEW = 584, /* NEW */
+ NEXT = 585, /* NEXT */
+ NFC = 586, /* NFC */
+ NFD = 587, /* NFD */
+ NFKC = 588, /* NFKC */
+ NFKD = 589, /* NFKD */
+ NO = 590, /* NO */
+ NONE = 591, /* NONE */
+ NORMALIZE = 592, /* NORMALIZE */
+ NORMALIZED = 593, /* NORMALIZED */
+ NOT = 594, /* NOT */
+ NOTHING = 595, /* NOTHING */
+ NOTIFY = 596, /* NOTIFY */
+ NOTNULL = 597, /* NOTNULL */
+ NOWAIT = 598, /* NOWAIT */
+ NULL_P = 599, /* NULL_P */
+ NULLIF = 600, /* NULLIF */
+ NULLS_P = 601, /* NULLS_P */
+ NUMERIC = 602, /* NUMERIC */
+ OBJECT_P = 603, /* OBJECT_P */
+ OF = 604, /* OF */
+ OFF = 605, /* OFF */
+ OFFSET = 606, /* OFFSET */
+ OIDS = 607, /* OIDS */
+ OLD = 608, /* OLD */
+ ON = 609, /* ON */
+ ONLY = 610, /* ONLY */
+ OPERATOR = 611, /* OPERATOR */
+ OPTION = 612, /* OPTION */
+ OPTIONS = 613, /* OPTIONS */
+ OR = 614, /* OR */
+ ORDER = 615, /* ORDER */
+ ORDINALITY = 616, /* ORDINALITY */
+ OTHERS = 617, /* OTHERS */
+ OUT_P = 618, /* OUT_P */
+ OUTER_P = 619, /* OUTER_P */
+ OVER = 620, /* OVER */
+ OVERLAPS = 621, /* OVERLAPS */
+ OVERLAY = 622, /* OVERLAY */
+ OVERRIDING = 623, /* OVERRIDING */
+ OWNED = 624, /* OWNED */
+ OWNER = 625, /* OWNER */
+ PARALLEL = 626, /* PARALLEL */
+ PARSER = 627, /* PARSER */
+ PARTIAL = 628, /* PARTIAL */
+ PARTITION = 629, /* PARTITION */
+ PASSING = 630, /* PASSING */
+ PASSWORD = 631, /* PASSWORD */
+ PLACING = 632, /* PLACING */
+ PLANS = 633, /* PLANS */
+ POLICY = 634, /* POLICY */
+ POSITION = 635, /* POSITION */
+ PRECEDING = 636, /* PRECEDING */
+ PRECISION = 637, /* PRECISION */
+ PRESERVE = 638, /* PRESERVE */
+ PREPARE = 639, /* PREPARE */
+ PREPARED = 640, /* PREPARED */
+ PRIMARY = 641, /* PRIMARY */
+ PRIOR = 642, /* PRIOR */
+ PRIVILEGES = 643, /* PRIVILEGES */
+ PROCEDURAL = 644, /* PROCEDURAL */
+ PROCEDURE = 645, /* PROCEDURE */
+ PROCEDURES = 646, /* PROCEDURES */
+ PROGRAM = 647, /* PROGRAM */
+ PUBLICATION = 648, /* PUBLICATION */
+ QUOTE = 649, /* QUOTE */
+ RANGE = 650, /* RANGE */
+ READ = 651, /* READ */
+ REAL = 652, /* REAL */
+ REASSIGN = 653, /* REASSIGN */
+ RECHECK = 654, /* RECHECK */
+ RECURSIVE = 655, /* RECURSIVE */
+ REF = 656, /* REF */
+ REFERENCES = 657, /* REFERENCES */
+ REFERENCING = 658, /* REFERENCING */
+ REFRESH = 659, /* REFRESH */
+ REINDEX = 660, /* REINDEX */
+ RELATIVE_P = 661, /* RELATIVE_P */
+ RELEASE = 662, /* RELEASE */
+ RENAME = 663, /* RENAME */
+ REPEATABLE = 664, /* REPEATABLE */
+ REPLACE = 665, /* REPLACE */
+ REPLICA = 666, /* REPLICA */
+ RESET = 667, /* RESET */
+ RESTART = 668, /* RESTART */
+ RESTRICT = 669, /* RESTRICT */
+ RETURN = 670, /* RETURN */
+ RETURNING = 671, /* RETURNING */
+ RETURNS = 672, /* RETURNS */
+ REVOKE = 673, /* REVOKE */
+ RIGHT = 674, /* RIGHT */
+ ROLE = 675, /* ROLE */
+ ROLLBACK = 676, /* ROLLBACK */
+ ROLLUP = 677, /* ROLLUP */
+ ROUTINE = 678, /* ROUTINE */
+ ROUTINES = 679, /* ROUTINES */
+ ROW = 680, /* ROW */
+ ROWS = 681, /* ROWS */
+ RULE = 682, /* RULE */
+ SAVEPOINT = 683, /* SAVEPOINT */
+ SCHEMA = 684, /* SCHEMA */
+ SCHEMAS = 685, /* SCHEMAS */
+ SCROLL = 686, /* SCROLL */
+ SEARCH = 687, /* SEARCH */
+ SECOND_P = 688, /* SECOND_P */
+ SECURITY = 689, /* SECURITY */
+ SELECT = 690, /* SELECT */
+ SEQUENCE = 691, /* SEQUENCE */
+ SEQUENCES = 692, /* SEQUENCES */
+ SERIALIZABLE = 693, /* SERIALIZABLE */
+ SERVER = 694, /* SERVER */
+ SESSION = 695, /* SESSION */
+ SESSION_USER = 696, /* SESSION_USER */
+ SET = 697, /* SET */
+ SETS = 698, /* SETS */
+ SETOF = 699, /* SETOF */
+ SHARE = 700, /* SHARE */
+ SHOW = 701, /* SHOW */
+ SIMILAR = 702, /* SIMILAR */
+ SIMPLE = 703, /* SIMPLE */
+ SKIP = 704, /* SKIP */
+ SMALLINT = 705, /* SMALLINT */
+ SNAPSHOT = 706, /* SNAPSHOT */
+ SOME = 707, /* SOME */
+ SQL_P = 708, /* SQL_P */
+ STABLE = 709, /* STABLE */
+ STANDALONE_P = 710, /* STANDALONE_P */
+ START = 711, /* START */
+ STATEMENT = 712, /* STATEMENT */
+ STATISTICS = 713, /* STATISTICS */
+ STDIN = 714, /* STDIN */
+ STDOUT = 715, /* STDOUT */
+ STORAGE = 716, /* STORAGE */
+ STORED = 717, /* STORED */
+ STRICT_P = 718, /* STRICT_P */
+ STRIP_P = 719, /* STRIP_P */
+ SUBSCRIPTION = 720, /* SUBSCRIPTION */
+ SUBSTRING = 721, /* SUBSTRING */
+ SUPPORT = 722, /* SUPPORT */
+ SYMMETRIC = 723, /* SYMMETRIC */
+ SYSID = 724, /* SYSID */
+ SYSTEM_P = 725, /* SYSTEM_P */
+ TABLE = 726, /* TABLE */
+ TABLES = 727, /* TABLES */
+ TABLESAMPLE = 728, /* TABLESAMPLE */
+ TABLESPACE = 729, /* TABLESPACE */
+ TEMP = 730, /* TEMP */
+ TEMPLATE = 731, /* TEMPLATE */
+ TEMPORARY = 732, /* TEMPORARY */
+ TEXT_P = 733, /* TEXT_P */
+ THEN = 734, /* THEN */
+ TIES = 735, /* TIES */
+ TIME = 736, /* TIME */
+ TIMESTAMP = 737, /* TIMESTAMP */
+ TO = 738, /* TO */
+ TRAILING = 739, /* TRAILING */
+ TRANSACTION = 740, /* TRANSACTION */
+ TRANSFORM = 741, /* TRANSFORM */
+ TREAT = 742, /* TREAT */
+ TRIGGER = 743, /* TRIGGER */
+ TRIM = 744, /* TRIM */
+ TRUE_P = 745, /* TRUE_P */
+ TRUNCATE = 746, /* TRUNCATE */
+ TRUSTED = 747, /* TRUSTED */
+ TYPE_P = 748, /* TYPE_P */
+ TYPES_P = 749, /* TYPES_P */
+ UESCAPE = 750, /* UESCAPE */
+ UNBOUNDED = 751, /* UNBOUNDED */
+ UNCOMMITTED = 752, /* UNCOMMITTED */
+ UNENCRYPTED = 753, /* UNENCRYPTED */
+ UNION = 754, /* UNION */
+ UNIQUE = 755, /* UNIQUE */
+ UNKNOWN = 756, /* UNKNOWN */
+ UNLISTEN = 757, /* UNLISTEN */
+ UNLOGGED = 758, /* UNLOGGED */
+ UNTIL = 759, /* UNTIL */
+ UPDATE = 760, /* UPDATE */
+ USER = 761, /* USER */
+ USING = 762, /* USING */
+ VACUUM = 763, /* VACUUM */
+ VALID = 764, /* VALID */
+ VALIDATE = 765, /* VALIDATE */
+ VALIDATOR = 766, /* VALIDATOR */
+ VALUE_P = 767, /* VALUE_P */
+ VALUES = 768, /* VALUES */
+ VARCHAR = 769, /* VARCHAR */
+ VARIADIC = 770, /* VARIADIC */
+ VARYING = 771, /* VARYING */
+ VERBOSE = 772, /* VERBOSE */
+ VERSION_P = 773, /* VERSION_P */
+ VIEW = 774, /* VIEW */
+ VIEWS = 775, /* VIEWS */
+ VOLATILE = 776, /* VOLATILE */
+ WHEN = 777, /* WHEN */
+ WHERE = 778, /* WHERE */
+ WHITESPACE_P = 779, /* WHITESPACE_P */
+ WINDOW = 780, /* WINDOW */
+ WITH = 781, /* WITH */
+ WITHIN = 782, /* WITHIN */
+ WITHOUT = 783, /* WITHOUT */
+ WORK = 784, /* WORK */
+ WRAPPER = 785, /* WRAPPER */
+ WRITE = 786, /* WRITE */
+ XML_P = 787, /* XML_P */
+ XMLATTRIBUTES = 788, /* XMLATTRIBUTES */
+ XMLCONCAT = 789, /* XMLCONCAT */
+ XMLELEMENT = 790, /* XMLELEMENT */
+ XMLEXISTS = 791, /* XMLEXISTS */
+ XMLFOREST = 792, /* XMLFOREST */
+ XMLNAMESPACES = 793, /* XMLNAMESPACES */
+ XMLPARSE = 794, /* XMLPARSE */
+ XMLPI = 795, /* XMLPI */
+ XMLROOT = 796, /* XMLROOT */
+ XMLSERIALIZE = 797, /* XMLSERIALIZE */
+ XMLTABLE = 798, /* XMLTABLE */
+ YEAR_P = 799, /* YEAR_P */
+ YES_P = 800, /* YES_P */
+ ZONE = 801, /* ZONE */
+ NOT_LA = 802, /* NOT_LA */
+ NULLS_LA = 803, /* NULLS_LA */
+ WITH_LA = 804, /* WITH_LA */
+ MODE_TYPE_NAME = 805, /* MODE_TYPE_NAME */
+ MODE_PLPGSQL_EXPR = 806, /* MODE_PLPGSQL_EXPR */
+ MODE_PLPGSQL_ASSIGN1 = 807, /* MODE_PLPGSQL_ASSIGN1 */
+ MODE_PLPGSQL_ASSIGN2 = 808, /* MODE_PLPGSQL_ASSIGN2 */
+ MODE_PLPGSQL_ASSIGN3 = 809, /* MODE_PLPGSQL_ASSIGN3 */
+ UMINUS = 810 /* UMINUS */
+ };
+ typedef enum yytokentype yytoken_kind_t;
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+union YYSTYPE
+{
+#line 612 "preproc.y"
+
+ double dval;
+ char *str;
+ int ival;
+ struct when action;
+ struct index index;
+ int tagname;
+ struct this_type type;
+ enum ECPGttype type_enum;
+ enum ECPGdtype dtype_enum;
+ struct fetch_desc descriptor;
+ struct su_symbol struct_union;
+ struct prep prep;
+ struct exec exec;
+ struct describe describe;
+
+#line 636 "preproc.h"
+
+};
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+extern YYSTYPE base_yylval;
+extern YYLTYPE base_yylloc;
+int base_yyparse (void);
+
+#endif /* !YY_BASE_YY_PREPROC_H_INCLUDED */
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
new file mode 100644
index 0000000..458ae68
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -0,0 +1,18828 @@
+/* header */
+/* src/interfaces/ecpg/preproc/ecpg.header */
+
+/* Copyright comment */
+%{
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+#include "ecpg_config.h"
+#include <unistd.h>
+
+/* Location tracking support --- simpler than bison's default */
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do { \
+ if (N) \
+ (Current) = (Rhs)[1]; \
+ else \
+ (Current) = (Rhs)[0]; \
+ } while (0)
+
+/*
+ * The %name-prefix option below will make bison call base_yylex, but we
+ * really want it to call filtered_base_yylex (see parser.c).
+ */
+#define base_yylex filtered_base_yylex
+
+/*
+ * This is only here so the string gets into the POT. Bison uses it
+ * internally.
+ */
+#define bison_gettext_dummy gettext_noop("syntax error")
+
+/*
+ * Variables containing simple states.
+ */
+int struct_level = 0;
+int braces_open; /* brace level counter */
+char *current_function;
+int ecpg_internal_var = 0;
+char *connection = NULL;
+char *input_filename = NULL;
+
+static int FoundInto = 0;
+static int initializer = 0;
+static int pacounter = 1;
+static char pacounter_buffer[sizeof(int) * CHAR_BIT * 10 / 3]; /* a rough guess at the size we need */
+static struct this_type actual_type[STRUCT_DEPTH];
+static char *actual_startline[STRUCT_DEPTH];
+static int varchar_counter = 1;
+static int bytea_counter = 1;
+
+/* temporarily store struct members while creating the data structure */
+struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH] = { NULL };
+
+/* also store struct type so we can do a sizeof() later */
+static char *ECPGstruct_sizeof = NULL;
+
+/* for forward declarations we have to store some data as well */
+static char *forward_name = NULL;
+
+struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR, NULL, NULL, NULL, {NULL}, 0};
+struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
+
+static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
+
+static void vmmerror(int error_code, enum errortype type, const char *error, va_list ap) pg_attribute_printf(3, 0);
+
+static bool check_declared_list(const char*);
+
+/*
+ * Handle parsing errors and warnings
+ */
+static void
+vmmerror(int error_code, enum errortype type, const char *error, va_list ap)
+{
+ /* localize the error message string */
+ error = _(error);
+
+ fprintf(stderr, "%s:%d: ", input_filename, base_yylineno);
+
+ switch(type)
+ {
+ case ET_WARNING:
+ fprintf(stderr, _("WARNING: "));
+ break;
+ case ET_ERROR:
+ fprintf(stderr, _("ERROR: "));
+ break;
+ }
+
+ vfprintf(stderr, error, ap);
+
+ fprintf(stderr, "\n");
+
+ switch(type)
+ {
+ case ET_WARNING:
+ break;
+ case ET_ERROR:
+ ret_value = error_code;
+ break;
+ }
+}
+
+void
+mmerror(int error_code, enum errortype type, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, type, error, ap);
+ va_end(ap);
+}
+
+void
+mmfatal(int error_code, const char *error, ...)
+{
+ va_list ap;
+
+ va_start(ap, error);
+ vmmerror(error_code, ET_ERROR, error, ap);
+ va_end(ap);
+
+ if (base_yyin)
+ fclose(base_yyin);
+ if (base_yyout)
+ fclose(base_yyout);
+
+ if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
+ fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
+ exit(error_code);
+}
+
+/*
+ * string concatenation
+ */
+
+static char *
+cat2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
+
+ strcpy(res_str, str1);
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+cat_str(int count, ...)
+{
+ va_list args;
+ int i;
+ char *res_str;
+
+ va_start(args, count);
+
+ res_str = va_arg(args, char *);
+
+ /* now add all other strings */
+ for (i = 1; i < count; i++)
+ res_str = cat2_str(res_str, va_arg(args, char *));
+
+ va_end(args);
+
+ return res_str;
+}
+
+static char *
+make2_str(char *str1, char *str2)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ free(str1);
+ free(str2);
+ return res_str;
+}
+
+static char *
+make3_str(char *str1, char *str2, char *str3)
+{
+ char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) +strlen(str3) + 1);
+
+ strcpy(res_str, str1);
+ strcat(res_str, str2);
+ strcat(res_str, str3);
+ free(str1);
+ free(str2);
+ free(str3);
+ return res_str;
+}
+
+/* and the rest */
+static char *
+make_name(void)
+{
+ return mm_strdup(base_yytext);
+}
+
+static char *
+create_questionmarks(char *name, bool array)
+{
+ struct variable *p = find_variable(name);
+ int count;
+ char *result = EMPTY;
+
+ /* In case we have a struct, we have to print as many "?" as there are attributes in the struct
+ * An array is only allowed together with an element argument
+ * This is essentially only used for inserts, but using a struct as input parameter is an error anywhere else
+ * so we don't have to worry here. */
+
+ if (p->type->type == ECPGt_struct || (array && p->type->type == ECPGt_array && p->type->u.element->type == ECPGt_struct))
+ {
+ struct ECPGstruct_member *m;
+
+ if (p->type->type == ECPGt_struct)
+ m = p->type->u.members;
+ else
+ m = p->type->u.element->u.members;
+
+ for (count = 0; m != NULL; m=m->next, count++);
+ }
+ else
+ count = 1;
+
+ for (; count > 0; count --)
+ {
+ sprintf(pacounter_buffer, "$%d", pacounter++);
+ result = cat_str(3, result, mm_strdup(pacounter_buffer), mm_strdup(" , "));
+ }
+
+ /* removed the trailing " ," */
+
+ result[strlen(result)-3] = '\0';
+ return result;
+}
+
+static char *
+adjust_outofscope_cursor_vars(struct cursor *cur)
+{
+ /* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
+ * For instance you can DECLARE a cursor in one function, and OPEN/FETCH/CLOSE
+ * it in another functions. This is very useful for e.g. event-driver programming,
+ * but may also lead to dangerous programming. The limitation when this is allowed
+ * and doesn't cause problems have to be documented, like the allocated variables
+ * must not be realloc()'ed.
+ *
+ * We have to change the variables to our own struct and just store the pointer
+ * instead of the variable. Do it only for local variables, not for globals.
+ */
+
+ char *result = EMPTY;
+ int insert;
+
+ for (insert = 1; insert >= 0; insert--)
+ {
+ struct arguments *list;
+ struct arguments *ptr;
+ struct arguments *newlist = NULL;
+ struct variable *newvar, *newind;
+
+ list = (insert ? cur->argsinsert : cur->argsresult);
+
+ for (ptr = list; ptr != NULL; ptr = ptr->next)
+ {
+ char var_text[20];
+ char *original_var;
+ bool skip_set_var = false;
+ bool var_ptr = false;
+
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->variable->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+
+ /* Don't emit ECPGset_var() calls for global variables */
+ if (ptr->variable->brace_level == 0)
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type == ECPGt_char_variable)
+ && (strncmp(ptr->variable->name, "ECPGprepared_statement", strlen("ECPGprepared_statement")) == 0))
+ {
+ newvar = ptr->variable;
+ skip_set_var = true;
+ }
+ else if ((ptr->variable->type->type != ECPGt_varchar
+ && ptr->variable->type->type != ECPGt_char
+ && ptr->variable->type->type != ECPGt_unsigned_char
+ && ptr->variable->type->type != ECPGt_string
+ && ptr->variable->type->type != ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ mm_strdup("1"),
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ }
+ else if ((ptr->variable->type->type == ECPGt_varchar
+ || ptr->variable->type->type == ECPGt_char
+ || ptr->variable->type->type == ECPGt_unsigned_char
+ || ptr->variable->type->type == ECPGt_string
+ || ptr->variable->type->type == ECPGt_bytea)
+ && atoi(ptr->variable->type->size) > 1)
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ if (ptr->variable->type->type == ECPGt_varchar ||
+ ptr->variable->type->type == ECPGt_bytea)
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_struct
+ || ptr->variable->type->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.members,
+ ptr->variable->type->type,
+ ptr->variable->type->type_name,
+ ptr->variable->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->variable->type->type == ECPGt_array)
+ {
+ if (ptr->variable->type->u.element->type == ECPGt_struct
+ || ptr->variable->type->u.element->type == ECPGt_union)
+ {
+ newvar = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->variable->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->variable->type->u.element->u.members,
+ ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->type_name,
+ ptr->variable->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,
+ ptr->variable->type->u.element->size,
+ ptr->variable->type->u.element->counter),
+ ptr->variable->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else
+ {
+ newvar = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->variable->type->type,
+ ptr->variable->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <connection>, <pointer>. <line number>)" */
+ if (!skip_set_var)
+ {
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ /* now the indicator if there is one and it's not a global variable */
+ if ((ptr->indicator->type->type == ECPGt_NO_INDICATOR) || (ptr->indicator->brace_level == 0))
+ {
+ newind = ptr->indicator;
+ }
+ else
+ {
+ /* change variable name to "ECPGget_var(<counter>)" */
+ original_var = ptr->indicator->name;
+ sprintf(var_text, "%d))", ecpg_internal_var);
+ var_ptr = false;
+
+ if (ptr->indicator->type->type == ECPGt_struct
+ || ptr->indicator->type->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.members,
+ ptr->indicator->type->type,
+ ptr->indicator->type->type_name,
+ ptr->indicator->type->struct_sizeof),
+ 0);
+ var_ptr = true;
+ }
+ else if (ptr->indicator->type->type == ECPGt_array)
+ {
+ if (ptr->indicator->type->u.element->type == ECPGt_struct
+ || ptr->indicator->type->u.element->type == ECPGt_union)
+ {
+ newind = new_variable(cat_str(5, mm_strdup("(*("),
+ mm_strdup(ptr->indicator->type->u.element->type_name),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text),
+ mm_strdup(")")),
+ ECPGmake_struct_type(ptr->indicator->type->u.element->u.members,
+ ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->type_name,
+ ptr->indicator->type->u.element->struct_sizeof),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->u.element->type)),
+ mm_strdup(" *)(ECPGget_var("), mm_strdup(var_text)),
+ ECPGmake_array_type(ECPGmake_simple_type(ptr->indicator->type->u.element->type,
+ ptr->indicator->type->u.element->size,
+ ptr->indicator->type->u.element->counter),
+ ptr->indicator->type->size),
+ 0);
+ var_ptr = true;
+ }
+ }
+ else if (atoi(ptr->indicator->type->size) > 1)
+ {
+ newind = new_variable(cat_str(4, mm_strdup("("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ }
+ else
+ {
+ newind = new_variable(cat_str(4, mm_strdup("*("),
+ mm_strdup(ecpg_type_name(ptr->indicator->type->type)),
+ mm_strdup(" *)(ECPGget_var("),
+ mm_strdup(var_text)),
+ ECPGmake_simple_type(ptr->indicator->type->type,
+ ptr->indicator->type->size,
+ ptr->variable->type->counter),
+ 0);
+ var_ptr = true;
+ }
+
+ /* create call to "ECPGset_var(<counter>, <pointer>. <line number>)" */
+ sprintf(var_text, "%d, %s", ecpg_internal_var++, var_ptr ? "&(" : "(");
+ result = cat_str(5, result, mm_strdup("ECPGset_var("),
+ mm_strdup(var_text), mm_strdup(original_var),
+ mm_strdup("), __LINE__);\n"));
+ }
+
+ add_variable_to_tail(&newlist, newvar, newind);
+ }
+
+ if (insert)
+ cur->argsinsert_oos = newlist;
+ else
+ cur->argsresult_oos = newlist;
+ }
+
+ return result;
+}
+
+/* This tests whether the cursor was declared and opened in the same function. */
+#define SAMEFUNC(cur) \
+ ((cur->function == NULL) || \
+ (cur->function != NULL && strcmp(cur->function, current_function) == 0))
+
+static struct cursor *
+add_additional_variables(char *name, bool insert)
+{
+ struct cursor *ptr;
+ struct arguments *p;
+ int (* strcmp_fn)(const char *, const char *) = ((name[0] == ':' || name[0] == '"') ? strcmp : pg_strcasecmp);
+
+ for (ptr = cur; ptr != NULL; ptr=ptr->next)
+ {
+ if (strcmp_fn(ptr->name, name) == 0)
+ break;
+ }
+
+ if (ptr == NULL)
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" does not exist", name);
+ return NULL;
+ }
+
+ if (insert)
+ {
+ /* add all those input variables that were given earlier
+ * note that we have to append here but have to keep the existing order */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsinsert : ptr->argsinsert_oos); p; p = p->next)
+ add_variable_to_tail(&argsinsert, p->variable, p->indicator);
+ }
+
+ /* add all those output variables that were given earlier */
+ for (p = (SAMEFUNC(ptr) ? ptr->argsresult : ptr->argsresult_oos); p; p = p->next)
+ add_variable_to_tail(&argsresult, p->variable, p->indicator);
+
+ return ptr;
+}
+
+static void
+add_typedef(char *name, char *dimension, char *length, enum ECPGttype type_enum,
+ char *type_dimension, char *type_index, int initializer, int array)
+{
+ /* add entry to list */
+ struct typedefs *ptr, *this;
+
+ if ((type_enum == ECPGt_struct ||
+ type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in type definition");
+ else if (INFORMIX_MODE && strcmp(name, "string") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "type name \"string\" is reserved in Informix mode");
+ else
+ {
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(name, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", name);
+ }
+ adjust_array(type_enum, &dimension, &length, type_dimension, type_index, array, true);
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = name;
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = type_enum;
+ this->type->type_str = mm_strdup(name);
+ this->type->type_dimension = dimension; /* dimension of array */
+ this->type->type_index = length; /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = (type_enum == ECPGt_struct || type_enum == ECPGt_union) ?
+ ECPGstruct_member_dup(struct_member_list[struct_level]) : NULL;
+
+ if (type_enum != ECPGt_varchar &&
+ type_enum != ECPGt_bytea &&
+ type_enum != ECPGt_char &&
+ type_enum != ECPGt_unsigned_char &&
+ type_enum != ECPGt_string &&
+ atoi(this->type->type_index) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ types = this;
+ }
+}
+
+/*
+ * check an SQL identifier is declared or not.
+ * If it is already declared, the global variable
+ * connection will be changed to the related connection.
+ */
+static bool
+check_declared_list(const char *name)
+{
+ struct declared_list *ptr = NULL;
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr -> next)
+ {
+ if (!ptr->connection)
+ continue;
+ if (strcmp(name, ptr -> name) == 0)
+ {
+ if (connection && strcmp(ptr->connection, connection) != 0)
+ mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten with %s by DECLARE statement %s", connection, ptr->connection, name);
+ connection = mm_strdup(ptr -> connection);
+ return true;
+ }
+ }
+ return false;
+}
+%}
+
+%expect 0
+%name-prefix="base_yy"
+%locations
+
+%union {
+ double dval;
+ char *str;
+ int ival;
+ struct when action;
+ struct index index;
+ int tagname;
+ struct this_type type;
+ enum ECPGttype type_enum;
+ enum ECPGdtype dtype_enum;
+ struct fetch_desc descriptor;
+ struct su_symbol struct_union;
+ struct prep prep;
+ struct exec exec;
+ struct describe describe;
+}
+/* tokens */
+/* src/interfaces/ecpg/preproc/ecpg.tokens */
+
+/* special embedded SQL tokens */
+%token SQL_ALLOCATE SQL_AUTOCOMMIT SQL_BOOL SQL_BREAK
+ SQL_CARDINALITY SQL_CONNECT
+ SQL_COUNT
+ SQL_DATETIME_INTERVAL_CODE
+ SQL_DATETIME_INTERVAL_PRECISION SQL_DESCRIBE
+ SQL_DESCRIPTOR SQL_DISCONNECT SQL_FOUND
+ SQL_FREE SQL_GET SQL_GO SQL_GOTO SQL_IDENTIFIED
+ SQL_INDICATOR SQL_KEY_MEMBER SQL_LENGTH
+ SQL_LONG SQL_NULLABLE SQL_OCTET_LENGTH
+ SQL_OPEN SQL_OUTPUT SQL_REFERENCE
+ SQL_RETURNED_LENGTH SQL_RETURNED_OCTET_LENGTH SQL_SCALE
+ SQL_SECTION SQL_SHORT SQL_SIGNED SQL_SQLERROR
+ SQL_SQLPRINT SQL_SQLWARNING SQL_START SQL_STOP
+ SQL_STRUCT SQL_UNSIGNED SQL_VAR SQL_WHENEVER
+
+/* C tokens */
+%token S_ADD S_AND S_ANYTHING S_AUTO S_CONST S_DEC S_DIV
+ S_DOTPOINT S_EQUAL S_EXTERN S_INC S_LSHIFT S_MEMPOINT
+ S_MEMBER S_MOD S_MUL S_NEQUAL S_OR S_REGISTER S_RSHIFT
+ S_STATIC S_SUB S_VOLATILE
+ S_TYPEDEF
+
+%token CSTRING CVARIABLE CPP_LINE IP
+/* types */
+%type <str> toplevel_stmt
+%type <str> stmt
+%type <str> CallStmt
+%type <str> CreateRoleStmt
+%type <str> opt_with
+%type <str> OptRoleList
+%type <str> AlterOptRoleList
+%type <str> AlterOptRoleElem
+%type <str> CreateOptRoleElem
+%type <str> CreateUserStmt
+%type <str> AlterRoleStmt
+%type <str> opt_in_database
+%type <str> AlterRoleSetStmt
+%type <str> DropRoleStmt
+%type <str> CreateGroupStmt
+%type <str> AlterGroupStmt
+%type <str> add_drop
+%type <str> CreateSchemaStmt
+%type <str> OptSchemaName
+%type <str> OptSchemaEltList
+%type <str> schema_stmt
+%type <str> VariableSetStmt
+%type <str> set_rest
+%type <str> generic_set
+%type <str> set_rest_more
+%type <str> var_name
+%type <str> var_list
+%type <str> var_value
+%type <str> iso_level
+%type <str> opt_boolean_or_string
+%type <str> zone_value
+%type <str> opt_encoding
+%type <str> NonReservedWord_or_Sconst
+%type <str> VariableResetStmt
+%type <str> reset_rest
+%type <str> generic_reset
+%type <str> SetResetClause
+%type <str> FunctionSetResetClause
+%type <str> VariableShowStmt
+%type <str> ConstraintsSetStmt
+%type <str> constraints_set_list
+%type <str> constraints_set_mode
+%type <str> CheckPointStmt
+%type <str> DiscardStmt
+%type <str> AlterTableStmt
+%type <str> alter_table_cmds
+%type <str> partition_cmd
+%type <str> index_partition_cmd
+%type <str> alter_table_cmd
+%type <str> alter_column_default
+%type <str> opt_drop_behavior
+%type <str> opt_collate_clause
+%type <str> alter_using
+%type <str> replica_identity
+%type <str> reloptions
+%type <str> opt_reloptions
+%type <str> reloption_list
+%type <str> reloption_elem
+%type <str> alter_identity_column_option_list
+%type <str> alter_identity_column_option
+%type <str> PartitionBoundSpec
+%type <str> hash_partbound_elem
+%type <str> hash_partbound
+%type <str> AlterCompositeTypeStmt
+%type <str> alter_type_cmds
+%type <str> alter_type_cmd
+%type <str> ClosePortalStmt
+%type <str> CopyStmt
+%type <str> copy_from
+%type <str> opt_program
+%type <str> copy_file_name
+%type <str> copy_options
+%type <str> copy_opt_list
+%type <str> copy_opt_item
+%type <str> opt_binary
+%type <str> copy_delimiter
+%type <str> opt_using
+%type <str> copy_generic_opt_list
+%type <str> copy_generic_opt_elem
+%type <str> copy_generic_opt_arg
+%type <str> copy_generic_opt_arg_list
+%type <str> copy_generic_opt_arg_list_item
+%type <str> CreateStmt
+%type <str> OptTemp
+%type <str> OptTableElementList
+%type <str> OptTypedTableElementList
+%type <str> TableElementList
+%type <str> TypedTableElementList
+%type <str> TableElement
+%type <str> TypedTableElement
+%type <str> columnDef
+%type <str> columnOptions
+%type <str> column_compression
+%type <str> opt_column_compression
+%type <str> ColQualList
+%type <str> ColConstraint
+%type <str> ColConstraintElem
+%type <str> generated_when
+%type <str> ConstraintAttr
+%type <str> TableLikeClause
+%type <str> TableLikeOptionList
+%type <str> TableLikeOption
+%type <str> TableConstraint
+%type <str> ConstraintElem
+%type <str> opt_no_inherit
+%type <str> opt_column_list
+%type <str> columnList
+%type <str> columnElem
+%type <str> opt_c_include
+%type <str> key_match
+%type <str> ExclusionConstraintList
+%type <str> ExclusionConstraintElem
+%type <str> OptWhereClause
+%type <str> key_actions
+%type <str> key_update
+%type <str> key_delete
+%type <str> key_action
+%type <str> OptInherit
+%type <str> OptPartitionSpec
+%type <str> PartitionSpec
+%type <str> part_params
+%type <str> part_elem
+%type <str> table_access_method_clause
+%type <str> OptWith
+%type <str> OnCommitOption
+%type <str> OptTableSpace
+%type <str> OptConsTableSpace
+%type <str> ExistingIndex
+%type <str> CreateStatsStmt
+%type <str> stats_params
+%type <str> stats_param
+%type <str> AlterStatsStmt
+%type <str> create_as_target
+%type <str> opt_with_data
+%type <str> CreateMatViewStmt
+%type <str> create_mv_target
+%type <str> OptNoLog
+%type <str> RefreshMatViewStmt
+%type <str> CreateSeqStmt
+%type <str> AlterSeqStmt
+%type <str> OptSeqOptList
+%type <str> OptParenthesizedSeqOptList
+%type <str> SeqOptList
+%type <str> SeqOptElem
+%type <str> opt_by
+%type <str> NumericOnly
+%type <str> NumericOnly_list
+%type <str> CreatePLangStmt
+%type <str> opt_trusted
+%type <str> handler_name
+%type <str> opt_inline_handler
+%type <str> validator_clause
+%type <str> opt_validator
+%type <str> opt_procedural
+%type <str> CreateTableSpaceStmt
+%type <str> OptTableSpaceOwner
+%type <str> DropTableSpaceStmt
+%type <str> CreateExtensionStmt
+%type <str> create_extension_opt_list
+%type <str> create_extension_opt_item
+%type <str> AlterExtensionStmt
+%type <str> alter_extension_opt_list
+%type <str> alter_extension_opt_item
+%type <str> AlterExtensionContentsStmt
+%type <str> CreateFdwStmt
+%type <str> fdw_option
+%type <str> fdw_options
+%type <str> opt_fdw_options
+%type <str> AlterFdwStmt
+%type <str> create_generic_options
+%type <str> generic_option_list
+%type <str> alter_generic_options
+%type <str> alter_generic_option_list
+%type <str> alter_generic_option_elem
+%type <str> generic_option_elem
+%type <str> generic_option_name
+%type <str> generic_option_arg
+%type <str> CreateForeignServerStmt
+%type <str> opt_type
+%type <str> foreign_server_version
+%type <str> opt_foreign_server_version
+%type <str> AlterForeignServerStmt
+%type <str> CreateForeignTableStmt
+%type <str> ImportForeignSchemaStmt
+%type <str> import_qualification_type
+%type <str> import_qualification
+%type <str> CreateUserMappingStmt
+%type <str> auth_ident
+%type <str> DropUserMappingStmt
+%type <str> AlterUserMappingStmt
+%type <str> CreatePolicyStmt
+%type <str> AlterPolicyStmt
+%type <str> RowSecurityOptionalExpr
+%type <str> RowSecurityOptionalWithCheck
+%type <str> RowSecurityDefaultToRole
+%type <str> RowSecurityOptionalToRole
+%type <str> RowSecurityDefaultPermissive
+%type <str> RowSecurityDefaultForCmd
+%type <str> row_security_cmd
+%type <str> CreateAmStmt
+%type <str> am_type
+%type <str> CreateTrigStmt
+%type <str> TriggerActionTime
+%type <str> TriggerEvents
+%type <str> TriggerOneEvent
+%type <str> TriggerReferencing
+%type <str> TriggerTransitions
+%type <str> TriggerTransition
+%type <str> TransitionOldOrNew
+%type <str> TransitionRowOrTable
+%type <str> TransitionRelName
+%type <str> TriggerForSpec
+%type <str> TriggerForOptEach
+%type <str> TriggerForType
+%type <str> TriggerWhen
+%type <str> FUNCTION_or_PROCEDURE
+%type <str> TriggerFuncArgs
+%type <str> TriggerFuncArg
+%type <str> OptConstrFromTable
+%type <str> ConstraintAttributeSpec
+%type <str> ConstraintAttributeElem
+%type <str> CreateEventTrigStmt
+%type <str> event_trigger_when_list
+%type <str> event_trigger_when_item
+%type <str> event_trigger_value_list
+%type <str> AlterEventTrigStmt
+%type <str> enable_trigger
+%type <str> CreateAssertionStmt
+%type <str> DefineStmt
+%type <str> definition
+%type <str> def_list
+%type <str> def_elem
+%type <str> def_arg
+%type <str> old_aggr_definition
+%type <str> old_aggr_list
+%type <str> old_aggr_elem
+%type <str> opt_enum_val_list
+%type <str> enum_val_list
+%type <str> AlterEnumStmt
+%type <str> opt_if_not_exists
+%type <str> CreateOpClassStmt
+%type <str> opclass_item_list
+%type <str> opclass_item
+%type <str> opt_default
+%type <str> opt_opfamily
+%type <str> opclass_purpose
+%type <str> opt_recheck
+%type <str> CreateOpFamilyStmt
+%type <str> AlterOpFamilyStmt
+%type <str> opclass_drop_list
+%type <str> opclass_drop
+%type <str> DropOpClassStmt
+%type <str> DropOpFamilyStmt
+%type <str> DropOwnedStmt
+%type <str> ReassignOwnedStmt
+%type <str> DropStmt
+%type <str> object_type_any_name
+%type <str> object_type_name
+%type <str> drop_type_name
+%type <str> object_type_name_on_any_name
+%type <str> any_name_list
+%type <str> any_name
+%type <str> attrs
+%type <str> type_name_list
+%type <str> TruncateStmt
+%type <str> opt_restart_seqs
+%type <str> CommentStmt
+%type <str> comment_text
+%type <str> SecLabelStmt
+%type <str> opt_provider
+%type <str> security_label
+%type <str> FetchStmt
+%type <str> fetch_args
+%type <str> from_in
+%type <str> opt_from_in
+%type <str> GrantStmt
+%type <str> RevokeStmt
+%type <str> privileges
+%type <str> privilege_list
+%type <str> privilege
+%type <str> privilege_target
+%type <str> grantee_list
+%type <str> grantee
+%type <str> opt_grant_grant_option
+%type <str> GrantRoleStmt
+%type <str> RevokeRoleStmt
+%type <str> opt_grant_admin_option
+%type <str> opt_granted_by
+%type <str> AlterDefaultPrivilegesStmt
+%type <str> DefACLOptionList
+%type <str> DefACLOption
+%type <str> DefACLAction
+%type <str> defacl_privilege_target
+%type <str> IndexStmt
+%type <str> opt_unique
+%type <str> opt_concurrently
+%type <str> opt_index_name
+%type <str> access_method_clause
+%type <str> index_params
+%type <str> index_elem_options
+%type <str> index_elem
+%type <str> opt_include
+%type <str> index_including_params
+%type <str> opt_collate
+%type <str> opt_class
+%type <str> opt_asc_desc
+%type <str> opt_nulls_order
+%type <str> CreateFunctionStmt
+%type <str> opt_or_replace
+%type <str> func_args
+%type <str> func_args_list
+%type <str> function_with_argtypes_list
+%type <str> function_with_argtypes
+%type <str> func_args_with_defaults
+%type <str> func_args_with_defaults_list
+%type <str> func_arg
+%type <str> arg_class
+%type <str> param_name
+%type <str> func_return
+%type <str> func_type
+%type <str> func_arg_with_default
+%type <str> aggr_arg
+%type <str> aggr_args
+%type <str> aggr_args_list
+%type <str> aggregate_with_argtypes
+%type <str> aggregate_with_argtypes_list
+%type <str> opt_createfunc_opt_list
+%type <str> createfunc_opt_list
+%type <str> common_func_opt_item
+%type <str> createfunc_opt_item
+%type <str> func_as
+%type <str> ReturnStmt
+%type <str> opt_routine_body
+%type <str> routine_body_stmt_list
+%type <str> routine_body_stmt
+%type <str> transform_type_list
+%type <str> opt_definition
+%type <str> table_func_column
+%type <str> table_func_column_list
+%type <str> AlterFunctionStmt
+%type <str> alterfunc_opt_list
+%type <str> opt_restrict
+%type <str> RemoveFuncStmt
+%type <str> RemoveAggrStmt
+%type <str> RemoveOperStmt
+%type <str> oper_argtypes
+%type <str> any_operator
+%type <str> operator_with_argtypes_list
+%type <str> operator_with_argtypes
+%type <str> DoStmt
+%type <str> dostmt_opt_list
+%type <str> dostmt_opt_item
+%type <str> CreateCastStmt
+%type <str> cast_context
+%type <str> DropCastStmt
+%type <str> opt_if_exists
+%type <str> CreateTransformStmt
+%type <str> transform_element_list
+%type <str> DropTransformStmt
+%type <str> ReindexStmt
+%type <str> reindex_target_type
+%type <str> reindex_target_multitable
+%type <str> AlterTblSpcStmt
+%type <str> RenameStmt
+%type <str> opt_column
+%type <str> opt_set_data
+%type <str> AlterObjectDependsStmt
+%type <str> opt_no
+%type <str> AlterObjectSchemaStmt
+%type <str> AlterOperatorStmt
+%type <str> operator_def_list
+%type <str> operator_def_elem
+%type <str> operator_def_arg
+%type <str> AlterTypeStmt
+%type <str> AlterOwnerStmt
+%type <str> CreatePublicationStmt
+%type <str> opt_publication_for_tables
+%type <str> publication_for_tables
+%type <str> AlterPublicationStmt
+%type <str> CreateSubscriptionStmt
+%type <str> AlterSubscriptionStmt
+%type <str> DropSubscriptionStmt
+%type <str> RuleStmt
+%type <str> RuleActionList
+%type <str> RuleActionMulti
+%type <str> RuleActionStmt
+%type <str> RuleActionStmtOrEmpty
+%type <str> event
+%type <str> opt_instead
+%type <str> NotifyStmt
+%type <str> notify_payload
+%type <str> ListenStmt
+%type <str> UnlistenStmt
+%type <str> TransactionStmt
+%type <str> TransactionStmtLegacy
+%type <str> opt_transaction
+%type <str> transaction_mode_item
+%type <str> transaction_mode_list
+%type <str> transaction_mode_list_or_empty
+%type <str> opt_transaction_chain
+%type <str> ViewStmt
+%type <str> opt_check_option
+%type <str> LoadStmt
+%type <str> CreatedbStmt
+%type <str> createdb_opt_list
+%type <str> createdb_opt_items
+%type <str> createdb_opt_item
+%type <str> createdb_opt_name
+%type <str> opt_equal
+%type <str> AlterDatabaseStmt
+%type <str> AlterDatabaseSetStmt
+%type <str> DropdbStmt
+%type <str> drop_option_list
+%type <str> drop_option
+%type <str> AlterCollationStmt
+%type <str> AlterSystemStmt
+%type <str> CreateDomainStmt
+%type <str> AlterDomainStmt
+%type <str> opt_as
+%type <str> AlterTSDictionaryStmt
+%type <str> AlterTSConfigurationStmt
+%type <str> any_with
+%type <str> CreateConversionStmt
+%type <str> ClusterStmt
+%type <str> cluster_index_specification
+%type <str> VacuumStmt
+%type <str> AnalyzeStmt
+%type <str> utility_option_list
+%type <str> analyze_keyword
+%type <str> utility_option_elem
+%type <str> utility_option_name
+%type <str> utility_option_arg
+%type <str> opt_analyze
+%type <str> opt_verbose
+%type <str> opt_full
+%type <str> opt_freeze
+%type <str> opt_name_list
+%type <str> vacuum_relation
+%type <str> vacuum_relation_list
+%type <str> opt_vacuum_relation_list
+%type <str> ExplainStmt
+%type <str> ExplainableStmt
+%type <prep> PrepareStmt
+%type <str> prep_type_clause
+%type <str> PreparableStmt
+%type <exec> ExecuteStmt
+%type <str> execute_param_clause
+%type <str> InsertStmt
+%type <str> insert_target
+%type <str> insert_rest
+%type <str> override_kind
+%type <str> insert_column_list
+%type <str> insert_column_item
+%type <str> opt_on_conflict
+%type <str> opt_conf_expr
+%type <str> returning_clause
+%type <str> DeleteStmt
+%type <str> using_clause
+%type <str> LockStmt
+%type <str> opt_lock
+%type <str> lock_type
+%type <str> opt_nowait
+%type <str> opt_nowait_or_skip
+%type <str> UpdateStmt
+%type <str> set_clause_list
+%type <str> set_clause
+%type <str> set_target
+%type <str> set_target_list
+%type <str> DeclareCursorStmt
+%type <str> cursor_name
+%type <str> cursor_options
+%type <str> opt_hold
+%type <str> SelectStmt
+%type <str> select_with_parens
+%type <str> select_no_parens
+%type <str> select_clause
+%type <str> simple_select
+%type <str> with_clause
+%type <str> cte_list
+%type <str> common_table_expr
+%type <str> opt_materialized
+%type <str> opt_search_clause
+%type <str> opt_cycle_clause
+%type <str> opt_with_clause
+%type <str> into_clause
+%type <str> OptTempTableName
+%type <str> opt_table
+%type <str> set_quantifier
+%type <str> distinct_clause
+%type <str> opt_all_clause
+%type <str> opt_sort_clause
+%type <str> sort_clause
+%type <str> sortby_list
+%type <str> sortby
+%type <str> select_limit
+%type <str> opt_select_limit
+%type <str> limit_clause
+%type <str> offset_clause
+%type <str> select_limit_value
+%type <str> select_offset_value
+%type <str> select_fetch_first_value
+%type <str> I_or_F_const
+%type <str> row_or_rows
+%type <str> first_or_next
+%type <str> group_clause
+%type <str> group_by_list
+%type <str> group_by_item
+%type <str> empty_grouping_set
+%type <str> rollup_clause
+%type <str> cube_clause
+%type <str> grouping_sets_clause
+%type <str> having_clause
+%type <str> for_locking_clause
+%type <str> opt_for_locking_clause
+%type <str> for_locking_items
+%type <str> for_locking_item
+%type <str> for_locking_strength
+%type <str> locked_rels_list
+%type <str> values_clause
+%type <str> from_clause
+%type <str> from_list
+%type <str> table_ref
+%type <str> joined_table
+%type <str> alias_clause
+%type <str> opt_alias_clause
+%type <str> opt_alias_clause_for_join_using
+%type <str> func_alias_clause
+%type <str> join_type
+%type <str> opt_outer
+%type <str> join_qual
+%type <str> relation_expr
+%type <str> relation_expr_list
+%type <str> relation_expr_opt_alias
+%type <str> tablesample_clause
+%type <str> opt_repeatable_clause
+%type <str> func_table
+%type <str> rowsfrom_item
+%type <str> rowsfrom_list
+%type <str> opt_col_def_list
+%type <str> opt_ordinality
+%type <str> where_clause
+%type <str> where_or_current_clause
+%type <str> OptTableFuncElementList
+%type <str> TableFuncElementList
+%type <str> TableFuncElement
+%type <str> xmltable
+%type <str> xmltable_column_list
+%type <str> xmltable_column_el
+%type <str> xmltable_column_option_list
+%type <str> xmltable_column_option_el
+%type <str> xml_namespace_list
+%type <str> xml_namespace_el
+%type <str> Typename
+%type <index> opt_array_bounds
+%type <str> SimpleTypename
+%type <str> ConstTypename
+%type <str> GenericType
+%type <str> opt_type_modifiers
+%type <str> Numeric
+%type <str> opt_float
+%type <str> Bit
+%type <str> ConstBit
+%type <str> BitWithLength
+%type <str> BitWithoutLength
+%type <str> Character
+%type <str> ConstCharacter
+%type <str> CharacterWithLength
+%type <str> CharacterWithoutLength
+%type <str> character
+%type <str> opt_varying
+%type <str> ConstDatetime
+%type <str> ConstInterval
+%type <str> opt_timezone
+%type <str> opt_interval
+%type <str> interval_second
+%type <str> a_expr
+%type <str> b_expr
+%type <str> c_expr
+%type <str> func_application
+%type <str> func_expr
+%type <str> func_expr_windowless
+%type <str> func_expr_common_subexpr
+%type <str> xml_root_version
+%type <str> opt_xml_root_standalone
+%type <str> xml_attributes
+%type <str> xml_attribute_list
+%type <str> xml_attribute_el
+%type <str> document_or_content
+%type <str> xml_whitespace_option
+%type <str> xmlexists_argument
+%type <str> xml_passing_mech
+%type <str> within_group_clause
+%type <str> filter_clause
+%type <str> window_clause
+%type <str> window_definition_list
+%type <str> window_definition
+%type <str> over_clause
+%type <str> window_specification
+%type <str> opt_existing_window_name
+%type <str> opt_partition_clause
+%type <str> opt_frame_clause
+%type <str> frame_extent
+%type <str> frame_bound
+%type <str> opt_window_exclusion_clause
+%type <str> row
+%type <str> explicit_row
+%type <str> implicit_row
+%type <str> sub_type
+%type <str> all_Op
+%type <str> MathOp
+%type <str> qual_Op
+%type <str> qual_all_Op
+%type <str> subquery_Op
+%type <str> expr_list
+%type <str> func_arg_list
+%type <str> func_arg_expr
+%type <str> func_arg_list_opt
+%type <str> type_list
+%type <str> array_expr
+%type <str> array_expr_list
+%type <str> extract_list
+%type <str> extract_arg
+%type <str> unicode_normal_form
+%type <str> overlay_list
+%type <str> position_list
+%type <str> substr_list
+%type <str> trim_list
+%type <str> in_expr
+%type <str> case_expr
+%type <str> when_clause_list
+%type <str> when_clause
+%type <str> case_default
+%type <str> case_arg
+%type <str> columnref
+%type <str> indirection_el
+%type <str> opt_slice_bound
+%type <str> indirection
+%type <str> opt_indirection
+%type <str> opt_asymmetric
+%type <str> opt_target_list
+%type <str> target_list
+%type <str> target_el
+%type <str> qualified_name_list
+%type <str> qualified_name
+%type <str> name_list
+%type <str> name
+%type <str> attr_name
+%type <str> file_name
+%type <str> func_name
+%type <str> AexprConst
+%type <str> Iconst
+%type <str> SignedIconst
+%type <str> RoleId
+%type <str> RoleSpec
+%type <str> role_list
+%type <str> NonReservedWord
+%type <str> BareColLabel
+%type <str> unreserved_keyword
+%type <str> col_name_keyword
+%type <str> type_func_name_keyword
+%type <str> reserved_keyword
+%type <str> bare_label_keyword
+/* ecpgtype */
+/* src/interfaces/ecpg/preproc/ecpg.type */
+%type <str> ECPGAllocateDescr
+%type <str> ECPGCKeywords
+%type <str> ECPGColId
+%type <str> ECPGColLabel
+%type <str> ECPGColLabelCommon
+%type <str> ECPGConnect
+%type <str> ECPGCursorStmt
+%type <str> ECPGDeallocateDescr
+%type <str> ECPGDeclaration
+%type <str> ECPGDeclare
+%type <str> ECPGDeclareStmt
+%type <str> ECPGDisconnect
+%type <str> ECPGExecuteImmediateStmt
+%type <str> ECPGFree
+%type <str> ECPGGetDescHeaderItem
+%type <str> ECPGGetDescItem
+%type <str> ECPGGetDescriptorHeader
+%type <str> ECPGKeywords
+%type <str> ECPGKeywords_rest
+%type <str> ECPGKeywords_vanames
+%type <str> ECPGOpen
+%type <str> ECPGSetAutocommit
+%type <str> ECPGSetConnection
+%type <str> ECPGSetDescHeaderItem
+%type <str> ECPGSetDescItem
+%type <str> ECPGSetDescriptorHeader
+%type <str> ECPGTypeName
+%type <str> ECPGTypedef
+%type <str> ECPGVar
+%type <str> ECPGVarDeclaration
+%type <str> ECPGWhenever
+%type <str> ECPGunreserved_interval
+%type <str> UsingConst
+%type <str> UsingValue
+%type <str> all_unreserved_keyword
+%type <str> c_anything
+%type <str> c_args
+%type <str> c_list
+%type <str> c_stuff
+%type <str> c_stuff_item
+%type <str> c_term
+%type <str> c_thing
+%type <str> char_variable
+%type <str> char_civar
+%type <str> civar
+%type <str> civarind
+%type <str> ColId
+%type <str> ColLabel
+%type <str> connect_options
+%type <str> connection_object
+%type <str> connection_target
+%type <str> coutputvariable
+%type <str> cvariable
+%type <str> db_prefix
+%type <str> CreateAsStmt
+%type <str> DeallocateStmt
+%type <str> dis_name
+%type <str> ecpg_bconst
+%type <str> ecpg_fconst
+%type <str> ecpg_ident
+%type <str> ecpg_interval
+%type <str> ecpg_into
+%type <str> ecpg_fetch_into
+%type <str> ecpg_param
+%type <str> ecpg_sconst
+%type <str> ecpg_using
+%type <str> ecpg_xconst
+%type <str> enum_definition
+%type <str> enum_type
+%type <str> execstring
+%type <str> execute_rest
+%type <str> indicator
+%type <str> into_descriptor
+%type <str> into_sqlda
+%type <str> Iresult
+%type <str> on_off
+%type <str> opt_bit_field
+%type <str> opt_connection_name
+%type <str> opt_database_name
+%type <str> opt_ecpg_into
+%type <str> opt_ecpg_fetch_into
+%type <str> opt_ecpg_using
+%type <str> opt_initializer
+%type <str> opt_options
+%type <str> opt_output
+%type <str> opt_pointer
+%type <str> opt_port
+%type <str> opt_reference
+%type <str> opt_scale
+%type <str> opt_server
+%type <str> opt_user
+%type <str> opt_opt_value
+%type <str> ora_user
+%type <str> precision
+%type <str> prepared_name
+%type <str> quoted_ident_stringvar
+%type <str> s_struct_union
+%type <str> server
+%type <str> server_name
+%type <str> single_vt_declaration
+%type <str> storage_clause
+%type <str> storage_declaration
+%type <str> storage_modifier
+%type <str> struct_union_type
+%type <str> struct_union_type_with_symbol
+%type <str> symbol
+%type <str> type_declaration
+%type <str> type_function_name
+%type <str> user_name
+%type <str> using_descriptor
+%type <str> var_declaration
+%type <str> var_type_declarations
+%type <str> variable
+%type <str> variable_declarations
+%type <str> variable_list
+%type <str> vt_declarations
+
+%type <str> Op
+%type <str> IntConstVar
+%type <str> AllConstVar
+%type <str> CSTRING
+%type <str> CPP_LINE
+%type <str> CVARIABLE
+%type <str> BCONST
+%type <str> SCONST
+%type <str> XCONST
+%type <str> IDENT
+
+%type <struct_union> s_struct_union_symbol
+
+%type <descriptor> ECPGGetDescriptor
+%type <descriptor> ECPGSetDescriptor
+
+%type <type_enum> simple_type
+%type <type_enum> signed_type
+%type <type_enum> unsigned_type
+
+%type <dtype_enum> descriptor_item
+%type <dtype_enum> desc_header_item
+
+%type <type> var_type
+
+%type <action> action
+
+%type <describe> ECPGDescribe
+/* orig_tokens */
+ %token IDENT UIDENT FCONST SCONST USCONST BCONST XCONST Op
+ %token ICONST PARAM
+ %token TYPECAST DOT_DOT COLON_EQUALS EQUALS_GREATER
+ %token LESS_EQUALS GREATER_EQUALS NOT_EQUALS
+
+
+
+
+
+
+
+
+
+ %token ABORT_P ABSOLUTE_P ACCESS ACTION ADD_P ADMIN AFTER
+ AGGREGATE ALL ALSO ALTER ALWAYS ANALYSE ANALYZE AND ANY ARRAY AS ASC
+ ASENSITIVE ASSERTION ASSIGNMENT ASYMMETRIC ATOMIC AT ATTACH ATTRIBUTE AUTHORIZATION
+
+ BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
+ BOOLEAN_P BOTH BREADTH BY
+
+ CACHE CALL CALLED CASCADE CASCADED CASE CAST CATALOG_P CHAIN CHAR_P
+ CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
+ CLUSTER COALESCE COLLATE COLLATION COLUMN COLUMNS COMMENT COMMENTS COMMIT
+ COMMITTED COMPRESSION CONCURRENTLY CONFIGURATION CONFLICT
+ CONNECTION CONSTRAINT CONSTRAINTS CONTENT_P CONTINUE_P CONVERSION_P COPY
+ COST CREATE CROSS CSV CUBE CURRENT_P
+ CURRENT_CATALOG CURRENT_DATE CURRENT_ROLE CURRENT_SCHEMA
+ CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
+
+ DATA_P DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS
+ DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS DEPENDS DEPTH DESC
+ DETACH DICTIONARY DISABLE_P DISCARD DISTINCT DO DOCUMENT_P DOMAIN_P
+ DOUBLE_P DROP
+
+ EACH ELSE ENABLE_P ENCODING ENCRYPTED END_P ENUM_P ESCAPE EVENT EXCEPT
+ EXCLUDE EXCLUDING EXCLUSIVE EXECUTE EXISTS EXPLAIN EXPRESSION
+ EXTENSION EXTERNAL EXTRACT
+
+ FALSE_P FAMILY FETCH FILTER FINALIZE FIRST_P FLOAT_P FOLLOWING FOR
+ FORCE FOREIGN FORWARD FREEZE FROM FULL FUNCTION FUNCTIONS
+
+ GENERATED GLOBAL GRANT GRANTED GREATEST GROUP_P GROUPING GROUPS
+
+ HANDLER HAVING HEADER_P HOLD HOUR_P
+
+ IDENTITY_P IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IMPORT_P IN_P INCLUDE
+ INCLUDING INCREMENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
+ INNER_P INOUT INPUT_P INSENSITIVE INSERT INSTEAD INT_P INTEGER
+ INTERSECT INTERVAL INTO INVOKER IS ISNULL ISOLATION
+
+ JOIN
+
+ KEY
+
+ LABEL LANGUAGE LARGE_P LAST_P LATERAL_P
+ LEADING LEAKPROOF LEAST LEFT LEVEL LIKE LIMIT LISTEN LOAD LOCAL
+ LOCALTIME LOCALTIMESTAMP LOCATION LOCK_P LOCKED LOGGED
+
+ MAPPING MATCH MATERIALIZED MAXVALUE METHOD MINUTE_P MINVALUE MODE MONTH_P MOVE
+
+ NAME_P NAMES NATIONAL NATURAL NCHAR NEW NEXT NFC NFD NFKC NFKD NO NONE
+ NORMALIZE NORMALIZED
+ NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF
+ NULLS_P NUMERIC
+
+ OBJECT_P OF OFF OFFSET OIDS OLD ON ONLY OPERATOR OPTION OPTIONS OR
+ ORDER ORDINALITY OTHERS OUT_P OUTER_P
+ OVER OVERLAPS OVERLAY OVERRIDING OWNED OWNER
+
+ PARALLEL PARSER PARTIAL PARTITION PASSING PASSWORD PLACING PLANS POLICY
+ POSITION PRECEDING PRECISION PRESERVE PREPARE PREPARED PRIMARY
+ PRIOR PRIVILEGES PROCEDURAL PROCEDURE PROCEDURES PROGRAM PUBLICATION
+
+ QUOTE
+
+ RANGE READ REAL REASSIGN RECHECK RECURSIVE REF REFERENCES REFERENCING
+ REFRESH REINDEX RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA
+ RESET RESTART RESTRICT RETURN RETURNING RETURNS REVOKE RIGHT ROLE ROLLBACK ROLLUP
+ ROUTINE ROUTINES ROW ROWS RULE
+
+ SAVEPOINT SCHEMA SCHEMAS SCROLL SEARCH SECOND_P SECURITY SELECT SEQUENCE SEQUENCES
+ SERIALIZABLE SERVER SESSION SESSION_USER SET SETS SETOF SHARE SHOW
+ SIMILAR SIMPLE SKIP SMALLINT SNAPSHOT SOME SQL_P STABLE STANDALONE_P
+ START STATEMENT STATISTICS STDIN STDOUT STORAGE STORED STRICT_P STRIP_P
+ SUBSCRIPTION SUBSTRING SUPPORT SYMMETRIC SYSID SYSTEM_P
+
+ TABLE TABLES TABLESAMPLE TABLESPACE TEMP TEMPLATE TEMPORARY TEXT_P THEN
+ TIES TIME TIMESTAMP TO TRAILING TRANSACTION TRANSFORM
+ TREAT TRIGGER TRIM TRUE_P
+ TRUNCATE TRUSTED TYPE_P TYPES_P
+
+ UESCAPE UNBOUNDED UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN
+ UNLISTEN UNLOGGED UNTIL UPDATE USER USING
+
+ VACUUM VALID VALIDATE VALIDATOR VALUE_P VALUES VARCHAR VARIADIC VARYING
+ VERBOSE VERSION_P VIEW VIEWS VOLATILE
+
+ WHEN WHERE WHITESPACE_P WINDOW WITH WITHIN WITHOUT WORK WRAPPER WRITE
+
+ XML_P XMLATTRIBUTES XMLCONCAT XMLELEMENT XMLEXISTS XMLFOREST XMLNAMESPACES
+ XMLPARSE XMLPI XMLROOT XMLSERIALIZE XMLTABLE
+
+ YEAR_P YES_P
+
+ ZONE
+
+
+
+
+
+
+
+
+
+
+
+ %token NOT_LA NULLS_LA WITH_LA
+
+
+
+
+
+
+
+
+ %token MODE_TYPE_NAME
+ %token MODE_PLPGSQL_EXPR
+ %token MODE_PLPGSQL_ASSIGN1
+ %token MODE_PLPGSQL_ASSIGN2
+ %token MODE_PLPGSQL_ASSIGN3
+
+
+
+ %nonassoc SET
+ %left UNION EXCEPT
+ %left INTERSECT
+ %left OR
+ %left AND
+ %right NOT
+ %nonassoc IS ISNULL NOTNULL
+ %nonassoc '<' '>' '=' LESS_EQUALS GREATER_EQUALS NOT_EQUALS
+ %nonassoc BETWEEN IN_P LIKE ILIKE SIMILAR NOT_LA
+ %nonassoc ESCAPE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %nonassoc UNBOUNDED
+ %nonassoc IDENT
+%nonassoc CSTRING PARTITION RANGE ROWS GROUPS PRECEDING FOLLOWING CUBE ROLLUP
+ %left Op OPERATOR
+ %left '+' '-'
+ %left '*' '/' '%'
+ %left '^'
+
+ %left AT
+ %left COLLATE
+ %right UMINUS
+ %left '[' ']'
+ %left '(' ')'
+ %left TYPECAST
+ %left '.'
+
+
+
+
+
+
+
+ %left JOIN CROSS LEFT FULL RIGHT INNER_P NATURAL
+
+%%
+prog: statements;
+/* rules */
+ toplevel_stmt:
+ stmt
+ {
+ $$ = $1;
+}
+| TransactionStmtLegacy
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);
+ whenever_action(2);
+ free($1);
+ }
+;
+
+
+ stmt:
+ AlterEventTrigStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterCollationStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterDatabaseStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterDatabaseSetStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterDefaultPrivilegesStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterDomainStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterEnumStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterExtensionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterExtensionContentsStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterFdwStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterForeignServerStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterFunctionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterGroupStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterObjectDependsStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterObjectSchemaStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterOwnerStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterOperatorStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterTypeStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterPolicyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterSeqStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterSystemStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterTableStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterTblSpcStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterCompositeTypeStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterPublicationStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterRoleSetStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterRoleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterSubscriptionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterStatsStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterTSConfigurationStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterTSDictionaryStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterUserMappingStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AnalyzeStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CallStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CheckPointStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ClosePortalStmt
+ {
+ if (INFORMIX_MODE)
+ {
+ if (pg_strcasecmp($1+strlen("close "), "database") == 0)
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CLOSE DATABASE statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");");
+ whenever_action(2);
+ free($1);
+ break;
+ }
+ }
+
+ output_statement($1, 0, ECPGst_normal);
+ }
+| ClusterStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CommentStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ConstraintsSetStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CopyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateAmStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateAsStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateAssertionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateCastStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateConversionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateDomainStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateExtensionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateFdwStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateForeignServerStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateForeignTableStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateFunctionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateGroupStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateMatViewStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateOpClassStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateOpFamilyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreatePublicationStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| AlterOpFamilyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreatePolicyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreatePLangStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateSchemaStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateSeqStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateSubscriptionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateStatsStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateTableSpaceStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateTransformStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateTrigStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateEventTrigStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateRoleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateUserStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreateUserMappingStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| CreatedbStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DeallocateStmt
+ {
+ output_deallocate_prepare_statement($1);
+ }
+| DeclareCursorStmt
+ { output_simple_statement($1, (strncmp($1, "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0); }
+| DefineStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DeleteStmt
+ { output_statement($1, 1, ECPGst_prepnormal); }
+| DiscardStmt
+ { output_statement($1, 1, ECPGst_normal); }
+| DoStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropCastStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropOpClassStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropOpFamilyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropOwnedStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropSubscriptionStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropTableSpaceStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropTransformStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropRoleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropUserMappingStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| DropdbStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ExecuteStmt
+ {
+ check_declared_list($1.name);
+ if ($1.type == NULL || strlen($1.type) == 0)
+ output_statement($1.name, 1, ECPGst_execute);
+ else
+ {
+ if ($1.name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable($1.name), &no_indicator);
+ else
+ {
+ /* case of ecpg_ident or CSTRING */
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup($1.name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(3, mm_strdup("execute"), mm_strdup("$0"), $1.type), 0, ECPGst_exec_with_exprlist);
+ }
+ }
+| ExplainStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| FetchStmt
+ { output_statement($1, 1, ECPGst_normal); }
+| GrantStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| GrantRoleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ImportForeignSchemaStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| IndexStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| InsertStmt
+ { output_statement($1, 1, ECPGst_prepnormal); }
+| ListenStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RefreshMatViewStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| LoadStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| LockStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| NotifyStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| PrepareStmt
+ {
+ check_declared_list($1.name);
+ if ($1.type == NULL)
+ output_prepare_statement($1.name, $1.stmt);
+ else if (strlen($1.type) == 0)
+ {
+ char *stmt = cat_str(3, mm_strdup("\""), $1.stmt, mm_strdup("\""));
+ output_prepare_statement($1.name, stmt);
+ }
+ else
+ {
+ if ($1.name[0] != '"')
+ /* case of char_variable */
+ add_variable_to_tail(&argsinsert, find_variable($1.name), &no_indicator);
+ else
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *str = mm_strdup($1.name + 1);
+
+ /* It must be cut off double quotation because new_variable() double-quotes. */
+ str[strlen(str) - 1] = '\0';
+ sprintf(length, "%zu", strlen(str));
+ add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ output_statement(cat_str(5, mm_strdup("prepare"), mm_strdup("$0"), $1.type, mm_strdup("as"), $1.stmt), 0, ECPGst_prepare);
+ }
+ }
+| ReassignOwnedStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ReindexStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RemoveAggrStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RemoveFuncStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RemoveOperStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RenameStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RevokeStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RevokeRoleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| RuleStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| SecLabelStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| SelectStmt
+ { output_statement($1, 1, ECPGst_prepnormal); }
+| TransactionStmt
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);
+ whenever_action(2);
+ free($1);
+ }
+| TruncateStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| UnlistenStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| UpdateStmt
+ { output_statement($1, 1, ECPGst_prepnormal); }
+| VacuumStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| VariableResetStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| VariableSetStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| VariableShowStmt
+ { output_statement($1, 0, ECPGst_normal); }
+| ViewStmt
+ { output_statement($1, 0, ECPGst_normal); }
+ | ECPGAllocateDescr
+ {
+ fprintf(base_yyout,"ECPGallocate_desc(__LINE__, %s);",$1);
+ whenever_action(0);
+ free($1);
+ }
+ | ECPGConnect
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in CONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGconnect(__LINE__, %d, %s, %d); ", compat, $1, autocommit);
+ reset_variables();
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGDeclareStmt
+ {
+ output_simple_statement($1, 0);
+ }
+ | ECPGCursorStmt
+ {
+ output_simple_statement($1, (strncmp($1, "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0);
+ }
+ | ECPGDeallocateDescr
+ {
+ fprintf(base_yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1);
+ whenever_action(0);
+ free($1);
+ }
+ | ECPGDeclare
+ {
+ output_simple_statement($1, 0);
+ }
+ | ECPGDescribe
+ {
+ check_declared_list($1.stmt_name);
+
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %d, %s, %s,", compat, $1.input, connection ? connection : "NULL", $1.stmt_name);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free($1.stmt_name);
+ }
+ | ECPGDisconnect
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in DISCONNECT statement");
+
+ fprintf(base_yyout, "{ ECPGdisconnect(__LINE__, %s);",
+ $1 ? $1 : "\"CURRENT\"");
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGExecuteImmediateStmt { output_statement($1, 0, ECPGst_exec_immediate); }
+ | ECPGFree
+ {
+ const char *con = connection ? connection : "NULL";
+
+ if (strcmp($1, "all") == 0)
+ fprintf(base_yyout, "{ ECPGdeallocate_all(__LINE__, %d, %s);", compat, con);
+ else if ($1[0] == ':')
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, %s);", compat, con, $1+1);
+ else
+ fprintf(base_yyout, "{ ECPGdeallocate(__LINE__, %d, %s, \"%s\");", compat, con, $1);
+
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGGetDescriptor
+ {
+ lookup_descriptor($1.name, connection);
+ output_get_descr($1.name, $1.str);
+ free($1.name);
+ free($1.str);
+ }
+ | ECPGGetDescriptorHeader
+ {
+ lookup_descriptor($1, connection);
+ output_get_descr_header($1);
+ free($1);
+ }
+ | ECPGOpen
+ {
+ struct cursor *ptr;
+
+ if ((ptr = add_additional_variables($1, true)) != NULL)
+ {
+ connection = ptr->connection ? mm_strdup(ptr->connection) : NULL;
+ output_statement(mm_strdup(ptr->command), 0, ECPGst_normal);
+ ptr->opened = true;
+ }
+ }
+ | ECPGSetAutocommit
+ {
+ fprintf(base_yyout, "{ ECPGsetcommit(__LINE__, \"%s\", %s);", $1, connection ? connection : "NULL");
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGSetConnection
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in SET CONNECTION statement");
+
+ fprintf(base_yyout, "{ ECPGsetconn(__LINE__, %s);", $1);
+ whenever_action(2);
+ free($1);
+ }
+ | ECPGSetDescriptor
+ {
+ lookup_descriptor($1.name, connection);
+ output_set_descr($1.name, $1.str);
+ free($1.name);
+ free($1.str);
+ }
+ | ECPGSetDescriptorHeader
+ {
+ lookup_descriptor($1, connection);
+ output_set_descr_header($1);
+ free($1);
+ }
+ | ECPGTypedef
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in TYPE statement");
+
+ fprintf(base_yyout, "%s", $1);
+ free($1);
+ output_line_number();
+ }
+ | ECPGVar
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in VAR statement");
+
+ output_simple_statement($1, 0);
+ }
+ | ECPGWhenever
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in WHENEVER statement");
+
+ output_simple_statement($1, 0);
+ }
+|
+ { $$ = NULL; }
+;
+
+
+ CallStmt:
+ CALL func_application
+ {
+ $$ = cat_str(2,mm_strdup("call"),$2);
+}
+;
+
+
+ CreateRoleStmt:
+ CREATE ROLE RoleId opt_with OptRoleList
+ {
+ $$ = cat_str(4,mm_strdup("create role"),$3,$4,$5);
+}
+;
+
+
+ opt_with:
+ WITH
+ {
+ $$ = mm_strdup("with");
+}
+| WITH_LA
+ {
+ $$ = mm_strdup("with");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptRoleList:
+ OptRoleList CreateOptRoleElem
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterOptRoleList:
+ AlterOptRoleList AlterOptRoleElem
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterOptRoleElem:
+ PASSWORD ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("password"),$2);
+}
+| PASSWORD NULL_P
+ {
+ $$ = mm_strdup("password null");
+}
+| ENCRYPTED PASSWORD ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("encrypted password"),$3);
+}
+| UNENCRYPTED PASSWORD ecpg_sconst
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(2,mm_strdup("unencrypted password"),$3);
+}
+| INHERIT
+ {
+ $$ = mm_strdup("inherit");
+}
+| CONNECTION LIMIT SignedIconst
+ {
+ $$ = cat_str(2,mm_strdup("connection limit"),$3);
+}
+| VALID UNTIL ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("valid until"),$3);
+}
+| USER role_list
+ {
+ $$ = cat_str(2,mm_strdup("user"),$2);
+}
+| ecpg_ident
+ {
+ $$ = $1;
+}
+;
+
+
+ CreateOptRoleElem:
+ AlterOptRoleElem
+ {
+ $$ = $1;
+}
+| SYSID Iconst
+ {
+ $$ = cat_str(2,mm_strdup("sysid"),$2);
+}
+| ADMIN role_list
+ {
+ $$ = cat_str(2,mm_strdup("admin"),$2);
+}
+| ROLE role_list
+ {
+ $$ = cat_str(2,mm_strdup("role"),$2);
+}
+| IN_P ROLE role_list
+ {
+ $$ = cat_str(2,mm_strdup("in role"),$3);
+}
+| IN_P GROUP_P role_list
+ {
+ $$ = cat_str(2,mm_strdup("in group"),$3);
+}
+;
+
+
+ CreateUserStmt:
+ CREATE USER RoleId opt_with OptRoleList
+ {
+ $$ = cat_str(4,mm_strdup("create user"),$3,$4,$5);
+}
+;
+
+
+ AlterRoleStmt:
+ ALTER ROLE RoleSpec opt_with AlterOptRoleList
+ {
+ $$ = cat_str(4,mm_strdup("alter role"),$3,$4,$5);
+}
+| ALTER USER RoleSpec opt_with AlterOptRoleList
+ {
+ $$ = cat_str(4,mm_strdup("alter user"),$3,$4,$5);
+}
+;
+
+
+ opt_in_database:
+
+ {
+ $$=EMPTY; }
+| IN_P DATABASE name
+ {
+ $$ = cat_str(2,mm_strdup("in database"),$3);
+}
+;
+
+
+ AlterRoleSetStmt:
+ ALTER ROLE RoleSpec opt_in_database SetResetClause
+ {
+ $$ = cat_str(4,mm_strdup("alter role"),$3,$4,$5);
+}
+| ALTER ROLE ALL opt_in_database SetResetClause
+ {
+ $$ = cat_str(3,mm_strdup("alter role all"),$4,$5);
+}
+| ALTER USER RoleSpec opt_in_database SetResetClause
+ {
+ $$ = cat_str(4,mm_strdup("alter user"),$3,$4,$5);
+}
+| ALTER USER ALL opt_in_database SetResetClause
+ {
+ $$ = cat_str(3,mm_strdup("alter user all"),$4,$5);
+}
+;
+
+
+ DropRoleStmt:
+ DROP ROLE role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop role"),$3);
+}
+| DROP ROLE IF_P EXISTS role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop role if exists"),$5);
+}
+| DROP USER role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop user"),$3);
+}
+| DROP USER IF_P EXISTS role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop user if exists"),$5);
+}
+| DROP GROUP_P role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop group"),$3);
+}
+| DROP GROUP_P IF_P EXISTS role_list
+ {
+ $$ = cat_str(2,mm_strdup("drop group if exists"),$5);
+}
+;
+
+
+ CreateGroupStmt:
+ CREATE GROUP_P RoleId opt_with OptRoleList
+ {
+ $$ = cat_str(4,mm_strdup("create group"),$3,$4,$5);
+}
+;
+
+
+ AlterGroupStmt:
+ ALTER GROUP_P RoleSpec add_drop USER role_list
+ {
+ $$ = cat_str(5,mm_strdup("alter group"),$3,$4,mm_strdup("user"),$6);
+}
+;
+
+
+ add_drop:
+ ADD_P
+ {
+ $$ = mm_strdup("add");
+}
+| DROP
+ {
+ $$ = mm_strdup("drop");
+}
+;
+
+
+ CreateSchemaStmt:
+ CREATE SCHEMA OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList
+ {
+ $$ = cat_str(5,mm_strdup("create schema"),$3,mm_strdup("authorization"),$5,$6);
+}
+| CREATE SCHEMA ColId OptSchemaEltList
+ {
+ $$ = cat_str(3,mm_strdup("create schema"),$3,$4);
+}
+| CREATE SCHEMA IF_P NOT EXISTS OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(5,mm_strdup("create schema if not exists"),$6,mm_strdup("authorization"),$8,$9);
+}
+| CREATE SCHEMA IF_P NOT EXISTS ColId OptSchemaEltList
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(3,mm_strdup("create schema if not exists"),$6,$7);
+}
+;
+
+
+ OptSchemaName:
+ ColId
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptSchemaEltList:
+ OptSchemaEltList schema_stmt
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ schema_stmt:
+ CreateStmt
+ {
+ $$ = $1;
+}
+| IndexStmt
+ {
+ $$ = $1;
+}
+| CreateSeqStmt
+ {
+ $$ = $1;
+}
+| CreateTrigStmt
+ {
+ $$ = $1;
+}
+| GrantStmt
+ {
+ $$ = $1;
+}
+| ViewStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ VariableSetStmt:
+ SET set_rest
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| SET LOCAL set_rest
+ {
+ $$ = cat_str(2,mm_strdup("set local"),$3);
+}
+| SET SESSION set_rest
+ {
+ $$ = cat_str(2,mm_strdup("set session"),$3);
+}
+;
+
+
+ set_rest:
+ TRANSACTION transaction_mode_list
+ {
+ $$ = cat_str(2,mm_strdup("transaction"),$2);
+}
+| SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list
+ {
+ $$ = cat_str(2,mm_strdup("session characteristics as transaction"),$5);
+}
+| set_rest_more
+ {
+ $$ = $1;
+}
+;
+
+
+ generic_set:
+ var_name TO var_list
+ {
+ $$ = cat_str(3,$1,mm_strdup("to"),$3);
+}
+| var_name '=' var_list
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| var_name TO DEFAULT
+ {
+ $$ = cat_str(2,$1,mm_strdup("to default"));
+}
+| var_name '=' DEFAULT
+ {
+ $$ = cat_str(2,$1,mm_strdup("= default"));
+}
+;
+
+
+ set_rest_more:
+ generic_set
+ {
+ $$ = $1;
+}
+| var_name FROM CURRENT_P
+ {
+ $$ = cat_str(2,$1,mm_strdup("from current"));
+}
+| TIME ZONE zone_value
+ {
+ $$ = cat_str(2,mm_strdup("time zone"),$3);
+}
+| CATALOG_P ecpg_sconst
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(2,mm_strdup("catalog"),$2);
+}
+| SCHEMA ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("schema"),$2);
+}
+| NAMES opt_encoding
+ {
+ $$ = cat_str(2,mm_strdup("names"),$2);
+}
+| ROLE NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("role"),$2);
+}
+| SESSION AUTHORIZATION NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("session authorization"),$3);
+}
+| SESSION AUTHORIZATION DEFAULT
+ {
+ $$ = mm_strdup("session authorization default");
+}
+| XML_P OPTION document_or_content
+ {
+ $$ = cat_str(2,mm_strdup("xml option"),$3);
+}
+| TRANSACTION SNAPSHOT ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("transaction snapshot"),$3);
+}
+;
+
+
+ var_name:
+ECPGColId
+ {
+ $$ = $1;
+}
+| var_name '.' ColId
+ {
+ $$ = cat_str(3,$1,mm_strdup("."),$3);
+}
+;
+
+
+ var_list:
+ var_value
+ {
+ $$ = $1;
+}
+| var_list ',' var_value
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ var_value:
+ opt_boolean_or_string
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ if ($1[0] == '$')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+
+ $$ = $1;
+}
+;
+
+
+ iso_level:
+ READ UNCOMMITTED
+ {
+ $$ = mm_strdup("read uncommitted");
+}
+| READ COMMITTED
+ {
+ $$ = mm_strdup("read committed");
+}
+| REPEATABLE READ
+ {
+ $$ = mm_strdup("repeatable read");
+}
+| SERIALIZABLE
+ {
+ $$ = mm_strdup("serializable");
+}
+;
+
+
+ opt_boolean_or_string:
+ TRUE_P
+ {
+ $$ = mm_strdup("true");
+}
+| FALSE_P
+ {
+ $$ = mm_strdup("false");
+}
+| ON
+ {
+ $$ = mm_strdup("on");
+}
+| NonReservedWord_or_Sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ zone_value:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| ecpg_ident
+ {
+ $$ = $1;
+}
+| ConstInterval ecpg_sconst opt_interval
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| ConstInterval '(' Iconst ')' ecpg_sconst
+ {
+ $$ = cat_str(5,$1,mm_strdup("("),$3,mm_strdup(")"),$5);
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+| LOCAL
+ {
+ $$ = mm_strdup("local");
+}
+;
+
+
+ opt_encoding:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ NonReservedWord_or_Sconst:
+ NonReservedWord
+ {
+ $$ = $1;
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ VariableResetStmt:
+ RESET reset_rest
+ {
+ $$ = cat_str(2,mm_strdup("reset"),$2);
+}
+;
+
+
+ reset_rest:
+ generic_reset
+ {
+ $$ = $1;
+}
+| TIME ZONE
+ {
+ $$ = mm_strdup("time zone");
+}
+| TRANSACTION ISOLATION LEVEL
+ {
+ $$ = mm_strdup("transaction isolation level");
+}
+| SESSION AUTHORIZATION
+ {
+ $$ = mm_strdup("session authorization");
+}
+;
+
+
+ generic_reset:
+ var_name
+ {
+ $$ = $1;
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+;
+
+
+ SetResetClause:
+ SET set_rest
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| VariableResetStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ FunctionSetResetClause:
+ SET set_rest_more
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| VariableResetStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ VariableShowStmt:
+SHOW var_name ecpg_into
+ {
+ $$ = cat_str(2,mm_strdup("show"),$2);
+}
+| SHOW TIME ZONE ecpg_into
+ {
+ $$ = mm_strdup("show time zone");
+}
+| SHOW TRANSACTION ISOLATION LEVEL ecpg_into
+ {
+ $$ = mm_strdup("show transaction isolation level");
+}
+| SHOW SESSION AUTHORIZATION ecpg_into
+ {
+ $$ = mm_strdup("show session authorization");
+}
+| SHOW ALL
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "SHOW ALL is not implemented");
+ $$ = EMPTY;
+ }
+;
+
+
+ ConstraintsSetStmt:
+ SET CONSTRAINTS constraints_set_list constraints_set_mode
+ {
+ $$ = cat_str(3,mm_strdup("set constraints"),$3,$4);
+}
+;
+
+
+ constraints_set_list:
+ ALL
+ {
+ $$ = mm_strdup("all");
+}
+| qualified_name_list
+ {
+ $$ = $1;
+}
+;
+
+
+ constraints_set_mode:
+ DEFERRED
+ {
+ $$ = mm_strdup("deferred");
+}
+| IMMEDIATE
+ {
+ $$ = mm_strdup("immediate");
+}
+;
+
+
+ CheckPointStmt:
+ CHECKPOINT
+ {
+ $$ = mm_strdup("checkpoint");
+}
+;
+
+
+ DiscardStmt:
+ DISCARD ALL
+ {
+ $$ = mm_strdup("discard all");
+}
+| DISCARD TEMP
+ {
+ $$ = mm_strdup("discard temp");
+}
+| DISCARD TEMPORARY
+ {
+ $$ = mm_strdup("discard temporary");
+}
+| DISCARD PLANS
+ {
+ $$ = mm_strdup("discard plans");
+}
+| DISCARD SEQUENCES
+ {
+ $$ = mm_strdup("discard sequences");
+}
+;
+
+
+ AlterTableStmt:
+ ALTER TABLE relation_expr alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter table"),$3,$4);
+}
+| ALTER TABLE IF_P EXISTS relation_expr alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter table if exists"),$5,$6);
+}
+| ALTER TABLE relation_expr partition_cmd
+ {
+ $$ = cat_str(3,mm_strdup("alter table"),$3,$4);
+}
+| ALTER TABLE IF_P EXISTS relation_expr partition_cmd
+ {
+ $$ = cat_str(3,mm_strdup("alter table if exists"),$5,$6);
+}
+| ALTER TABLE ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(5,mm_strdup("alter table all in tablespace"),$6,mm_strdup("set tablespace"),$9,$10);
+}
+| ALTER TABLE ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(7,mm_strdup("alter table all in tablespace"),$6,mm_strdup("owned by"),$9,mm_strdup("set tablespace"),$12,$13);
+}
+| ALTER INDEX qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter index"),$3,$4);
+}
+| ALTER INDEX IF_P EXISTS qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter index if exists"),$5,$6);
+}
+| ALTER INDEX qualified_name index_partition_cmd
+ {
+ $$ = cat_str(3,mm_strdup("alter index"),$3,$4);
+}
+| ALTER INDEX ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(5,mm_strdup("alter index all in tablespace"),$6,mm_strdup("set tablespace"),$9,$10);
+}
+| ALTER INDEX ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(7,mm_strdup("alter index all in tablespace"),$6,mm_strdup("owned by"),$9,mm_strdup("set tablespace"),$12,$13);
+}
+| ALTER SEQUENCE qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter sequence"),$3,$4);
+}
+| ALTER SEQUENCE IF_P EXISTS qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter sequence if exists"),$5,$6);
+}
+| ALTER VIEW qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter view"),$3,$4);
+}
+| ALTER VIEW IF_P EXISTS qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter view if exists"),$5,$6);
+}
+| ALTER MATERIALIZED VIEW qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter materialized view"),$4,$5);
+}
+| ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter materialized view if exists"),$6,$7);
+}
+| ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(5,mm_strdup("alter materialized view all in tablespace"),$7,mm_strdup("set tablespace"),$10,$11);
+}
+| ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait
+ {
+ $$ = cat_str(7,mm_strdup("alter materialized view all in tablespace"),$7,mm_strdup("owned by"),$10,mm_strdup("set tablespace"),$13,$14);
+}
+| ALTER FOREIGN TABLE relation_expr alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter foreign table"),$4,$5);
+}
+| ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter foreign table if exists"),$6,$7);
+}
+;
+
+
+ alter_table_cmds:
+ alter_table_cmd
+ {
+ $$ = $1;
+}
+| alter_table_cmds ',' alter_table_cmd
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ partition_cmd:
+ ATTACH PARTITION qualified_name PartitionBoundSpec
+ {
+ $$ = cat_str(3,mm_strdup("attach partition"),$3,$4);
+}
+| DETACH PARTITION qualified_name opt_concurrently
+ {
+ $$ = cat_str(3,mm_strdup("detach partition"),$3,$4);
+}
+| DETACH PARTITION qualified_name FINALIZE
+ {
+ $$ = cat_str(3,mm_strdup("detach partition"),$3,mm_strdup("finalize"));
+}
+;
+
+
+ index_partition_cmd:
+ ATTACH PARTITION qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("attach partition"),$3);
+}
+;
+
+
+ alter_table_cmd:
+ ADD_P columnDef
+ {
+ $$ = cat_str(2,mm_strdup("add"),$2);
+}
+| ADD_P IF_P NOT EXISTS columnDef
+ {
+ $$ = cat_str(2,mm_strdup("add if not exists"),$5);
+}
+| ADD_P COLUMN columnDef
+ {
+ $$ = cat_str(2,mm_strdup("add column"),$3);
+}
+| ADD_P COLUMN IF_P NOT EXISTS columnDef
+ {
+ $$ = cat_str(2,mm_strdup("add column if not exists"),$6);
+}
+| ALTER opt_column ColId alter_column_default
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,$4);
+}
+| ALTER opt_column ColId DROP NOT NULL_P
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("drop not null"));
+}
+| ALTER opt_column ColId SET NOT NULL_P
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("set not null"));
+}
+| ALTER opt_column ColId DROP EXPRESSION
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("drop expression"));
+}
+| ALTER opt_column ColId DROP EXPRESSION IF_P EXISTS
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("drop expression if exists"));
+}
+| ALTER opt_column ColId SET STATISTICS SignedIconst
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("set statistics"),$6);
+}
+| ALTER opt_column Iconst SET STATISTICS SignedIconst
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("set statistics"),$6);
+}
+| ALTER opt_column ColId SET reloptions
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("set"),$5);
+}
+| ALTER opt_column ColId RESET reloptions
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("reset"),$5);
+}
+| ALTER opt_column ColId SET STORAGE ColId
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("set storage"),$6);
+}
+| ALTER opt_column ColId SET column_compression
+ {
+ $$ = cat_str(5,mm_strdup("alter"),$2,$3,mm_strdup("set"),$5);
+}
+| ALTER opt_column ColId ADD_P GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList
+ {
+ $$ = cat_str(7,mm_strdup("alter"),$2,$3,mm_strdup("add generated"),$6,mm_strdup("as identity"),$9);
+}
+| ALTER opt_column ColId alter_identity_column_option_list
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,$4);
+}
+| ALTER opt_column ColId DROP IDENTITY_P
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("drop identity"));
+}
+| ALTER opt_column ColId DROP IDENTITY_P IF_P EXISTS
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,mm_strdup("drop identity if exists"));
+}
+| DROP opt_column IF_P EXISTS ColId opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop"),$2,mm_strdup("if exists"),$5,$6);
+}
+| DROP opt_column ColId opt_drop_behavior
+ {
+ $$ = cat_str(4,mm_strdup("drop"),$2,$3,$4);
+}
+| ALTER opt_column ColId opt_set_data TYPE_P Typename opt_collate_clause alter_using
+ {
+ $$ = cat_str(8,mm_strdup("alter"),$2,$3,$4,mm_strdup("type"),$6,$7,$8);
+}
+| ALTER opt_column ColId alter_generic_options
+ {
+ $$ = cat_str(4,mm_strdup("alter"),$2,$3,$4);
+}
+| ADD_P TableConstraint
+ {
+ $$ = cat_str(2,mm_strdup("add"),$2);
+}
+| ALTER CONSTRAINT name ConstraintAttributeSpec
+ {
+ $$ = cat_str(3,mm_strdup("alter constraint"),$3,$4);
+}
+| VALIDATE CONSTRAINT name
+ {
+ $$ = cat_str(2,mm_strdup("validate constraint"),$3);
+}
+| DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop constraint if exists"),$5,$6);
+}
+| DROP CONSTRAINT name opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop constraint"),$3,$4);
+}
+| SET WITHOUT OIDS
+ {
+ $$ = mm_strdup("set without oids");
+}
+| CLUSTER ON name
+ {
+ $$ = cat_str(2,mm_strdup("cluster on"),$3);
+}
+| SET WITHOUT CLUSTER
+ {
+ $$ = mm_strdup("set without cluster");
+}
+| SET LOGGED
+ {
+ $$ = mm_strdup("set logged");
+}
+| SET UNLOGGED
+ {
+ $$ = mm_strdup("set unlogged");
+}
+| ENABLE_P TRIGGER name
+ {
+ $$ = cat_str(2,mm_strdup("enable trigger"),$3);
+}
+| ENABLE_P ALWAYS TRIGGER name
+ {
+ $$ = cat_str(2,mm_strdup("enable always trigger"),$4);
+}
+| ENABLE_P REPLICA TRIGGER name
+ {
+ $$ = cat_str(2,mm_strdup("enable replica trigger"),$4);
+}
+| ENABLE_P TRIGGER ALL
+ {
+ $$ = mm_strdup("enable trigger all");
+}
+| ENABLE_P TRIGGER USER
+ {
+ $$ = mm_strdup("enable trigger user");
+}
+| DISABLE_P TRIGGER name
+ {
+ $$ = cat_str(2,mm_strdup("disable trigger"),$3);
+}
+| DISABLE_P TRIGGER ALL
+ {
+ $$ = mm_strdup("disable trigger all");
+}
+| DISABLE_P TRIGGER USER
+ {
+ $$ = mm_strdup("disable trigger user");
+}
+| ENABLE_P RULE name
+ {
+ $$ = cat_str(2,mm_strdup("enable rule"),$3);
+}
+| ENABLE_P ALWAYS RULE name
+ {
+ $$ = cat_str(2,mm_strdup("enable always rule"),$4);
+}
+| ENABLE_P REPLICA RULE name
+ {
+ $$ = cat_str(2,mm_strdup("enable replica rule"),$4);
+}
+| DISABLE_P RULE name
+ {
+ $$ = cat_str(2,mm_strdup("disable rule"),$3);
+}
+| INHERIT qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("inherit"),$2);
+}
+| NO INHERIT qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("no inherit"),$3);
+}
+| OF any_name
+ {
+ $$ = cat_str(2,mm_strdup("of"),$2);
+}
+| NOT OF
+ {
+ $$ = mm_strdup("not of");
+}
+| OWNER TO RoleSpec
+ {
+ $$ = cat_str(2,mm_strdup("owner to"),$3);
+}
+| SET TABLESPACE name
+ {
+ $$ = cat_str(2,mm_strdup("set tablespace"),$3);
+}
+| SET reloptions
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| RESET reloptions
+ {
+ $$ = cat_str(2,mm_strdup("reset"),$2);
+}
+| REPLICA IDENTITY_P replica_identity
+ {
+ $$ = cat_str(2,mm_strdup("replica identity"),$3);
+}
+| ENABLE_P ROW LEVEL SECURITY
+ {
+ $$ = mm_strdup("enable row level security");
+}
+| DISABLE_P ROW LEVEL SECURITY
+ {
+ $$ = mm_strdup("disable row level security");
+}
+| FORCE ROW LEVEL SECURITY
+ {
+ $$ = mm_strdup("force row level security");
+}
+| NO FORCE ROW LEVEL SECURITY
+ {
+ $$ = mm_strdup("no force row level security");
+}
+| alter_generic_options
+ {
+ $$ = $1;
+}
+;
+
+
+ alter_column_default:
+ SET DEFAULT a_expr
+ {
+ $$ = cat_str(2,mm_strdup("set default"),$3);
+}
+| DROP DEFAULT
+ {
+ $$ = mm_strdup("drop default");
+}
+;
+
+
+ opt_drop_behavior:
+ CASCADE
+ {
+ $$ = mm_strdup("cascade");
+}
+| RESTRICT
+ {
+ $$ = mm_strdup("restrict");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_collate_clause:
+ COLLATE any_name
+ {
+ $$ = cat_str(2,mm_strdup("collate"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ alter_using:
+ USING a_expr
+ {
+ $$ = cat_str(2,mm_strdup("using"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ replica_identity:
+ NOTHING
+ {
+ $$ = mm_strdup("nothing");
+}
+| FULL
+ {
+ $$ = mm_strdup("full");
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+| USING INDEX name
+ {
+ $$ = cat_str(2,mm_strdup("using index"),$3);
+}
+;
+
+
+ reloptions:
+ '(' reloption_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ opt_reloptions:
+ WITH reloptions
+ {
+ $$ = cat_str(2,mm_strdup("with"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ reloption_list:
+ reloption_elem
+ {
+ $$ = $1;
+}
+| reloption_list ',' reloption_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ reloption_elem:
+ ColLabel '=' def_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| ColLabel
+ {
+ $$ = $1;
+}
+| ColLabel '.' ColLabel '=' def_arg
+ {
+ $$ = cat_str(5,$1,mm_strdup("."),$3,mm_strdup("="),$5);
+}
+| ColLabel '.' ColLabel
+ {
+ $$ = cat_str(3,$1,mm_strdup("."),$3);
+}
+;
+
+
+ alter_identity_column_option_list:
+ alter_identity_column_option
+ {
+ $$ = $1;
+}
+| alter_identity_column_option_list alter_identity_column_option
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ alter_identity_column_option:
+ RESTART
+ {
+ $$ = mm_strdup("restart");
+}
+| RESTART opt_with NumericOnly
+ {
+ $$ = cat_str(3,mm_strdup("restart"),$2,$3);
+}
+| SET SeqOptElem
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| SET GENERATED generated_when
+ {
+ $$ = cat_str(2,mm_strdup("set generated"),$3);
+}
+;
+
+
+ PartitionBoundSpec:
+ FOR VALUES WITH '(' hash_partbound ')'
+ {
+ $$ = cat_str(3,mm_strdup("for values with ("),$5,mm_strdup(")"));
+}
+| FOR VALUES IN_P '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("for values in ("),$5,mm_strdup(")"));
+}
+| FOR VALUES FROM '(' expr_list ')' TO '(' expr_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("for values from ("),$5,mm_strdup(") to ("),$9,mm_strdup(")"));
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+;
+
+
+ hash_partbound_elem:
+ NonReservedWord Iconst
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ hash_partbound:
+ hash_partbound_elem
+ {
+ $$ = $1;
+}
+| hash_partbound ',' hash_partbound_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ AlterCompositeTypeStmt:
+ ALTER TYPE_P any_name alter_type_cmds
+ {
+ $$ = cat_str(3,mm_strdup("alter type"),$3,$4);
+}
+;
+
+
+ alter_type_cmds:
+ alter_type_cmd
+ {
+ $$ = $1;
+}
+| alter_type_cmds ',' alter_type_cmd
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ alter_type_cmd:
+ ADD_P ATTRIBUTE TableFuncElement opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("add attribute"),$3,$4);
+}
+| DROP ATTRIBUTE IF_P EXISTS ColId opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop attribute if exists"),$5,$6);
+}
+| DROP ATTRIBUTE ColId opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop attribute"),$3,$4);
+}
+| ALTER ATTRIBUTE ColId opt_set_data TYPE_P Typename opt_collate_clause opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("alter attribute"),$3,$4,mm_strdup("type"),$6,$7,$8);
+}
+;
+
+
+ ClosePortalStmt:
+ CLOSE cursor_name
+ {
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : $2;
+ struct cursor *ptr = NULL;
+ for (ptr = cur; ptr != NULL; ptr = ptr -> next)
+ {
+ if (strcmp($2, ptr -> name) == 0)
+ {
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ break;
+ }
+ }
+ $$ = cat2_str(mm_strdup("close"), cursor_marker);
+ }
+| CLOSE ALL
+ {
+ $$ = mm_strdup("close all");
+}
+;
+
+
+ CopyStmt:
+ COPY opt_binary qualified_name opt_column_list copy_from opt_program copy_file_name copy_delimiter opt_with copy_options where_clause
+ {
+ if (strcmp($6, "from") == 0 &&
+ (strcmp($7, "stdin") == 0 || strcmp($7, "stdout") == 0))
+ mmerror(PARSE_ERROR, ET_WARNING, "COPY FROM STDIN is not implemented");
+
+ $$ = cat_str(11,mm_strdup("copy"),$2,$3,$4,$5,$6,$7,$8,$9,$10,$11);
+}
+| COPY '(' PreparableStmt ')' TO opt_program copy_file_name opt_with copy_options
+ {
+ $$ = cat_str(7,mm_strdup("copy ("),$3,mm_strdup(") to"),$6,$7,$8,$9);
+}
+;
+
+
+ copy_from:
+ FROM
+ {
+ $$ = mm_strdup("from");
+}
+| TO
+ {
+ $$ = mm_strdup("to");
+}
+;
+
+
+ opt_program:
+ PROGRAM
+ {
+ $$ = mm_strdup("program");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ copy_file_name:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| STDIN
+ {
+ $$ = mm_strdup("stdin");
+}
+| STDOUT
+ {
+ $$ = mm_strdup("stdout");
+}
+;
+
+
+ copy_options:
+ copy_opt_list
+ {
+ $$ = $1;
+}
+| '(' copy_generic_opt_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ copy_opt_list:
+ copy_opt_list copy_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ copy_opt_item:
+ BINARY
+ {
+ $$ = mm_strdup("binary");
+}
+| FREEZE
+ {
+ $$ = mm_strdup("freeze");
+}
+| DELIMITER opt_as ecpg_sconst
+ {
+ $$ = cat_str(3,mm_strdup("delimiter"),$2,$3);
+}
+| NULL_P opt_as ecpg_sconst
+ {
+ $$ = cat_str(3,mm_strdup("null"),$2,$3);
+}
+| CSV
+ {
+ $$ = mm_strdup("csv");
+}
+| HEADER_P
+ {
+ $$ = mm_strdup("header");
+}
+| QUOTE opt_as ecpg_sconst
+ {
+ $$ = cat_str(3,mm_strdup("quote"),$2,$3);
+}
+| ESCAPE opt_as ecpg_sconst
+ {
+ $$ = cat_str(3,mm_strdup("escape"),$2,$3);
+}
+| FORCE QUOTE columnList
+ {
+ $$ = cat_str(2,mm_strdup("force quote"),$3);
+}
+| FORCE QUOTE '*'
+ {
+ $$ = mm_strdup("force quote *");
+}
+| FORCE NOT NULL_P columnList
+ {
+ $$ = cat_str(2,mm_strdup("force not null"),$4);
+}
+| FORCE NULL_P columnList
+ {
+ $$ = cat_str(2,mm_strdup("force null"),$3);
+}
+| ENCODING ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("encoding"),$2);
+}
+;
+
+
+ opt_binary:
+ BINARY
+ {
+ $$ = mm_strdup("binary");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ copy_delimiter:
+ opt_using DELIMITERS ecpg_sconst
+ {
+ $$ = cat_str(3,$1,mm_strdup("delimiters"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_using:
+ USING
+ {
+ $$ = mm_strdup("using");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ copy_generic_opt_list:
+ copy_generic_opt_elem
+ {
+ $$ = $1;
+}
+| copy_generic_opt_list ',' copy_generic_opt_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ copy_generic_opt_elem:
+ ColLabel copy_generic_opt_arg
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ copy_generic_opt_arg:
+ opt_boolean_or_string
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+| '*'
+ {
+ $$ = mm_strdup("*");
+}
+| '(' copy_generic_opt_arg_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ copy_generic_opt_arg_list:
+ copy_generic_opt_arg_list_item
+ {
+ $$ = $1;
+}
+| copy_generic_opt_arg_list ',' copy_generic_opt_arg_list_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ copy_generic_opt_arg_list_item:
+ opt_boolean_or_string
+ {
+ $$ = $1;
+}
+;
+
+
+ CreateStmt:
+ CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(13,mm_strdup("create"),$2,mm_strdup("table"),$4,mm_strdup("("),$6,mm_strdup(")"),$8,$9,$10,$11,$12,$13);
+}
+| CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(13,mm_strdup("create"),$2,mm_strdup("table if not exists"),$7,mm_strdup("("),$9,mm_strdup(")"),$11,$12,$13,$14,$15,$16);
+}
+| CREATE OptTemp TABLE qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(12,mm_strdup("create"),$2,mm_strdup("table"),$4,mm_strdup("of"),$6,$7,$8,$9,$10,$11,$12);
+}
+| CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(12,mm_strdup("create"),$2,mm_strdup("table if not exists"),$7,mm_strdup("of"),$9,$10,$11,$12,$13,$14,$15);
+}
+| CREATE OptTemp TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(13,mm_strdup("create"),$2,mm_strdup("table"),$4,mm_strdup("partition of"),$7,$8,$9,$10,$11,$12,$13,$14);
+}
+| CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(13,mm_strdup("create"),$2,mm_strdup("table if not exists"),$7,mm_strdup("partition of"),$10,$11,$12,$13,$14,$15,$16,$17);
+}
+;
+
+
+ OptTemp:
+ TEMPORARY
+ {
+ $$ = mm_strdup("temporary");
+}
+| TEMP
+ {
+ $$ = mm_strdup("temp");
+}
+| LOCAL TEMPORARY
+ {
+ $$ = mm_strdup("local temporary");
+}
+| LOCAL TEMP
+ {
+ $$ = mm_strdup("local temp");
+}
+| GLOBAL TEMPORARY
+ {
+ $$ = mm_strdup("global temporary");
+}
+| GLOBAL TEMP
+ {
+ $$ = mm_strdup("global temp");
+}
+| UNLOGGED
+ {
+ $$ = mm_strdup("unlogged");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptTableElementList:
+ TableElementList
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptTypedTableElementList:
+ '(' TypedTableElementList ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TableElementList:
+ TableElement
+ {
+ $$ = $1;
+}
+| TableElementList ',' TableElement
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ TypedTableElementList:
+ TypedTableElement
+ {
+ $$ = $1;
+}
+| TypedTableElementList ',' TypedTableElement
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ TableElement:
+ columnDef
+ {
+ $$ = $1;
+}
+| TableLikeClause
+ {
+ $$ = $1;
+}
+| TableConstraint
+ {
+ $$ = $1;
+}
+;
+
+
+ TypedTableElement:
+ columnOptions
+ {
+ $$ = $1;
+}
+| TableConstraint
+ {
+ $$ = $1;
+}
+;
+
+
+ columnDef:
+ ColId Typename opt_column_compression create_generic_options ColQualList
+ {
+ $$ = cat_str(5,$1,$2,$3,$4,$5);
+}
+;
+
+
+ columnOptions:
+ ColId ColQualList
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ColId WITH OPTIONS ColQualList
+ {
+ $$ = cat_str(3,$1,mm_strdup("with options"),$4);
+}
+;
+
+
+ column_compression:
+ COMPRESSION ColId
+ {
+ $$ = cat_str(2,mm_strdup("compression"),$2);
+}
+| COMPRESSION DEFAULT
+ {
+ $$ = mm_strdup("compression default");
+}
+;
+
+
+ opt_column_compression:
+ column_compression
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ColQualList:
+ ColQualList ColConstraint
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ColConstraint:
+ CONSTRAINT name ColConstraintElem
+ {
+ $$ = cat_str(3,mm_strdup("constraint"),$2,$3);
+}
+| ColConstraintElem
+ {
+ $$ = $1;
+}
+| ConstraintAttr
+ {
+ $$ = $1;
+}
+| COLLATE any_name
+ {
+ $$ = cat_str(2,mm_strdup("collate"),$2);
+}
+;
+
+
+ ColConstraintElem:
+ NOT NULL_P
+ {
+ $$ = mm_strdup("not null");
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+| UNIQUE opt_definition OptConsTableSpace
+ {
+ $$ = cat_str(3,mm_strdup("unique"),$2,$3);
+}
+| PRIMARY KEY opt_definition OptConsTableSpace
+ {
+ $$ = cat_str(3,mm_strdup("primary key"),$3,$4);
+}
+| CHECK '(' a_expr ')' opt_no_inherit
+ {
+ $$ = cat_str(4,mm_strdup("check ("),$3,mm_strdup(")"),$5);
+}
+| DEFAULT b_expr
+ {
+ $$ = cat_str(2,mm_strdup("default"),$2);
+}
+| GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList
+ {
+ $$ = cat_str(4,mm_strdup("generated"),$2,mm_strdup("as identity"),$5);
+}
+| GENERATED generated_when AS '(' a_expr ')' STORED
+ {
+ $$ = cat_str(5,mm_strdup("generated"),$2,mm_strdup("as ("),$5,mm_strdup(") stored"));
+}
+| REFERENCES qualified_name opt_column_list key_match key_actions
+ {
+ $$ = cat_str(5,mm_strdup("references"),$2,$3,$4,$5);
+}
+;
+
+
+ generated_when:
+ ALWAYS
+ {
+ $$ = mm_strdup("always");
+}
+| BY DEFAULT
+ {
+ $$ = mm_strdup("by default");
+}
+;
+
+
+ ConstraintAttr:
+ DEFERRABLE
+ {
+ $$ = mm_strdup("deferrable");
+}
+| NOT DEFERRABLE
+ {
+ $$ = mm_strdup("not deferrable");
+}
+| INITIALLY DEFERRED
+ {
+ $$ = mm_strdup("initially deferred");
+}
+| INITIALLY IMMEDIATE
+ {
+ $$ = mm_strdup("initially immediate");
+}
+;
+
+
+ TableLikeClause:
+ LIKE qualified_name TableLikeOptionList
+ {
+ $$ = cat_str(3,mm_strdup("like"),$2,$3);
+}
+;
+
+
+ TableLikeOptionList:
+ TableLikeOptionList INCLUDING TableLikeOption
+ {
+ $$ = cat_str(3,$1,mm_strdup("including"),$3);
+}
+| TableLikeOptionList EXCLUDING TableLikeOption
+ {
+ $$ = cat_str(3,$1,mm_strdup("excluding"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TableLikeOption:
+ COMMENTS
+ {
+ $$ = mm_strdup("comments");
+}
+| COMPRESSION
+ {
+ $$ = mm_strdup("compression");
+}
+| CONSTRAINTS
+ {
+ $$ = mm_strdup("constraints");
+}
+| DEFAULTS
+ {
+ $$ = mm_strdup("defaults");
+}
+| IDENTITY_P
+ {
+ $$ = mm_strdup("identity");
+}
+| GENERATED
+ {
+ $$ = mm_strdup("generated");
+}
+| INDEXES
+ {
+ $$ = mm_strdup("indexes");
+}
+| STATISTICS
+ {
+ $$ = mm_strdup("statistics");
+}
+| STORAGE
+ {
+ $$ = mm_strdup("storage");
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+;
+
+
+ TableConstraint:
+ CONSTRAINT name ConstraintElem
+ {
+ $$ = cat_str(3,mm_strdup("constraint"),$2,$3);
+}
+| ConstraintElem
+ {
+ $$ = $1;
+}
+;
+
+
+ ConstraintElem:
+ CHECK '(' a_expr ')' ConstraintAttributeSpec
+ {
+ $$ = cat_str(4,mm_strdup("check ("),$3,mm_strdup(")"),$5);
+}
+| UNIQUE '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec
+ {
+ $$ = cat_str(7,mm_strdup("unique ("),$3,mm_strdup(")"),$5,$6,$7,$8);
+}
+| UNIQUE ExistingIndex ConstraintAttributeSpec
+ {
+ $$ = cat_str(3,mm_strdup("unique"),$2,$3);
+}
+| PRIMARY KEY '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec
+ {
+ $$ = cat_str(7,mm_strdup("primary key ("),$4,mm_strdup(")"),$6,$7,$8,$9);
+}
+| PRIMARY KEY ExistingIndex ConstraintAttributeSpec
+ {
+ $$ = cat_str(3,mm_strdup("primary key"),$3,$4);
+}
+| EXCLUDE access_method_clause '(' ExclusionConstraintList ')' opt_c_include opt_definition OptConsTableSpace OptWhereClause ConstraintAttributeSpec
+ {
+ $$ = cat_str(10,mm_strdup("exclude"),$2,mm_strdup("("),$4,mm_strdup(")"),$6,$7,$8,$9,$10);
+}
+| FOREIGN KEY '(' columnList ')' REFERENCES qualified_name opt_column_list key_match key_actions ConstraintAttributeSpec
+ {
+ $$ = cat_str(8,mm_strdup("foreign key ("),$4,mm_strdup(") references"),$7,$8,$9,$10,$11);
+}
+;
+
+
+ opt_no_inherit:
+ NO INHERIT
+ {
+ $$ = mm_strdup("no inherit");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_column_list:
+ '(' columnList ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ columnList:
+ columnElem
+ {
+ $$ = $1;
+}
+| columnList ',' columnElem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ columnElem:
+ ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ opt_c_include:
+ INCLUDE '(' columnList ')'
+ {
+ $$ = cat_str(3,mm_strdup("include ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ key_match:
+ MATCH FULL
+ {
+ $$ = mm_strdup("match full");
+}
+| MATCH PARTIAL
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = mm_strdup("match partial");
+}
+| MATCH SIMPLE
+ {
+ $$ = mm_strdup("match simple");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ExclusionConstraintList:
+ ExclusionConstraintElem
+ {
+ $$ = $1;
+}
+| ExclusionConstraintList ',' ExclusionConstraintElem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ ExclusionConstraintElem:
+ index_elem WITH any_operator
+ {
+ $$ = cat_str(3,$1,mm_strdup("with"),$3);
+}
+| index_elem WITH OPERATOR '(' any_operator ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("with operator ("),$5,mm_strdup(")"));
+}
+;
+
+
+ OptWhereClause:
+ WHERE '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("where ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ key_actions:
+ key_update
+ {
+ $$ = $1;
+}
+| key_delete
+ {
+ $$ = $1;
+}
+| key_update key_delete
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| key_delete key_update
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ key_update:
+ ON UPDATE key_action
+ {
+ $$ = cat_str(2,mm_strdup("on update"),$3);
+}
+;
+
+
+ key_delete:
+ ON DELETE_P key_action
+ {
+ $$ = cat_str(2,mm_strdup("on delete"),$3);
+}
+;
+
+
+ key_action:
+ NO ACTION
+ {
+ $$ = mm_strdup("no action");
+}
+| RESTRICT
+ {
+ $$ = mm_strdup("restrict");
+}
+| CASCADE
+ {
+ $$ = mm_strdup("cascade");
+}
+| SET NULL_P
+ {
+ $$ = mm_strdup("set null");
+}
+| SET DEFAULT
+ {
+ $$ = mm_strdup("set default");
+}
+;
+
+
+ OptInherit:
+ INHERITS '(' qualified_name_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("inherits ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptPartitionSpec:
+ PartitionSpec
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ PartitionSpec:
+ PARTITION BY ColId '(' part_params ')'
+ {
+ $$ = cat_str(5,mm_strdup("partition by"),$3,mm_strdup("("),$5,mm_strdup(")"));
+}
+;
+
+
+ part_params:
+ part_elem
+ {
+ $$ = $1;
+}
+| part_params ',' part_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ part_elem:
+ ColId opt_collate opt_class
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| func_expr_windowless opt_collate opt_class
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| '(' a_expr ')' opt_collate opt_class
+ {
+ $$ = cat_str(5,mm_strdup("("),$2,mm_strdup(")"),$4,$5);
+}
+;
+
+
+ table_access_method_clause:
+ USING name
+ {
+ $$ = cat_str(2,mm_strdup("using"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptWith:
+ WITH reloptions
+ {
+ $$ = cat_str(2,mm_strdup("with"),$2);
+}
+| WITHOUT OIDS
+ {
+ $$ = mm_strdup("without oids");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OnCommitOption:
+ ON COMMIT DROP
+ {
+ $$ = mm_strdup("on commit drop");
+}
+| ON COMMIT DELETE_P ROWS
+ {
+ $$ = mm_strdup("on commit delete rows");
+}
+| ON COMMIT PRESERVE ROWS
+ {
+ $$ = mm_strdup("on commit preserve rows");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptTableSpace:
+ TABLESPACE name
+ {
+ $$ = cat_str(2,mm_strdup("tablespace"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptConsTableSpace:
+ USING INDEX TABLESPACE name
+ {
+ $$ = cat_str(2,mm_strdup("using index tablespace"),$4);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ExistingIndex:
+ USING INDEX name
+ {
+ $$ = cat_str(2,mm_strdup("using index"),$3);
+}
+;
+
+
+ CreateStatsStmt:
+ CREATE STATISTICS any_name opt_name_list ON stats_params FROM from_list
+ {
+ $$ = cat_str(7,mm_strdup("create statistics"),$3,$4,mm_strdup("on"),$6,mm_strdup("from"),$8);
+}
+| CREATE STATISTICS IF_P NOT EXISTS any_name opt_name_list ON stats_params FROM from_list
+ {
+ $$ = cat_str(7,mm_strdup("create statistics if not exists"),$6,$7,mm_strdup("on"),$9,mm_strdup("from"),$11);
+}
+;
+
+
+ stats_params:
+ stats_param
+ {
+ $$ = $1;
+}
+| stats_params ',' stats_param
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ stats_param:
+ ColId
+ {
+ $$ = $1;
+}
+| func_expr_windowless
+ {
+ $$ = $1;
+}
+| '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ AlterStatsStmt:
+ ALTER STATISTICS any_name SET STATISTICS SignedIconst
+ {
+ $$ = cat_str(4,mm_strdup("alter statistics"),$3,mm_strdup("set statistics"),$6);
+}
+| ALTER STATISTICS IF_P EXISTS any_name SET STATISTICS SignedIconst
+ {
+ $$ = cat_str(4,mm_strdup("alter statistics if exists"),$5,mm_strdup("set statistics"),$8);
+}
+;
+
+
+ create_as_target:
+ qualified_name opt_column_list table_access_method_clause OptWith OnCommitOption OptTableSpace
+ {
+ $$ = cat_str(6,$1,$2,$3,$4,$5,$6);
+}
+;
+
+
+ opt_with_data:
+ WITH DATA_P
+ {
+ $$ = mm_strdup("with data");
+}
+| WITH NO DATA_P
+ {
+ $$ = mm_strdup("with no data");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateMatViewStmt:
+ CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data
+ {
+ $$ = cat_str(7,mm_strdup("create"),$2,mm_strdup("materialized view"),$5,mm_strdup("as"),$7,$8);
+}
+| CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
+ {
+ $$ = cat_str(7,mm_strdup("create"),$2,mm_strdup("materialized view if not exists"),$8,mm_strdup("as"),$10,$11);
+}
+;
+
+
+ create_mv_target:
+ qualified_name opt_column_list table_access_method_clause opt_reloptions OptTableSpace
+ {
+ $$ = cat_str(5,$1,$2,$3,$4,$5);
+}
+;
+
+
+ OptNoLog:
+ UNLOGGED
+ {
+ $$ = mm_strdup("unlogged");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RefreshMatViewStmt:
+ REFRESH MATERIALIZED VIEW opt_concurrently qualified_name opt_with_data
+ {
+ $$ = cat_str(4,mm_strdup("refresh materialized view"),$4,$5,$6);
+}
+;
+
+
+ CreateSeqStmt:
+ CREATE OptTemp SEQUENCE qualified_name OptSeqOptList
+ {
+ $$ = cat_str(5,mm_strdup("create"),$2,mm_strdup("sequence"),$4,$5);
+}
+| CREATE OptTemp SEQUENCE IF_P NOT EXISTS qualified_name OptSeqOptList
+ {
+ $$ = cat_str(5,mm_strdup("create"),$2,mm_strdup("sequence if not exists"),$7,$8);
+}
+;
+
+
+ AlterSeqStmt:
+ ALTER SEQUENCE qualified_name SeqOptList
+ {
+ $$ = cat_str(3,mm_strdup("alter sequence"),$3,$4);
+}
+| ALTER SEQUENCE IF_P EXISTS qualified_name SeqOptList
+ {
+ $$ = cat_str(3,mm_strdup("alter sequence if exists"),$5,$6);
+}
+;
+
+
+ OptSeqOptList:
+ SeqOptList
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptParenthesizedSeqOptList:
+ '(' SeqOptList ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ SeqOptList:
+ SeqOptElem
+ {
+ $$ = $1;
+}
+| SeqOptList SeqOptElem
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ SeqOptElem:
+ AS SimpleTypename
+ {
+ $$ = cat_str(2,mm_strdup("as"),$2);
+}
+| CACHE NumericOnly
+ {
+ $$ = cat_str(2,mm_strdup("cache"),$2);
+}
+| CYCLE
+ {
+ $$ = mm_strdup("cycle");
+}
+| NO CYCLE
+ {
+ $$ = mm_strdup("no cycle");
+}
+| INCREMENT opt_by NumericOnly
+ {
+ $$ = cat_str(3,mm_strdup("increment"),$2,$3);
+}
+| MAXVALUE NumericOnly
+ {
+ $$ = cat_str(2,mm_strdup("maxvalue"),$2);
+}
+| MINVALUE NumericOnly
+ {
+ $$ = cat_str(2,mm_strdup("minvalue"),$2);
+}
+| NO MAXVALUE
+ {
+ $$ = mm_strdup("no maxvalue");
+}
+| NO MINVALUE
+ {
+ $$ = mm_strdup("no minvalue");
+}
+| OWNED BY any_name
+ {
+ $$ = cat_str(2,mm_strdup("owned by"),$3);
+}
+| SEQUENCE NAME_P any_name
+ {
+ $$ = cat_str(2,mm_strdup("sequence name"),$3);
+}
+| START opt_with NumericOnly
+ {
+ $$ = cat_str(3,mm_strdup("start"),$2,$3);
+}
+| RESTART
+ {
+ $$ = mm_strdup("restart");
+}
+| RESTART opt_with NumericOnly
+ {
+ $$ = cat_str(3,mm_strdup("restart"),$2,$3);
+}
+;
+
+
+ opt_by:
+ BY
+ {
+ $$ = mm_strdup("by");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ NumericOnly:
+ ecpg_fconst
+ {
+ $$ = $1;
+}
+| '+' ecpg_fconst
+ {
+ $$ = cat_str(2,mm_strdup("+"),$2);
+}
+| '-' ecpg_fconst
+ {
+ $$ = cat_str(2,mm_strdup("-"),$2);
+}
+| SignedIconst
+ {
+ $$ = $1;
+}
+;
+
+
+ NumericOnly_list:
+ NumericOnly
+ {
+ $$ = $1;
+}
+| NumericOnly_list ',' NumericOnly
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ CreatePLangStmt:
+ CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name
+ {
+ $$ = cat_str(6,mm_strdup("create"),$2,$3,$4,mm_strdup("language"),$6);
+}
+| CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name HANDLER handler_name opt_inline_handler opt_validator
+ {
+ $$ = cat_str(10,mm_strdup("create"),$2,$3,$4,mm_strdup("language"),$6,mm_strdup("handler"),$8,$9,$10);
+}
+;
+
+
+ opt_trusted:
+ TRUSTED
+ {
+ $$ = mm_strdup("trusted");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ handler_name:
+ name
+ {
+ $$ = $1;
+}
+| name attrs
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_inline_handler:
+ INLINE_P handler_name
+ {
+ $$ = cat_str(2,mm_strdup("inline"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ validator_clause:
+ VALIDATOR handler_name
+ {
+ $$ = cat_str(2,mm_strdup("validator"),$2);
+}
+| NO VALIDATOR
+ {
+ $$ = mm_strdup("no validator");
+}
+;
+
+
+ opt_validator:
+ validator_clause
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_procedural:
+ PROCEDURAL
+ {
+ $$ = mm_strdup("procedural");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateTableSpaceStmt:
+ CREATE TABLESPACE name OptTableSpaceOwner LOCATION ecpg_sconst opt_reloptions
+ {
+ $$ = cat_str(6,mm_strdup("create tablespace"),$3,$4,mm_strdup("location"),$6,$7);
+}
+;
+
+
+ OptTableSpaceOwner:
+ OWNER RoleSpec
+ {
+ $$ = cat_str(2,mm_strdup("owner"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ DropTableSpaceStmt:
+ DROP TABLESPACE name
+ {
+ $$ = cat_str(2,mm_strdup("drop tablespace"),$3);
+}
+| DROP TABLESPACE IF_P EXISTS name
+ {
+ $$ = cat_str(2,mm_strdup("drop tablespace if exists"),$5);
+}
+;
+
+
+ CreateExtensionStmt:
+ CREATE EXTENSION name opt_with create_extension_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("create extension"),$3,$4,$5);
+}
+| CREATE EXTENSION IF_P NOT EXISTS name opt_with create_extension_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("create extension if not exists"),$6,$7,$8);
+}
+;
+
+
+ create_extension_opt_list:
+ create_extension_opt_list create_extension_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ create_extension_opt_item:
+ SCHEMA name
+ {
+ $$ = cat_str(2,mm_strdup("schema"),$2);
+}
+| VERSION_P NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("version"),$2);
+}
+| FROM NonReservedWord_or_Sconst
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(2,mm_strdup("from"),$2);
+}
+| CASCADE
+ {
+ $$ = mm_strdup("cascade");
+}
+;
+
+
+ AlterExtensionStmt:
+ ALTER EXTENSION name UPDATE alter_extension_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("alter extension"),$3,mm_strdup("update"),$5);
+}
+;
+
+
+ alter_extension_opt_list:
+ alter_extension_opt_list alter_extension_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ alter_extension_opt_item:
+ TO NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("to"),$2);
+}
+;
+
+
+ AlterExtensionContentsStmt:
+ ALTER EXTENSION name add_drop object_type_name name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,$5,$6);
+}
+| ALTER EXTENSION name add_drop object_type_any_name any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,$5,$6);
+}
+| ALTER EXTENSION name add_drop AGGREGATE aggregate_with_argtypes
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("aggregate"),$6);
+}
+| ALTER EXTENSION name add_drop CAST '(' Typename AS Typename ')'
+ {
+ $$ = cat_str(8,mm_strdup("alter extension"),$3,$4,mm_strdup("cast ("),$7,mm_strdup("as"),$9,mm_strdup(")"));
+}
+| ALTER EXTENSION name add_drop DOMAIN_P Typename
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("domain"),$6);
+}
+| ALTER EXTENSION name add_drop FUNCTION function_with_argtypes
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("function"),$6);
+}
+| ALTER EXTENSION name add_drop OPERATOR operator_with_argtypes
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("operator"),$6);
+}
+| ALTER EXTENSION name add_drop OPERATOR CLASS any_name USING name
+ {
+ $$ = cat_str(7,mm_strdup("alter extension"),$3,$4,mm_strdup("operator class"),$7,mm_strdup("using"),$9);
+}
+| ALTER EXTENSION name add_drop OPERATOR FAMILY any_name USING name
+ {
+ $$ = cat_str(7,mm_strdup("alter extension"),$3,$4,mm_strdup("operator family"),$7,mm_strdup("using"),$9);
+}
+| ALTER EXTENSION name add_drop PROCEDURE function_with_argtypes
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("procedure"),$6);
+}
+| ALTER EXTENSION name add_drop ROUTINE function_with_argtypes
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("routine"),$6);
+}
+| ALTER EXTENSION name add_drop TRANSFORM FOR Typename LANGUAGE name
+ {
+ $$ = cat_str(7,mm_strdup("alter extension"),$3,$4,mm_strdup("transform for"),$7,mm_strdup("language"),$9);
+}
+| ALTER EXTENSION name add_drop TYPE_P Typename
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("type"),$6);
+}
+;
+
+
+ CreateFdwStmt:
+ CREATE FOREIGN DATA_P WRAPPER name opt_fdw_options create_generic_options
+ {
+ $$ = cat_str(4,mm_strdup("create foreign data wrapper"),$5,$6,$7);
+}
+;
+
+
+ fdw_option:
+ HANDLER handler_name
+ {
+ $$ = cat_str(2,mm_strdup("handler"),$2);
+}
+| NO HANDLER
+ {
+ $$ = mm_strdup("no handler");
+}
+| VALIDATOR handler_name
+ {
+ $$ = cat_str(2,mm_strdup("validator"),$2);
+}
+| NO VALIDATOR
+ {
+ $$ = mm_strdup("no validator");
+}
+;
+
+
+ fdw_options:
+ fdw_option
+ {
+ $$ = $1;
+}
+| fdw_options fdw_option
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_fdw_options:
+ fdw_options
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterFdwStmt:
+ ALTER FOREIGN DATA_P WRAPPER name opt_fdw_options alter_generic_options
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign data wrapper"),$5,$6,$7);
+}
+| ALTER FOREIGN DATA_P WRAPPER name fdw_options
+ {
+ $$ = cat_str(3,mm_strdup("alter foreign data wrapper"),$5,$6);
+}
+;
+
+
+ create_generic_options:
+ OPTIONS '(' generic_option_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("options ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ generic_option_list:
+ generic_option_elem
+ {
+ $$ = $1;
+}
+| generic_option_list ',' generic_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ alter_generic_options:
+ OPTIONS '(' alter_generic_option_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("options ("),$3,mm_strdup(")"));
+}
+;
+
+
+ alter_generic_option_list:
+ alter_generic_option_elem
+ {
+ $$ = $1;
+}
+| alter_generic_option_list ',' alter_generic_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ alter_generic_option_elem:
+ generic_option_elem
+ {
+ $$ = $1;
+}
+| SET generic_option_elem
+ {
+ $$ = cat_str(2,mm_strdup("set"),$2);
+}
+| ADD_P generic_option_elem
+ {
+ $$ = cat_str(2,mm_strdup("add"),$2);
+}
+| DROP generic_option_name
+ {
+ $$ = cat_str(2,mm_strdup("drop"),$2);
+}
+;
+
+
+ generic_option_elem:
+ generic_option_name generic_option_arg
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ generic_option_name:
+ ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ generic_option_arg:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ CreateForeignServerStmt:
+ CREATE SERVER name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options
+ {
+ $$ = cat_str(7,mm_strdup("create server"),$3,$4,$5,mm_strdup("foreign data wrapper"),$9,$10);
+}
+| CREATE SERVER IF_P NOT EXISTS name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options
+ {
+ $$ = cat_str(7,mm_strdup("create server if not exists"),$6,$7,$8,mm_strdup("foreign data wrapper"),$12,$13);
+}
+;
+
+
+ opt_type:
+ TYPE_P ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("type"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ foreign_server_version:
+ VERSION_P ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("version"),$2);
+}
+| VERSION_P NULL_P
+ {
+ $$ = mm_strdup("version null");
+}
+;
+
+
+ opt_foreign_server_version:
+ foreign_server_version
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterForeignServerStmt:
+ ALTER SERVER name foreign_server_version alter_generic_options
+ {
+ $$ = cat_str(4,mm_strdup("alter server"),$3,$4,$5);
+}
+| ALTER SERVER name foreign_server_version
+ {
+ $$ = cat_str(3,mm_strdup("alter server"),$3,$4);
+}
+| ALTER SERVER name alter_generic_options
+ {
+ $$ = cat_str(3,mm_strdup("alter server"),$3,$4);
+}
+;
+
+
+ CreateForeignTableStmt:
+ CREATE FOREIGN TABLE qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options
+ {
+ $$ = cat_str(9,mm_strdup("create foreign table"),$4,mm_strdup("("),$6,mm_strdup(")"),$8,mm_strdup("server"),$10,$11);
+}
+| CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options
+ {
+ $$ = cat_str(9,mm_strdup("create foreign table if not exists"),$7,mm_strdup("("),$9,mm_strdup(")"),$11,mm_strdup("server"),$13,$14);
+}
+| CREATE FOREIGN TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options
+ {
+ $$ = cat_str(9,mm_strdup("create foreign table"),$4,mm_strdup("partition of"),$7,$8,$9,mm_strdup("server"),$11,$12);
+}
+| CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options
+ {
+ $$ = cat_str(9,mm_strdup("create foreign table if not exists"),$7,mm_strdup("partition of"),$10,$11,$12,mm_strdup("server"),$14,$15);
+}
+;
+
+
+ ImportForeignSchemaStmt:
+ IMPORT_P FOREIGN SCHEMA name import_qualification FROM SERVER name INTO name create_generic_options
+ {
+ $$ = cat_str(8,mm_strdup("import foreign schema"),$4,$5,mm_strdup("from server"),$8,mm_strdup("into"),$10,$11);
+}
+;
+
+
+ import_qualification_type:
+ LIMIT TO
+ {
+ $$ = mm_strdup("limit to");
+}
+| EXCEPT
+ {
+ $$ = mm_strdup("except");
+}
+;
+
+
+ import_qualification:
+ import_qualification_type '(' relation_expr_list ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateUserMappingStmt:
+ CREATE USER MAPPING FOR auth_ident SERVER name create_generic_options
+ {
+ $$ = cat_str(5,mm_strdup("create user mapping for"),$5,mm_strdup("server"),$7,$8);
+}
+| CREATE USER MAPPING IF_P NOT EXISTS FOR auth_ident SERVER name create_generic_options
+ {
+ $$ = cat_str(5,mm_strdup("create user mapping if not exists for"),$8,mm_strdup("server"),$10,$11);
+}
+;
+
+
+ auth_ident:
+ RoleSpec
+ {
+ $$ = $1;
+}
+| USER
+ {
+ $$ = mm_strdup("user");
+}
+;
+
+
+ DropUserMappingStmt:
+ DROP USER MAPPING FOR auth_ident SERVER name
+ {
+ $$ = cat_str(4,mm_strdup("drop user mapping for"),$5,mm_strdup("server"),$7);
+}
+| DROP USER MAPPING IF_P EXISTS FOR auth_ident SERVER name
+ {
+ $$ = cat_str(4,mm_strdup("drop user mapping if exists for"),$7,mm_strdup("server"),$9);
+}
+;
+
+
+ AlterUserMappingStmt:
+ ALTER USER MAPPING FOR auth_ident SERVER name alter_generic_options
+ {
+ $$ = cat_str(5,mm_strdup("alter user mapping for"),$5,mm_strdup("server"),$7,$8);
+}
+;
+
+
+ CreatePolicyStmt:
+ CREATE POLICY name ON qualified_name RowSecurityDefaultPermissive RowSecurityDefaultForCmd RowSecurityDefaultToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck
+ {
+ $$ = cat_str(9,mm_strdup("create policy"),$3,mm_strdup("on"),$5,$6,$7,$8,$9,$10);
+}
+;
+
+
+ AlterPolicyStmt:
+ ALTER POLICY name ON qualified_name RowSecurityOptionalToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck
+ {
+ $$ = cat_str(7,mm_strdup("alter policy"),$3,mm_strdup("on"),$5,$6,$7,$8);
+}
+;
+
+
+ RowSecurityOptionalExpr:
+ USING '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("using ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RowSecurityOptionalWithCheck:
+ WITH CHECK '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("with check ("),$4,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RowSecurityDefaultToRole:
+ TO role_list
+ {
+ $$ = cat_str(2,mm_strdup("to"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RowSecurityOptionalToRole:
+ TO role_list
+ {
+ $$ = cat_str(2,mm_strdup("to"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RowSecurityDefaultPermissive:
+ AS ecpg_ident
+ {
+ $$ = cat_str(2,mm_strdup("as"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RowSecurityDefaultForCmd:
+ FOR row_security_cmd
+ {
+ $$ = cat_str(2,mm_strdup("for"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ row_security_cmd:
+ ALL
+ {
+ $$ = mm_strdup("all");
+}
+| SELECT
+ {
+ $$ = mm_strdup("select");
+}
+| INSERT
+ {
+ $$ = mm_strdup("insert");
+}
+| UPDATE
+ {
+ $$ = mm_strdup("update");
+}
+| DELETE_P
+ {
+ $$ = mm_strdup("delete");
+}
+;
+
+
+ CreateAmStmt:
+ CREATE ACCESS METHOD name TYPE_P am_type HANDLER handler_name
+ {
+ $$ = cat_str(6,mm_strdup("create access method"),$4,mm_strdup("type"),$6,mm_strdup("handler"),$8);
+}
+;
+
+
+ am_type:
+ INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+;
+
+
+ CreateTrigStmt:
+ CREATE opt_or_replace TRIGGER name TriggerActionTime TriggerEvents ON qualified_name TriggerReferencing TriggerForSpec TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')'
+ {
+ $$ = cat_str(17,mm_strdup("create"),$2,mm_strdup("trigger"),$4,$5,$6,mm_strdup("on"),$8,$9,$10,$11,mm_strdup("execute"),$13,$14,mm_strdup("("),$16,mm_strdup(")"));
+}
+| CREATE opt_or_replace CONSTRAINT TRIGGER name AFTER TriggerEvents ON qualified_name OptConstrFromTable ConstraintAttributeSpec FOR EACH ROW TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')'
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(18,mm_strdup("create"),$2,mm_strdup("constraint trigger"),$5,mm_strdup("after"),$7,mm_strdup("on"),$9,$10,$11,mm_strdup("for each row"),$15,mm_strdup("execute"),$17,$18,mm_strdup("("),$20,mm_strdup(")"));
+}
+;
+
+
+ TriggerActionTime:
+ BEFORE
+ {
+ $$ = mm_strdup("before");
+}
+| AFTER
+ {
+ $$ = mm_strdup("after");
+}
+| INSTEAD OF
+ {
+ $$ = mm_strdup("instead of");
+}
+;
+
+
+ TriggerEvents:
+ TriggerOneEvent
+ {
+ $$ = $1;
+}
+| TriggerEvents OR TriggerOneEvent
+ {
+ $$ = cat_str(3,$1,mm_strdup("or"),$3);
+}
+;
+
+
+ TriggerOneEvent:
+ INSERT
+ {
+ $$ = mm_strdup("insert");
+}
+| DELETE_P
+ {
+ $$ = mm_strdup("delete");
+}
+| UPDATE
+ {
+ $$ = mm_strdup("update");
+}
+| UPDATE OF columnList
+ {
+ $$ = cat_str(2,mm_strdup("update of"),$3);
+}
+| TRUNCATE
+ {
+ $$ = mm_strdup("truncate");
+}
+;
+
+
+ TriggerReferencing:
+ REFERENCING TriggerTransitions
+ {
+ $$ = cat_str(2,mm_strdup("referencing"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TriggerTransitions:
+ TriggerTransition
+ {
+ $$ = $1;
+}
+| TriggerTransitions TriggerTransition
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ TriggerTransition:
+ TransitionOldOrNew TransitionRowOrTable opt_as TransitionRelName
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+;
+
+
+ TransitionOldOrNew:
+ NEW
+ {
+ $$ = mm_strdup("new");
+}
+| OLD
+ {
+ $$ = mm_strdup("old");
+}
+;
+
+
+ TransitionRowOrTable:
+ TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| ROW
+ {
+ $$ = mm_strdup("row");
+}
+;
+
+
+ TransitionRelName:
+ ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ TriggerForSpec:
+ FOR TriggerForOptEach TriggerForType
+ {
+ $$ = cat_str(3,mm_strdup("for"),$2,$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TriggerForOptEach:
+ EACH
+ {
+ $$ = mm_strdup("each");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TriggerForType:
+ ROW
+ {
+ $$ = mm_strdup("row");
+}
+| STATEMENT
+ {
+ $$ = mm_strdup("statement");
+}
+;
+
+
+ TriggerWhen:
+ WHEN '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("when ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ FUNCTION_or_PROCEDURE:
+ FUNCTION
+ {
+ $$ = mm_strdup("function");
+}
+| PROCEDURE
+ {
+ $$ = mm_strdup("procedure");
+}
+;
+
+
+ TriggerFuncArgs:
+ TriggerFuncArg
+ {
+ $$ = $1;
+}
+| TriggerFuncArgs ',' TriggerFuncArg
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TriggerFuncArg:
+ Iconst
+ {
+ $$ = $1;
+}
+| ecpg_fconst
+ {
+ $$ = $1;
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+| ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ OptConstrFromTable:
+ FROM qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("from"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ConstraintAttributeSpec:
+
+ {
+ $$=EMPTY; }
+| ConstraintAttributeSpec ConstraintAttributeElem
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ ConstraintAttributeElem:
+ NOT DEFERRABLE
+ {
+ $$ = mm_strdup("not deferrable");
+}
+| DEFERRABLE
+ {
+ $$ = mm_strdup("deferrable");
+}
+| INITIALLY IMMEDIATE
+ {
+ $$ = mm_strdup("initially immediate");
+}
+| INITIALLY DEFERRED
+ {
+ $$ = mm_strdup("initially deferred");
+}
+| NOT VALID
+ {
+ $$ = mm_strdup("not valid");
+}
+| NO INHERIT
+ {
+ $$ = mm_strdup("no inherit");
+}
+;
+
+
+ CreateEventTrigStmt:
+ CREATE EVENT TRIGGER name ON ColLabel EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')'
+ {
+ $$ = cat_str(8,mm_strdup("create event trigger"),$4,mm_strdup("on"),$6,mm_strdup("execute"),$8,$9,mm_strdup("( )"));
+}
+| CREATE EVENT TRIGGER name ON ColLabel WHEN event_trigger_when_list EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')'
+ {
+ $$ = cat_str(10,mm_strdup("create event trigger"),$4,mm_strdup("on"),$6,mm_strdup("when"),$8,mm_strdup("execute"),$10,$11,mm_strdup("( )"));
+}
+;
+
+
+ event_trigger_when_list:
+ event_trigger_when_item
+ {
+ $$ = $1;
+}
+| event_trigger_when_list AND event_trigger_when_item
+ {
+ $$ = cat_str(3,$1,mm_strdup("and"),$3);
+}
+;
+
+
+ event_trigger_when_item:
+ ColId IN_P '(' event_trigger_value_list ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("in ("),$4,mm_strdup(")"));
+}
+;
+
+
+ event_trigger_value_list:
+ SCONST
+ {
+ $$ = mm_strdup("sconst");
+}
+| event_trigger_value_list ',' SCONST
+ {
+ $$ = cat_str(2,$1,mm_strdup(", sconst"));
+}
+;
+
+
+ AlterEventTrigStmt:
+ ALTER EVENT TRIGGER name enable_trigger
+ {
+ $$ = cat_str(3,mm_strdup("alter event trigger"),$4,$5);
+}
+;
+
+
+ enable_trigger:
+ ENABLE_P
+ {
+ $$ = mm_strdup("enable");
+}
+| ENABLE_P REPLICA
+ {
+ $$ = mm_strdup("enable replica");
+}
+| ENABLE_P ALWAYS
+ {
+ $$ = mm_strdup("enable always");
+}
+| DISABLE_P
+ {
+ $$ = mm_strdup("disable");
+}
+;
+
+
+ CreateAssertionStmt:
+ CREATE ASSERTION any_name CHECK '(' a_expr ')' ConstraintAttributeSpec
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(6,mm_strdup("create assertion"),$3,mm_strdup("check ("),$6,mm_strdup(")"),$8);
+}
+;
+
+
+ DefineStmt:
+ CREATE opt_or_replace AGGREGATE func_name aggr_args definition
+ {
+ $$ = cat_str(6,mm_strdup("create"),$2,mm_strdup("aggregate"),$4,$5,$6);
+}
+| CREATE opt_or_replace AGGREGATE func_name old_aggr_definition
+ {
+ $$ = cat_str(5,mm_strdup("create"),$2,mm_strdup("aggregate"),$4,$5);
+}
+| CREATE OPERATOR any_operator definition
+ {
+ $$ = cat_str(3,mm_strdup("create operator"),$3,$4);
+}
+| CREATE TYPE_P any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create type"),$3,$4);
+}
+| CREATE TYPE_P any_name
+ {
+ $$ = cat_str(2,mm_strdup("create type"),$3);
+}
+| CREATE TYPE_P any_name AS '(' OptTableFuncElementList ')'
+ {
+ $$ = cat_str(5,mm_strdup("create type"),$3,mm_strdup("as ("),$6,mm_strdup(")"));
+}
+| CREATE TYPE_P any_name AS ENUM_P '(' opt_enum_val_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("create type"),$3,mm_strdup("as enum ("),$7,mm_strdup(")"));
+}
+| CREATE TYPE_P any_name AS RANGE definition
+ {
+ $$ = cat_str(4,mm_strdup("create type"),$3,mm_strdup("as range"),$6);
+}
+| CREATE TEXT_P SEARCH PARSER any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create text search parser"),$5,$6);
+}
+| CREATE TEXT_P SEARCH DICTIONARY any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create text search dictionary"),$5,$6);
+}
+| CREATE TEXT_P SEARCH TEMPLATE any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create text search template"),$5,$6);
+}
+| CREATE TEXT_P SEARCH CONFIGURATION any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create text search configuration"),$5,$6);
+}
+| CREATE COLLATION any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create collation"),$3,$4);
+}
+| CREATE COLLATION IF_P NOT EXISTS any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("create collation if not exists"),$6,$7);
+}
+| CREATE COLLATION any_name FROM any_name
+ {
+ $$ = cat_str(4,mm_strdup("create collation"),$3,mm_strdup("from"),$5);
+}
+| CREATE COLLATION IF_P NOT EXISTS any_name FROM any_name
+ {
+ $$ = cat_str(4,mm_strdup("create collation if not exists"),$6,mm_strdup("from"),$8);
+}
+;
+
+
+ definition:
+ '(' def_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ def_list:
+ def_elem
+ {
+ $$ = $1;
+}
+| def_list ',' def_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ def_elem:
+ ColLabel '=' def_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ def_arg:
+ func_type
+ {
+ $$ = $1;
+}
+| reserved_keyword
+ {
+ $$ = $1;
+}
+| qual_all_Op
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+| NONE
+ {
+ $$ = mm_strdup("none");
+}
+;
+
+
+ old_aggr_definition:
+ '(' old_aggr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ old_aggr_list:
+ old_aggr_elem
+ {
+ $$ = $1;
+}
+| old_aggr_list ',' old_aggr_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ old_aggr_elem:
+ ecpg_ident '=' def_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+;
+
+
+ opt_enum_val_list:
+ enum_val_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ enum_val_list:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| enum_val_list ',' ecpg_sconst
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ AlterEnumStmt:
+ ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst
+ {
+ $$ = cat_str(5,mm_strdup("alter type"),$3,mm_strdup("add value"),$6,$7);
+}
+| ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst BEFORE ecpg_sconst
+ {
+ $$ = cat_str(7,mm_strdup("alter type"),$3,mm_strdup("add value"),$6,$7,mm_strdup("before"),$9);
+}
+| ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists ecpg_sconst AFTER ecpg_sconst
+ {
+ $$ = cat_str(7,mm_strdup("alter type"),$3,mm_strdup("add value"),$6,$7,mm_strdup("after"),$9);
+}
+| ALTER TYPE_P any_name RENAME VALUE_P ecpg_sconst TO ecpg_sconst
+ {
+ $$ = cat_str(6,mm_strdup("alter type"),$3,mm_strdup("rename value"),$6,mm_strdup("to"),$8);
+}
+;
+
+
+ opt_if_not_exists:
+ IF_P NOT EXISTS
+ {
+ $$ = mm_strdup("if not exists");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateOpClassStmt:
+ CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename USING name opt_opfamily AS opclass_item_list
+ {
+ $$ = cat_str(10,mm_strdup("create operator class"),$4,$5,mm_strdup("for type"),$8,mm_strdup("using"),$10,$11,mm_strdup("as"),$13);
+}
+;
+
+
+ opclass_item_list:
+ opclass_item
+ {
+ $$ = $1;
+}
+| opclass_item_list ',' opclass_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opclass_item:
+ OPERATOR Iconst any_operator opclass_purpose opt_recheck
+ {
+ $$ = cat_str(5,mm_strdup("operator"),$2,$3,$4,$5);
+}
+| OPERATOR Iconst operator_with_argtypes opclass_purpose opt_recheck
+ {
+ $$ = cat_str(5,mm_strdup("operator"),$2,$3,$4,$5);
+}
+| FUNCTION Iconst function_with_argtypes
+ {
+ $$ = cat_str(3,mm_strdup("function"),$2,$3);
+}
+| FUNCTION Iconst '(' type_list ')' function_with_argtypes
+ {
+ $$ = cat_str(6,mm_strdup("function"),$2,mm_strdup("("),$4,mm_strdup(")"),$6);
+}
+| STORAGE Typename
+ {
+ $$ = cat_str(2,mm_strdup("storage"),$2);
+}
+;
+
+
+ opt_default:
+ DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_opfamily:
+ FAMILY any_name
+ {
+ $$ = cat_str(2,mm_strdup("family"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opclass_purpose:
+ FOR SEARCH
+ {
+ $$ = mm_strdup("for search");
+}
+| FOR ORDER BY any_name
+ {
+ $$ = cat_str(2,mm_strdup("for order by"),$4);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_recheck:
+ RECHECK
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = mm_strdup("recheck");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateOpFamilyStmt:
+ CREATE OPERATOR FAMILY any_name USING name
+ {
+ $$ = cat_str(4,mm_strdup("create operator family"),$4,mm_strdup("using"),$6);
+}
+;
+
+
+ AlterOpFamilyStmt:
+ ALTER OPERATOR FAMILY any_name USING name ADD_P opclass_item_list
+ {
+ $$ = cat_str(6,mm_strdup("alter operator family"),$4,mm_strdup("using"),$6,mm_strdup("add"),$8);
+}
+| ALTER OPERATOR FAMILY any_name USING name DROP opclass_drop_list
+ {
+ $$ = cat_str(6,mm_strdup("alter operator family"),$4,mm_strdup("using"),$6,mm_strdup("drop"),$8);
+}
+;
+
+
+ opclass_drop_list:
+ opclass_drop
+ {
+ $$ = $1;
+}
+| opclass_drop_list ',' opclass_drop
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opclass_drop:
+ OPERATOR Iconst '(' type_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("operator"),$2,mm_strdup("("),$4,mm_strdup(")"));
+}
+| FUNCTION Iconst '(' type_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("function"),$2,mm_strdup("("),$4,mm_strdup(")"));
+}
+;
+
+
+ DropOpClassStmt:
+ DROP OPERATOR CLASS any_name USING name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop operator class"),$4,mm_strdup("using"),$6,$7);
+}
+| DROP OPERATOR CLASS IF_P EXISTS any_name USING name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop operator class if exists"),$6,mm_strdup("using"),$8,$9);
+}
+;
+
+
+ DropOpFamilyStmt:
+ DROP OPERATOR FAMILY any_name USING name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop operator family"),$4,mm_strdup("using"),$6,$7);
+}
+| DROP OPERATOR FAMILY IF_P EXISTS any_name USING name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop operator family if exists"),$6,mm_strdup("using"),$8,$9);
+}
+;
+
+
+ DropOwnedStmt:
+ DROP OWNED BY role_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop owned by"),$4,$5);
+}
+;
+
+
+ ReassignOwnedStmt:
+ REASSIGN OWNED BY role_list TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("reassign owned by"),$4,mm_strdup("to"),$6);
+}
+;
+
+
+ DropStmt:
+ DROP object_type_any_name IF_P EXISTS any_name_list opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop"),$2,mm_strdup("if exists"),$5,$6);
+}
+| DROP object_type_any_name any_name_list opt_drop_behavior
+ {
+ $$ = cat_str(4,mm_strdup("drop"),$2,$3,$4);
+}
+| DROP drop_type_name IF_P EXISTS name_list opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop"),$2,mm_strdup("if exists"),$5,$6);
+}
+| DROP drop_type_name name_list opt_drop_behavior
+ {
+ $$ = cat_str(4,mm_strdup("drop"),$2,$3,$4);
+}
+| DROP object_type_name_on_any_name name ON any_name opt_drop_behavior
+ {
+ $$ = cat_str(6,mm_strdup("drop"),$2,$3,mm_strdup("on"),$5,$6);
+}
+| DROP object_type_name_on_any_name IF_P EXISTS name ON any_name opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("drop"),$2,mm_strdup("if exists"),$5,mm_strdup("on"),$7,$8);
+}
+| DROP TYPE_P type_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop type"),$3,$4);
+}
+| DROP TYPE_P IF_P EXISTS type_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop type if exists"),$5,$6);
+}
+| DROP DOMAIN_P type_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop domain"),$3,$4);
+}
+| DROP DOMAIN_P IF_P EXISTS type_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop domain if exists"),$5,$6);
+}
+| DROP INDEX CONCURRENTLY any_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop index concurrently"),$4,$5);
+}
+| DROP INDEX CONCURRENTLY IF_P EXISTS any_name_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop index concurrently if exists"),$6,$7);
+}
+;
+
+
+ object_type_any_name:
+ TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| SEQUENCE
+ {
+ $$ = mm_strdup("sequence");
+}
+| VIEW
+ {
+ $$ = mm_strdup("view");
+}
+| MATERIALIZED VIEW
+ {
+ $$ = mm_strdup("materialized view");
+}
+| INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| FOREIGN TABLE
+ {
+ $$ = mm_strdup("foreign table");
+}
+| COLLATION
+ {
+ $$ = mm_strdup("collation");
+}
+| CONVERSION_P
+ {
+ $$ = mm_strdup("conversion");
+}
+| STATISTICS
+ {
+ $$ = mm_strdup("statistics");
+}
+| TEXT_P SEARCH PARSER
+ {
+ $$ = mm_strdup("text search parser");
+}
+| TEXT_P SEARCH DICTIONARY
+ {
+ $$ = mm_strdup("text search dictionary");
+}
+| TEXT_P SEARCH TEMPLATE
+ {
+ $$ = mm_strdup("text search template");
+}
+| TEXT_P SEARCH CONFIGURATION
+ {
+ $$ = mm_strdup("text search configuration");
+}
+;
+
+
+ object_type_name:
+ drop_type_name
+ {
+ $$ = $1;
+}
+| DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+| ROLE
+ {
+ $$ = mm_strdup("role");
+}
+| SUBSCRIPTION
+ {
+ $$ = mm_strdup("subscription");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+;
+
+
+ drop_type_name:
+ ACCESS METHOD
+ {
+ $$ = mm_strdup("access method");
+}
+| EVENT TRIGGER
+ {
+ $$ = mm_strdup("event trigger");
+}
+| EXTENSION
+ {
+ $$ = mm_strdup("extension");
+}
+| FOREIGN DATA_P WRAPPER
+ {
+ $$ = mm_strdup("foreign data wrapper");
+}
+| opt_procedural LANGUAGE
+ {
+ $$ = cat_str(2,$1,mm_strdup("language"));
+}
+| PUBLICATION
+ {
+ $$ = mm_strdup("publication");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SERVER
+ {
+ $$ = mm_strdup("server");
+}
+;
+
+
+ object_type_name_on_any_name:
+ POLICY
+ {
+ $$ = mm_strdup("policy");
+}
+| RULE
+ {
+ $$ = mm_strdup("rule");
+}
+| TRIGGER
+ {
+ $$ = mm_strdup("trigger");
+}
+;
+
+
+ any_name_list:
+ any_name
+ {
+ $$ = $1;
+}
+| any_name_list ',' any_name
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ any_name:
+ ColId
+ {
+ $$ = $1;
+}
+| ColId attrs
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ attrs:
+ '.' attr_name
+ {
+ $$ = cat_str(2,mm_strdup("."),$2);
+}
+| attrs '.' attr_name
+ {
+ $$ = cat_str(3,$1,mm_strdup("."),$3);
+}
+;
+
+
+ type_name_list:
+ Typename
+ {
+ $$ = $1;
+}
+| type_name_list ',' Typename
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ TruncateStmt:
+ TRUNCATE opt_table relation_expr_list opt_restart_seqs opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("truncate"),$2,$3,$4,$5);
+}
+;
+
+
+ opt_restart_seqs:
+ CONTINUE_P IDENTITY_P
+ {
+ $$ = mm_strdup("continue identity");
+}
+| RESTART IDENTITY_P
+ {
+ $$ = mm_strdup("restart identity");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CommentStmt:
+ COMMENT ON object_type_any_name any_name IS comment_text
+ {
+ $$ = cat_str(5,mm_strdup("comment on"),$3,$4,mm_strdup("is"),$6);
+}
+| COMMENT ON COLUMN any_name IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on column"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON object_type_name name IS comment_text
+ {
+ $$ = cat_str(5,mm_strdup("comment on"),$3,$4,mm_strdup("is"),$6);
+}
+| COMMENT ON TYPE_P Typename IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on type"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON DOMAIN_P Typename IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on domain"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON AGGREGATE aggregate_with_argtypes IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on aggregate"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON FUNCTION function_with_argtypes IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on function"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON OPERATOR operator_with_argtypes IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on operator"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON CONSTRAINT name ON any_name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on constraint"),$4,mm_strdup("on"),$6,mm_strdup("is"),$8);
+}
+| COMMENT ON CONSTRAINT name ON DOMAIN_P any_name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on constraint"),$4,mm_strdup("on domain"),$7,mm_strdup("is"),$9);
+}
+| COMMENT ON object_type_name_on_any_name name ON any_name IS comment_text
+ {
+ $$ = cat_str(7,mm_strdup("comment on"),$3,$4,mm_strdup("on"),$6,mm_strdup("is"),$8);
+}
+| COMMENT ON PROCEDURE function_with_argtypes IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on procedure"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON ROUTINE function_with_argtypes IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on routine"),$4,mm_strdup("is"),$6);
+}
+| COMMENT ON TRANSFORM FOR Typename LANGUAGE name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on transform for"),$5,mm_strdup("language"),$7,mm_strdup("is"),$9);
+}
+| COMMENT ON OPERATOR CLASS any_name USING name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on operator class"),$5,mm_strdup("using"),$7,mm_strdup("is"),$9);
+}
+| COMMENT ON OPERATOR FAMILY any_name USING name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on operator family"),$5,mm_strdup("using"),$7,mm_strdup("is"),$9);
+}
+| COMMENT ON LARGE_P OBJECT_P NumericOnly IS comment_text
+ {
+ $$ = cat_str(4,mm_strdup("comment on large object"),$5,mm_strdup("is"),$7);
+}
+| COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on cast ("),$5,mm_strdup("as"),$7,mm_strdup(") is"),$10);
+}
+;
+
+
+ comment_text:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+;
+
+
+ SecLabelStmt:
+ SECURITY LABEL opt_provider ON object_type_any_name any_name IS security_label
+ {
+ $$ = cat_str(7,mm_strdup("security label"),$3,mm_strdup("on"),$5,$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON COLUMN any_name IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on column"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON object_type_name name IS security_label
+ {
+ $$ = cat_str(7,mm_strdup("security label"),$3,mm_strdup("on"),$5,$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON TYPE_P Typename IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on type"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON DOMAIN_P Typename IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on domain"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON AGGREGATE aggregate_with_argtypes IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on aggregate"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON FUNCTION function_with_argtypes IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on function"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON LARGE_P OBJECT_P NumericOnly IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on large object"),$7,mm_strdup("is"),$9);
+}
+| SECURITY LABEL opt_provider ON PROCEDURE function_with_argtypes IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on procedure"),$6,mm_strdup("is"),$8);
+}
+| SECURITY LABEL opt_provider ON ROUTINE function_with_argtypes IS security_label
+ {
+ $$ = cat_str(6,mm_strdup("security label"),$3,mm_strdup("on routine"),$6,mm_strdup("is"),$8);
+}
+;
+
+
+ opt_provider:
+ FOR NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("for"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ security_label:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+;
+
+
+ FetchStmt:
+ FETCH fetch_args
+ {
+ $$ = cat_str(2,mm_strdup("fetch"),$2);
+}
+| MOVE fetch_args
+ {
+ $$ = cat_str(2,mm_strdup("move"),$2);
+}
+ | FETCH fetch_args ecpg_fetch_into
+ {
+ $$ = cat2_str(mm_strdup("fetch"), $2);
+ }
+ | FETCH FORWARD cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch forward"), cursor_marker);
+ }
+ | FETCH FORWARD from_in cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch forward from"), cursor_marker);
+ }
+ | FETCH BACKWARD cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch backward"), cursor_marker);
+ }
+ | FETCH BACKWARD from_in cursor_name opt_ecpg_fetch_into
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+ | MOVE FORWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+ | MOVE FORWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+ | MOVE BACKWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+ | MOVE BACKWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ $$ = cat_str(2, mm_strdup("move backward from"), cursor_marker);
+ }
+;
+
+
+ fetch_args:
+ cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($1, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($1[0] == ':')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+
+ $$ = $1;
+}
+| from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($2, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($2[0] == ':')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(2,$1,$2);
+}
+| NEXT opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("next"),$2,$3);
+}
+| PRIOR opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("prior"),$2,$3);
+}
+| FIRST_P opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("first"),$2,$3);
+}
+| LAST_P opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("last"),$2,$3);
+}
+| ABSOLUTE_P SignedIconst opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ if ($2[0] == '$')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(4,mm_strdup("absolute"),$2,$3,$4);
+}
+| RELATIVE_P SignedIconst opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ if ($2[0] == '$')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(4,mm_strdup("relative"),$2,$3,$4);
+}
+| SignedIconst opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+ if ($1[0] == '$')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,$1,$2,$3);
+}
+| ALL opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($3, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("all"),$2,$3);
+}
+| FORWARD SignedIconst opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ if ($2[0] == '$')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(4,mm_strdup("forward"),$2,$3,$4);
+}
+| FORWARD ALL opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("forward all"),$3,$4);
+}
+| BACKWARD SignedIconst opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+ if ($2[0] == '$')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(4,mm_strdup("backward"),$2,$3,$4);
+}
+| BACKWARD ALL opt_from_in cursor_name
+ {
+ struct cursor *ptr = add_additional_variables($4, false);
+ if (ptr -> connection)
+ connection = mm_strdup(ptr -> connection);
+
+ if ($4[0] == ':')
+ {
+ free($4);
+ $4 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("backward all"),$3,$4);
+}
+;
+
+
+ from_in:
+ FROM
+ {
+ $$ = mm_strdup("from");
+}
+| IN_P
+ {
+ $$ = mm_strdup("in");
+}
+;
+
+
+ opt_from_in:
+ from_in
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ GrantStmt:
+ GRANT privileges ON privilege_target TO grantee_list opt_grant_grant_option opt_granted_by
+ {
+ $$ = cat_str(8,mm_strdup("grant"),$2,mm_strdup("on"),$4,mm_strdup("to"),$6,$7,$8);
+}
+;
+
+
+ RevokeStmt:
+ REVOKE privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior
+ {
+ $$ = cat_str(8,mm_strdup("revoke"),$2,mm_strdup("on"),$4,mm_strdup("from"),$6,$7,$8);
+}
+| REVOKE GRANT OPTION FOR privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior
+ {
+ $$ = cat_str(8,mm_strdup("revoke grant option for"),$5,mm_strdup("on"),$7,mm_strdup("from"),$9,$10,$11);
+}
+;
+
+
+ privileges:
+ privilege_list
+ {
+ $$ = $1;
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+| ALL PRIVILEGES
+ {
+ $$ = mm_strdup("all privileges");
+}
+| ALL '(' columnList ')'
+ {
+ $$ = cat_str(3,mm_strdup("all ("),$3,mm_strdup(")"));
+}
+| ALL PRIVILEGES '(' columnList ')'
+ {
+ $$ = cat_str(3,mm_strdup("all privileges ("),$4,mm_strdup(")"));
+}
+;
+
+
+ privilege_list:
+ privilege
+ {
+ $$ = $1;
+}
+| privilege_list ',' privilege
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ privilege:
+ SELECT opt_column_list
+ {
+ $$ = cat_str(2,mm_strdup("select"),$2);
+}
+| REFERENCES opt_column_list
+ {
+ $$ = cat_str(2,mm_strdup("references"),$2);
+}
+| CREATE opt_column_list
+ {
+ $$ = cat_str(2,mm_strdup("create"),$2);
+}
+| ColId opt_column_list
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ privilege_target:
+ qualified_name_list
+ {
+ $$ = $1;
+}
+| TABLE qualified_name_list
+ {
+ $$ = cat_str(2,mm_strdup("table"),$2);
+}
+| SEQUENCE qualified_name_list
+ {
+ $$ = cat_str(2,mm_strdup("sequence"),$2);
+}
+| FOREIGN DATA_P WRAPPER name_list
+ {
+ $$ = cat_str(2,mm_strdup("foreign data wrapper"),$4);
+}
+| FOREIGN SERVER name_list
+ {
+ $$ = cat_str(2,mm_strdup("foreign server"),$3);
+}
+| FUNCTION function_with_argtypes_list
+ {
+ $$ = cat_str(2,mm_strdup("function"),$2);
+}
+| PROCEDURE function_with_argtypes_list
+ {
+ $$ = cat_str(2,mm_strdup("procedure"),$2);
+}
+| ROUTINE function_with_argtypes_list
+ {
+ $$ = cat_str(2,mm_strdup("routine"),$2);
+}
+| DATABASE name_list
+ {
+ $$ = cat_str(2,mm_strdup("database"),$2);
+}
+| DOMAIN_P any_name_list
+ {
+ $$ = cat_str(2,mm_strdup("domain"),$2);
+}
+| LANGUAGE name_list
+ {
+ $$ = cat_str(2,mm_strdup("language"),$2);
+}
+| LARGE_P OBJECT_P NumericOnly_list
+ {
+ $$ = cat_str(2,mm_strdup("large object"),$3);
+}
+| SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("schema"),$2);
+}
+| TABLESPACE name_list
+ {
+ $$ = cat_str(2,mm_strdup("tablespace"),$2);
+}
+| TYPE_P any_name_list
+ {
+ $$ = cat_str(2,mm_strdup("type"),$2);
+}
+| ALL TABLES IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("all tables in schema"),$5);
+}
+| ALL SEQUENCES IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("all sequences in schema"),$5);
+}
+| ALL FUNCTIONS IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("all functions in schema"),$5);
+}
+| ALL PROCEDURES IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("all procedures in schema"),$5);
+}
+| ALL ROUTINES IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("all routines in schema"),$5);
+}
+;
+
+
+ grantee_list:
+ grantee
+ {
+ $$ = $1;
+}
+| grantee_list ',' grantee
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ grantee:
+ RoleSpec
+ {
+ $$ = $1;
+}
+| GROUP_P RoleSpec
+ {
+ $$ = cat_str(2,mm_strdup("group"),$2);
+}
+;
+
+
+ opt_grant_grant_option:
+ WITH GRANT OPTION
+ {
+ $$ = mm_strdup("with grant option");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ GrantRoleStmt:
+ GRANT privilege_list TO role_list opt_grant_admin_option opt_granted_by
+ {
+ $$ = cat_str(6,mm_strdup("grant"),$2,mm_strdup("to"),$4,$5,$6);
+}
+;
+
+
+ RevokeRoleStmt:
+ REVOKE privilege_list FROM role_list opt_granted_by opt_drop_behavior
+ {
+ $$ = cat_str(6,mm_strdup("revoke"),$2,mm_strdup("from"),$4,$5,$6);
+}
+| REVOKE ADMIN OPTION FOR privilege_list FROM role_list opt_granted_by opt_drop_behavior
+ {
+ $$ = cat_str(6,mm_strdup("revoke admin option for"),$5,mm_strdup("from"),$7,$8,$9);
+}
+;
+
+
+ opt_grant_admin_option:
+ WITH ADMIN OPTION
+ {
+ $$ = mm_strdup("with admin option");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_granted_by:
+ GRANTED BY RoleSpec
+ {
+ $$ = cat_str(2,mm_strdup("granted by"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterDefaultPrivilegesStmt:
+ ALTER DEFAULT PRIVILEGES DefACLOptionList DefACLAction
+ {
+ $$ = cat_str(3,mm_strdup("alter default privileges"),$4,$5);
+}
+;
+
+
+ DefACLOptionList:
+ DefACLOptionList DefACLOption
+ {
+ $$ = cat_str(2,$1,$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ DefACLOption:
+ IN_P SCHEMA name_list
+ {
+ $$ = cat_str(2,mm_strdup("in schema"),$3);
+}
+| FOR ROLE role_list
+ {
+ $$ = cat_str(2,mm_strdup("for role"),$3);
+}
+| FOR USER role_list
+ {
+ $$ = cat_str(2,mm_strdup("for user"),$3);
+}
+;
+
+
+ DefACLAction:
+ GRANT privileges ON defacl_privilege_target TO grantee_list opt_grant_grant_option
+ {
+ $$ = cat_str(7,mm_strdup("grant"),$2,mm_strdup("on"),$4,mm_strdup("to"),$6,$7);
+}
+| REVOKE privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("revoke"),$2,mm_strdup("on"),$4,mm_strdup("from"),$6,$7);
+}
+| REVOKE GRANT OPTION FOR privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("revoke grant option for"),$5,mm_strdup("on"),$7,mm_strdup("from"),$9,$10);
+}
+;
+
+
+ defacl_privilege_target:
+ TABLES
+ {
+ $$ = mm_strdup("tables");
+}
+| FUNCTIONS
+ {
+ $$ = mm_strdup("functions");
+}
+| ROUTINES
+ {
+ $$ = mm_strdup("routines");
+}
+| SEQUENCES
+ {
+ $$ = mm_strdup("sequences");
+}
+| TYPES_P
+ {
+ $$ = mm_strdup("types");
+}
+| SCHEMAS
+ {
+ $$ = mm_strdup("schemas");
+}
+;
+
+
+ IndexStmt:
+ CREATE opt_unique INDEX opt_concurrently opt_index_name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause
+ {
+ $$ = cat_str(15,mm_strdup("create"),$2,mm_strdup("index"),$4,$5,mm_strdup("on"),$7,$8,mm_strdup("("),$10,mm_strdup(")"),$12,$13,$14,$15);
+}
+| CREATE opt_unique INDEX opt_concurrently IF_P NOT EXISTS name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause
+ {
+ $$ = cat_str(16,mm_strdup("create"),$2,mm_strdup("index"),$4,mm_strdup("if not exists"),$8,mm_strdup("on"),$10,$11,mm_strdup("("),$13,mm_strdup(")"),$15,$16,$17,$18);
+}
+;
+
+
+ opt_unique:
+ UNIQUE
+ {
+ $$ = mm_strdup("unique");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_concurrently:
+ CONCURRENTLY
+ {
+ $$ = mm_strdup("concurrently");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_index_name:
+ name
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ access_method_clause:
+ USING name
+ {
+ $$ = cat_str(2,mm_strdup("using"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ index_params:
+ index_elem
+ {
+ $$ = $1;
+}
+| index_params ',' index_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ index_elem_options:
+ opt_collate opt_class opt_asc_desc opt_nulls_order
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| opt_collate any_name reloptions opt_asc_desc opt_nulls_order
+ {
+ $$ = cat_str(5,$1,$2,$3,$4,$5);
+}
+;
+
+
+ index_elem:
+ ColId index_elem_options
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| func_expr_windowless index_elem_options
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| '(' a_expr ')' index_elem_options
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(")"),$4);
+}
+;
+
+
+ opt_include:
+ INCLUDE '(' index_including_params ')'
+ {
+ $$ = cat_str(3,mm_strdup("include ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ index_including_params:
+ index_elem
+ {
+ $$ = $1;
+}
+| index_including_params ',' index_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opt_collate:
+ COLLATE any_name
+ {
+ $$ = cat_str(2,mm_strdup("collate"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_class:
+ any_name
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_asc_desc:
+ ASC
+ {
+ $$ = mm_strdup("asc");
+}
+| DESC
+ {
+ $$ = mm_strdup("desc");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_nulls_order:
+ NULLS_LA FIRST_P
+ {
+ $$ = mm_strdup("nulls first");
+}
+| NULLS_LA LAST_P
+ {
+ $$ = mm_strdup("nulls last");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateFunctionStmt:
+ CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS func_return opt_createfunc_opt_list opt_routine_body
+ {
+ $$ = cat_str(9,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,mm_strdup("returns"),$7,$8,$9);
+}
+| CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS TABLE '(' table_func_column_list ')' opt_createfunc_opt_list opt_routine_body
+ {
+ $$ = cat_str(10,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,mm_strdup("returns table ("),$9,mm_strdup(")"),$11,$12);
+}
+| CREATE opt_or_replace FUNCTION func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body
+ {
+ $$ = cat_str(7,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,$6,$7);
+}
+| CREATE opt_or_replace PROCEDURE func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body
+ {
+ $$ = cat_str(7,mm_strdup("create"),$2,mm_strdup("procedure"),$4,$5,$6,$7);
+}
+;
+
+
+ opt_or_replace:
+ OR REPLACE
+ {
+ $$ = mm_strdup("or replace");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ func_args:
+ '(' func_args_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| '(' ')'
+ {
+ $$ = mm_strdup("( )");
+}
+;
+
+
+ func_args_list:
+ func_arg
+ {
+ $$ = $1;
+}
+| func_args_list ',' func_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ function_with_argtypes_list:
+ function_with_argtypes
+ {
+ $$ = $1;
+}
+| function_with_argtypes_list ',' function_with_argtypes
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ function_with_argtypes:
+ func_name func_args
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| type_func_name_keyword
+ {
+ $$ = $1;
+}
+| ColId
+ {
+ $$ = $1;
+}
+| ColId indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ func_args_with_defaults:
+ '(' func_args_with_defaults_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| '(' ')'
+ {
+ $$ = mm_strdup("( )");
+}
+;
+
+
+ func_args_with_defaults_list:
+ func_arg_with_default
+ {
+ $$ = $1;
+}
+| func_args_with_defaults_list ',' func_arg_with_default
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ func_arg:
+ arg_class param_name func_type
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| param_name arg_class func_type
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| param_name func_type
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| arg_class func_type
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| func_type
+ {
+ $$ = $1;
+}
+;
+
+
+ arg_class:
+ IN_P
+ {
+ $$ = mm_strdup("in");
+}
+| OUT_P
+ {
+ $$ = mm_strdup("out");
+}
+| INOUT
+ {
+ $$ = mm_strdup("inout");
+}
+| IN_P OUT_P
+ {
+ $$ = mm_strdup("in out");
+}
+| VARIADIC
+ {
+ $$ = mm_strdup("variadic");
+}
+;
+
+
+ param_name:
+ type_function_name
+ {
+ $$ = $1;
+}
+;
+
+
+ func_return:
+ func_type
+ {
+ $$ = $1;
+}
+;
+
+
+ func_type:
+ Typename
+ {
+ $$ = $1;
+}
+| type_function_name attrs '%' TYPE_P
+ {
+ $$ = cat_str(3,$1,$2,mm_strdup("% type"));
+}
+| SETOF type_function_name attrs '%' TYPE_P
+ {
+ $$ = cat_str(4,mm_strdup("setof"),$2,$3,mm_strdup("% type"));
+}
+;
+
+
+ func_arg_with_default:
+ func_arg
+ {
+ $$ = $1;
+}
+| func_arg DEFAULT a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("default"),$3);
+}
+| func_arg '=' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+;
+
+
+ aggr_arg:
+ func_arg
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = $1;
+}
+;
+
+
+ aggr_args:
+ '(' '*' ')'
+ {
+ $$ = mm_strdup("( * )");
+}
+| '(' aggr_args_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| '(' ORDER BY aggr_args_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("( order by"),$4,mm_strdup(")"));
+}
+| '(' aggr_args_list ORDER BY aggr_args_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("("),$2,mm_strdup("order by"),$5,mm_strdup(")"));
+}
+;
+
+
+ aggr_args_list:
+ aggr_arg
+ {
+ $$ = $1;
+}
+| aggr_args_list ',' aggr_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ aggregate_with_argtypes:
+ func_name aggr_args
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ aggregate_with_argtypes_list:
+ aggregate_with_argtypes
+ {
+ $$ = $1;
+}
+| aggregate_with_argtypes_list ',' aggregate_with_argtypes
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opt_createfunc_opt_list:
+ createfunc_opt_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ createfunc_opt_list:
+ createfunc_opt_item
+ {
+ $$ = $1;
+}
+| createfunc_opt_list createfunc_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ common_func_opt_item:
+ CALLED ON NULL_P INPUT_P
+ {
+ $$ = mm_strdup("called on null input");
+}
+| RETURNS NULL_P ON NULL_P INPUT_P
+ {
+ $$ = mm_strdup("returns null on null input");
+}
+| STRICT_P
+ {
+ $$ = mm_strdup("strict");
+}
+| IMMUTABLE
+ {
+ $$ = mm_strdup("immutable");
+}
+| STABLE
+ {
+ $$ = mm_strdup("stable");
+}
+| VOLATILE
+ {
+ $$ = mm_strdup("volatile");
+}
+| EXTERNAL SECURITY DEFINER
+ {
+ $$ = mm_strdup("external security definer");
+}
+| EXTERNAL SECURITY INVOKER
+ {
+ $$ = mm_strdup("external security invoker");
+}
+| SECURITY DEFINER
+ {
+ $$ = mm_strdup("security definer");
+}
+| SECURITY INVOKER
+ {
+ $$ = mm_strdup("security invoker");
+}
+| LEAKPROOF
+ {
+ $$ = mm_strdup("leakproof");
+}
+| NOT LEAKPROOF
+ {
+ $$ = mm_strdup("not leakproof");
+}
+| COST NumericOnly
+ {
+ $$ = cat_str(2,mm_strdup("cost"),$2);
+}
+| ROWS NumericOnly
+ {
+ $$ = cat_str(2,mm_strdup("rows"),$2);
+}
+| SUPPORT any_name
+ {
+ $$ = cat_str(2,mm_strdup("support"),$2);
+}
+| FunctionSetResetClause
+ {
+ $$ = $1;
+}
+| PARALLEL ColId
+ {
+ $$ = cat_str(2,mm_strdup("parallel"),$2);
+}
+;
+
+
+ createfunc_opt_item:
+ AS func_as
+ {
+ $$ = cat_str(2,mm_strdup("as"),$2);
+}
+| LANGUAGE NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("language"),$2);
+}
+| TRANSFORM transform_type_list
+ {
+ $$ = cat_str(2,mm_strdup("transform"),$2);
+}
+| WINDOW
+ {
+ $$ = mm_strdup("window");
+}
+| common_func_opt_item
+ {
+ $$ = $1;
+}
+;
+
+
+ func_as:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| ecpg_sconst ',' ecpg_sconst
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ ReturnStmt:
+ RETURN a_expr
+ {
+ $$ = cat_str(2,mm_strdup("return"),$2);
+}
+;
+
+
+ opt_routine_body:
+ ReturnStmt
+ {
+ $$ = $1;
+}
+| BEGIN_P ATOMIC routine_body_stmt_list END_P
+ {
+ $$ = cat_str(3,mm_strdup("begin atomic"),$3,mm_strdup("end"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ routine_body_stmt_list:
+ routine_body_stmt_list routine_body_stmt ';'
+ {
+ $$ = cat_str(3,$1,$2,mm_strdup(";"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ routine_body_stmt:
+ stmt
+ {
+ $$ = $1;
+}
+| ReturnStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ transform_type_list:
+ FOR TYPE_P Typename
+ {
+ $$ = cat_str(2,mm_strdup("for type"),$3);
+}
+| transform_type_list ',' FOR TYPE_P Typename
+ {
+ $$ = cat_str(3,$1,mm_strdup(", for type"),$5);
+}
+;
+
+
+ opt_definition:
+ WITH definition
+ {
+ $$ = cat_str(2,mm_strdup("with"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ table_func_column:
+ param_name func_type
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ table_func_column_list:
+ table_func_column
+ {
+ $$ = $1;
+}
+| table_func_column_list ',' table_func_column
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ AlterFunctionStmt:
+ ALTER FUNCTION function_with_argtypes alterfunc_opt_list opt_restrict
+ {
+ $$ = cat_str(4,mm_strdup("alter function"),$3,$4,$5);
+}
+| ALTER PROCEDURE function_with_argtypes alterfunc_opt_list opt_restrict
+ {
+ $$ = cat_str(4,mm_strdup("alter procedure"),$3,$4,$5);
+}
+| ALTER ROUTINE function_with_argtypes alterfunc_opt_list opt_restrict
+ {
+ $$ = cat_str(4,mm_strdup("alter routine"),$3,$4,$5);
+}
+;
+
+
+ alterfunc_opt_list:
+ common_func_opt_item
+ {
+ $$ = $1;
+}
+| alterfunc_opt_list common_func_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_restrict:
+ RESTRICT
+ {
+ $$ = mm_strdup("restrict");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ RemoveFuncStmt:
+ DROP FUNCTION function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop function"),$3,$4);
+}
+| DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop function if exists"),$5,$6);
+}
+| DROP PROCEDURE function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop procedure"),$3,$4);
+}
+| DROP PROCEDURE IF_P EXISTS function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop procedure if exists"),$5,$6);
+}
+| DROP ROUTINE function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop routine"),$3,$4);
+}
+| DROP ROUTINE IF_P EXISTS function_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop routine if exists"),$5,$6);
+}
+;
+
+
+ RemoveAggrStmt:
+ DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop aggregate"),$3,$4);
+}
+| DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop aggregate if exists"),$5,$6);
+}
+;
+
+
+ RemoveOperStmt:
+ DROP OPERATOR operator_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop operator"),$3,$4);
+}
+| DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop operator if exists"),$5,$6);
+}
+;
+
+
+ oper_argtypes:
+ '(' Typename ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| '(' Typename ',' Typename ')'
+ {
+ $$ = cat_str(5,mm_strdup("("),$2,mm_strdup(","),$4,mm_strdup(")"));
+}
+| '(' NONE ',' Typename ')'
+ {
+ $$ = cat_str(3,mm_strdup("( none ,"),$4,mm_strdup(")"));
+}
+| '(' Typename ',' NONE ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(", none )"));
+}
+;
+
+
+ any_operator:
+ all_Op
+ {
+ $$ = $1;
+}
+| ColId '.' any_operator
+ {
+ $$ = cat_str(3,$1,mm_strdup("."),$3);
+}
+;
+
+
+ operator_with_argtypes_list:
+ operator_with_argtypes
+ {
+ $$ = $1;
+}
+| operator_with_argtypes_list ',' operator_with_argtypes
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ operator_with_argtypes:
+ any_operator oper_argtypes
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ DoStmt:
+ DO dostmt_opt_list
+ {
+ $$ = cat_str(2,mm_strdup("do"),$2);
+}
+;
+
+
+ dostmt_opt_list:
+ dostmt_opt_item
+ {
+ $$ = $1;
+}
+| dostmt_opt_list dostmt_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ dostmt_opt_item:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| LANGUAGE NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(2,mm_strdup("language"),$2);
+}
+;
+
+
+ CreateCastStmt:
+ CREATE CAST '(' Typename AS Typename ')' WITH FUNCTION function_with_argtypes cast_context
+ {
+ $$ = cat_str(7,mm_strdup("create cast ("),$4,mm_strdup("as"),$6,mm_strdup(") with function"),$10,$11);
+}
+| CREATE CAST '(' Typename AS Typename ')' WITHOUT FUNCTION cast_context
+ {
+ $$ = cat_str(6,mm_strdup("create cast ("),$4,mm_strdup("as"),$6,mm_strdup(") without function"),$10);
+}
+| CREATE CAST '(' Typename AS Typename ')' WITH INOUT cast_context
+ {
+ $$ = cat_str(6,mm_strdup("create cast ("),$4,mm_strdup("as"),$6,mm_strdup(") with inout"),$10);
+}
+;
+
+
+ cast_context:
+ AS IMPLICIT_P
+ {
+ $$ = mm_strdup("as implicit");
+}
+| AS ASSIGNMENT
+ {
+ $$ = mm_strdup("as assignment");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ DropCastStmt:
+ DROP CAST opt_if_exists '(' Typename AS Typename ')' opt_drop_behavior
+ {
+ $$ = cat_str(8,mm_strdup("drop cast"),$3,mm_strdup("("),$5,mm_strdup("as"),$7,mm_strdup(")"),$9);
+}
+;
+
+
+ opt_if_exists:
+ IF_P EXISTS
+ {
+ $$ = mm_strdup("if exists");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ CreateTransformStmt:
+ CREATE opt_or_replace TRANSFORM FOR Typename LANGUAGE name '(' transform_element_list ')'
+ {
+ $$ = cat_str(9,mm_strdup("create"),$2,mm_strdup("transform for"),$5,mm_strdup("language"),$7,mm_strdup("("),$9,mm_strdup(")"));
+}
+;
+
+
+ transform_element_list:
+ FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes
+ {
+ $$ = cat_str(4,mm_strdup("from sql with function"),$5,mm_strdup(", to sql with function"),$11);
+}
+| TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes
+ {
+ $$ = cat_str(4,mm_strdup("to sql with function"),$5,mm_strdup(", from sql with function"),$11);
+}
+| FROM SQL_P WITH FUNCTION function_with_argtypes
+ {
+ $$ = cat_str(2,mm_strdup("from sql with function"),$5);
+}
+| TO SQL_P WITH FUNCTION function_with_argtypes
+ {
+ $$ = cat_str(2,mm_strdup("to sql with function"),$5);
+}
+;
+
+
+ DropTransformStmt:
+ DROP TRANSFORM opt_if_exists FOR Typename LANGUAGE name opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("drop transform"),$3,mm_strdup("for"),$5,mm_strdup("language"),$7,$8);
+}
+;
+
+
+ ReindexStmt:
+ REINDEX reindex_target_type opt_concurrently qualified_name
+ {
+ $$ = cat_str(4,mm_strdup("reindex"),$2,$3,$4);
+}
+| REINDEX reindex_target_multitable opt_concurrently name
+ {
+ $$ = cat_str(4,mm_strdup("reindex"),$2,$3,$4);
+}
+| REINDEX '(' utility_option_list ')' reindex_target_type opt_concurrently qualified_name
+ {
+ $$ = cat_str(6,mm_strdup("reindex ("),$3,mm_strdup(")"),$5,$6,$7);
+}
+| REINDEX '(' utility_option_list ')' reindex_target_multitable opt_concurrently name
+ {
+ $$ = cat_str(6,mm_strdup("reindex ("),$3,mm_strdup(")"),$5,$6,$7);
+}
+;
+
+
+ reindex_target_type:
+ INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+;
+
+
+ reindex_target_multitable:
+ SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SYSTEM_P
+ {
+ $$ = mm_strdup("system");
+}
+| DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+;
+
+
+ AlterTblSpcStmt:
+ ALTER TABLESPACE name SET reloptions
+ {
+ $$ = cat_str(4,mm_strdup("alter tablespace"),$3,mm_strdup("set"),$5);
+}
+| ALTER TABLESPACE name RESET reloptions
+ {
+ $$ = cat_str(4,mm_strdup("alter tablespace"),$3,mm_strdup("reset"),$5);
+}
+;
+
+
+ RenameStmt:
+ ALTER AGGREGATE aggregate_with_argtypes RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter aggregate"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER COLLATION any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter collation"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER CONVERSION_P any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter conversion"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER DATABASE name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER DOMAIN_P any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter domain"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER DOMAIN_P any_name RENAME CONSTRAINT name TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter domain"),$3,mm_strdup("rename constraint"),$6,mm_strdup("to"),$8);
+}
+| ALTER FOREIGN DATA_P WRAPPER name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign data wrapper"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER FUNCTION function_with_argtypes RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter function"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER GROUP_P RoleId RENAME TO RoleId
+ {
+ $$ = cat_str(4,mm_strdup("alter group"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER opt_procedural LANGUAGE name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter"),$2,mm_strdup("language"),$4,mm_strdup("rename to"),$7);
+}
+| ALTER OPERATOR CLASS any_name USING name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter operator class"),$4,mm_strdup("using"),$6,mm_strdup("rename to"),$9);
+}
+| ALTER OPERATOR FAMILY any_name USING name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter operator family"),$4,mm_strdup("using"),$6,mm_strdup("rename to"),$9);
+}
+| ALTER POLICY name ON qualified_name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter policy"),$3,mm_strdup("on"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER POLICY IF_P EXISTS name ON qualified_name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter policy if exists"),$5,mm_strdup("on"),$7,mm_strdup("rename to"),$10);
+}
+| ALTER PROCEDURE function_with_argtypes RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter procedure"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER PUBLICATION name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER ROUTINE function_with_argtypes RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter routine"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER SCHEMA name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter schema"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER SERVER name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter server"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER SUBSCRIPTION name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter subscription"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER TABLE relation_expr RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter table"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER TABLE IF_P EXISTS relation_expr RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter table if exists"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER SEQUENCE qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter sequence"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER SEQUENCE IF_P EXISTS qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter sequence if exists"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER VIEW qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter view"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER VIEW IF_P EXISTS qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter view if exists"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER MATERIALIZED VIEW qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter materialized view"),$4,mm_strdup("rename to"),$7);
+}
+| ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter materialized view if exists"),$6,mm_strdup("rename to"),$9);
+}
+| ALTER INDEX qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter index"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER INDEX IF_P EXISTS qualified_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter index if exists"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER FOREIGN TABLE relation_expr RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign table"),$4,mm_strdup("rename to"),$7);
+}
+| ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign table if exists"),$6,mm_strdup("rename to"),$9);
+}
+| ALTER TABLE relation_expr RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter table"),$3,mm_strdup("rename"),$5,$6,mm_strdup("to"),$8);
+}
+| ALTER TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter table if exists"),$5,mm_strdup("rename"),$7,$8,mm_strdup("to"),$10);
+}
+| ALTER VIEW qualified_name RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter view"),$3,mm_strdup("rename"),$5,$6,mm_strdup("to"),$8);
+}
+| ALTER VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter view if exists"),$5,mm_strdup("rename"),$7,$8,mm_strdup("to"),$10);
+}
+| ALTER MATERIALIZED VIEW qualified_name RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter materialized view"),$4,mm_strdup("rename"),$6,$7,mm_strdup("to"),$9);
+}
+| ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter materialized view if exists"),$6,mm_strdup("rename"),$8,$9,mm_strdup("to"),$11);
+}
+| ALTER TABLE relation_expr RENAME CONSTRAINT name TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter table"),$3,mm_strdup("rename constraint"),$6,mm_strdup("to"),$8);
+}
+| ALTER TABLE IF_P EXISTS relation_expr RENAME CONSTRAINT name TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter table if exists"),$5,mm_strdup("rename constraint"),$8,mm_strdup("to"),$10);
+}
+| ALTER FOREIGN TABLE relation_expr RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter foreign table"),$4,mm_strdup("rename"),$6,$7,mm_strdup("to"),$9);
+}
+| ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name
+ {
+ $$ = cat_str(7,mm_strdup("alter foreign table if exists"),$6,mm_strdup("rename"),$8,$9,mm_strdup("to"),$11);
+}
+| ALTER RULE name ON qualified_name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter rule"),$3,mm_strdup("on"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER TRIGGER name ON qualified_name RENAME TO name
+ {
+ $$ = cat_str(6,mm_strdup("alter trigger"),$3,mm_strdup("on"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER EVENT TRIGGER name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter event trigger"),$4,mm_strdup("rename to"),$7);
+}
+| ALTER ROLE RoleId RENAME TO RoleId
+ {
+ $$ = cat_str(4,mm_strdup("alter role"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER USER RoleId RENAME TO RoleId
+ {
+ $$ = cat_str(4,mm_strdup("alter user"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER TABLESPACE name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter tablespace"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER STATISTICS any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter statistics"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER TEXT_P SEARCH PARSER any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search parser"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER TEXT_P SEARCH DICTIONARY any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search dictionary"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER TEXT_P SEARCH TEMPLATE any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search template"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search configuration"),$5,mm_strdup("rename to"),$8);
+}
+| ALTER TYPE_P any_name RENAME TO name
+ {
+ $$ = cat_str(4,mm_strdup("alter type"),$3,mm_strdup("rename to"),$6);
+}
+| ALTER TYPE_P any_name RENAME ATTRIBUTE name TO name opt_drop_behavior
+ {
+ $$ = cat_str(7,mm_strdup("alter type"),$3,mm_strdup("rename attribute"),$6,mm_strdup("to"),$8,$9);
+}
+;
+
+
+ opt_column:
+ COLUMN
+ {
+ $$ = mm_strdup("column");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_set_data:
+ SET DATA_P
+ {
+ $$ = mm_strdup("set data");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterObjectDependsStmt:
+ ALTER FUNCTION function_with_argtypes opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(5,mm_strdup("alter function"),$3,$4,mm_strdup("depends on extension"),$8);
+}
+| ALTER PROCEDURE function_with_argtypes opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(5,mm_strdup("alter procedure"),$3,$4,mm_strdup("depends on extension"),$8);
+}
+| ALTER ROUTINE function_with_argtypes opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(5,mm_strdup("alter routine"),$3,$4,mm_strdup("depends on extension"),$8);
+}
+| ALTER TRIGGER name ON qualified_name opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(7,mm_strdup("alter trigger"),$3,mm_strdup("on"),$5,$6,mm_strdup("depends on extension"),$10);
+}
+| ALTER MATERIALIZED VIEW qualified_name opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(5,mm_strdup("alter materialized view"),$4,$5,mm_strdup("depends on extension"),$9);
+}
+| ALTER INDEX qualified_name opt_no DEPENDS ON EXTENSION name
+ {
+ $$ = cat_str(5,mm_strdup("alter index"),$3,$4,mm_strdup("depends on extension"),$8);
+}
+;
+
+
+ opt_no:
+ NO
+ {
+ $$ = mm_strdup("no");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterObjectSchemaStmt:
+ ALTER AGGREGATE aggregate_with_argtypes SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter aggregate"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER COLLATION any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter collation"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER CONVERSION_P any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter conversion"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER DOMAIN_P any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter domain"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER EXTENSION name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter extension"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER FUNCTION function_with_argtypes SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter function"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER OPERATOR operator_with_argtypes SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter operator"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER OPERATOR CLASS any_name USING name SET SCHEMA name
+ {
+ $$ = cat_str(6,mm_strdup("alter operator class"),$4,mm_strdup("using"),$6,mm_strdup("set schema"),$9);
+}
+| ALTER OPERATOR FAMILY any_name USING name SET SCHEMA name
+ {
+ $$ = cat_str(6,mm_strdup("alter operator family"),$4,mm_strdup("using"),$6,mm_strdup("set schema"),$9);
+}
+| ALTER PROCEDURE function_with_argtypes SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter procedure"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER ROUTINE function_with_argtypes SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter routine"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER TABLE relation_expr SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter table"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER TABLE IF_P EXISTS relation_expr SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter table if exists"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER STATISTICS any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter statistics"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER TEXT_P SEARCH PARSER any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search parser"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER TEXT_P SEARCH DICTIONARY any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search dictionary"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER TEXT_P SEARCH TEMPLATE any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search template"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter text search configuration"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER SEQUENCE qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter sequence"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER SEQUENCE IF_P EXISTS qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter sequence if exists"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER VIEW qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter view"),$3,mm_strdup("set schema"),$6);
+}
+| ALTER VIEW IF_P EXISTS qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter view if exists"),$5,mm_strdup("set schema"),$8);
+}
+| ALTER MATERIALIZED VIEW qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter materialized view"),$4,mm_strdup("set schema"),$7);
+}
+| ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter materialized view if exists"),$6,mm_strdup("set schema"),$9);
+}
+| ALTER FOREIGN TABLE relation_expr SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign table"),$4,mm_strdup("set schema"),$7);
+}
+| ALTER FOREIGN TABLE IF_P EXISTS relation_expr SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign table if exists"),$6,mm_strdup("set schema"),$9);
+}
+| ALTER TYPE_P any_name SET SCHEMA name
+ {
+ $$ = cat_str(4,mm_strdup("alter type"),$3,mm_strdup("set schema"),$6);
+}
+;
+
+
+ AlterOperatorStmt:
+ ALTER OPERATOR operator_with_argtypes SET '(' operator_def_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("alter operator"),$3,mm_strdup("set ("),$6,mm_strdup(")"));
+}
+;
+
+
+ operator_def_list:
+ operator_def_elem
+ {
+ $$ = $1;
+}
+| operator_def_list ',' operator_def_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ operator_def_elem:
+ ColLabel '=' NONE
+ {
+ $$ = cat_str(2,$1,mm_strdup("= none"));
+}
+| ColLabel '=' operator_def_arg
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+;
+
+
+ operator_def_arg:
+ func_type
+ {
+ $$ = $1;
+}
+| reserved_keyword
+ {
+ $$ = $1;
+}
+| qual_all_Op
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ AlterTypeStmt:
+ ALTER TYPE_P any_name SET '(' operator_def_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("alter type"),$3,mm_strdup("set ("),$6,mm_strdup(")"));
+}
+;
+
+
+ AlterOwnerStmt:
+ ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter aggregate"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER COLLATION any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter collation"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER CONVERSION_P any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter conversion"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER DATABASE name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER DOMAIN_P any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter domain"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER FUNCTION function_with_argtypes OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter function"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER opt_procedural LANGUAGE name OWNER TO RoleSpec
+ {
+ $$ = cat_str(6,mm_strdup("alter"),$2,mm_strdup("language"),$4,mm_strdup("owner to"),$7);
+}
+| ALTER LARGE_P OBJECT_P NumericOnly OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter large object"),$4,mm_strdup("owner to"),$7);
+}
+| ALTER OPERATOR operator_with_argtypes OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter operator"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER OPERATOR CLASS any_name USING name OWNER TO RoleSpec
+ {
+ $$ = cat_str(6,mm_strdup("alter operator class"),$4,mm_strdup("using"),$6,mm_strdup("owner to"),$9);
+}
+| ALTER OPERATOR FAMILY any_name USING name OWNER TO RoleSpec
+ {
+ $$ = cat_str(6,mm_strdup("alter operator family"),$4,mm_strdup("using"),$6,mm_strdup("owner to"),$9);
+}
+| ALTER PROCEDURE function_with_argtypes OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter procedure"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER ROUTINE function_with_argtypes OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter routine"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER SCHEMA name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter schema"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER TYPE_P any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter type"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER TABLESPACE name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter tablespace"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER STATISTICS any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter statistics"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER TEXT_P SEARCH DICTIONARY any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter text search dictionary"),$5,mm_strdup("owner to"),$8);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter text search configuration"),$5,mm_strdup("owner to"),$8);
+}
+| ALTER FOREIGN DATA_P WRAPPER name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter foreign data wrapper"),$5,mm_strdup("owner to"),$8);
+}
+| ALTER SERVER name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter server"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER EVENT TRIGGER name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter event trigger"),$4,mm_strdup("owner to"),$7);
+}
+| ALTER PUBLICATION name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("owner to"),$6);
+}
+| ALTER SUBSCRIPTION name OWNER TO RoleSpec
+ {
+ $$ = cat_str(4,mm_strdup("alter subscription"),$3,mm_strdup("owner to"),$6);
+}
+;
+
+
+ CreatePublicationStmt:
+ CREATE PUBLICATION name opt_publication_for_tables opt_definition
+ {
+ $$ = cat_str(4,mm_strdup("create publication"),$3,$4,$5);
+}
+;
+
+
+ opt_publication_for_tables:
+ publication_for_tables
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ publication_for_tables:
+ FOR TABLE relation_expr_list
+ {
+ $$ = cat_str(2,mm_strdup("for table"),$3);
+}
+| FOR ALL TABLES
+ {
+ $$ = mm_strdup("for all tables");
+}
+;
+
+
+ AlterPublicationStmt:
+ ALTER PUBLICATION name SET definition
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("set"),$5);
+}
+| ALTER PUBLICATION name ADD_P TABLE relation_expr_list
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("add table"),$6);
+}
+| ALTER PUBLICATION name SET TABLE relation_expr_list
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("set table"),$6);
+}
+| ALTER PUBLICATION name DROP TABLE relation_expr_list
+ {
+ $$ = cat_str(4,mm_strdup("alter publication"),$3,mm_strdup("drop table"),$6);
+}
+;
+
+
+ CreateSubscriptionStmt:
+ CREATE SUBSCRIPTION name CONNECTION ecpg_sconst PUBLICATION name_list opt_definition
+ {
+ $$ = cat_str(7,mm_strdup("create subscription"),$3,mm_strdup("connection"),$5,mm_strdup("publication"),$7,$8);
+}
+;
+
+
+ AlterSubscriptionStmt:
+ ALTER SUBSCRIPTION name SET definition
+ {
+ $$ = cat_str(4,mm_strdup("alter subscription"),$3,mm_strdup("set"),$5);
+}
+| ALTER SUBSCRIPTION name CONNECTION ecpg_sconst
+ {
+ $$ = cat_str(4,mm_strdup("alter subscription"),$3,mm_strdup("connection"),$5);
+}
+| ALTER SUBSCRIPTION name REFRESH PUBLICATION opt_definition
+ {
+ $$ = cat_str(4,mm_strdup("alter subscription"),$3,mm_strdup("refresh publication"),$6);
+}
+| ALTER SUBSCRIPTION name ADD_P PUBLICATION name_list opt_definition
+ {
+ $$ = cat_str(5,mm_strdup("alter subscription"),$3,mm_strdup("add publication"),$6,$7);
+}
+| ALTER SUBSCRIPTION name DROP PUBLICATION name_list opt_definition
+ {
+ $$ = cat_str(5,mm_strdup("alter subscription"),$3,mm_strdup("drop publication"),$6,$7);
+}
+| ALTER SUBSCRIPTION name SET PUBLICATION name_list opt_definition
+ {
+ $$ = cat_str(5,mm_strdup("alter subscription"),$3,mm_strdup("set publication"),$6,$7);
+}
+| ALTER SUBSCRIPTION name ENABLE_P
+ {
+ $$ = cat_str(3,mm_strdup("alter subscription"),$3,mm_strdup("enable"));
+}
+| ALTER SUBSCRIPTION name DISABLE_P
+ {
+ $$ = cat_str(3,mm_strdup("alter subscription"),$3,mm_strdup("disable"));
+}
+;
+
+
+ DropSubscriptionStmt:
+ DROP SUBSCRIPTION name opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop subscription"),$3,$4);
+}
+| DROP SUBSCRIPTION IF_P EXISTS name opt_drop_behavior
+ {
+ $$ = cat_str(3,mm_strdup("drop subscription if exists"),$5,$6);
+}
+;
+
+
+ RuleStmt:
+ CREATE opt_or_replace RULE name AS ON event TO qualified_name where_clause DO opt_instead RuleActionList
+ {
+ $$ = cat_str(12,mm_strdup("create"),$2,mm_strdup("rule"),$4,mm_strdup("as on"),$7,mm_strdup("to"),$9,$10,mm_strdup("do"),$12,$13);
+}
+;
+
+
+ RuleActionList:
+ NOTHING
+ {
+ $$ = mm_strdup("nothing");
+}
+| RuleActionStmt
+ {
+ $$ = $1;
+}
+| '(' RuleActionMulti ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ RuleActionMulti:
+ RuleActionMulti ';' RuleActionStmtOrEmpty
+ {
+ $$ = cat_str(3,$1,mm_strdup(";"),$3);
+}
+| RuleActionStmtOrEmpty
+ {
+ $$ = $1;
+}
+;
+
+
+ RuleActionStmt:
+ SelectStmt
+ {
+ $$ = $1;
+}
+| InsertStmt
+ {
+ $$ = $1;
+}
+| UpdateStmt
+ {
+ $$ = $1;
+}
+| DeleteStmt
+ {
+ $$ = $1;
+}
+| NotifyStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ RuleActionStmtOrEmpty:
+ RuleActionStmt
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ event:
+ SELECT
+ {
+ $$ = mm_strdup("select");
+}
+| UPDATE
+ {
+ $$ = mm_strdup("update");
+}
+| DELETE_P
+ {
+ $$ = mm_strdup("delete");
+}
+| INSERT
+ {
+ $$ = mm_strdup("insert");
+}
+;
+
+
+ opt_instead:
+ INSTEAD
+ {
+ $$ = mm_strdup("instead");
+}
+| ALSO
+ {
+ $$ = mm_strdup("also");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ NotifyStmt:
+ NOTIFY ColId notify_payload
+ {
+ $$ = cat_str(3,mm_strdup("notify"),$2,$3);
+}
+;
+
+
+ notify_payload:
+ ',' ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup(","),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ListenStmt:
+ LISTEN ColId
+ {
+ $$ = cat_str(2,mm_strdup("listen"),$2);
+}
+;
+
+
+ UnlistenStmt:
+ UNLISTEN ColId
+ {
+ $$ = cat_str(2,mm_strdup("unlisten"),$2);
+}
+| UNLISTEN '*'
+ {
+ $$ = mm_strdup("unlisten *");
+}
+;
+
+
+ TransactionStmt:
+ ABORT_P opt_transaction opt_transaction_chain
+ {
+ $$ = cat_str(3,mm_strdup("abort"),$2,$3);
+}
+| START TRANSACTION transaction_mode_list_or_empty
+ {
+ $$ = cat_str(2,mm_strdup("start transaction"),$3);
+}
+| COMMIT opt_transaction opt_transaction_chain
+ {
+ $$ = cat_str(3,mm_strdup("commit"),$2,$3);
+}
+| ROLLBACK opt_transaction opt_transaction_chain
+ {
+ $$ = cat_str(3,mm_strdup("rollback"),$2,$3);
+}
+| SAVEPOINT ColId
+ {
+ $$ = cat_str(2,mm_strdup("savepoint"),$2);
+}
+| RELEASE SAVEPOINT ColId
+ {
+ $$ = cat_str(2,mm_strdup("release savepoint"),$3);
+}
+| RELEASE ColId
+ {
+ $$ = cat_str(2,mm_strdup("release"),$2);
+}
+| ROLLBACK opt_transaction TO SAVEPOINT ColId
+ {
+ $$ = cat_str(4,mm_strdup("rollback"),$2,mm_strdup("to savepoint"),$5);
+}
+| ROLLBACK opt_transaction TO ColId
+ {
+ $$ = cat_str(4,mm_strdup("rollback"),$2,mm_strdup("to"),$4);
+}
+| PREPARE TRANSACTION ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("prepare transaction"),$3);
+}
+| COMMIT PREPARED ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("commit prepared"),$3);
+}
+| ROLLBACK PREPARED ecpg_sconst
+ {
+ $$ = cat_str(2,mm_strdup("rollback prepared"),$3);
+}
+;
+
+
+ TransactionStmtLegacy:
+ BEGIN_P opt_transaction transaction_mode_list_or_empty
+ {
+ $$ = cat_str(3,mm_strdup("begin"),$2,$3);
+}
+| END_P opt_transaction opt_transaction_chain
+ {
+ $$ = cat_str(3,mm_strdup("end"),$2,$3);
+}
+;
+
+
+ opt_transaction:
+ WORK
+ {
+ $$ = mm_strdup("work");
+}
+| TRANSACTION
+ {
+ $$ = mm_strdup("transaction");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ transaction_mode_item:
+ ISOLATION LEVEL iso_level
+ {
+ $$ = cat_str(2,mm_strdup("isolation level"),$3);
+}
+| READ ONLY
+ {
+ $$ = mm_strdup("read only");
+}
+| READ WRITE
+ {
+ $$ = mm_strdup("read write");
+}
+| DEFERRABLE
+ {
+ $$ = mm_strdup("deferrable");
+}
+| NOT DEFERRABLE
+ {
+ $$ = mm_strdup("not deferrable");
+}
+;
+
+
+ transaction_mode_list:
+ transaction_mode_item
+ {
+ $$ = $1;
+}
+| transaction_mode_list ',' transaction_mode_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+| transaction_mode_list transaction_mode_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ transaction_mode_list_or_empty:
+ transaction_mode_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_transaction_chain:
+ AND CHAIN
+ {
+ $$ = mm_strdup("and chain");
+}
+| AND NO CHAIN
+ {
+ $$ = mm_strdup("and no chain");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ViewStmt:
+ CREATE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option
+ {
+ $$ = cat_str(9,mm_strdup("create"),$2,mm_strdup("view"),$4,$5,$6,mm_strdup("as"),$8,$9);
+}
+| CREATE OR REPLACE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option
+ {
+ $$ = cat_str(9,mm_strdup("create or replace"),$4,mm_strdup("view"),$6,$7,$8,mm_strdup("as"),$10,$11);
+}
+| CREATE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(11,mm_strdup("create"),$2,mm_strdup("recursive view"),$5,mm_strdup("("),$7,mm_strdup(")"),$9,mm_strdup("as"),$11,$12);
+}
+| CREATE OR REPLACE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(11,mm_strdup("create or replace"),$4,mm_strdup("recursive view"),$7,mm_strdup("("),$9,mm_strdup(")"),$11,mm_strdup("as"),$13,$14);
+}
+;
+
+
+ opt_check_option:
+ WITH CHECK OPTION
+ {
+ $$ = mm_strdup("with check option");
+}
+| WITH CASCADED CHECK OPTION
+ {
+ $$ = mm_strdup("with cascaded check option");
+}
+| WITH LOCAL CHECK OPTION
+ {
+ $$ = mm_strdup("with local check option");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ LoadStmt:
+ LOAD file_name
+ {
+ $$ = cat_str(2,mm_strdup("load"),$2);
+}
+;
+
+
+ CreatedbStmt:
+ CREATE DATABASE name opt_with createdb_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("create database"),$3,$4,$5);
+}
+;
+
+
+ createdb_opt_list:
+ createdb_opt_items
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ createdb_opt_items:
+ createdb_opt_item
+ {
+ $$ = $1;
+}
+| createdb_opt_items createdb_opt_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ createdb_opt_item:
+ createdb_opt_name opt_equal SignedIconst
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| createdb_opt_name opt_equal opt_boolean_or_string
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| createdb_opt_name opt_equal DEFAULT
+ {
+ $$ = cat_str(3,$1,$2,mm_strdup("default"));
+}
+;
+
+
+ createdb_opt_name:
+ ecpg_ident
+ {
+ $$ = $1;
+}
+| CONNECTION LIMIT
+ {
+ $$ = mm_strdup("connection limit");
+}
+| ENCODING
+ {
+ $$ = mm_strdup("encoding");
+}
+| LOCATION
+ {
+ $$ = mm_strdup("location");
+}
+| OWNER
+ {
+ $$ = mm_strdup("owner");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+| TEMPLATE
+ {
+ $$ = mm_strdup("template");
+}
+;
+
+
+ opt_equal:
+ '='
+ {
+ $$ = mm_strdup("=");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterDatabaseStmt:
+ ALTER DATABASE name WITH createdb_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("with"),$5);
+}
+| ALTER DATABASE name createdb_opt_list
+ {
+ $$ = cat_str(3,mm_strdup("alter database"),$3,$4);
+}
+| ALTER DATABASE name SET TABLESPACE name
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("set tablespace"),$6);
+}
+;
+
+
+ AlterDatabaseSetStmt:
+ ALTER DATABASE name SetResetClause
+ {
+ $$ = cat_str(3,mm_strdup("alter database"),$3,$4);
+}
+;
+
+
+ DropdbStmt:
+ DROP DATABASE name
+ {
+ $$ = cat_str(2,mm_strdup("drop database"),$3);
+}
+| DROP DATABASE IF_P EXISTS name
+ {
+ $$ = cat_str(2,mm_strdup("drop database if exists"),$5);
+}
+| DROP DATABASE name opt_with '(' drop_option_list ')'
+ {
+ $$ = cat_str(6,mm_strdup("drop database"),$3,$4,mm_strdup("("),$6,mm_strdup(")"));
+}
+| DROP DATABASE IF_P EXISTS name opt_with '(' drop_option_list ')'
+ {
+ $$ = cat_str(6,mm_strdup("drop database if exists"),$5,$6,mm_strdup("("),$8,mm_strdup(")"));
+}
+;
+
+
+ drop_option_list:
+ drop_option
+ {
+ $$ = $1;
+}
+| drop_option_list ',' drop_option
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ drop_option:
+ FORCE
+ {
+ $$ = mm_strdup("force");
+}
+;
+
+
+ AlterCollationStmt:
+ ALTER COLLATION any_name REFRESH VERSION_P
+ {
+ $$ = cat_str(3,mm_strdup("alter collation"),$3,mm_strdup("refresh version"));
+}
+;
+
+
+ AlterSystemStmt:
+ ALTER SYSTEM_P SET generic_set
+ {
+ $$ = cat_str(2,mm_strdup("alter system set"),$4);
+}
+| ALTER SYSTEM_P RESET generic_reset
+ {
+ $$ = cat_str(2,mm_strdup("alter system reset"),$4);
+}
+;
+
+
+ CreateDomainStmt:
+ CREATE DOMAIN_P any_name opt_as Typename ColQualList
+ {
+ $$ = cat_str(5,mm_strdup("create domain"),$3,$4,$5,$6);
+}
+;
+
+
+ AlterDomainStmt:
+ ALTER DOMAIN_P any_name alter_column_default
+ {
+ $$ = cat_str(3,mm_strdup("alter domain"),$3,$4);
+}
+| ALTER DOMAIN_P any_name DROP NOT NULL_P
+ {
+ $$ = cat_str(3,mm_strdup("alter domain"),$3,mm_strdup("drop not null"));
+}
+| ALTER DOMAIN_P any_name SET NOT NULL_P
+ {
+ $$ = cat_str(3,mm_strdup("alter domain"),$3,mm_strdup("set not null"));
+}
+| ALTER DOMAIN_P any_name ADD_P TableConstraint
+ {
+ $$ = cat_str(4,mm_strdup("alter domain"),$3,mm_strdup("add"),$5);
+}
+| ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("alter domain"),$3,mm_strdup("drop constraint"),$6,$7);
+}
+| ALTER DOMAIN_P any_name DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("alter domain"),$3,mm_strdup("drop constraint if exists"),$8,$9);
+}
+| ALTER DOMAIN_P any_name VALIDATE CONSTRAINT name
+ {
+ $$ = cat_str(4,mm_strdup("alter domain"),$3,mm_strdup("validate constraint"),$6);
+}
+;
+
+
+ opt_as:
+ AS
+ {
+ $$ = mm_strdup("as");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ AlterTSDictionaryStmt:
+ ALTER TEXT_P SEARCH DICTIONARY any_name definition
+ {
+ $$ = cat_str(3,mm_strdup("alter text search dictionary"),$5,$6);
+}
+;
+
+
+ AlterTSConfigurationStmt:
+ ALTER TEXT_P SEARCH CONFIGURATION any_name ADD_P MAPPING FOR name_list any_with any_name_list
+ {
+ $$ = cat_str(6,mm_strdup("alter text search configuration"),$5,mm_strdup("add mapping for"),$9,$10,$11);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list any_with any_name_list
+ {
+ $$ = cat_str(6,mm_strdup("alter text search configuration"),$5,mm_strdup("alter mapping for"),$9,$10,$11);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING REPLACE any_name any_with any_name
+ {
+ $$ = cat_str(6,mm_strdup("alter text search configuration"),$5,mm_strdup("alter mapping replace"),$9,$10,$11);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list REPLACE any_name any_with any_name
+ {
+ $$ = cat_str(8,mm_strdup("alter text search configuration"),$5,mm_strdup("alter mapping for"),$9,mm_strdup("replace"),$11,$12,$13);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING FOR name_list
+ {
+ $$ = cat_str(4,mm_strdup("alter text search configuration"),$5,mm_strdup("drop mapping for"),$9);
+}
+| ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING IF_P EXISTS FOR name_list
+ {
+ $$ = cat_str(4,mm_strdup("alter text search configuration"),$5,mm_strdup("drop mapping if exists for"),$11);
+}
+;
+
+
+ any_with:
+ WITH
+ {
+ $$ = mm_strdup("with");
+}
+| WITH_LA
+ {
+ $$ = mm_strdup("with");
+}
+;
+
+
+ CreateConversionStmt:
+ CREATE opt_default CONVERSION_P any_name FOR ecpg_sconst TO ecpg_sconst FROM any_name
+ {
+ $$ = cat_str(10,mm_strdup("create"),$2,mm_strdup("conversion"),$4,mm_strdup("for"),$6,mm_strdup("to"),$8,mm_strdup("from"),$10);
+}
+;
+
+
+ ClusterStmt:
+ CLUSTER opt_verbose qualified_name cluster_index_specification
+ {
+ $$ = cat_str(4,mm_strdup("cluster"),$2,$3,$4);
+}
+| CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification
+ {
+ $$ = cat_str(5,mm_strdup("cluster ("),$3,mm_strdup(")"),$5,$6);
+}
+| CLUSTER opt_verbose
+ {
+ $$ = cat_str(2,mm_strdup("cluster"),$2);
+}
+| CLUSTER opt_verbose name ON qualified_name
+ {
+ $$ = cat_str(5,mm_strdup("cluster"),$2,$3,mm_strdup("on"),$5);
+}
+;
+
+
+ cluster_index_specification:
+ USING name
+ {
+ $$ = cat_str(2,mm_strdup("using"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ VacuumStmt:
+ VACUUM opt_full opt_freeze opt_verbose opt_analyze opt_vacuum_relation_list
+ {
+ $$ = cat_str(6,mm_strdup("vacuum"),$2,$3,$4,$5,$6);
+}
+| VACUUM '(' utility_option_list ')' opt_vacuum_relation_list
+ {
+ $$ = cat_str(4,mm_strdup("vacuum ("),$3,mm_strdup(")"),$5);
+}
+;
+
+
+ AnalyzeStmt:
+ analyze_keyword opt_verbose opt_vacuum_relation_list
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| analyze_keyword '(' utility_option_list ')' opt_vacuum_relation_list
+ {
+ $$ = cat_str(5,$1,mm_strdup("("),$3,mm_strdup(")"),$5);
+}
+;
+
+
+ utility_option_list:
+ utility_option_elem
+ {
+ $$ = $1;
+}
+| utility_option_list ',' utility_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ analyze_keyword:
+ ANALYZE
+ {
+ $$ = mm_strdup("analyze");
+}
+| ANALYSE
+ {
+ $$ = mm_strdup("analyse");
+}
+;
+
+
+ utility_option_elem:
+ utility_option_name utility_option_arg
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ utility_option_name:
+ NonReservedWord
+ {
+ $$ = $1;
+}
+| analyze_keyword
+ {
+ $$ = $1;
+}
+;
+
+
+ utility_option_arg:
+ opt_boolean_or_string
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_analyze:
+ analyze_keyword
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_verbose:
+ VERBOSE
+ {
+ $$ = mm_strdup("verbose");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_full:
+ FULL
+ {
+ $$ = mm_strdup("full");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_freeze:
+ FREEZE
+ {
+ $$ = mm_strdup("freeze");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_name_list:
+ '(' name_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ vacuum_relation:
+ qualified_name opt_name_list
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ vacuum_relation_list:
+ vacuum_relation
+ {
+ $$ = $1;
+}
+| vacuum_relation_list ',' vacuum_relation
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opt_vacuum_relation_list:
+ vacuum_relation_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ExplainStmt:
+ EXPLAIN ExplainableStmt
+ {
+ $$ = cat_str(2,mm_strdup("explain"),$2);
+}
+| EXPLAIN analyze_keyword opt_verbose ExplainableStmt
+ {
+ $$ = cat_str(4,mm_strdup("explain"),$2,$3,$4);
+}
+| EXPLAIN VERBOSE ExplainableStmt
+ {
+ $$ = cat_str(2,mm_strdup("explain verbose"),$3);
+}
+| EXPLAIN '(' utility_option_list ')' ExplainableStmt
+ {
+ $$ = cat_str(4,mm_strdup("explain ("),$3,mm_strdup(")"),$5);
+}
+;
+
+
+ ExplainableStmt:
+ SelectStmt
+ {
+ $$ = $1;
+}
+| InsertStmt
+ {
+ $$ = $1;
+}
+| UpdateStmt
+ {
+ $$ = $1;
+}
+| DeleteStmt
+ {
+ $$ = $1;
+}
+| DeclareCursorStmt
+ {
+ $$ = $1;
+}
+| CreateAsStmt
+ {
+ $$ = $1;
+}
+| CreateMatViewStmt
+ {
+ $$ = $1;
+}
+| RefreshMatViewStmt
+ {
+ $$ = $1;
+}
+| ExecuteStmt
+ {
+ $$ = $1.name;
+ }
+;
+
+
+ PrepareStmt:
+PREPARE prepared_name prep_type_clause AS PreparableStmt
+ {
+ $$.name = $2;
+ $$.type = $3;
+ $$.stmt = $5;
+ }
+ | PREPARE prepared_name FROM execstring
+ {
+ $$.name = $2;
+ $$.type = NULL;
+ $$.stmt = $4;
+ }
+;
+
+
+ prep_type_clause:
+ '(' type_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ PreparableStmt:
+ SelectStmt
+ {
+ $$ = $1;
+}
+| InsertStmt
+ {
+ $$ = $1;
+}
+| UpdateStmt
+ {
+ $$ = $1;
+}
+| DeleteStmt
+ {
+ $$ = $1;
+}
+;
+
+
+ ExecuteStmt:
+EXECUTE prepared_name execute_param_clause execute_rest
+ {
+ $$.name = $2;
+ $$.type = $3;
+ }
+| CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest
+ {
+ $$.name = cat_str(8,mm_strdup("create"),$2,mm_strdup("table"),$4,mm_strdup("as execute"),$7,$8,$9);
+ }
+| CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE prepared_name execute_param_clause opt_with_data execute_rest
+ {
+ $$.name = cat_str(8,mm_strdup("create"),$2,mm_strdup("table if not exists"),$7,mm_strdup("as execute"),$10,$11,$12);
+ }
+;
+
+
+ execute_param_clause:
+ '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ InsertStmt:
+ opt_with_clause INSERT INTO insert_target insert_rest opt_on_conflict returning_clause
+ {
+ $$ = cat_str(6,$1,mm_strdup("insert into"),$4,$5,$6,$7);
+}
+;
+
+
+ insert_target:
+ qualified_name
+ {
+ $$ = $1;
+}
+| qualified_name AS ColId
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+;
+
+
+ insert_rest:
+ SelectStmt
+ {
+ $$ = $1;
+}
+| OVERRIDING override_kind VALUE_P SelectStmt
+ {
+ $$ = cat_str(4,mm_strdup("overriding"),$2,mm_strdup("value"),$4);
+}
+| '(' insert_column_list ')' SelectStmt
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(")"),$4);
+}
+| '(' insert_column_list ')' OVERRIDING override_kind VALUE_P SelectStmt
+ {
+ $$ = cat_str(6,mm_strdup("("),$2,mm_strdup(") overriding"),$5,mm_strdup("value"),$7);
+}
+| DEFAULT VALUES
+ {
+ $$ = mm_strdup("default values");
+}
+;
+
+
+ override_kind:
+ USER
+ {
+ $$ = mm_strdup("user");
+}
+| SYSTEM_P
+ {
+ $$ = mm_strdup("system");
+}
+;
+
+
+ insert_column_list:
+ insert_column_item
+ {
+ $$ = $1;
+}
+| insert_column_list ',' insert_column_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ insert_column_item:
+ ColId opt_indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_on_conflict:
+ ON CONFLICT opt_conf_expr DO UPDATE SET set_clause_list where_clause
+ {
+ $$ = cat_str(5,mm_strdup("on conflict"),$3,mm_strdup("do update set"),$7,$8);
+}
+| ON CONFLICT opt_conf_expr DO NOTHING
+ {
+ $$ = cat_str(3,mm_strdup("on conflict"),$3,mm_strdup("do nothing"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_conf_expr:
+ '(' index_params ')' where_clause
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(")"),$4);
+}
+| ON CONSTRAINT name
+ {
+ $$ = cat_str(2,mm_strdup("on constraint"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ returning_clause:
+RETURNING target_list opt_ecpg_into
+ {
+ $$ = cat_str(2,mm_strdup("returning"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ DeleteStmt:
+ opt_with_clause DELETE_P FROM relation_expr_opt_alias using_clause where_or_current_clause returning_clause
+ {
+ $$ = cat_str(6,$1,mm_strdup("delete from"),$4,$5,$6,$7);
+}
+;
+
+
+ using_clause:
+ USING from_list
+ {
+ $$ = cat_str(2,mm_strdup("using"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ LockStmt:
+ LOCK_P opt_table relation_expr_list opt_lock opt_nowait
+ {
+ $$ = cat_str(5,mm_strdup("lock"),$2,$3,$4,$5);
+}
+;
+
+
+ opt_lock:
+ IN_P lock_type MODE
+ {
+ $$ = cat_str(3,mm_strdup("in"),$2,mm_strdup("mode"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ lock_type:
+ ACCESS SHARE
+ {
+ $$ = mm_strdup("access share");
+}
+| ROW SHARE
+ {
+ $$ = mm_strdup("row share");
+}
+| ROW EXCLUSIVE
+ {
+ $$ = mm_strdup("row exclusive");
+}
+| SHARE UPDATE EXCLUSIVE
+ {
+ $$ = mm_strdup("share update exclusive");
+}
+| SHARE
+ {
+ $$ = mm_strdup("share");
+}
+| SHARE ROW EXCLUSIVE
+ {
+ $$ = mm_strdup("share row exclusive");
+}
+| EXCLUSIVE
+ {
+ $$ = mm_strdup("exclusive");
+}
+| ACCESS EXCLUSIVE
+ {
+ $$ = mm_strdup("access exclusive");
+}
+;
+
+
+ opt_nowait:
+ NOWAIT
+ {
+ $$ = mm_strdup("nowait");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_nowait_or_skip:
+ NOWAIT
+ {
+ $$ = mm_strdup("nowait");
+}
+| SKIP LOCKED
+ {
+ $$ = mm_strdup("skip locked");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ UpdateStmt:
+ opt_with_clause UPDATE relation_expr_opt_alias SET set_clause_list from_clause where_or_current_clause returning_clause
+ {
+ $$ = cat_str(8,$1,mm_strdup("update"),$3,mm_strdup("set"),$5,$6,$7,$8);
+}
+;
+
+
+ set_clause_list:
+ set_clause
+ {
+ $$ = $1;
+}
+| set_clause_list ',' set_clause
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ set_clause:
+ set_target '=' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| '(' set_target_list ')' '=' a_expr
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(") ="),$5);
+}
+;
+
+
+ set_target:
+ ColId opt_indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ set_target_list:
+ set_target
+ {
+ $$ = $1;
+}
+| set_target_list ',' set_target
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ DeclareCursorStmt:
+ DECLARE cursor_name cursor_options CURSOR opt_hold FOR SelectStmt
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
+ char *comment, *c1, *c2;
+ int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
+
+ if (INFORMIX_MODE && pg_strcasecmp($2, "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn($2, ptr->name) == 0)
+ {
+ if ($2[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", $2+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", $2);
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ this->next = cur;
+ this->name = $2;
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->opened = false;
+ this->command = cat_str(7, mm_strdup("declare"), cursor_marker, $3, mm_strdup("cursor"), $5, mm_strdup("for"), $7);
+ this->argsinsert = argsinsert;
+ this->argsinsert_oos = NULL;
+ this->argsresult = argsresult;
+ this->argsresult_oos = NULL;
+ argsinsert = argsresult = NULL;
+ cur = this;
+
+ c1 = mm_strdup(this->command);
+ if ((c2 = strstr(c1, "*/")) != NULL)
+ {
+ /* We put this text into a comment, so we better remove [*][/]. */
+ c2[0] = '.';
+ c2[1] = '.';
+ }
+ comment = cat_str(3, mm_strdup("/*"), c1, mm_strdup("*/"));
+
+ $$ = cat2_str(adjust_outofscope_cursor_vars(this), comment);
+ }
+;
+
+
+ cursor_name:
+ name
+ {
+ $$ = $1;
+}
+ | char_civar
+ {
+ char *curname = mm_alloc(strlen($1) + 2);
+ sprintf(curname, ":%s", $1);
+ free($1);
+ $1 = curname;
+ $$ = $1;
+ }
+;
+
+
+ cursor_options:
+
+ {
+ $$=EMPTY; }
+| cursor_options NO SCROLL
+ {
+ $$ = cat_str(2,$1,mm_strdup("no scroll"));
+}
+| cursor_options SCROLL
+ {
+ $$ = cat_str(2,$1,mm_strdup("scroll"));
+}
+| cursor_options BINARY
+ {
+ $$ = cat_str(2,$1,mm_strdup("binary"));
+}
+| cursor_options ASENSITIVE
+ {
+ $$ = cat_str(2,$1,mm_strdup("asensitive"));
+}
+| cursor_options INSENSITIVE
+ {
+ $$ = cat_str(2,$1,mm_strdup("insensitive"));
+}
+;
+
+
+ opt_hold:
+
+ {
+ if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
+ $$ = mm_strdup("with hold");
+ else
+ $$ = EMPTY;
+ }
+| WITH HOLD
+ {
+ $$ = mm_strdup("with hold");
+}
+| WITHOUT HOLD
+ {
+ $$ = mm_strdup("without hold");
+}
+;
+
+
+ SelectStmt:
+ select_no_parens %prec UMINUS
+ {
+ $$ = $1;
+}
+| select_with_parens %prec UMINUS
+ {
+ $$ = $1;
+}
+;
+
+
+ select_with_parens:
+ '(' select_no_parens ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| '(' select_with_parens ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ select_no_parens:
+ simple_select
+ {
+ $$ = $1;
+}
+| select_clause sort_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| select_clause opt_sort_clause for_locking_clause opt_select_limit
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| select_clause opt_sort_clause select_limit opt_for_locking_clause
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| with_clause select_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| with_clause select_clause sort_clause
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| with_clause select_clause opt_sort_clause for_locking_clause opt_select_limit
+ {
+ $$ = cat_str(5,$1,$2,$3,$4,$5);
+}
+| with_clause select_clause opt_sort_clause select_limit opt_for_locking_clause
+ {
+ $$ = cat_str(5,$1,$2,$3,$4,$5);
+}
+;
+
+
+ select_clause:
+ simple_select
+ {
+ $$ = $1;
+}
+| select_with_parens
+ {
+ $$ = $1;
+}
+;
+
+
+ simple_select:
+ SELECT opt_all_clause opt_target_list into_clause from_clause where_clause group_clause having_clause window_clause
+ {
+ $$ = cat_str(9,mm_strdup("select"),$2,$3,$4,$5,$6,$7,$8,$9);
+}
+| SELECT distinct_clause target_list into_clause from_clause where_clause group_clause having_clause window_clause
+ {
+ $$ = cat_str(9,mm_strdup("select"),$2,$3,$4,$5,$6,$7,$8,$9);
+}
+| values_clause
+ {
+ $$ = $1;
+}
+| TABLE relation_expr
+ {
+ $$ = cat_str(2,mm_strdup("table"),$2);
+}
+| select_clause UNION set_quantifier select_clause
+ {
+ $$ = cat_str(4,$1,mm_strdup("union"),$3,$4);
+}
+| select_clause INTERSECT set_quantifier select_clause
+ {
+ $$ = cat_str(4,$1,mm_strdup("intersect"),$3,$4);
+}
+| select_clause EXCEPT set_quantifier select_clause
+ {
+ $$ = cat_str(4,$1,mm_strdup("except"),$3,$4);
+}
+;
+
+
+ with_clause:
+ WITH cte_list
+ {
+ $$ = cat_str(2,mm_strdup("with"),$2);
+}
+| WITH_LA cte_list
+ {
+ $$ = cat_str(2,mm_strdup("with"),$2);
+}
+| WITH RECURSIVE cte_list
+ {
+ $$ = cat_str(2,mm_strdup("with recursive"),$3);
+}
+;
+
+
+ cte_list:
+ common_table_expr
+ {
+ $$ = $1;
+}
+| cte_list ',' common_table_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ common_table_expr:
+ name opt_name_list AS opt_materialized '(' PreparableStmt ')' opt_search_clause opt_cycle_clause
+ {
+ $$ = cat_str(9,$1,$2,mm_strdup("as"),$4,mm_strdup("("),$6,mm_strdup(")"),$8,$9);
+}
+;
+
+
+ opt_materialized:
+ MATERIALIZED
+ {
+ $$ = mm_strdup("materialized");
+}
+| NOT MATERIALIZED
+ {
+ $$ = mm_strdup("not materialized");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_search_clause:
+ SEARCH DEPTH FIRST_P BY columnList SET ColId
+ {
+ $$ = cat_str(4,mm_strdup("search depth first by"),$5,mm_strdup("set"),$7);
+}
+| SEARCH BREADTH FIRST_P BY columnList SET ColId
+ {
+ $$ = cat_str(4,mm_strdup("search breadth first by"),$5,mm_strdup("set"),$7);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_cycle_clause:
+ CYCLE columnList SET ColId TO AexprConst DEFAULT AexprConst USING ColId
+ {
+ $$ = cat_str(10,mm_strdup("cycle"),$2,mm_strdup("set"),$4,mm_strdup("to"),$6,mm_strdup("default"),$8,mm_strdup("using"),$10);
+}
+| CYCLE columnList SET ColId USING ColId
+ {
+ $$ = cat_str(6,mm_strdup("cycle"),$2,mm_strdup("set"),$4,mm_strdup("using"),$6);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_with_clause:
+ with_clause
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ into_clause:
+ INTO OptTempTableName
+ {
+ FoundInto = 1;
+ $$= cat2_str(mm_strdup("into"), $2);
+ }
+ | ecpg_into { $$ = EMPTY; }
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptTempTableName:
+ TEMPORARY opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("temporary"),$2,$3);
+}
+| TEMP opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("temp"),$2,$3);
+}
+| LOCAL TEMPORARY opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("local temporary"),$3,$4);
+}
+| LOCAL TEMP opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("local temp"),$3,$4);
+}
+| GLOBAL TEMPORARY opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("global temporary"),$3,$4);
+}
+| GLOBAL TEMP opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("global temp"),$3,$4);
+}
+| UNLOGGED opt_table qualified_name
+ {
+ $$ = cat_str(3,mm_strdup("unlogged"),$2,$3);
+}
+| TABLE qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("table"),$2);
+}
+| qualified_name
+ {
+ $$ = $1;
+}
+;
+
+
+ opt_table:
+ TABLE
+ {
+ $$ = mm_strdup("table");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ set_quantifier:
+ ALL
+ {
+ $$ = mm_strdup("all");
+}
+| DISTINCT
+ {
+ $$ = mm_strdup("distinct");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ distinct_clause:
+ DISTINCT
+ {
+ $$ = mm_strdup("distinct");
+}
+| DISTINCT ON '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("distinct on ("),$4,mm_strdup(")"));
+}
+;
+
+
+ opt_all_clause:
+ ALL
+ {
+ $$ = mm_strdup("all");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_sort_clause:
+ sort_clause
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ sort_clause:
+ ORDER BY sortby_list
+ {
+ $$ = cat_str(2,mm_strdup("order by"),$3);
+}
+;
+
+
+ sortby_list:
+ sortby
+ {
+ $$ = $1;
+}
+| sortby_list ',' sortby
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ sortby:
+ a_expr USING qual_all_Op opt_nulls_order
+ {
+ $$ = cat_str(4,$1,mm_strdup("using"),$3,$4);
+}
+| a_expr opt_asc_desc opt_nulls_order
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+;
+
+
+ select_limit:
+ limit_clause offset_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| offset_clause limit_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| limit_clause
+ {
+ $$ = $1;
+}
+| offset_clause
+ {
+ $$ = $1;
+}
+;
+
+
+ opt_select_limit:
+ select_limit
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ limit_clause:
+ LIMIT select_limit_value
+ {
+ $$ = cat_str(2,mm_strdup("limit"),$2);
+}
+| LIMIT select_limit_value ',' select_offset_value
+ {
+ mmerror(PARSE_ERROR, ET_WARNING, "no longer supported LIMIT #,# syntax passed to server");
+ $$ = cat_str(4, mm_strdup("limit"), $2, mm_strdup(","), $4);
+ }
+| FETCH first_or_next select_fetch_first_value row_or_rows ONLY
+ {
+ $$ = cat_str(5,mm_strdup("fetch"),$2,$3,$4,mm_strdup("only"));
+}
+| FETCH first_or_next select_fetch_first_value row_or_rows WITH TIES
+ {
+ $$ = cat_str(5,mm_strdup("fetch"),$2,$3,$4,mm_strdup("with ties"));
+}
+| FETCH first_or_next row_or_rows ONLY
+ {
+ $$ = cat_str(4,mm_strdup("fetch"),$2,$3,mm_strdup("only"));
+}
+| FETCH first_or_next row_or_rows WITH TIES
+ {
+ $$ = cat_str(4,mm_strdup("fetch"),$2,$3,mm_strdup("with ties"));
+}
+;
+
+
+ offset_clause:
+ OFFSET select_offset_value
+ {
+ $$ = cat_str(2,mm_strdup("offset"),$2);
+}
+| OFFSET select_fetch_first_value row_or_rows
+ {
+ $$ = cat_str(3,mm_strdup("offset"),$2,$3);
+}
+;
+
+
+ select_limit_value:
+ a_expr
+ {
+ $$ = $1;
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+;
+
+
+ select_offset_value:
+ a_expr
+ {
+ $$ = $1;
+}
+;
+
+
+ select_fetch_first_value:
+ c_expr
+ {
+ $$ = $1;
+}
+| '+' I_or_F_const
+ {
+ $$ = cat_str(2,mm_strdup("+"),$2);
+}
+| '-' I_or_F_const
+ {
+ $$ = cat_str(2,mm_strdup("-"),$2);
+}
+;
+
+
+ I_or_F_const:
+ Iconst
+ {
+ $$ = $1;
+}
+| ecpg_fconst
+ {
+ $$ = $1;
+}
+;
+
+
+ row_or_rows:
+ ROW
+ {
+ $$ = mm_strdup("row");
+}
+| ROWS
+ {
+ $$ = mm_strdup("rows");
+}
+;
+
+
+ first_or_next:
+ FIRST_P
+ {
+ $$ = mm_strdup("first");
+}
+| NEXT
+ {
+ $$ = mm_strdup("next");
+}
+;
+
+
+ group_clause:
+ GROUP_P BY set_quantifier group_by_list
+ {
+ $$ = cat_str(3,mm_strdup("group by"),$3,$4);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ group_by_list:
+ group_by_item
+ {
+ $$ = $1;
+}
+| group_by_list ',' group_by_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ group_by_item:
+ a_expr
+ {
+ $$ = $1;
+}
+| empty_grouping_set
+ {
+ $$ = $1;
+}
+| cube_clause
+ {
+ $$ = $1;
+}
+| rollup_clause
+ {
+ $$ = $1;
+}
+| grouping_sets_clause
+ {
+ $$ = $1;
+}
+;
+
+
+ empty_grouping_set:
+ '(' ')'
+ {
+ $$ = mm_strdup("( )");
+}
+;
+
+
+ rollup_clause:
+ ROLLUP '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("rollup ("),$3,mm_strdup(")"));
+}
+;
+
+
+ cube_clause:
+ CUBE '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("cube ("),$3,mm_strdup(")"));
+}
+;
+
+
+ grouping_sets_clause:
+ GROUPING SETS '(' group_by_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("grouping sets ("),$4,mm_strdup(")"));
+}
+;
+
+
+ having_clause:
+ HAVING a_expr
+ {
+ $$ = cat_str(2,mm_strdup("having"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ for_locking_clause:
+ for_locking_items
+ {
+ $$ = $1;
+}
+| FOR READ ONLY
+ {
+ $$ = mm_strdup("for read only");
+}
+;
+
+
+ opt_for_locking_clause:
+ for_locking_clause
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ for_locking_items:
+ for_locking_item
+ {
+ $$ = $1;
+}
+| for_locking_items for_locking_item
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ for_locking_item:
+ for_locking_strength locked_rels_list opt_nowait_or_skip
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+;
+
+
+ for_locking_strength:
+ FOR UPDATE
+ {
+ $$ = mm_strdup("for update");
+}
+| FOR NO KEY UPDATE
+ {
+ $$ = mm_strdup("for no key update");
+}
+| FOR SHARE
+ {
+ $$ = mm_strdup("for share");
+}
+| FOR KEY SHARE
+ {
+ $$ = mm_strdup("for key share");
+}
+;
+
+
+ locked_rels_list:
+ OF qualified_name_list
+ {
+ $$ = cat_str(2,mm_strdup("of"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ values_clause:
+ VALUES '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("values ("),$3,mm_strdup(")"));
+}
+| values_clause ',' '(' expr_list ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup(", ("),$4,mm_strdup(")"));
+}
+;
+
+
+ from_clause:
+ FROM from_list
+ {
+ $$ = cat_str(2,mm_strdup("from"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ from_list:
+ table_ref
+ {
+ $$ = $1;
+}
+| from_list ',' table_ref
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ table_ref:
+ relation_expr opt_alias_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| relation_expr opt_alias_clause tablesample_clause
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| func_table func_alias_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| LATERAL_P func_table func_alias_clause
+ {
+ $$ = cat_str(3,mm_strdup("lateral"),$2,$3);
+}
+| xmltable opt_alias_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| LATERAL_P xmltable opt_alias_clause
+ {
+ $$ = cat_str(3,mm_strdup("lateral"),$2,$3);
+}
+| select_with_parens opt_alias_clause
+ {
+ if ($2 == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+
+ $$ = cat_str(2,$1,$2);
+}
+| LATERAL_P select_with_parens opt_alias_clause
+ {
+ if ($3 == NULL)
+ mmerror(PARSE_ERROR, ET_ERROR, "subquery in FROM must have an alias");
+
+ $$ = cat_str(3,mm_strdup("lateral"),$2,$3);
+}
+| joined_table
+ {
+ $$ = $1;
+}
+| '(' joined_table ')' alias_clause
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(")"),$4);
+}
+;
+
+
+ joined_table:
+ '(' joined_table ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+| table_ref CROSS JOIN table_ref
+ {
+ $$ = cat_str(3,$1,mm_strdup("cross join"),$4);
+}
+| table_ref join_type JOIN table_ref join_qual
+ {
+ $$ = cat_str(5,$1,$2,mm_strdup("join"),$4,$5);
+}
+| table_ref JOIN table_ref join_qual
+ {
+ $$ = cat_str(4,$1,mm_strdup("join"),$3,$4);
+}
+| table_ref NATURAL join_type JOIN table_ref
+ {
+ $$ = cat_str(5,$1,mm_strdup("natural"),$3,mm_strdup("join"),$5);
+}
+| table_ref NATURAL JOIN table_ref
+ {
+ $$ = cat_str(3,$1,mm_strdup("natural join"),$4);
+}
+;
+
+
+ alias_clause:
+ AS ColId '(' name_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("as"),$2,mm_strdup("("),$4,mm_strdup(")"));
+}
+| AS ColId
+ {
+ $$ = cat_str(2,mm_strdup("as"),$2);
+}
+| ColId '(' name_list ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("("),$3,mm_strdup(")"));
+}
+| ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ opt_alias_clause:
+ alias_clause
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_alias_clause_for_join_using:
+ AS ColId
+ {
+ $$ = cat_str(2,mm_strdup("as"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ func_alias_clause:
+ alias_clause
+ {
+ $$ = $1;
+}
+| AS '(' TableFuncElementList ')'
+ {
+ $$ = cat_str(3,mm_strdup("as ("),$3,mm_strdup(")"));
+}
+| AS ColId '(' TableFuncElementList ')'
+ {
+ $$ = cat_str(5,mm_strdup("as"),$2,mm_strdup("("),$4,mm_strdup(")"));
+}
+| ColId '(' TableFuncElementList ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ join_type:
+ FULL opt_outer
+ {
+ $$ = cat_str(2,mm_strdup("full"),$2);
+}
+| LEFT opt_outer
+ {
+ $$ = cat_str(2,mm_strdup("left"),$2);
+}
+| RIGHT opt_outer
+ {
+ $$ = cat_str(2,mm_strdup("right"),$2);
+}
+| INNER_P
+ {
+ $$ = mm_strdup("inner");
+}
+;
+
+
+ opt_outer:
+ OUTER_P
+ {
+ $$ = mm_strdup("outer");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ join_qual:
+ USING '(' name_list ')' opt_alias_clause_for_join_using
+ {
+ $$ = cat_str(4,mm_strdup("using ("),$3,mm_strdup(")"),$5);
+}
+| ON a_expr
+ {
+ $$ = cat_str(2,mm_strdup("on"),$2);
+}
+;
+
+
+ relation_expr:
+ qualified_name
+ {
+ $$ = $1;
+}
+| qualified_name '*'
+ {
+ $$ = cat_str(2,$1,mm_strdup("*"));
+}
+| ONLY qualified_name
+ {
+ $$ = cat_str(2,mm_strdup("only"),$2);
+}
+| ONLY '(' qualified_name ')'
+ {
+ $$ = cat_str(3,mm_strdup("only ("),$3,mm_strdup(")"));
+}
+;
+
+
+ relation_expr_list:
+ relation_expr
+ {
+ $$ = $1;
+}
+| relation_expr_list ',' relation_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ relation_expr_opt_alias:
+ relation_expr %prec UMINUS
+ {
+ $$ = $1;
+}
+| relation_expr ColId
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| relation_expr AS ColId
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+;
+
+
+ tablesample_clause:
+ TABLESAMPLE func_name '(' expr_list ')' opt_repeatable_clause
+ {
+ $$ = cat_str(6,mm_strdup("tablesample"),$2,mm_strdup("("),$4,mm_strdup(")"),$6);
+}
+;
+
+
+ opt_repeatable_clause:
+ REPEATABLE '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("repeatable ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ func_table:
+ func_expr_windowless opt_ordinality
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ROWS FROM '(' rowsfrom_list ')' opt_ordinality
+ {
+ $$ = cat_str(4,mm_strdup("rows from ("),$4,mm_strdup(")"),$6);
+}
+;
+
+
+ rowsfrom_item:
+ func_expr_windowless opt_col_def_list
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ rowsfrom_list:
+ rowsfrom_item
+ {
+ $$ = $1;
+}
+| rowsfrom_list ',' rowsfrom_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ opt_col_def_list:
+ AS '(' TableFuncElementList ')'
+ {
+ $$ = cat_str(3,mm_strdup("as ("),$3,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_ordinality:
+ WITH_LA ORDINALITY
+ {
+ $$ = mm_strdup("with ordinality");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ where_clause:
+ WHERE a_expr
+ {
+ $$ = cat_str(2,mm_strdup("where"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ where_or_current_clause:
+ WHERE a_expr
+ {
+ $$ = cat_str(2,mm_strdup("where"),$2);
+}
+| WHERE CURRENT_P OF cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ $$ = cat_str(2,mm_strdup("where current of"), cursor_marker);
+ }
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ OptTableFuncElementList:
+ TableFuncElementList
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ TableFuncElementList:
+ TableFuncElement
+ {
+ $$ = $1;
+}
+| TableFuncElementList ',' TableFuncElement
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ TableFuncElement:
+ ColId Typename opt_collate_clause
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+;
+
+
+ xmltable:
+ XMLTABLE '(' c_expr xmlexists_argument COLUMNS xmltable_column_list ')'
+ {
+ $$ = cat_str(6,mm_strdup("xmltable ("),$3,$4,mm_strdup("columns"),$6,mm_strdup(")"));
+}
+| XMLTABLE '(' XMLNAMESPACES '(' xml_namespace_list ')' ',' c_expr xmlexists_argument COLUMNS xmltable_column_list ')'
+ {
+ $$ = cat_str(8,mm_strdup("xmltable ( xmlnamespaces ("),$5,mm_strdup(") ,"),$8,$9,mm_strdup("columns"),$11,mm_strdup(")"));
+}
+;
+
+
+ xmltable_column_list:
+ xmltable_column_el
+ {
+ $$ = $1;
+}
+| xmltable_column_list ',' xmltable_column_el
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ xmltable_column_el:
+ ColId Typename
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ColId Typename xmltable_column_option_list
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| ColId FOR ORDINALITY
+ {
+ $$ = cat_str(2,$1,mm_strdup("for ordinality"));
+}
+;
+
+
+ xmltable_column_option_list:
+ xmltable_column_option_el
+ {
+ $$ = $1;
+}
+| xmltable_column_option_list xmltable_column_option_el
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ xmltable_column_option_el:
+ ecpg_ident b_expr
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| DEFAULT b_expr
+ {
+ $$ = cat_str(2,mm_strdup("default"),$2);
+}
+| NOT NULL_P
+ {
+ $$ = mm_strdup("not null");
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+;
+
+
+ xml_namespace_list:
+ xml_namespace_el
+ {
+ $$ = $1;
+}
+| xml_namespace_list ',' xml_namespace_el
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ xml_namespace_el:
+ b_expr AS ColLabel
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+| DEFAULT b_expr
+ {
+ $$ = cat_str(2,mm_strdup("default"),$2);
+}
+;
+
+
+ Typename:
+ SimpleTypename opt_array_bounds
+ { $$ = cat2_str($1, $2.str); }
+| SETOF SimpleTypename opt_array_bounds
+ { $$ = cat_str(3, mm_strdup("setof"), $2, $3.str); }
+| SimpleTypename ARRAY '[' Iconst ']'
+ {
+ $$ = cat_str(4,$1,mm_strdup("array ["),$4,mm_strdup("]"));
+}
+| SETOF SimpleTypename ARRAY '[' Iconst ']'
+ {
+ $$ = cat_str(5,mm_strdup("setof"),$2,mm_strdup("array ["),$5,mm_strdup("]"));
+}
+| SimpleTypename ARRAY
+ {
+ $$ = cat_str(2,$1,mm_strdup("array"));
+}
+| SETOF SimpleTypename ARRAY
+ {
+ $$ = cat_str(3,mm_strdup("setof"),$2,mm_strdup("array"));
+}
+;
+
+
+ opt_array_bounds:
+ opt_array_bounds '[' ']'
+ {
+ $$.index1 = $1.index1;
+ $$.index2 = $1.index2;
+ if (strcmp($$.index1, "-1") == 0)
+ $$.index1 = mm_strdup("0");
+ else if (strcmp($1.index2, "-1") == 0)
+ $$.index2 = mm_strdup("0");
+ $$.str = cat_str(2, $1.str, mm_strdup("[]"));
+ }
+ | opt_array_bounds '[' Iresult ']'
+ {
+ $$.index1 = $1.index1;
+ $$.index2 = $1.index2;
+ if (strcmp($1.index1, "-1") == 0)
+ $$.index1 = mm_strdup($3);
+ else if (strcmp($1.index2, "-1") == 0)
+ $$.index2 = mm_strdup($3);
+ $$.str = cat_str(4, $1.str, mm_strdup("["), $3, mm_strdup("]"));
+ }
+|
+ {
+ $$.index1 = mm_strdup("-1");
+ $$.index2 = mm_strdup("-1");
+ $$.str= EMPTY;
+ }
+;
+
+
+ SimpleTypename:
+ GenericType
+ {
+ $$ = $1;
+}
+| Numeric
+ {
+ $$ = $1;
+}
+| Bit
+ {
+ $$ = $1;
+}
+| Character
+ {
+ $$ = $1;
+}
+| ConstDatetime
+ {
+ $$ = $1;
+}
+| ConstInterval opt_interval
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ConstInterval '(' Iconst ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("("),$3,mm_strdup(")"));
+}
+;
+
+
+ ConstTypename:
+ Numeric
+ {
+ $$ = $1;
+}
+| ConstBit
+ {
+ $$ = $1;
+}
+| ConstCharacter
+ {
+ $$ = $1;
+}
+| ConstDatetime
+ {
+ $$ = $1;
+}
+;
+
+
+ GenericType:
+ type_function_name opt_type_modifiers
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| type_function_name attrs opt_type_modifiers
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+;
+
+
+ opt_type_modifiers:
+ '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ Numeric:
+ INT_P
+ {
+ $$ = mm_strdup("int");
+}
+| INTEGER
+ {
+ $$ = mm_strdup("integer");
+}
+| SMALLINT
+ {
+ $$ = mm_strdup("smallint");
+}
+| BIGINT
+ {
+ $$ = mm_strdup("bigint");
+}
+| REAL
+ {
+ $$ = mm_strdup("real");
+}
+| FLOAT_P opt_float
+ {
+ $$ = cat_str(2,mm_strdup("float"),$2);
+}
+| DOUBLE_P PRECISION
+ {
+ $$ = mm_strdup("double precision");
+}
+| DECIMAL_P opt_type_modifiers
+ {
+ $$ = cat_str(2,mm_strdup("decimal"),$2);
+}
+| DEC opt_type_modifiers
+ {
+ $$ = cat_str(2,mm_strdup("dec"),$2);
+}
+| NUMERIC opt_type_modifiers
+ {
+ $$ = cat_str(2,mm_strdup("numeric"),$2);
+}
+| BOOLEAN_P
+ {
+ $$ = mm_strdup("boolean");
+}
+;
+
+
+ opt_float:
+ '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ Bit:
+ BitWithLength
+ {
+ $$ = $1;
+}
+| BitWithoutLength
+ {
+ $$ = $1;
+}
+;
+
+
+ ConstBit:
+ BitWithLength
+ {
+ $$ = $1;
+}
+| BitWithoutLength
+ {
+ $$ = $1;
+}
+;
+
+
+ BitWithLength:
+ BIT opt_varying '(' expr_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("bit"),$2,mm_strdup("("),$4,mm_strdup(")"));
+}
+;
+
+
+ BitWithoutLength:
+ BIT opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("bit"),$2);
+}
+;
+
+
+ Character:
+ CharacterWithLength
+ {
+ $$ = $1;
+}
+| CharacterWithoutLength
+ {
+ $$ = $1;
+}
+;
+
+
+ ConstCharacter:
+ CharacterWithLength
+ {
+ $$ = $1;
+}
+| CharacterWithoutLength
+ {
+ $$ = $1;
+}
+;
+
+
+ CharacterWithLength:
+ character '(' Iconst ')'
+ {
+ $$ = cat_str(4,$1,mm_strdup("("),$3,mm_strdup(")"));
+}
+;
+
+
+ CharacterWithoutLength:
+ character
+ {
+ $$ = $1;
+}
+;
+
+
+ character:
+ CHARACTER opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("character"),$2);
+}
+| CHAR_P opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("char"),$2);
+}
+| VARCHAR
+ {
+ $$ = mm_strdup("varchar");
+}
+| NATIONAL CHARACTER opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("national character"),$3);
+}
+| NATIONAL CHAR_P opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("national char"),$3);
+}
+| NCHAR opt_varying
+ {
+ $$ = cat_str(2,mm_strdup("nchar"),$2);
+}
+;
+
+
+ opt_varying:
+ VARYING
+ {
+ $$ = mm_strdup("varying");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ ConstDatetime:
+ TIMESTAMP '(' Iconst ')' opt_timezone
+ {
+ $$ = cat_str(4,mm_strdup("timestamp ("),$3,mm_strdup(")"),$5);
+}
+| TIMESTAMP opt_timezone
+ {
+ $$ = cat_str(2,mm_strdup("timestamp"),$2);
+}
+| TIME '(' Iconst ')' opt_timezone
+ {
+ $$ = cat_str(4,mm_strdup("time ("),$3,mm_strdup(")"),$5);
+}
+| TIME opt_timezone
+ {
+ $$ = cat_str(2,mm_strdup("time"),$2);
+}
+;
+
+
+ ConstInterval:
+ INTERVAL
+ {
+ $$ = mm_strdup("interval");
+}
+;
+
+
+ opt_timezone:
+ WITH_LA TIME ZONE
+ {
+ $$ = mm_strdup("with time zone");
+}
+| WITHOUT TIME ZONE
+ {
+ $$ = mm_strdup("without time zone");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_interval:
+ YEAR_P
+ {
+ $$ = mm_strdup("year");
+}
+| MONTH_P
+ {
+ $$ = mm_strdup("month");
+}
+| DAY_P
+ {
+ $$ = mm_strdup("day");
+}
+| HOUR_P
+ {
+ $$ = mm_strdup("hour");
+}
+| MINUTE_P
+ {
+ $$ = mm_strdup("minute");
+}
+| interval_second
+ {
+ $$ = $1;
+}
+| YEAR_P TO MONTH_P
+ {
+ $$ = mm_strdup("year to month");
+}
+| DAY_P TO HOUR_P
+ {
+ $$ = mm_strdup("day to hour");
+}
+| DAY_P TO MINUTE_P
+ {
+ $$ = mm_strdup("day to minute");
+}
+| DAY_P TO interval_second
+ {
+ $$ = cat_str(2,mm_strdup("day to"),$3);
+}
+| HOUR_P TO MINUTE_P
+ {
+ $$ = mm_strdup("hour to minute");
+}
+| HOUR_P TO interval_second
+ {
+ $$ = cat_str(2,mm_strdup("hour to"),$3);
+}
+| MINUTE_P TO interval_second
+ {
+ $$ = cat_str(2,mm_strdup("minute to"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ interval_second:
+ SECOND_P
+ {
+ $$ = mm_strdup("second");
+}
+| SECOND_P '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("second ("),$3,mm_strdup(")"));
+}
+;
+
+
+ a_expr:
+ c_expr
+ {
+ $$ = $1;
+}
+| a_expr TYPECAST Typename
+ {
+ $$ = cat_str(3,$1,mm_strdup("::"),$3);
+}
+| a_expr COLLATE any_name
+ {
+ $$ = cat_str(3,$1,mm_strdup("collate"),$3);
+}
+| a_expr AT TIME ZONE a_expr %prec AT
+ {
+ $$ = cat_str(3,$1,mm_strdup("at time zone"),$5);
+}
+| '+' a_expr %prec UMINUS
+ {
+ $$ = cat_str(2,mm_strdup("+"),$2);
+}
+| '-' a_expr %prec UMINUS
+ {
+ $$ = cat_str(2,mm_strdup("-"),$2);
+}
+| a_expr '+' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("+"),$3);
+}
+| a_expr '-' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("-"),$3);
+}
+| a_expr '*' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("*"),$3);
+}
+| a_expr '/' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("/"),$3);
+}
+| a_expr '%' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("%"),$3);
+}
+| a_expr '^' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("^"),$3);
+}
+| a_expr '<' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<"),$3);
+}
+| a_expr '>' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(">"),$3);
+}
+| a_expr '=' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| a_expr LESS_EQUALS a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<="),$3);
+}
+| a_expr GREATER_EQUALS a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(">="),$3);
+}
+| a_expr NOT_EQUALS a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<>"),$3);
+}
+| a_expr qual_Op a_expr %prec Op
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| qual_Op a_expr %prec Op
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| a_expr AND a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("and"),$3);
+}
+| a_expr OR a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("or"),$3);
+}
+| NOT a_expr
+ {
+ $$ = cat_str(2,mm_strdup("not"),$2);
+}
+| NOT_LA a_expr %prec NOT
+ {
+ $$ = cat_str(2,mm_strdup("not"),$2);
+}
+| a_expr LIKE a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("like"),$3);
+}
+| a_expr LIKE a_expr ESCAPE a_expr %prec LIKE
+ {
+ $$ = cat_str(5,$1,mm_strdup("like"),$3,mm_strdup("escape"),$5);
+}
+| a_expr NOT_LA LIKE a_expr %prec NOT_LA
+ {
+ $$ = cat_str(3,$1,mm_strdup("not like"),$4);
+}
+| a_expr NOT_LA LIKE a_expr ESCAPE a_expr %prec NOT_LA
+ {
+ $$ = cat_str(5,$1,mm_strdup("not like"),$4,mm_strdup("escape"),$6);
+}
+| a_expr ILIKE a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("ilike"),$3);
+}
+| a_expr ILIKE a_expr ESCAPE a_expr %prec ILIKE
+ {
+ $$ = cat_str(5,$1,mm_strdup("ilike"),$3,mm_strdup("escape"),$5);
+}
+| a_expr NOT_LA ILIKE a_expr %prec NOT_LA
+ {
+ $$ = cat_str(3,$1,mm_strdup("not ilike"),$4);
+}
+| a_expr NOT_LA ILIKE a_expr ESCAPE a_expr %prec NOT_LA
+ {
+ $$ = cat_str(5,$1,mm_strdup("not ilike"),$4,mm_strdup("escape"),$6);
+}
+| a_expr SIMILAR TO a_expr %prec SIMILAR
+ {
+ $$ = cat_str(3,$1,mm_strdup("similar to"),$4);
+}
+| a_expr SIMILAR TO a_expr ESCAPE a_expr %prec SIMILAR
+ {
+ $$ = cat_str(5,$1,mm_strdup("similar to"),$4,mm_strdup("escape"),$6);
+}
+| a_expr NOT_LA SIMILAR TO a_expr %prec NOT_LA
+ {
+ $$ = cat_str(3,$1,mm_strdup("not similar to"),$5);
+}
+| a_expr NOT_LA SIMILAR TO a_expr ESCAPE a_expr %prec NOT_LA
+ {
+ $$ = cat_str(5,$1,mm_strdup("not similar to"),$5,mm_strdup("escape"),$7);
+}
+| a_expr IS NULL_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is null"));
+}
+| a_expr ISNULL
+ {
+ $$ = cat_str(2,$1,mm_strdup("isnull"));
+}
+| a_expr IS NOT NULL_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not null"));
+}
+| a_expr NOTNULL
+ {
+ $$ = cat_str(2,$1,mm_strdup("notnull"));
+}
+| row OVERLAPS row
+ {
+ $$ = cat_str(3,$1,mm_strdup("overlaps"),$3);
+}
+| a_expr IS TRUE_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is true"));
+}
+| a_expr IS NOT TRUE_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not true"));
+}
+| a_expr IS FALSE_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is false"));
+}
+| a_expr IS NOT FALSE_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not false"));
+}
+| a_expr IS UNKNOWN %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is unknown"));
+}
+| a_expr IS NOT UNKNOWN %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not unknown"));
+}
+| a_expr IS DISTINCT FROM a_expr %prec IS
+ {
+ $$ = cat_str(3,$1,mm_strdup("is distinct from"),$5);
+}
+| a_expr IS NOT DISTINCT FROM a_expr %prec IS
+ {
+ $$ = cat_str(3,$1,mm_strdup("is not distinct from"),$6);
+}
+| a_expr BETWEEN opt_asymmetric b_expr AND a_expr %prec BETWEEN
+ {
+ $$ = cat_str(6,$1,mm_strdup("between"),$3,$4,mm_strdup("and"),$6);
+}
+| a_expr NOT_LA BETWEEN opt_asymmetric b_expr AND a_expr %prec NOT_LA
+ {
+ $$ = cat_str(6,$1,mm_strdup("not between"),$4,$5,mm_strdup("and"),$7);
+}
+| a_expr BETWEEN SYMMETRIC b_expr AND a_expr %prec BETWEEN
+ {
+ $$ = cat_str(5,$1,mm_strdup("between symmetric"),$4,mm_strdup("and"),$6);
+}
+| a_expr NOT_LA BETWEEN SYMMETRIC b_expr AND a_expr %prec NOT_LA
+ {
+ $$ = cat_str(5,$1,mm_strdup("not between symmetric"),$5,mm_strdup("and"),$7);
+}
+| a_expr IN_P in_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("in"),$3);
+}
+| a_expr NOT_LA IN_P in_expr %prec NOT_LA
+ {
+ $$ = cat_str(3,$1,mm_strdup("not in"),$4);
+}
+| a_expr subquery_Op sub_type select_with_parens %prec Op
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| a_expr subquery_Op sub_type '(' a_expr ')' %prec Op
+ {
+ $$ = cat_str(6,$1,$2,$3,mm_strdup("("),$5,mm_strdup(")"));
+}
+| UNIQUE select_with_parens
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ $$ = cat_str(2,mm_strdup("unique"),$2);
+}
+| a_expr IS DOCUMENT_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is document"));
+}
+| a_expr IS NOT DOCUMENT_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not document"));
+}
+| a_expr IS NORMALIZED %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is normalized"));
+}
+| a_expr IS unicode_normal_form NORMALIZED %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is"),$3,mm_strdup("normalized"));
+}
+| a_expr IS NOT NORMALIZED %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not normalized"));
+}
+| a_expr IS NOT unicode_normal_form NORMALIZED %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is not"),$4,mm_strdup("normalized"));
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+;
+
+
+ b_expr:
+ c_expr
+ {
+ $$ = $1;
+}
+| b_expr TYPECAST Typename
+ {
+ $$ = cat_str(3,$1,mm_strdup("::"),$3);
+}
+| '+' b_expr %prec UMINUS
+ {
+ $$ = cat_str(2,mm_strdup("+"),$2);
+}
+| '-' b_expr %prec UMINUS
+ {
+ $$ = cat_str(2,mm_strdup("-"),$2);
+}
+| b_expr '+' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("+"),$3);
+}
+| b_expr '-' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("-"),$3);
+}
+| b_expr '*' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("*"),$3);
+}
+| b_expr '/' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("/"),$3);
+}
+| b_expr '%' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("%"),$3);
+}
+| b_expr '^' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("^"),$3);
+}
+| b_expr '<' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<"),$3);
+}
+| b_expr '>' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(">"),$3);
+}
+| b_expr '=' b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("="),$3);
+}
+| b_expr LESS_EQUALS b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<="),$3);
+}
+| b_expr GREATER_EQUALS b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(">="),$3);
+}
+| b_expr NOT_EQUALS b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("<>"),$3);
+}
+| b_expr qual_Op b_expr %prec Op
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| qual_Op b_expr %prec Op
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| b_expr IS DISTINCT FROM b_expr %prec IS
+ {
+ $$ = cat_str(3,$1,mm_strdup("is distinct from"),$5);
+}
+| b_expr IS NOT DISTINCT FROM b_expr %prec IS
+ {
+ $$ = cat_str(3,$1,mm_strdup("is not distinct from"),$6);
+}
+| b_expr IS DOCUMENT_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is document"));
+}
+| b_expr IS NOT DOCUMENT_P %prec IS
+ {
+ $$ = cat_str(2,$1,mm_strdup("is not document"));
+}
+;
+
+
+ c_expr:
+ columnref
+ {
+ $$ = $1;
+}
+| AexprConst
+ {
+ $$ = $1;
+}
+| ecpg_param opt_indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| '(' a_expr ')' opt_indirection
+ {
+ $$ = cat_str(4,mm_strdup("("),$2,mm_strdup(")"),$4);
+}
+| case_expr
+ {
+ $$ = $1;
+}
+| func_expr
+ {
+ $$ = $1;
+}
+| select_with_parens %prec UMINUS
+ {
+ $$ = $1;
+}
+| select_with_parens indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| EXISTS select_with_parens
+ {
+ $$ = cat_str(2,mm_strdup("exists"),$2);
+}
+| ARRAY select_with_parens
+ {
+ $$ = cat_str(2,mm_strdup("array"),$2);
+}
+| ARRAY array_expr
+ {
+ $$ = cat_str(2,mm_strdup("array"),$2);
+}
+| explicit_row
+ {
+ $$ = $1;
+}
+| implicit_row
+ {
+ $$ = $1;
+}
+| GROUPING '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("grouping ("),$3,mm_strdup(")"));
+}
+;
+
+
+ func_application:
+ func_name '(' ')'
+ {
+ $$ = cat_str(2,$1,mm_strdup("( )"));
+}
+| func_name '(' func_arg_list opt_sort_clause ')'
+ {
+ $$ = cat_str(5,$1,mm_strdup("("),$3,$4,mm_strdup(")"));
+}
+| func_name '(' VARIADIC func_arg_expr opt_sort_clause ')'
+ {
+ $$ = cat_str(5,$1,mm_strdup("( variadic"),$4,$5,mm_strdup(")"));
+}
+| func_name '(' func_arg_list ',' VARIADIC func_arg_expr opt_sort_clause ')'
+ {
+ $$ = cat_str(7,$1,mm_strdup("("),$3,mm_strdup(", variadic"),$6,$7,mm_strdup(")"));
+}
+| func_name '(' ALL func_arg_list opt_sort_clause ')'
+ {
+ $$ = cat_str(5,$1,mm_strdup("( all"),$4,$5,mm_strdup(")"));
+}
+| func_name '(' DISTINCT func_arg_list opt_sort_clause ')'
+ {
+ $$ = cat_str(5,$1,mm_strdup("( distinct"),$4,$5,mm_strdup(")"));
+}
+| func_name '(' '*' ')'
+ {
+ $$ = cat_str(2,$1,mm_strdup("( * )"));
+}
+;
+
+
+ func_expr:
+ func_application within_group_clause filter_clause over_clause
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| func_expr_common_subexpr
+ {
+ $$ = $1;
+}
+;
+
+
+ func_expr_windowless:
+ func_application
+ {
+ $$ = $1;
+}
+| func_expr_common_subexpr
+ {
+ $$ = $1;
+}
+;
+
+
+ func_expr_common_subexpr:
+ COLLATION FOR '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("collation for ("),$4,mm_strdup(")"));
+}
+| CURRENT_DATE
+ {
+ $$ = mm_strdup("current_date");
+}
+| CURRENT_TIME
+ {
+ $$ = mm_strdup("current_time");
+}
+| CURRENT_TIME '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("current_time ("),$3,mm_strdup(")"));
+}
+| CURRENT_TIMESTAMP
+ {
+ $$ = mm_strdup("current_timestamp");
+}
+| CURRENT_TIMESTAMP '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("current_timestamp ("),$3,mm_strdup(")"));
+}
+| LOCALTIME
+ {
+ $$ = mm_strdup("localtime");
+}
+| LOCALTIME '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("localtime ("),$3,mm_strdup(")"));
+}
+| LOCALTIMESTAMP
+ {
+ $$ = mm_strdup("localtimestamp");
+}
+| LOCALTIMESTAMP '(' Iconst ')'
+ {
+ $$ = cat_str(3,mm_strdup("localtimestamp ("),$3,mm_strdup(")"));
+}
+| CURRENT_ROLE
+ {
+ $$ = mm_strdup("current_role");
+}
+| CURRENT_USER
+ {
+ $$ = mm_strdup("current_user");
+}
+| SESSION_USER
+ {
+ $$ = mm_strdup("session_user");
+}
+| USER
+ {
+ $$ = mm_strdup("user");
+}
+| CURRENT_CATALOG
+ {
+ $$ = mm_strdup("current_catalog");
+}
+| CURRENT_SCHEMA
+ {
+ $$ = mm_strdup("current_schema");
+}
+| CAST '(' a_expr AS Typename ')'
+ {
+ $$ = cat_str(5,mm_strdup("cast ("),$3,mm_strdup("as"),$5,mm_strdup(")"));
+}
+| EXTRACT '(' extract_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("extract ("),$3,mm_strdup(")"));
+}
+| NORMALIZE '(' a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("normalize ("),$3,mm_strdup(")"));
+}
+| NORMALIZE '(' a_expr ',' unicode_normal_form ')'
+ {
+ $$ = cat_str(5,mm_strdup("normalize ("),$3,mm_strdup(","),$5,mm_strdup(")"));
+}
+| OVERLAY '(' overlay_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("overlay ("),$3,mm_strdup(")"));
+}
+| OVERLAY '(' func_arg_list_opt ')'
+ {
+ $$ = cat_str(3,mm_strdup("overlay ("),$3,mm_strdup(")"));
+}
+| POSITION '(' position_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("position ("),$3,mm_strdup(")"));
+}
+| SUBSTRING '(' substr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("substring ("),$3,mm_strdup(")"));
+}
+| SUBSTRING '(' func_arg_list_opt ')'
+ {
+ $$ = cat_str(3,mm_strdup("substring ("),$3,mm_strdup(")"));
+}
+| TREAT '(' a_expr AS Typename ')'
+ {
+ $$ = cat_str(5,mm_strdup("treat ("),$3,mm_strdup("as"),$5,mm_strdup(")"));
+}
+| TRIM '(' BOTH trim_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("trim ( both"),$4,mm_strdup(")"));
+}
+| TRIM '(' LEADING trim_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("trim ( leading"),$4,mm_strdup(")"));
+}
+| TRIM '(' TRAILING trim_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("trim ( trailing"),$4,mm_strdup(")"));
+}
+| TRIM '(' trim_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("trim ("),$3,mm_strdup(")"));
+}
+| NULLIF '(' a_expr ',' a_expr ')'
+ {
+ $$ = cat_str(5,mm_strdup("nullif ("),$3,mm_strdup(","),$5,mm_strdup(")"));
+}
+| COALESCE '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("coalesce ("),$3,mm_strdup(")"));
+}
+| GREATEST '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("greatest ("),$3,mm_strdup(")"));
+}
+| LEAST '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("least ("),$3,mm_strdup(")"));
+}
+| XMLCONCAT '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("xmlconcat ("),$3,mm_strdup(")"));
+}
+| XMLELEMENT '(' NAME_P ColLabel ')'
+ {
+ $$ = cat_str(3,mm_strdup("xmlelement ( name"),$4,mm_strdup(")"));
+}
+| XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ')'
+ {
+ $$ = cat_str(5,mm_strdup("xmlelement ( name"),$4,mm_strdup(","),$6,mm_strdup(")"));
+}
+| XMLELEMENT '(' NAME_P ColLabel ',' expr_list ')'
+ {
+ $$ = cat_str(5,mm_strdup("xmlelement ( name"),$4,mm_strdup(","),$6,mm_strdup(")"));
+}
+| XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ',' expr_list ')'
+ {
+ $$ = cat_str(7,mm_strdup("xmlelement ( name"),$4,mm_strdup(","),$6,mm_strdup(","),$8,mm_strdup(")"));
+}
+| XMLEXISTS '(' c_expr xmlexists_argument ')'
+ {
+ $$ = cat_str(4,mm_strdup("xmlexists ("),$3,$4,mm_strdup(")"));
+}
+| XMLFOREST '(' xml_attribute_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("xmlforest ("),$3,mm_strdup(")"));
+}
+| XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')'
+ {
+ $$ = cat_str(5,mm_strdup("xmlparse ("),$3,$4,$5,mm_strdup(")"));
+}
+| XMLPI '(' NAME_P ColLabel ')'
+ {
+ $$ = cat_str(3,mm_strdup("xmlpi ( name"),$4,mm_strdup(")"));
+}
+| XMLPI '(' NAME_P ColLabel ',' a_expr ')'
+ {
+ $$ = cat_str(5,mm_strdup("xmlpi ( name"),$4,mm_strdup(","),$6,mm_strdup(")"));
+}
+| XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')'
+ {
+ $$ = cat_str(6,mm_strdup("xmlroot ("),$3,mm_strdup(","),$5,$6,mm_strdup(")"));
+}
+| XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')'
+ {
+ $$ = cat_str(6,mm_strdup("xmlserialize ("),$3,$4,mm_strdup("as"),$6,mm_strdup(")"));
+}
+;
+
+
+ xml_root_version:
+ VERSION_P a_expr
+ {
+ $$ = cat_str(2,mm_strdup("version"),$2);
+}
+| VERSION_P NO VALUE_P
+ {
+ $$ = mm_strdup("version no value");
+}
+;
+
+
+ opt_xml_root_standalone:
+ ',' STANDALONE_P YES_P
+ {
+ $$ = mm_strdup(", standalone yes");
+}
+| ',' STANDALONE_P NO
+ {
+ $$ = mm_strdup(", standalone no");
+}
+| ',' STANDALONE_P NO VALUE_P
+ {
+ $$ = mm_strdup(", standalone no value");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ xml_attributes:
+ XMLATTRIBUTES '(' xml_attribute_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("xmlattributes ("),$3,mm_strdup(")"));
+}
+;
+
+
+ xml_attribute_list:
+ xml_attribute_el
+ {
+ $$ = $1;
+}
+| xml_attribute_list ',' xml_attribute_el
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ xml_attribute_el:
+ a_expr AS ColLabel
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+| a_expr
+ {
+ $$ = $1;
+}
+;
+
+
+ document_or_content:
+ DOCUMENT_P
+ {
+ $$ = mm_strdup("document");
+}
+| CONTENT_P
+ {
+ $$ = mm_strdup("content");
+}
+;
+
+
+ xml_whitespace_option:
+ PRESERVE WHITESPACE_P
+ {
+ $$ = mm_strdup("preserve whitespace");
+}
+| STRIP_P WHITESPACE_P
+ {
+ $$ = mm_strdup("strip whitespace");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ xmlexists_argument:
+ PASSING c_expr
+ {
+ $$ = cat_str(2,mm_strdup("passing"),$2);
+}
+| PASSING c_expr xml_passing_mech
+ {
+ $$ = cat_str(3,mm_strdup("passing"),$2,$3);
+}
+| PASSING xml_passing_mech c_expr
+ {
+ $$ = cat_str(3,mm_strdup("passing"),$2,$3);
+}
+| PASSING xml_passing_mech c_expr xml_passing_mech
+ {
+ $$ = cat_str(4,mm_strdup("passing"),$2,$3,$4);
+}
+;
+
+
+ xml_passing_mech:
+ BY REF
+ {
+ $$ = mm_strdup("by ref");
+}
+| BY VALUE_P
+ {
+ $$ = mm_strdup("by value");
+}
+;
+
+
+ within_group_clause:
+ WITHIN GROUP_P '(' sort_clause ')'
+ {
+ $$ = cat_str(3,mm_strdup("within group ("),$4,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ filter_clause:
+ FILTER '(' WHERE a_expr ')'
+ {
+ $$ = cat_str(3,mm_strdup("filter ( where"),$4,mm_strdup(")"));
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ window_clause:
+ WINDOW window_definition_list
+ {
+ $$ = cat_str(2,mm_strdup("window"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ window_definition_list:
+ window_definition
+ {
+ $$ = $1;
+}
+| window_definition_list ',' window_definition
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ window_definition:
+ ColId AS window_specification
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+;
+
+
+ over_clause:
+ OVER window_specification
+ {
+ $$ = cat_str(2,mm_strdup("over"),$2);
+}
+| OVER ColId
+ {
+ $$ = cat_str(2,mm_strdup("over"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ window_specification:
+ '(' opt_existing_window_name opt_partition_clause opt_sort_clause opt_frame_clause ')'
+ {
+ $$ = cat_str(6,mm_strdup("("),$2,$3,$4,$5,mm_strdup(")"));
+}
+;
+
+
+ opt_existing_window_name:
+ ColId
+ {
+ $$ = $1;
+}
+| %prec Op
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_partition_clause:
+ PARTITION BY expr_list
+ {
+ $$ = cat_str(2,mm_strdup("partition by"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_frame_clause:
+ RANGE frame_extent opt_window_exclusion_clause
+ {
+ $$ = cat_str(3,mm_strdup("range"),$2,$3);
+}
+| ROWS frame_extent opt_window_exclusion_clause
+ {
+ $$ = cat_str(3,mm_strdup("rows"),$2,$3);
+}
+| GROUPS frame_extent opt_window_exclusion_clause
+ {
+ $$ = cat_str(3,mm_strdup("groups"),$2,$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ frame_extent:
+ frame_bound
+ {
+ $$ = $1;
+}
+| BETWEEN frame_bound AND frame_bound
+ {
+ $$ = cat_str(4,mm_strdup("between"),$2,mm_strdup("and"),$4);
+}
+;
+
+
+ frame_bound:
+ UNBOUNDED PRECEDING
+ {
+ $$ = mm_strdup("unbounded preceding");
+}
+| UNBOUNDED FOLLOWING
+ {
+ $$ = mm_strdup("unbounded following");
+}
+| CURRENT_P ROW
+ {
+ $$ = mm_strdup("current row");
+}
+| a_expr PRECEDING
+ {
+ $$ = cat_str(2,$1,mm_strdup("preceding"));
+}
+| a_expr FOLLOWING
+ {
+ $$ = cat_str(2,$1,mm_strdup("following"));
+}
+;
+
+
+ opt_window_exclusion_clause:
+ EXCLUDE CURRENT_P ROW
+ {
+ $$ = mm_strdup("exclude current row");
+}
+| EXCLUDE GROUP_P
+ {
+ $$ = mm_strdup("exclude group");
+}
+| EXCLUDE TIES
+ {
+ $$ = mm_strdup("exclude ties");
+}
+| EXCLUDE NO OTHERS
+ {
+ $$ = mm_strdup("exclude no others");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ row:
+ ROW '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("row ("),$3,mm_strdup(")"));
+}
+| ROW '(' ')'
+ {
+ $$ = mm_strdup("row ( )");
+}
+| '(' expr_list ',' a_expr ')'
+ {
+ $$ = cat_str(5,mm_strdup("("),$2,mm_strdup(","),$4,mm_strdup(")"));
+}
+;
+
+
+ explicit_row:
+ ROW '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("row ("),$3,mm_strdup(")"));
+}
+| ROW '(' ')'
+ {
+ $$ = mm_strdup("row ( )");
+}
+;
+
+
+ implicit_row:
+ '(' expr_list ',' a_expr ')'
+ {
+ $$ = cat_str(5,mm_strdup("("),$2,mm_strdup(","),$4,mm_strdup(")"));
+}
+;
+
+
+ sub_type:
+ ANY
+ {
+ $$ = mm_strdup("any");
+}
+| SOME
+ {
+ $$ = mm_strdup("some");
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+;
+
+
+ all_Op:
+ Op
+ {
+ $$ = $1;
+}
+| MathOp
+ {
+ $$ = $1;
+}
+;
+
+
+ MathOp:
+ '+'
+ {
+ $$ = mm_strdup("+");
+}
+| '-'
+ {
+ $$ = mm_strdup("-");
+}
+| '*'
+ {
+ $$ = mm_strdup("*");
+}
+| '/'
+ {
+ $$ = mm_strdup("/");
+}
+| '%'
+ {
+ $$ = mm_strdup("%");
+}
+| '^'
+ {
+ $$ = mm_strdup("^");
+}
+| '<'
+ {
+ $$ = mm_strdup("<");
+}
+| '>'
+ {
+ $$ = mm_strdup(">");
+}
+| '='
+ {
+ $$ = mm_strdup("=");
+}
+| LESS_EQUALS
+ {
+ $$ = mm_strdup("<=");
+}
+| GREATER_EQUALS
+ {
+ $$ = mm_strdup(">=");
+}
+| NOT_EQUALS
+ {
+ $$ = mm_strdup("<>");
+}
+;
+
+
+ qual_Op:
+ Op
+ {
+ $$ = $1;
+}
+| OPERATOR '(' any_operator ')'
+ {
+ $$ = cat_str(3,mm_strdup("operator ("),$3,mm_strdup(")"));
+}
+;
+
+
+ qual_all_Op:
+ all_Op
+ {
+ $$ = $1;
+}
+| OPERATOR '(' any_operator ')'
+ {
+ $$ = cat_str(3,mm_strdup("operator ("),$3,mm_strdup(")"));
+}
+;
+
+
+ subquery_Op:
+ all_Op
+ {
+ $$ = $1;
+}
+| OPERATOR '(' any_operator ')'
+ {
+ $$ = cat_str(3,mm_strdup("operator ("),$3,mm_strdup(")"));
+}
+| LIKE
+ {
+ $$ = mm_strdup("like");
+}
+| NOT_LA LIKE
+ {
+ $$ = mm_strdup("not like");
+}
+| ILIKE
+ {
+ $$ = mm_strdup("ilike");
+}
+| NOT_LA ILIKE
+ {
+ $$ = mm_strdup("not ilike");
+}
+;
+
+
+ expr_list:
+ a_expr
+ {
+ $$ = $1;
+}
+| expr_list ',' a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ func_arg_list:
+ func_arg_expr
+ {
+ $$ = $1;
+}
+| func_arg_list ',' func_arg_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ func_arg_expr:
+ a_expr
+ {
+ $$ = $1;
+}
+| param_name COLON_EQUALS a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(":="),$3);
+}
+| param_name EQUALS_GREATER a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("=>"),$3);
+}
+;
+
+
+ func_arg_list_opt:
+ func_arg_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ type_list:
+ Typename
+ {
+ $$ = $1;
+}
+| type_list ',' Typename
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ array_expr:
+ '[' expr_list ']'
+ {
+ $$ = cat_str(3,mm_strdup("["),$2,mm_strdup("]"));
+}
+| '[' array_expr_list ']'
+ {
+ $$ = cat_str(3,mm_strdup("["),$2,mm_strdup("]"));
+}
+| '[' ']'
+ {
+ $$ = mm_strdup("[ ]");
+}
+;
+
+
+ array_expr_list:
+ array_expr
+ {
+ $$ = $1;
+}
+| array_expr_list ',' array_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ extract_list:
+ extract_arg FROM a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("from"),$3);
+}
+;
+
+
+ extract_arg:
+ ecpg_ident
+ {
+ $$ = $1;
+}
+| YEAR_P
+ {
+ $$ = mm_strdup("year");
+}
+| MONTH_P
+ {
+ $$ = mm_strdup("month");
+}
+| DAY_P
+ {
+ $$ = mm_strdup("day");
+}
+| HOUR_P
+ {
+ $$ = mm_strdup("hour");
+}
+| MINUTE_P
+ {
+ $$ = mm_strdup("minute");
+}
+| SECOND_P
+ {
+ $$ = mm_strdup("second");
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ unicode_normal_form:
+ NFC
+ {
+ $$ = mm_strdup("nfc");
+}
+| NFD
+ {
+ $$ = mm_strdup("nfd");
+}
+| NFKC
+ {
+ $$ = mm_strdup("nfkc");
+}
+| NFKD
+ {
+ $$ = mm_strdup("nfkd");
+}
+;
+
+
+ overlay_list:
+ a_expr PLACING a_expr FROM a_expr FOR a_expr
+ {
+ $$ = cat_str(7,$1,mm_strdup("placing"),$3,mm_strdup("from"),$5,mm_strdup("for"),$7);
+}
+| a_expr PLACING a_expr FROM a_expr
+ {
+ $$ = cat_str(5,$1,mm_strdup("placing"),$3,mm_strdup("from"),$5);
+}
+;
+
+
+ position_list:
+ b_expr IN_P b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("in"),$3);
+}
+;
+
+
+ substr_list:
+ a_expr FROM a_expr FOR a_expr
+ {
+ $$ = cat_str(5,$1,mm_strdup("from"),$3,mm_strdup("for"),$5);
+}
+| a_expr FOR a_expr FROM a_expr
+ {
+ $$ = cat_str(5,$1,mm_strdup("for"),$3,mm_strdup("from"),$5);
+}
+| a_expr FROM a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("from"),$3);
+}
+| a_expr FOR a_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("for"),$3);
+}
+| a_expr SIMILAR a_expr ESCAPE a_expr
+ {
+ $$ = cat_str(5,$1,mm_strdup("similar"),$3,mm_strdup("escape"),$5);
+}
+;
+
+
+ trim_list:
+ a_expr FROM expr_list
+ {
+ $$ = cat_str(3,$1,mm_strdup("from"),$3);
+}
+| FROM expr_list
+ {
+ $$ = cat_str(2,mm_strdup("from"),$2);
+}
+| expr_list
+ {
+ $$ = $1;
+}
+;
+
+
+ in_expr:
+ select_with_parens
+ {
+ $$ = $1;
+}
+| '(' expr_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("("),$2,mm_strdup(")"));
+}
+;
+
+
+ case_expr:
+ CASE case_arg when_clause_list case_default END_P
+ {
+ $$ = cat_str(5,mm_strdup("case"),$2,$3,$4,mm_strdup("end"));
+}
+;
+
+
+ when_clause_list:
+ when_clause
+ {
+ $$ = $1;
+}
+| when_clause_list when_clause
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ when_clause:
+ WHEN a_expr THEN a_expr
+ {
+ $$ = cat_str(4,mm_strdup("when"),$2,mm_strdup("then"),$4);
+}
+;
+
+
+ case_default:
+ ELSE a_expr
+ {
+ $$ = cat_str(2,mm_strdup("else"),$2);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ case_arg:
+ a_expr
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ columnref:
+ ColId
+ {
+ $$ = $1;
+}
+| ColId indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ indirection_el:
+ '.' attr_name
+ {
+ $$ = cat_str(2,mm_strdup("."),$2);
+}
+| '.' '*'
+ {
+ $$ = mm_strdup(". *");
+}
+| '[' a_expr ']'
+ {
+ $$ = cat_str(3,mm_strdup("["),$2,mm_strdup("]"));
+}
+| '[' opt_slice_bound ':' opt_slice_bound ']'
+ {
+ $$ = cat_str(5,mm_strdup("["),$2,mm_strdup(":"),$4,mm_strdup("]"));
+}
+;
+
+
+ opt_slice_bound:
+ a_expr
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ indirection:
+ indirection_el
+ {
+ $$ = $1;
+}
+| indirection indirection_el
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_indirection:
+
+ {
+ $$=EMPTY; }
+| opt_indirection indirection_el
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ opt_asymmetric:
+ ASYMMETRIC
+ {
+ $$ = mm_strdup("asymmetric");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ opt_target_list:
+ target_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ target_list:
+ target_el
+ {
+ $$ = $1;
+}
+| target_list ',' target_el
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ target_el:
+ a_expr AS ColLabel
+ {
+ $$ = cat_str(3,$1,mm_strdup("as"),$3);
+}
+| a_expr BareColLabel
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| a_expr
+ {
+ $$ = $1;
+}
+| '*'
+ {
+ $$ = mm_strdup("*");
+}
+;
+
+
+ qualified_name_list:
+ qualified_name
+ {
+ $$ = $1;
+}
+| qualified_name_list ',' qualified_name
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ qualified_name:
+ ColId
+ {
+ $$ = $1;
+}
+| ColId indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ name_list:
+ name
+ {
+ $$ = $1;
+}
+| name_list ',' name
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ name:
+ ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ attr_name:
+ ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ file_name:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+;
+
+
+ func_name:
+ type_function_name
+ {
+ $$ = $1;
+}
+| ColId indirection
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ AexprConst:
+ Iconst
+ {
+ $$ = $1;
+}
+| ecpg_fconst
+ {
+ $$ = $1;
+}
+| ecpg_sconst
+ {
+ $$ = $1;
+}
+| ecpg_bconst
+ {
+ $$ = $1;
+}
+| ecpg_xconst
+ {
+ $$ = $1;
+}
+| func_name ecpg_sconst
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| func_name '(' func_arg_list opt_sort_clause ')' ecpg_sconst
+ {
+ $$ = cat_str(6,$1,mm_strdup("("),$3,$4,mm_strdup(")"),$6);
+}
+| ConstTypename ecpg_sconst
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ConstInterval ecpg_sconst opt_interval
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| ConstInterval '(' Iconst ')' ecpg_sconst
+ {
+ $$ = cat_str(5,$1,mm_strdup("("),$3,mm_strdup(")"),$5);
+}
+| TRUE_P
+ {
+ $$ = mm_strdup("true");
+}
+| FALSE_P
+ {
+ $$ = mm_strdup("false");
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+ | civar { $$ = $1; }
+ | civarind { $$ = $1; }
+;
+
+
+ Iconst:
+ ICONST
+ { $$ = make_name(); }
+;
+
+
+ SignedIconst:
+ Iconst
+ {
+ $$ = $1;
+}
+ | civar { $$ = $1; }
+| '+' Iconst
+ {
+ $$ = cat_str(2,mm_strdup("+"),$2);
+}
+| '-' Iconst
+ {
+ $$ = cat_str(2,mm_strdup("-"),$2);
+}
+;
+
+
+ RoleId:
+ RoleSpec
+ {
+ $$ = $1;
+}
+;
+
+
+ RoleSpec:
+ NonReservedWord
+ {
+ $$ = $1;
+}
+| CURRENT_ROLE
+ {
+ $$ = mm_strdup("current_role");
+}
+| CURRENT_USER
+ {
+ $$ = mm_strdup("current_user");
+}
+| SESSION_USER
+ {
+ $$ = mm_strdup("session_user");
+}
+;
+
+
+ role_list:
+ RoleSpec
+ {
+ $$ = $1;
+}
+| role_list ',' RoleSpec
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ NonReservedWord:
+ ecpg_ident
+ {
+ $$ = $1;
+}
+| unreserved_keyword
+ {
+ $$ = $1;
+}
+| col_name_keyword
+ {
+ $$ = $1;
+}
+| type_func_name_keyword
+ {
+ $$ = $1;
+}
+;
+
+
+ BareColLabel:
+ ecpg_ident
+ {
+ $$ = $1;
+}
+| bare_label_keyword
+ {
+ $$ = $1;
+}
+;
+
+
+ unreserved_keyword:
+ ABORT_P
+ {
+ $$ = mm_strdup("abort");
+}
+| ABSOLUTE_P
+ {
+ $$ = mm_strdup("absolute");
+}
+| ACCESS
+ {
+ $$ = mm_strdup("access");
+}
+| ACTION
+ {
+ $$ = mm_strdup("action");
+}
+| ADD_P
+ {
+ $$ = mm_strdup("add");
+}
+| ADMIN
+ {
+ $$ = mm_strdup("admin");
+}
+| AFTER
+ {
+ $$ = mm_strdup("after");
+}
+| AGGREGATE
+ {
+ $$ = mm_strdup("aggregate");
+}
+| ALSO
+ {
+ $$ = mm_strdup("also");
+}
+| ALTER
+ {
+ $$ = mm_strdup("alter");
+}
+| ALWAYS
+ {
+ $$ = mm_strdup("always");
+}
+| ASENSITIVE
+ {
+ $$ = mm_strdup("asensitive");
+}
+| ASSERTION
+ {
+ $$ = mm_strdup("assertion");
+}
+| ASSIGNMENT
+ {
+ $$ = mm_strdup("assignment");
+}
+| AT
+ {
+ $$ = mm_strdup("at");
+}
+| ATOMIC
+ {
+ $$ = mm_strdup("atomic");
+}
+| ATTACH
+ {
+ $$ = mm_strdup("attach");
+}
+| ATTRIBUTE
+ {
+ $$ = mm_strdup("attribute");
+}
+| BACKWARD
+ {
+ $$ = mm_strdup("backward");
+}
+| BEFORE
+ {
+ $$ = mm_strdup("before");
+}
+| BEGIN_P
+ {
+ $$ = mm_strdup("begin");
+}
+| BREADTH
+ {
+ $$ = mm_strdup("breadth");
+}
+| BY
+ {
+ $$ = mm_strdup("by");
+}
+| CACHE
+ {
+ $$ = mm_strdup("cache");
+}
+| CALL
+ {
+ $$ = mm_strdup("call");
+}
+| CALLED
+ {
+ $$ = mm_strdup("called");
+}
+| CASCADE
+ {
+ $$ = mm_strdup("cascade");
+}
+| CASCADED
+ {
+ $$ = mm_strdup("cascaded");
+}
+| CATALOG_P
+ {
+ $$ = mm_strdup("catalog");
+}
+| CHAIN
+ {
+ $$ = mm_strdup("chain");
+}
+| CHARACTERISTICS
+ {
+ $$ = mm_strdup("characteristics");
+}
+| CHECKPOINT
+ {
+ $$ = mm_strdup("checkpoint");
+}
+| CLASS
+ {
+ $$ = mm_strdup("class");
+}
+| CLOSE
+ {
+ $$ = mm_strdup("close");
+}
+| CLUSTER
+ {
+ $$ = mm_strdup("cluster");
+}
+| COLUMNS
+ {
+ $$ = mm_strdup("columns");
+}
+| COMMENT
+ {
+ $$ = mm_strdup("comment");
+}
+| COMMENTS
+ {
+ $$ = mm_strdup("comments");
+}
+| COMMIT
+ {
+ $$ = mm_strdup("commit");
+}
+| COMMITTED
+ {
+ $$ = mm_strdup("committed");
+}
+| COMPRESSION
+ {
+ $$ = mm_strdup("compression");
+}
+| CONFIGURATION
+ {
+ $$ = mm_strdup("configuration");
+}
+| CONFLICT
+ {
+ $$ = mm_strdup("conflict");
+}
+| CONSTRAINTS
+ {
+ $$ = mm_strdup("constraints");
+}
+| CONTENT_P
+ {
+ $$ = mm_strdup("content");
+}
+| CONTINUE_P
+ {
+ $$ = mm_strdup("continue");
+}
+| CONVERSION_P
+ {
+ $$ = mm_strdup("conversion");
+}
+| COPY
+ {
+ $$ = mm_strdup("copy");
+}
+| COST
+ {
+ $$ = mm_strdup("cost");
+}
+| CSV
+ {
+ $$ = mm_strdup("csv");
+}
+| CUBE
+ {
+ $$ = mm_strdup("cube");
+}
+| CURSOR
+ {
+ $$ = mm_strdup("cursor");
+}
+| CYCLE
+ {
+ $$ = mm_strdup("cycle");
+}
+| DATA_P
+ {
+ $$ = mm_strdup("data");
+}
+| DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+| DEALLOCATE
+ {
+ $$ = mm_strdup("deallocate");
+}
+| DECLARE
+ {
+ $$ = mm_strdup("declare");
+}
+| DEFAULTS
+ {
+ $$ = mm_strdup("defaults");
+}
+| DEFERRED
+ {
+ $$ = mm_strdup("deferred");
+}
+| DEFINER
+ {
+ $$ = mm_strdup("definer");
+}
+| DELETE_P
+ {
+ $$ = mm_strdup("delete");
+}
+| DELIMITER
+ {
+ $$ = mm_strdup("delimiter");
+}
+| DELIMITERS
+ {
+ $$ = mm_strdup("delimiters");
+}
+| DEPENDS
+ {
+ $$ = mm_strdup("depends");
+}
+| DEPTH
+ {
+ $$ = mm_strdup("depth");
+}
+| DETACH
+ {
+ $$ = mm_strdup("detach");
+}
+| DICTIONARY
+ {
+ $$ = mm_strdup("dictionary");
+}
+| DISABLE_P
+ {
+ $$ = mm_strdup("disable");
+}
+| DISCARD
+ {
+ $$ = mm_strdup("discard");
+}
+| DOCUMENT_P
+ {
+ $$ = mm_strdup("document");
+}
+| DOMAIN_P
+ {
+ $$ = mm_strdup("domain");
+}
+| DOUBLE_P
+ {
+ $$ = mm_strdup("double");
+}
+| DROP
+ {
+ $$ = mm_strdup("drop");
+}
+| EACH
+ {
+ $$ = mm_strdup("each");
+}
+| ENABLE_P
+ {
+ $$ = mm_strdup("enable");
+}
+| ENCODING
+ {
+ $$ = mm_strdup("encoding");
+}
+| ENCRYPTED
+ {
+ $$ = mm_strdup("encrypted");
+}
+| ENUM_P
+ {
+ $$ = mm_strdup("enum");
+}
+| ESCAPE
+ {
+ $$ = mm_strdup("escape");
+}
+| EVENT
+ {
+ $$ = mm_strdup("event");
+}
+| EXCLUDE
+ {
+ $$ = mm_strdup("exclude");
+}
+| EXCLUDING
+ {
+ $$ = mm_strdup("excluding");
+}
+| EXCLUSIVE
+ {
+ $$ = mm_strdup("exclusive");
+}
+| EXECUTE
+ {
+ $$ = mm_strdup("execute");
+}
+| EXPLAIN
+ {
+ $$ = mm_strdup("explain");
+}
+| EXPRESSION
+ {
+ $$ = mm_strdup("expression");
+}
+| EXTENSION
+ {
+ $$ = mm_strdup("extension");
+}
+| EXTERNAL
+ {
+ $$ = mm_strdup("external");
+}
+| FAMILY
+ {
+ $$ = mm_strdup("family");
+}
+| FILTER
+ {
+ $$ = mm_strdup("filter");
+}
+| FINALIZE
+ {
+ $$ = mm_strdup("finalize");
+}
+| FIRST_P
+ {
+ $$ = mm_strdup("first");
+}
+| FOLLOWING
+ {
+ $$ = mm_strdup("following");
+}
+| FORCE
+ {
+ $$ = mm_strdup("force");
+}
+| FORWARD
+ {
+ $$ = mm_strdup("forward");
+}
+| FUNCTION
+ {
+ $$ = mm_strdup("function");
+}
+| FUNCTIONS
+ {
+ $$ = mm_strdup("functions");
+}
+| GENERATED
+ {
+ $$ = mm_strdup("generated");
+}
+| GLOBAL
+ {
+ $$ = mm_strdup("global");
+}
+| GRANTED
+ {
+ $$ = mm_strdup("granted");
+}
+| GROUPS
+ {
+ $$ = mm_strdup("groups");
+}
+| HANDLER
+ {
+ $$ = mm_strdup("handler");
+}
+| HEADER_P
+ {
+ $$ = mm_strdup("header");
+}
+| HOLD
+ {
+ $$ = mm_strdup("hold");
+}
+| IDENTITY_P
+ {
+ $$ = mm_strdup("identity");
+}
+| IF_P
+ {
+ $$ = mm_strdup("if");
+}
+| IMMEDIATE
+ {
+ $$ = mm_strdup("immediate");
+}
+| IMMUTABLE
+ {
+ $$ = mm_strdup("immutable");
+}
+| IMPLICIT_P
+ {
+ $$ = mm_strdup("implicit");
+}
+| IMPORT_P
+ {
+ $$ = mm_strdup("import");
+}
+| INCLUDE
+ {
+ $$ = mm_strdup("include");
+}
+| INCLUDING
+ {
+ $$ = mm_strdup("including");
+}
+| INCREMENT
+ {
+ $$ = mm_strdup("increment");
+}
+| INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| INDEXES
+ {
+ $$ = mm_strdup("indexes");
+}
+| INHERIT
+ {
+ $$ = mm_strdup("inherit");
+}
+| INHERITS
+ {
+ $$ = mm_strdup("inherits");
+}
+| INLINE_P
+ {
+ $$ = mm_strdup("inline");
+}
+| INSENSITIVE
+ {
+ $$ = mm_strdup("insensitive");
+}
+| INSERT
+ {
+ $$ = mm_strdup("insert");
+}
+| INSTEAD
+ {
+ $$ = mm_strdup("instead");
+}
+| INVOKER
+ {
+ $$ = mm_strdup("invoker");
+}
+| ISOLATION
+ {
+ $$ = mm_strdup("isolation");
+}
+| KEY
+ {
+ $$ = mm_strdup("key");
+}
+| LABEL
+ {
+ $$ = mm_strdup("label");
+}
+| LANGUAGE
+ {
+ $$ = mm_strdup("language");
+}
+| LARGE_P
+ {
+ $$ = mm_strdup("large");
+}
+| LAST_P
+ {
+ $$ = mm_strdup("last");
+}
+| LEAKPROOF
+ {
+ $$ = mm_strdup("leakproof");
+}
+| LEVEL
+ {
+ $$ = mm_strdup("level");
+}
+| LISTEN
+ {
+ $$ = mm_strdup("listen");
+}
+| LOAD
+ {
+ $$ = mm_strdup("load");
+}
+| LOCAL
+ {
+ $$ = mm_strdup("local");
+}
+| LOCATION
+ {
+ $$ = mm_strdup("location");
+}
+| LOCK_P
+ {
+ $$ = mm_strdup("lock");
+}
+| LOCKED
+ {
+ $$ = mm_strdup("locked");
+}
+| LOGGED
+ {
+ $$ = mm_strdup("logged");
+}
+| MAPPING
+ {
+ $$ = mm_strdup("mapping");
+}
+| MATCH
+ {
+ $$ = mm_strdup("match");
+}
+| MATERIALIZED
+ {
+ $$ = mm_strdup("materialized");
+}
+| MAXVALUE
+ {
+ $$ = mm_strdup("maxvalue");
+}
+| METHOD
+ {
+ $$ = mm_strdup("method");
+}
+| MINVALUE
+ {
+ $$ = mm_strdup("minvalue");
+}
+| MODE
+ {
+ $$ = mm_strdup("mode");
+}
+| MOVE
+ {
+ $$ = mm_strdup("move");
+}
+| NAME_P
+ {
+ $$ = mm_strdup("name");
+}
+| NAMES
+ {
+ $$ = mm_strdup("names");
+}
+| NEW
+ {
+ $$ = mm_strdup("new");
+}
+| NEXT
+ {
+ $$ = mm_strdup("next");
+}
+| NFC
+ {
+ $$ = mm_strdup("nfc");
+}
+| NFD
+ {
+ $$ = mm_strdup("nfd");
+}
+| NFKC
+ {
+ $$ = mm_strdup("nfkc");
+}
+| NFKD
+ {
+ $$ = mm_strdup("nfkd");
+}
+| NO
+ {
+ $$ = mm_strdup("no");
+}
+| NORMALIZED
+ {
+ $$ = mm_strdup("normalized");
+}
+| NOTHING
+ {
+ $$ = mm_strdup("nothing");
+}
+| NOTIFY
+ {
+ $$ = mm_strdup("notify");
+}
+| NOWAIT
+ {
+ $$ = mm_strdup("nowait");
+}
+| NULLS_P
+ {
+ $$ = mm_strdup("nulls");
+}
+| OBJECT_P
+ {
+ $$ = mm_strdup("object");
+}
+| OF
+ {
+ $$ = mm_strdup("of");
+}
+| OFF
+ {
+ $$ = mm_strdup("off");
+}
+| OIDS
+ {
+ $$ = mm_strdup("oids");
+}
+| OLD
+ {
+ $$ = mm_strdup("old");
+}
+| OPERATOR
+ {
+ $$ = mm_strdup("operator");
+}
+| OPTION
+ {
+ $$ = mm_strdup("option");
+}
+| OPTIONS
+ {
+ $$ = mm_strdup("options");
+}
+| ORDINALITY
+ {
+ $$ = mm_strdup("ordinality");
+}
+| OTHERS
+ {
+ $$ = mm_strdup("others");
+}
+| OVER
+ {
+ $$ = mm_strdup("over");
+}
+| OVERRIDING
+ {
+ $$ = mm_strdup("overriding");
+}
+| OWNED
+ {
+ $$ = mm_strdup("owned");
+}
+| OWNER
+ {
+ $$ = mm_strdup("owner");
+}
+| PARALLEL
+ {
+ $$ = mm_strdup("parallel");
+}
+| PARSER
+ {
+ $$ = mm_strdup("parser");
+}
+| PARTIAL
+ {
+ $$ = mm_strdup("partial");
+}
+| PARTITION
+ {
+ $$ = mm_strdup("partition");
+}
+| PASSING
+ {
+ $$ = mm_strdup("passing");
+}
+| PASSWORD
+ {
+ $$ = mm_strdup("password");
+}
+| PLANS
+ {
+ $$ = mm_strdup("plans");
+}
+| POLICY
+ {
+ $$ = mm_strdup("policy");
+}
+| PRECEDING
+ {
+ $$ = mm_strdup("preceding");
+}
+| PREPARE
+ {
+ $$ = mm_strdup("prepare");
+}
+| PREPARED
+ {
+ $$ = mm_strdup("prepared");
+}
+| PRESERVE
+ {
+ $$ = mm_strdup("preserve");
+}
+| PRIOR
+ {
+ $$ = mm_strdup("prior");
+}
+| PRIVILEGES
+ {
+ $$ = mm_strdup("privileges");
+}
+| PROCEDURAL
+ {
+ $$ = mm_strdup("procedural");
+}
+| PROCEDURE
+ {
+ $$ = mm_strdup("procedure");
+}
+| PROCEDURES
+ {
+ $$ = mm_strdup("procedures");
+}
+| PROGRAM
+ {
+ $$ = mm_strdup("program");
+}
+| PUBLICATION
+ {
+ $$ = mm_strdup("publication");
+}
+| QUOTE
+ {
+ $$ = mm_strdup("quote");
+}
+| RANGE
+ {
+ $$ = mm_strdup("range");
+}
+| READ
+ {
+ $$ = mm_strdup("read");
+}
+| REASSIGN
+ {
+ $$ = mm_strdup("reassign");
+}
+| RECHECK
+ {
+ $$ = mm_strdup("recheck");
+}
+| RECURSIVE
+ {
+ $$ = mm_strdup("recursive");
+}
+| REF
+ {
+ $$ = mm_strdup("ref");
+}
+| REFERENCING
+ {
+ $$ = mm_strdup("referencing");
+}
+| REFRESH
+ {
+ $$ = mm_strdup("refresh");
+}
+| REINDEX
+ {
+ $$ = mm_strdup("reindex");
+}
+| RELATIVE_P
+ {
+ $$ = mm_strdup("relative");
+}
+| RELEASE
+ {
+ $$ = mm_strdup("release");
+}
+| RENAME
+ {
+ $$ = mm_strdup("rename");
+}
+| REPEATABLE
+ {
+ $$ = mm_strdup("repeatable");
+}
+| REPLACE
+ {
+ $$ = mm_strdup("replace");
+}
+| REPLICA
+ {
+ $$ = mm_strdup("replica");
+}
+| RESET
+ {
+ $$ = mm_strdup("reset");
+}
+| RESTART
+ {
+ $$ = mm_strdup("restart");
+}
+| RESTRICT
+ {
+ $$ = mm_strdup("restrict");
+}
+| RETURN
+ {
+ $$ = mm_strdup("return");
+}
+| RETURNS
+ {
+ $$ = mm_strdup("returns");
+}
+| REVOKE
+ {
+ $$ = mm_strdup("revoke");
+}
+| ROLE
+ {
+ $$ = mm_strdup("role");
+}
+| ROLLBACK
+ {
+ $$ = mm_strdup("rollback");
+}
+| ROLLUP
+ {
+ $$ = mm_strdup("rollup");
+}
+| ROUTINE
+ {
+ $$ = mm_strdup("routine");
+}
+| ROUTINES
+ {
+ $$ = mm_strdup("routines");
+}
+| ROWS
+ {
+ $$ = mm_strdup("rows");
+}
+| RULE
+ {
+ $$ = mm_strdup("rule");
+}
+| SAVEPOINT
+ {
+ $$ = mm_strdup("savepoint");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SCHEMAS
+ {
+ $$ = mm_strdup("schemas");
+}
+| SCROLL
+ {
+ $$ = mm_strdup("scroll");
+}
+| SEARCH
+ {
+ $$ = mm_strdup("search");
+}
+| SECURITY
+ {
+ $$ = mm_strdup("security");
+}
+| SEQUENCE
+ {
+ $$ = mm_strdup("sequence");
+}
+| SEQUENCES
+ {
+ $$ = mm_strdup("sequences");
+}
+| SERIALIZABLE
+ {
+ $$ = mm_strdup("serializable");
+}
+| SERVER
+ {
+ $$ = mm_strdup("server");
+}
+| SESSION
+ {
+ $$ = mm_strdup("session");
+}
+| SET
+ {
+ $$ = mm_strdup("set");
+}
+| SETS
+ {
+ $$ = mm_strdup("sets");
+}
+| SHARE
+ {
+ $$ = mm_strdup("share");
+}
+| SHOW
+ {
+ $$ = mm_strdup("show");
+}
+| SIMPLE
+ {
+ $$ = mm_strdup("simple");
+}
+| SKIP
+ {
+ $$ = mm_strdup("skip");
+}
+| SNAPSHOT
+ {
+ $$ = mm_strdup("snapshot");
+}
+| SQL_P
+ {
+ $$ = mm_strdup("sql");
+}
+| STABLE
+ {
+ $$ = mm_strdup("stable");
+}
+| STANDALONE_P
+ {
+ $$ = mm_strdup("standalone");
+}
+| START
+ {
+ $$ = mm_strdup("start");
+}
+| STATEMENT
+ {
+ $$ = mm_strdup("statement");
+}
+| STATISTICS
+ {
+ $$ = mm_strdup("statistics");
+}
+| STDIN
+ {
+ $$ = mm_strdup("stdin");
+}
+| STDOUT
+ {
+ $$ = mm_strdup("stdout");
+}
+| STORAGE
+ {
+ $$ = mm_strdup("storage");
+}
+| STORED
+ {
+ $$ = mm_strdup("stored");
+}
+| STRICT_P
+ {
+ $$ = mm_strdup("strict");
+}
+| STRIP_P
+ {
+ $$ = mm_strdup("strip");
+}
+| SUBSCRIPTION
+ {
+ $$ = mm_strdup("subscription");
+}
+| SUPPORT
+ {
+ $$ = mm_strdup("support");
+}
+| SYSID
+ {
+ $$ = mm_strdup("sysid");
+}
+| SYSTEM_P
+ {
+ $$ = mm_strdup("system");
+}
+| TABLES
+ {
+ $$ = mm_strdup("tables");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+| TEMP
+ {
+ $$ = mm_strdup("temp");
+}
+| TEMPLATE
+ {
+ $$ = mm_strdup("template");
+}
+| TEMPORARY
+ {
+ $$ = mm_strdup("temporary");
+}
+| TEXT_P
+ {
+ $$ = mm_strdup("text");
+}
+| TIES
+ {
+ $$ = mm_strdup("ties");
+}
+| TRANSACTION
+ {
+ $$ = mm_strdup("transaction");
+}
+| TRANSFORM
+ {
+ $$ = mm_strdup("transform");
+}
+| TRIGGER
+ {
+ $$ = mm_strdup("trigger");
+}
+| TRUNCATE
+ {
+ $$ = mm_strdup("truncate");
+}
+| TRUSTED
+ {
+ $$ = mm_strdup("trusted");
+}
+| TYPE_P
+ {
+ $$ = mm_strdup("type");
+}
+| TYPES_P
+ {
+ $$ = mm_strdup("types");
+}
+| UESCAPE
+ {
+ $$ = mm_strdup("uescape");
+}
+| UNBOUNDED
+ {
+ $$ = mm_strdup("unbounded");
+}
+| UNCOMMITTED
+ {
+ $$ = mm_strdup("uncommitted");
+}
+| UNENCRYPTED
+ {
+ $$ = mm_strdup("unencrypted");
+}
+| UNKNOWN
+ {
+ $$ = mm_strdup("unknown");
+}
+| UNLISTEN
+ {
+ $$ = mm_strdup("unlisten");
+}
+| UNLOGGED
+ {
+ $$ = mm_strdup("unlogged");
+}
+| UNTIL
+ {
+ $$ = mm_strdup("until");
+}
+| UPDATE
+ {
+ $$ = mm_strdup("update");
+}
+| VACUUM
+ {
+ $$ = mm_strdup("vacuum");
+}
+| VALID
+ {
+ $$ = mm_strdup("valid");
+}
+| VALIDATE
+ {
+ $$ = mm_strdup("validate");
+}
+| VALIDATOR
+ {
+ $$ = mm_strdup("validator");
+}
+| VALUE_P
+ {
+ $$ = mm_strdup("value");
+}
+| VARYING
+ {
+ $$ = mm_strdup("varying");
+}
+| VERSION_P
+ {
+ $$ = mm_strdup("version");
+}
+| VIEW
+ {
+ $$ = mm_strdup("view");
+}
+| VIEWS
+ {
+ $$ = mm_strdup("views");
+}
+| VOLATILE
+ {
+ $$ = mm_strdup("volatile");
+}
+| WHITESPACE_P
+ {
+ $$ = mm_strdup("whitespace");
+}
+| WITHIN
+ {
+ $$ = mm_strdup("within");
+}
+| WITHOUT
+ {
+ $$ = mm_strdup("without");
+}
+| WORK
+ {
+ $$ = mm_strdup("work");
+}
+| WRAPPER
+ {
+ $$ = mm_strdup("wrapper");
+}
+| WRITE
+ {
+ $$ = mm_strdup("write");
+}
+| XML_P
+ {
+ $$ = mm_strdup("xml");
+}
+| YES_P
+ {
+ $$ = mm_strdup("yes");
+}
+| ZONE
+ {
+ $$ = mm_strdup("zone");
+}
+;
+
+
+ col_name_keyword:
+ BETWEEN
+ {
+ $$ = mm_strdup("between");
+}
+| BIGINT
+ {
+ $$ = mm_strdup("bigint");
+}
+| BIT
+ {
+ $$ = mm_strdup("bit");
+}
+| BOOLEAN_P
+ {
+ $$ = mm_strdup("boolean");
+}
+| CHARACTER
+ {
+ $$ = mm_strdup("character");
+}
+| COALESCE
+ {
+ $$ = mm_strdup("coalesce");
+}
+| DEC
+ {
+ $$ = mm_strdup("dec");
+}
+| DECIMAL_P
+ {
+ $$ = mm_strdup("decimal");
+}
+| EXISTS
+ {
+ $$ = mm_strdup("exists");
+}
+| EXTRACT
+ {
+ $$ = mm_strdup("extract");
+}
+| FLOAT_P
+ {
+ $$ = mm_strdup("float");
+}
+| GREATEST
+ {
+ $$ = mm_strdup("greatest");
+}
+| GROUPING
+ {
+ $$ = mm_strdup("grouping");
+}
+| INOUT
+ {
+ $$ = mm_strdup("inout");
+}
+| INTEGER
+ {
+ $$ = mm_strdup("integer");
+}
+| INTERVAL
+ {
+ $$ = mm_strdup("interval");
+}
+| LEAST
+ {
+ $$ = mm_strdup("least");
+}
+| NATIONAL
+ {
+ $$ = mm_strdup("national");
+}
+| NCHAR
+ {
+ $$ = mm_strdup("nchar");
+}
+| NONE
+ {
+ $$ = mm_strdup("none");
+}
+| NORMALIZE
+ {
+ $$ = mm_strdup("normalize");
+}
+| NULLIF
+ {
+ $$ = mm_strdup("nullif");
+}
+| NUMERIC
+ {
+ $$ = mm_strdup("numeric");
+}
+| OUT_P
+ {
+ $$ = mm_strdup("out");
+}
+| OVERLAY
+ {
+ $$ = mm_strdup("overlay");
+}
+| POSITION
+ {
+ $$ = mm_strdup("position");
+}
+| PRECISION
+ {
+ $$ = mm_strdup("precision");
+}
+| REAL
+ {
+ $$ = mm_strdup("real");
+}
+| ROW
+ {
+ $$ = mm_strdup("row");
+}
+| SETOF
+ {
+ $$ = mm_strdup("setof");
+}
+| SMALLINT
+ {
+ $$ = mm_strdup("smallint");
+}
+| SUBSTRING
+ {
+ $$ = mm_strdup("substring");
+}
+| TIME
+ {
+ $$ = mm_strdup("time");
+}
+| TIMESTAMP
+ {
+ $$ = mm_strdup("timestamp");
+}
+| TREAT
+ {
+ $$ = mm_strdup("treat");
+}
+| TRIM
+ {
+ $$ = mm_strdup("trim");
+}
+| VARCHAR
+ {
+ $$ = mm_strdup("varchar");
+}
+| XMLATTRIBUTES
+ {
+ $$ = mm_strdup("xmlattributes");
+}
+| XMLCONCAT
+ {
+ $$ = mm_strdup("xmlconcat");
+}
+| XMLELEMENT
+ {
+ $$ = mm_strdup("xmlelement");
+}
+| XMLEXISTS
+ {
+ $$ = mm_strdup("xmlexists");
+}
+| XMLFOREST
+ {
+ $$ = mm_strdup("xmlforest");
+}
+| XMLNAMESPACES
+ {
+ $$ = mm_strdup("xmlnamespaces");
+}
+| XMLPARSE
+ {
+ $$ = mm_strdup("xmlparse");
+}
+| XMLPI
+ {
+ $$ = mm_strdup("xmlpi");
+}
+| XMLROOT
+ {
+ $$ = mm_strdup("xmlroot");
+}
+| XMLSERIALIZE
+ {
+ $$ = mm_strdup("xmlserialize");
+}
+| XMLTABLE
+ {
+ $$ = mm_strdup("xmltable");
+}
+;
+
+
+ type_func_name_keyword:
+ AUTHORIZATION
+ {
+ $$ = mm_strdup("authorization");
+}
+| BINARY
+ {
+ $$ = mm_strdup("binary");
+}
+| COLLATION
+ {
+ $$ = mm_strdup("collation");
+}
+| CONCURRENTLY
+ {
+ $$ = mm_strdup("concurrently");
+}
+| CROSS
+ {
+ $$ = mm_strdup("cross");
+}
+| CURRENT_SCHEMA
+ {
+ $$ = mm_strdup("current_schema");
+}
+| FREEZE
+ {
+ $$ = mm_strdup("freeze");
+}
+| FULL
+ {
+ $$ = mm_strdup("full");
+}
+| ILIKE
+ {
+ $$ = mm_strdup("ilike");
+}
+| INNER_P
+ {
+ $$ = mm_strdup("inner");
+}
+| IS
+ {
+ $$ = mm_strdup("is");
+}
+| ISNULL
+ {
+ $$ = mm_strdup("isnull");
+}
+| JOIN
+ {
+ $$ = mm_strdup("join");
+}
+| LEFT
+ {
+ $$ = mm_strdup("left");
+}
+| LIKE
+ {
+ $$ = mm_strdup("like");
+}
+| NATURAL
+ {
+ $$ = mm_strdup("natural");
+}
+| NOTNULL
+ {
+ $$ = mm_strdup("notnull");
+}
+| OUTER_P
+ {
+ $$ = mm_strdup("outer");
+}
+| OVERLAPS
+ {
+ $$ = mm_strdup("overlaps");
+}
+| RIGHT
+ {
+ $$ = mm_strdup("right");
+}
+| SIMILAR
+ {
+ $$ = mm_strdup("similar");
+}
+| TABLESAMPLE
+ {
+ $$ = mm_strdup("tablesample");
+}
+| VERBOSE
+ {
+ $$ = mm_strdup("verbose");
+}
+;
+
+
+ reserved_keyword:
+ ALL
+ {
+ $$ = mm_strdup("all");
+}
+| ANALYSE
+ {
+ $$ = mm_strdup("analyse");
+}
+| ANALYZE
+ {
+ $$ = mm_strdup("analyze");
+}
+| AND
+ {
+ $$ = mm_strdup("and");
+}
+| ANY
+ {
+ $$ = mm_strdup("any");
+}
+| ARRAY
+ {
+ $$ = mm_strdup("array");
+}
+| AS
+ {
+ $$ = mm_strdup("as");
+}
+| ASC
+ {
+ $$ = mm_strdup("asc");
+}
+| ASYMMETRIC
+ {
+ $$ = mm_strdup("asymmetric");
+}
+| BOTH
+ {
+ $$ = mm_strdup("both");
+}
+| CASE
+ {
+ $$ = mm_strdup("case");
+}
+| CAST
+ {
+ $$ = mm_strdup("cast");
+}
+| CHECK
+ {
+ $$ = mm_strdup("check");
+}
+| COLLATE
+ {
+ $$ = mm_strdup("collate");
+}
+| COLUMN
+ {
+ $$ = mm_strdup("column");
+}
+| CONSTRAINT
+ {
+ $$ = mm_strdup("constraint");
+}
+| CREATE
+ {
+ $$ = mm_strdup("create");
+}
+| CURRENT_CATALOG
+ {
+ $$ = mm_strdup("current_catalog");
+}
+| CURRENT_DATE
+ {
+ $$ = mm_strdup("current_date");
+}
+| CURRENT_ROLE
+ {
+ $$ = mm_strdup("current_role");
+}
+| CURRENT_TIME
+ {
+ $$ = mm_strdup("current_time");
+}
+| CURRENT_TIMESTAMP
+ {
+ $$ = mm_strdup("current_timestamp");
+}
+| CURRENT_USER
+ {
+ $$ = mm_strdup("current_user");
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+| DEFERRABLE
+ {
+ $$ = mm_strdup("deferrable");
+}
+| DESC
+ {
+ $$ = mm_strdup("desc");
+}
+| DISTINCT
+ {
+ $$ = mm_strdup("distinct");
+}
+| DO
+ {
+ $$ = mm_strdup("do");
+}
+| ELSE
+ {
+ $$ = mm_strdup("else");
+}
+| END_P
+ {
+ $$ = mm_strdup("end");
+}
+| EXCEPT
+ {
+ $$ = mm_strdup("except");
+}
+| FALSE_P
+ {
+ $$ = mm_strdup("false");
+}
+| FETCH
+ {
+ $$ = mm_strdup("fetch");
+}
+| FOR
+ {
+ $$ = mm_strdup("for");
+}
+| FOREIGN
+ {
+ $$ = mm_strdup("foreign");
+}
+| FROM
+ {
+ $$ = mm_strdup("from");
+}
+| GRANT
+ {
+ $$ = mm_strdup("grant");
+}
+| GROUP_P
+ {
+ $$ = mm_strdup("group");
+}
+| HAVING
+ {
+ $$ = mm_strdup("having");
+}
+| IN_P
+ {
+ $$ = mm_strdup("in");
+}
+| INITIALLY
+ {
+ $$ = mm_strdup("initially");
+}
+| INTERSECT
+ {
+ $$ = mm_strdup("intersect");
+}
+| INTO
+ {
+ $$ = mm_strdup("into");
+}
+| LATERAL_P
+ {
+ $$ = mm_strdup("lateral");
+}
+| LEADING
+ {
+ $$ = mm_strdup("leading");
+}
+| LIMIT
+ {
+ $$ = mm_strdup("limit");
+}
+| LOCALTIME
+ {
+ $$ = mm_strdup("localtime");
+}
+| LOCALTIMESTAMP
+ {
+ $$ = mm_strdup("localtimestamp");
+}
+| NOT
+ {
+ $$ = mm_strdup("not");
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+| OFFSET
+ {
+ $$ = mm_strdup("offset");
+}
+| ON
+ {
+ $$ = mm_strdup("on");
+}
+| ONLY
+ {
+ $$ = mm_strdup("only");
+}
+| OR
+ {
+ $$ = mm_strdup("or");
+}
+| ORDER
+ {
+ $$ = mm_strdup("order");
+}
+| PLACING
+ {
+ $$ = mm_strdup("placing");
+}
+| PRIMARY
+ {
+ $$ = mm_strdup("primary");
+}
+| REFERENCES
+ {
+ $$ = mm_strdup("references");
+}
+| RETURNING
+ {
+ $$ = mm_strdup("returning");
+}
+| SELECT
+ {
+ $$ = mm_strdup("select");
+}
+| SESSION_USER
+ {
+ $$ = mm_strdup("session_user");
+}
+| SOME
+ {
+ $$ = mm_strdup("some");
+}
+| SYMMETRIC
+ {
+ $$ = mm_strdup("symmetric");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| THEN
+ {
+ $$ = mm_strdup("then");
+}
+| TRAILING
+ {
+ $$ = mm_strdup("trailing");
+}
+| TRUE_P
+ {
+ $$ = mm_strdup("true");
+}
+| UNIQUE
+ {
+ $$ = mm_strdup("unique");
+}
+| USER
+ {
+ $$ = mm_strdup("user");
+}
+| USING
+ {
+ $$ = mm_strdup("using");
+}
+| VARIADIC
+ {
+ $$ = mm_strdup("variadic");
+}
+| WHEN
+ {
+ $$ = mm_strdup("when");
+}
+| WHERE
+ {
+ $$ = mm_strdup("where");
+}
+| WINDOW
+ {
+ $$ = mm_strdup("window");
+}
+| WITH
+ {
+ $$ = mm_strdup("with");
+}
+;
+
+
+ bare_label_keyword:
+ ABORT_P
+ {
+ $$ = mm_strdup("abort");
+}
+| ABSOLUTE_P
+ {
+ $$ = mm_strdup("absolute");
+}
+| ACCESS
+ {
+ $$ = mm_strdup("access");
+}
+| ACTION
+ {
+ $$ = mm_strdup("action");
+}
+| ADD_P
+ {
+ $$ = mm_strdup("add");
+}
+| ADMIN
+ {
+ $$ = mm_strdup("admin");
+}
+| AFTER
+ {
+ $$ = mm_strdup("after");
+}
+| AGGREGATE
+ {
+ $$ = mm_strdup("aggregate");
+}
+| ALL
+ {
+ $$ = mm_strdup("all");
+}
+| ALSO
+ {
+ $$ = mm_strdup("also");
+}
+| ALTER
+ {
+ $$ = mm_strdup("alter");
+}
+| ALWAYS
+ {
+ $$ = mm_strdup("always");
+}
+| ANALYSE
+ {
+ $$ = mm_strdup("analyse");
+}
+| ANALYZE
+ {
+ $$ = mm_strdup("analyze");
+}
+| AND
+ {
+ $$ = mm_strdup("and");
+}
+| ANY
+ {
+ $$ = mm_strdup("any");
+}
+| ASC
+ {
+ $$ = mm_strdup("asc");
+}
+| ASENSITIVE
+ {
+ $$ = mm_strdup("asensitive");
+}
+| ASSERTION
+ {
+ $$ = mm_strdup("assertion");
+}
+| ASSIGNMENT
+ {
+ $$ = mm_strdup("assignment");
+}
+| ASYMMETRIC
+ {
+ $$ = mm_strdup("asymmetric");
+}
+| AT
+ {
+ $$ = mm_strdup("at");
+}
+| ATOMIC
+ {
+ $$ = mm_strdup("atomic");
+}
+| ATTACH
+ {
+ $$ = mm_strdup("attach");
+}
+| ATTRIBUTE
+ {
+ $$ = mm_strdup("attribute");
+}
+| AUTHORIZATION
+ {
+ $$ = mm_strdup("authorization");
+}
+| BACKWARD
+ {
+ $$ = mm_strdup("backward");
+}
+| BEFORE
+ {
+ $$ = mm_strdup("before");
+}
+| BEGIN_P
+ {
+ $$ = mm_strdup("begin");
+}
+| BETWEEN
+ {
+ $$ = mm_strdup("between");
+}
+| BIGINT
+ {
+ $$ = mm_strdup("bigint");
+}
+| BINARY
+ {
+ $$ = mm_strdup("binary");
+}
+| BIT
+ {
+ $$ = mm_strdup("bit");
+}
+| BOOLEAN_P
+ {
+ $$ = mm_strdup("boolean");
+}
+| BOTH
+ {
+ $$ = mm_strdup("both");
+}
+| BREADTH
+ {
+ $$ = mm_strdup("breadth");
+}
+| BY
+ {
+ $$ = mm_strdup("by");
+}
+| CACHE
+ {
+ $$ = mm_strdup("cache");
+}
+| CALL
+ {
+ $$ = mm_strdup("call");
+}
+| CALLED
+ {
+ $$ = mm_strdup("called");
+}
+| CASCADE
+ {
+ $$ = mm_strdup("cascade");
+}
+| CASCADED
+ {
+ $$ = mm_strdup("cascaded");
+}
+| CASE
+ {
+ $$ = mm_strdup("case");
+}
+| CAST
+ {
+ $$ = mm_strdup("cast");
+}
+| CATALOG_P
+ {
+ $$ = mm_strdup("catalog");
+}
+| CHAIN
+ {
+ $$ = mm_strdup("chain");
+}
+| CHARACTERISTICS
+ {
+ $$ = mm_strdup("characteristics");
+}
+| CHECK
+ {
+ $$ = mm_strdup("check");
+}
+| CHECKPOINT
+ {
+ $$ = mm_strdup("checkpoint");
+}
+| CLASS
+ {
+ $$ = mm_strdup("class");
+}
+| CLOSE
+ {
+ $$ = mm_strdup("close");
+}
+| CLUSTER
+ {
+ $$ = mm_strdup("cluster");
+}
+| COALESCE
+ {
+ $$ = mm_strdup("coalesce");
+}
+| COLLATE
+ {
+ $$ = mm_strdup("collate");
+}
+| COLLATION
+ {
+ $$ = mm_strdup("collation");
+}
+| COLUMN
+ {
+ $$ = mm_strdup("column");
+}
+| COLUMNS
+ {
+ $$ = mm_strdup("columns");
+}
+| COMMENT
+ {
+ $$ = mm_strdup("comment");
+}
+| COMMENTS
+ {
+ $$ = mm_strdup("comments");
+}
+| COMMIT
+ {
+ $$ = mm_strdup("commit");
+}
+| COMMITTED
+ {
+ $$ = mm_strdup("committed");
+}
+| COMPRESSION
+ {
+ $$ = mm_strdup("compression");
+}
+| CONCURRENTLY
+ {
+ $$ = mm_strdup("concurrently");
+}
+| CONFIGURATION
+ {
+ $$ = mm_strdup("configuration");
+}
+| CONFLICT
+ {
+ $$ = mm_strdup("conflict");
+}
+| CONNECTION
+ {
+ $$ = mm_strdup("connection");
+}
+| CONSTRAINT
+ {
+ $$ = mm_strdup("constraint");
+}
+| CONSTRAINTS
+ {
+ $$ = mm_strdup("constraints");
+}
+| CONTENT_P
+ {
+ $$ = mm_strdup("content");
+}
+| CONTINUE_P
+ {
+ $$ = mm_strdup("continue");
+}
+| CONVERSION_P
+ {
+ $$ = mm_strdup("conversion");
+}
+| COPY
+ {
+ $$ = mm_strdup("copy");
+}
+| COST
+ {
+ $$ = mm_strdup("cost");
+}
+| CROSS
+ {
+ $$ = mm_strdup("cross");
+}
+| CSV
+ {
+ $$ = mm_strdup("csv");
+}
+| CUBE
+ {
+ $$ = mm_strdup("cube");
+}
+| CURRENT_P
+ {
+ $$ = mm_strdup("current");
+}
+| CURRENT_CATALOG
+ {
+ $$ = mm_strdup("current_catalog");
+}
+| CURRENT_DATE
+ {
+ $$ = mm_strdup("current_date");
+}
+| CURRENT_ROLE
+ {
+ $$ = mm_strdup("current_role");
+}
+| CURRENT_SCHEMA
+ {
+ $$ = mm_strdup("current_schema");
+}
+| CURRENT_TIME
+ {
+ $$ = mm_strdup("current_time");
+}
+| CURRENT_TIMESTAMP
+ {
+ $$ = mm_strdup("current_timestamp");
+}
+| CURRENT_USER
+ {
+ $$ = mm_strdup("current_user");
+}
+| CURSOR
+ {
+ $$ = mm_strdup("cursor");
+}
+| CYCLE
+ {
+ $$ = mm_strdup("cycle");
+}
+| DATA_P
+ {
+ $$ = mm_strdup("data");
+}
+| DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+| DEALLOCATE
+ {
+ $$ = mm_strdup("deallocate");
+}
+| DEC
+ {
+ $$ = mm_strdup("dec");
+}
+| DECIMAL_P
+ {
+ $$ = mm_strdup("decimal");
+}
+| DECLARE
+ {
+ $$ = mm_strdup("declare");
+}
+| DEFAULT
+ {
+ $$ = mm_strdup("default");
+}
+| DEFAULTS
+ {
+ $$ = mm_strdup("defaults");
+}
+| DEFERRABLE
+ {
+ $$ = mm_strdup("deferrable");
+}
+| DEFERRED
+ {
+ $$ = mm_strdup("deferred");
+}
+| DEFINER
+ {
+ $$ = mm_strdup("definer");
+}
+| DELETE_P
+ {
+ $$ = mm_strdup("delete");
+}
+| DELIMITER
+ {
+ $$ = mm_strdup("delimiter");
+}
+| DELIMITERS
+ {
+ $$ = mm_strdup("delimiters");
+}
+| DEPENDS
+ {
+ $$ = mm_strdup("depends");
+}
+| DEPTH
+ {
+ $$ = mm_strdup("depth");
+}
+| DESC
+ {
+ $$ = mm_strdup("desc");
+}
+| DETACH
+ {
+ $$ = mm_strdup("detach");
+}
+| DICTIONARY
+ {
+ $$ = mm_strdup("dictionary");
+}
+| DISABLE_P
+ {
+ $$ = mm_strdup("disable");
+}
+| DISCARD
+ {
+ $$ = mm_strdup("discard");
+}
+| DISTINCT
+ {
+ $$ = mm_strdup("distinct");
+}
+| DO
+ {
+ $$ = mm_strdup("do");
+}
+| DOCUMENT_P
+ {
+ $$ = mm_strdup("document");
+}
+| DOMAIN_P
+ {
+ $$ = mm_strdup("domain");
+}
+| DOUBLE_P
+ {
+ $$ = mm_strdup("double");
+}
+| DROP
+ {
+ $$ = mm_strdup("drop");
+}
+| EACH
+ {
+ $$ = mm_strdup("each");
+}
+| ELSE
+ {
+ $$ = mm_strdup("else");
+}
+| ENABLE_P
+ {
+ $$ = mm_strdup("enable");
+}
+| ENCODING
+ {
+ $$ = mm_strdup("encoding");
+}
+| ENCRYPTED
+ {
+ $$ = mm_strdup("encrypted");
+}
+| END_P
+ {
+ $$ = mm_strdup("end");
+}
+| ENUM_P
+ {
+ $$ = mm_strdup("enum");
+}
+| ESCAPE
+ {
+ $$ = mm_strdup("escape");
+}
+| EVENT
+ {
+ $$ = mm_strdup("event");
+}
+| EXCLUDE
+ {
+ $$ = mm_strdup("exclude");
+}
+| EXCLUDING
+ {
+ $$ = mm_strdup("excluding");
+}
+| EXCLUSIVE
+ {
+ $$ = mm_strdup("exclusive");
+}
+| EXECUTE
+ {
+ $$ = mm_strdup("execute");
+}
+| EXISTS
+ {
+ $$ = mm_strdup("exists");
+}
+| EXPLAIN
+ {
+ $$ = mm_strdup("explain");
+}
+| EXPRESSION
+ {
+ $$ = mm_strdup("expression");
+}
+| EXTENSION
+ {
+ $$ = mm_strdup("extension");
+}
+| EXTERNAL
+ {
+ $$ = mm_strdup("external");
+}
+| EXTRACT
+ {
+ $$ = mm_strdup("extract");
+}
+| FALSE_P
+ {
+ $$ = mm_strdup("false");
+}
+| FAMILY
+ {
+ $$ = mm_strdup("family");
+}
+| FINALIZE
+ {
+ $$ = mm_strdup("finalize");
+}
+| FIRST_P
+ {
+ $$ = mm_strdup("first");
+}
+| FLOAT_P
+ {
+ $$ = mm_strdup("float");
+}
+| FOLLOWING
+ {
+ $$ = mm_strdup("following");
+}
+| FORCE
+ {
+ $$ = mm_strdup("force");
+}
+| FOREIGN
+ {
+ $$ = mm_strdup("foreign");
+}
+| FORWARD
+ {
+ $$ = mm_strdup("forward");
+}
+| FREEZE
+ {
+ $$ = mm_strdup("freeze");
+}
+| FULL
+ {
+ $$ = mm_strdup("full");
+}
+| FUNCTION
+ {
+ $$ = mm_strdup("function");
+}
+| FUNCTIONS
+ {
+ $$ = mm_strdup("functions");
+}
+| GENERATED
+ {
+ $$ = mm_strdup("generated");
+}
+| GLOBAL
+ {
+ $$ = mm_strdup("global");
+}
+| GRANTED
+ {
+ $$ = mm_strdup("granted");
+}
+| GREATEST
+ {
+ $$ = mm_strdup("greatest");
+}
+| GROUPING
+ {
+ $$ = mm_strdup("grouping");
+}
+| GROUPS
+ {
+ $$ = mm_strdup("groups");
+}
+| HANDLER
+ {
+ $$ = mm_strdup("handler");
+}
+| HEADER_P
+ {
+ $$ = mm_strdup("header");
+}
+| HOLD
+ {
+ $$ = mm_strdup("hold");
+}
+| IDENTITY_P
+ {
+ $$ = mm_strdup("identity");
+}
+| IF_P
+ {
+ $$ = mm_strdup("if");
+}
+| ILIKE
+ {
+ $$ = mm_strdup("ilike");
+}
+| IMMEDIATE
+ {
+ $$ = mm_strdup("immediate");
+}
+| IMMUTABLE
+ {
+ $$ = mm_strdup("immutable");
+}
+| IMPLICIT_P
+ {
+ $$ = mm_strdup("implicit");
+}
+| IMPORT_P
+ {
+ $$ = mm_strdup("import");
+}
+| IN_P
+ {
+ $$ = mm_strdup("in");
+}
+| INCLUDE
+ {
+ $$ = mm_strdup("include");
+}
+| INCLUDING
+ {
+ $$ = mm_strdup("including");
+}
+| INCREMENT
+ {
+ $$ = mm_strdup("increment");
+}
+| INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| INDEXES
+ {
+ $$ = mm_strdup("indexes");
+}
+| INHERIT
+ {
+ $$ = mm_strdup("inherit");
+}
+| INHERITS
+ {
+ $$ = mm_strdup("inherits");
+}
+| INITIALLY
+ {
+ $$ = mm_strdup("initially");
+}
+| INLINE_P
+ {
+ $$ = mm_strdup("inline");
+}
+| INNER_P
+ {
+ $$ = mm_strdup("inner");
+}
+| INOUT
+ {
+ $$ = mm_strdup("inout");
+}
+| INPUT_P
+ {
+ $$ = mm_strdup("input");
+}
+| INSENSITIVE
+ {
+ $$ = mm_strdup("insensitive");
+}
+| INSERT
+ {
+ $$ = mm_strdup("insert");
+}
+| INSTEAD
+ {
+ $$ = mm_strdup("instead");
+}
+| INT_P
+ {
+ $$ = mm_strdup("int");
+}
+| INTEGER
+ {
+ $$ = mm_strdup("integer");
+}
+| INTERVAL
+ {
+ $$ = mm_strdup("interval");
+}
+| INVOKER
+ {
+ $$ = mm_strdup("invoker");
+}
+| IS
+ {
+ $$ = mm_strdup("is");
+}
+| ISOLATION
+ {
+ $$ = mm_strdup("isolation");
+}
+| JOIN
+ {
+ $$ = mm_strdup("join");
+}
+| KEY
+ {
+ $$ = mm_strdup("key");
+}
+| LABEL
+ {
+ $$ = mm_strdup("label");
+}
+| LANGUAGE
+ {
+ $$ = mm_strdup("language");
+}
+| LARGE_P
+ {
+ $$ = mm_strdup("large");
+}
+| LAST_P
+ {
+ $$ = mm_strdup("last");
+}
+| LATERAL_P
+ {
+ $$ = mm_strdup("lateral");
+}
+| LEADING
+ {
+ $$ = mm_strdup("leading");
+}
+| LEAKPROOF
+ {
+ $$ = mm_strdup("leakproof");
+}
+| LEAST
+ {
+ $$ = mm_strdup("least");
+}
+| LEFT
+ {
+ $$ = mm_strdup("left");
+}
+| LEVEL
+ {
+ $$ = mm_strdup("level");
+}
+| LIKE
+ {
+ $$ = mm_strdup("like");
+}
+| LISTEN
+ {
+ $$ = mm_strdup("listen");
+}
+| LOAD
+ {
+ $$ = mm_strdup("load");
+}
+| LOCAL
+ {
+ $$ = mm_strdup("local");
+}
+| LOCALTIME
+ {
+ $$ = mm_strdup("localtime");
+}
+| LOCALTIMESTAMP
+ {
+ $$ = mm_strdup("localtimestamp");
+}
+| LOCATION
+ {
+ $$ = mm_strdup("location");
+}
+| LOCK_P
+ {
+ $$ = mm_strdup("lock");
+}
+| LOCKED
+ {
+ $$ = mm_strdup("locked");
+}
+| LOGGED
+ {
+ $$ = mm_strdup("logged");
+}
+| MAPPING
+ {
+ $$ = mm_strdup("mapping");
+}
+| MATCH
+ {
+ $$ = mm_strdup("match");
+}
+| MATERIALIZED
+ {
+ $$ = mm_strdup("materialized");
+}
+| MAXVALUE
+ {
+ $$ = mm_strdup("maxvalue");
+}
+| METHOD
+ {
+ $$ = mm_strdup("method");
+}
+| MINVALUE
+ {
+ $$ = mm_strdup("minvalue");
+}
+| MODE
+ {
+ $$ = mm_strdup("mode");
+}
+| MOVE
+ {
+ $$ = mm_strdup("move");
+}
+| NAME_P
+ {
+ $$ = mm_strdup("name");
+}
+| NAMES
+ {
+ $$ = mm_strdup("names");
+}
+| NATIONAL
+ {
+ $$ = mm_strdup("national");
+}
+| NATURAL
+ {
+ $$ = mm_strdup("natural");
+}
+| NCHAR
+ {
+ $$ = mm_strdup("nchar");
+}
+| NEW
+ {
+ $$ = mm_strdup("new");
+}
+| NEXT
+ {
+ $$ = mm_strdup("next");
+}
+| NFC
+ {
+ $$ = mm_strdup("nfc");
+}
+| NFD
+ {
+ $$ = mm_strdup("nfd");
+}
+| NFKC
+ {
+ $$ = mm_strdup("nfkc");
+}
+| NFKD
+ {
+ $$ = mm_strdup("nfkd");
+}
+| NO
+ {
+ $$ = mm_strdup("no");
+}
+| NONE
+ {
+ $$ = mm_strdup("none");
+}
+| NORMALIZE
+ {
+ $$ = mm_strdup("normalize");
+}
+| NORMALIZED
+ {
+ $$ = mm_strdup("normalized");
+}
+| NOT
+ {
+ $$ = mm_strdup("not");
+}
+| NOTHING
+ {
+ $$ = mm_strdup("nothing");
+}
+| NOTIFY
+ {
+ $$ = mm_strdup("notify");
+}
+| NOWAIT
+ {
+ $$ = mm_strdup("nowait");
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+| NULLIF
+ {
+ $$ = mm_strdup("nullif");
+}
+| NULLS_P
+ {
+ $$ = mm_strdup("nulls");
+}
+| NUMERIC
+ {
+ $$ = mm_strdup("numeric");
+}
+| OBJECT_P
+ {
+ $$ = mm_strdup("object");
+}
+| OF
+ {
+ $$ = mm_strdup("of");
+}
+| OFF
+ {
+ $$ = mm_strdup("off");
+}
+| OIDS
+ {
+ $$ = mm_strdup("oids");
+}
+| OLD
+ {
+ $$ = mm_strdup("old");
+}
+| ONLY
+ {
+ $$ = mm_strdup("only");
+}
+| OPERATOR
+ {
+ $$ = mm_strdup("operator");
+}
+| OPTION
+ {
+ $$ = mm_strdup("option");
+}
+| OPTIONS
+ {
+ $$ = mm_strdup("options");
+}
+| OR
+ {
+ $$ = mm_strdup("or");
+}
+| ORDINALITY
+ {
+ $$ = mm_strdup("ordinality");
+}
+| OTHERS
+ {
+ $$ = mm_strdup("others");
+}
+| OUT_P
+ {
+ $$ = mm_strdup("out");
+}
+| OUTER_P
+ {
+ $$ = mm_strdup("outer");
+}
+| OVERLAY
+ {
+ $$ = mm_strdup("overlay");
+}
+| OVERRIDING
+ {
+ $$ = mm_strdup("overriding");
+}
+| OWNED
+ {
+ $$ = mm_strdup("owned");
+}
+| OWNER
+ {
+ $$ = mm_strdup("owner");
+}
+| PARALLEL
+ {
+ $$ = mm_strdup("parallel");
+}
+| PARSER
+ {
+ $$ = mm_strdup("parser");
+}
+| PARTIAL
+ {
+ $$ = mm_strdup("partial");
+}
+| PARTITION
+ {
+ $$ = mm_strdup("partition");
+}
+| PASSING
+ {
+ $$ = mm_strdup("passing");
+}
+| PASSWORD
+ {
+ $$ = mm_strdup("password");
+}
+| PLACING
+ {
+ $$ = mm_strdup("placing");
+}
+| PLANS
+ {
+ $$ = mm_strdup("plans");
+}
+| POLICY
+ {
+ $$ = mm_strdup("policy");
+}
+| POSITION
+ {
+ $$ = mm_strdup("position");
+}
+| PRECEDING
+ {
+ $$ = mm_strdup("preceding");
+}
+| PREPARE
+ {
+ $$ = mm_strdup("prepare");
+}
+| PREPARED
+ {
+ $$ = mm_strdup("prepared");
+}
+| PRESERVE
+ {
+ $$ = mm_strdup("preserve");
+}
+| PRIMARY
+ {
+ $$ = mm_strdup("primary");
+}
+| PRIOR
+ {
+ $$ = mm_strdup("prior");
+}
+| PRIVILEGES
+ {
+ $$ = mm_strdup("privileges");
+}
+| PROCEDURAL
+ {
+ $$ = mm_strdup("procedural");
+}
+| PROCEDURE
+ {
+ $$ = mm_strdup("procedure");
+}
+| PROCEDURES
+ {
+ $$ = mm_strdup("procedures");
+}
+| PROGRAM
+ {
+ $$ = mm_strdup("program");
+}
+| PUBLICATION
+ {
+ $$ = mm_strdup("publication");
+}
+| QUOTE
+ {
+ $$ = mm_strdup("quote");
+}
+| RANGE
+ {
+ $$ = mm_strdup("range");
+}
+| READ
+ {
+ $$ = mm_strdup("read");
+}
+| REAL
+ {
+ $$ = mm_strdup("real");
+}
+| REASSIGN
+ {
+ $$ = mm_strdup("reassign");
+}
+| RECHECK
+ {
+ $$ = mm_strdup("recheck");
+}
+| RECURSIVE
+ {
+ $$ = mm_strdup("recursive");
+}
+| REF
+ {
+ $$ = mm_strdup("ref");
+}
+| REFERENCES
+ {
+ $$ = mm_strdup("references");
+}
+| REFERENCING
+ {
+ $$ = mm_strdup("referencing");
+}
+| REFRESH
+ {
+ $$ = mm_strdup("refresh");
+}
+| REINDEX
+ {
+ $$ = mm_strdup("reindex");
+}
+| RELATIVE_P
+ {
+ $$ = mm_strdup("relative");
+}
+| RELEASE
+ {
+ $$ = mm_strdup("release");
+}
+| RENAME
+ {
+ $$ = mm_strdup("rename");
+}
+| REPEATABLE
+ {
+ $$ = mm_strdup("repeatable");
+}
+| REPLACE
+ {
+ $$ = mm_strdup("replace");
+}
+| REPLICA
+ {
+ $$ = mm_strdup("replica");
+}
+| RESET
+ {
+ $$ = mm_strdup("reset");
+}
+| RESTART
+ {
+ $$ = mm_strdup("restart");
+}
+| RESTRICT
+ {
+ $$ = mm_strdup("restrict");
+}
+| RETURN
+ {
+ $$ = mm_strdup("return");
+}
+| RETURNS
+ {
+ $$ = mm_strdup("returns");
+}
+| REVOKE
+ {
+ $$ = mm_strdup("revoke");
+}
+| RIGHT
+ {
+ $$ = mm_strdup("right");
+}
+| ROLE
+ {
+ $$ = mm_strdup("role");
+}
+| ROLLBACK
+ {
+ $$ = mm_strdup("rollback");
+}
+| ROLLUP
+ {
+ $$ = mm_strdup("rollup");
+}
+| ROUTINE
+ {
+ $$ = mm_strdup("routine");
+}
+| ROUTINES
+ {
+ $$ = mm_strdup("routines");
+}
+| ROW
+ {
+ $$ = mm_strdup("row");
+}
+| ROWS
+ {
+ $$ = mm_strdup("rows");
+}
+| RULE
+ {
+ $$ = mm_strdup("rule");
+}
+| SAVEPOINT
+ {
+ $$ = mm_strdup("savepoint");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SCHEMAS
+ {
+ $$ = mm_strdup("schemas");
+}
+| SCROLL
+ {
+ $$ = mm_strdup("scroll");
+}
+| SEARCH
+ {
+ $$ = mm_strdup("search");
+}
+| SECURITY
+ {
+ $$ = mm_strdup("security");
+}
+| SELECT
+ {
+ $$ = mm_strdup("select");
+}
+| SEQUENCE
+ {
+ $$ = mm_strdup("sequence");
+}
+| SEQUENCES
+ {
+ $$ = mm_strdup("sequences");
+}
+| SERIALIZABLE
+ {
+ $$ = mm_strdup("serializable");
+}
+| SERVER
+ {
+ $$ = mm_strdup("server");
+}
+| SESSION
+ {
+ $$ = mm_strdup("session");
+}
+| SESSION_USER
+ {
+ $$ = mm_strdup("session_user");
+}
+| SET
+ {
+ $$ = mm_strdup("set");
+}
+| SETOF
+ {
+ $$ = mm_strdup("setof");
+}
+| SETS
+ {
+ $$ = mm_strdup("sets");
+}
+| SHARE
+ {
+ $$ = mm_strdup("share");
+}
+| SHOW
+ {
+ $$ = mm_strdup("show");
+}
+| SIMILAR
+ {
+ $$ = mm_strdup("similar");
+}
+| SIMPLE
+ {
+ $$ = mm_strdup("simple");
+}
+| SKIP
+ {
+ $$ = mm_strdup("skip");
+}
+| SMALLINT
+ {
+ $$ = mm_strdup("smallint");
+}
+| SNAPSHOT
+ {
+ $$ = mm_strdup("snapshot");
+}
+| SOME
+ {
+ $$ = mm_strdup("some");
+}
+| SQL_P
+ {
+ $$ = mm_strdup("sql");
+}
+| STABLE
+ {
+ $$ = mm_strdup("stable");
+}
+| STANDALONE_P
+ {
+ $$ = mm_strdup("standalone");
+}
+| START
+ {
+ $$ = mm_strdup("start");
+}
+| STATEMENT
+ {
+ $$ = mm_strdup("statement");
+}
+| STATISTICS
+ {
+ $$ = mm_strdup("statistics");
+}
+| STDIN
+ {
+ $$ = mm_strdup("stdin");
+}
+| STDOUT
+ {
+ $$ = mm_strdup("stdout");
+}
+| STORAGE
+ {
+ $$ = mm_strdup("storage");
+}
+| STORED
+ {
+ $$ = mm_strdup("stored");
+}
+| STRICT_P
+ {
+ $$ = mm_strdup("strict");
+}
+| STRIP_P
+ {
+ $$ = mm_strdup("strip");
+}
+| SUBSCRIPTION
+ {
+ $$ = mm_strdup("subscription");
+}
+| SUBSTRING
+ {
+ $$ = mm_strdup("substring");
+}
+| SUPPORT
+ {
+ $$ = mm_strdup("support");
+}
+| SYMMETRIC
+ {
+ $$ = mm_strdup("symmetric");
+}
+| SYSID
+ {
+ $$ = mm_strdup("sysid");
+}
+| SYSTEM_P
+ {
+ $$ = mm_strdup("system");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| TABLES
+ {
+ $$ = mm_strdup("tables");
+}
+| TABLESAMPLE
+ {
+ $$ = mm_strdup("tablesample");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+| TEMP
+ {
+ $$ = mm_strdup("temp");
+}
+| TEMPLATE
+ {
+ $$ = mm_strdup("template");
+}
+| TEMPORARY
+ {
+ $$ = mm_strdup("temporary");
+}
+| TEXT_P
+ {
+ $$ = mm_strdup("text");
+}
+| THEN
+ {
+ $$ = mm_strdup("then");
+}
+| TIES
+ {
+ $$ = mm_strdup("ties");
+}
+| TIME
+ {
+ $$ = mm_strdup("time");
+}
+| TIMESTAMP
+ {
+ $$ = mm_strdup("timestamp");
+}
+| TRAILING
+ {
+ $$ = mm_strdup("trailing");
+}
+| TRANSACTION
+ {
+ $$ = mm_strdup("transaction");
+}
+| TRANSFORM
+ {
+ $$ = mm_strdup("transform");
+}
+| TREAT
+ {
+ $$ = mm_strdup("treat");
+}
+| TRIGGER
+ {
+ $$ = mm_strdup("trigger");
+}
+| TRIM
+ {
+ $$ = mm_strdup("trim");
+}
+| TRUE_P
+ {
+ $$ = mm_strdup("true");
+}
+| TRUNCATE
+ {
+ $$ = mm_strdup("truncate");
+}
+| TRUSTED
+ {
+ $$ = mm_strdup("trusted");
+}
+| TYPE_P
+ {
+ $$ = mm_strdup("type");
+}
+| TYPES_P
+ {
+ $$ = mm_strdup("types");
+}
+| UESCAPE
+ {
+ $$ = mm_strdup("uescape");
+}
+| UNBOUNDED
+ {
+ $$ = mm_strdup("unbounded");
+}
+| UNCOMMITTED
+ {
+ $$ = mm_strdup("uncommitted");
+}
+| UNENCRYPTED
+ {
+ $$ = mm_strdup("unencrypted");
+}
+| UNIQUE
+ {
+ $$ = mm_strdup("unique");
+}
+| UNKNOWN
+ {
+ $$ = mm_strdup("unknown");
+}
+| UNLISTEN
+ {
+ $$ = mm_strdup("unlisten");
+}
+| UNLOGGED
+ {
+ $$ = mm_strdup("unlogged");
+}
+| UNTIL
+ {
+ $$ = mm_strdup("until");
+}
+| UPDATE
+ {
+ $$ = mm_strdup("update");
+}
+| USER
+ {
+ $$ = mm_strdup("user");
+}
+| USING
+ {
+ $$ = mm_strdup("using");
+}
+| VACUUM
+ {
+ $$ = mm_strdup("vacuum");
+}
+| VALID
+ {
+ $$ = mm_strdup("valid");
+}
+| VALIDATE
+ {
+ $$ = mm_strdup("validate");
+}
+| VALIDATOR
+ {
+ $$ = mm_strdup("validator");
+}
+| VALUE_P
+ {
+ $$ = mm_strdup("value");
+}
+| VALUES
+ {
+ $$ = mm_strdup("values");
+}
+| VARCHAR
+ {
+ $$ = mm_strdup("varchar");
+}
+| VARIADIC
+ {
+ $$ = mm_strdup("variadic");
+}
+| VERBOSE
+ {
+ $$ = mm_strdup("verbose");
+}
+| VERSION_P
+ {
+ $$ = mm_strdup("version");
+}
+| VIEW
+ {
+ $$ = mm_strdup("view");
+}
+| VIEWS
+ {
+ $$ = mm_strdup("views");
+}
+| VOLATILE
+ {
+ $$ = mm_strdup("volatile");
+}
+| WHEN
+ {
+ $$ = mm_strdup("when");
+}
+| WHITESPACE_P
+ {
+ $$ = mm_strdup("whitespace");
+}
+| WORK
+ {
+ $$ = mm_strdup("work");
+}
+| WRAPPER
+ {
+ $$ = mm_strdup("wrapper");
+}
+| WRITE
+ {
+ $$ = mm_strdup("write");
+}
+| XML_P
+ {
+ $$ = mm_strdup("xml");
+}
+| XMLATTRIBUTES
+ {
+ $$ = mm_strdup("xmlattributes");
+}
+| XMLCONCAT
+ {
+ $$ = mm_strdup("xmlconcat");
+}
+| XMLELEMENT
+ {
+ $$ = mm_strdup("xmlelement");
+}
+| XMLEXISTS
+ {
+ $$ = mm_strdup("xmlexists");
+}
+| XMLFOREST
+ {
+ $$ = mm_strdup("xmlforest");
+}
+| XMLNAMESPACES
+ {
+ $$ = mm_strdup("xmlnamespaces");
+}
+| XMLPARSE
+ {
+ $$ = mm_strdup("xmlparse");
+}
+| XMLPI
+ {
+ $$ = mm_strdup("xmlpi");
+}
+| XMLROOT
+ {
+ $$ = mm_strdup("xmlroot");
+}
+| XMLSERIALIZE
+ {
+ $$ = mm_strdup("xmlserialize");
+}
+| XMLTABLE
+ {
+ $$ = mm_strdup("xmltable");
+}
+| YES_P
+ {
+ $$ = mm_strdup("yes");
+}
+| ZONE
+ {
+ $$ = mm_strdup("zone");
+}
+;
+
+
+/* trailer */
+/* src/interfaces/ecpg/preproc/ecpg.trailer */
+
+statements: /*EMPTY*/
+ | statements statement
+ ;
+
+statement: ecpgstart at toplevel_stmt ';'
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+ | ecpgstart toplevel_stmt ';'
+ {
+ if (connection)
+ free(connection);
+ connection = NULL;
+ }
+ | ecpgstart ECPGVarDeclaration
+ {
+ fprintf(base_yyout, "%s", $2);
+ free($2);
+ output_line_number();
+ }
+ | ECPGDeclaration
+ | c_thing { fprintf(base_yyout, "%s", $1); free($1); }
+ | CPP_LINE { fprintf(base_yyout, "%s", $1); free($1); }
+ | '{' { braces_open++; fputs("{", base_yyout); }
+ | '}'
+ {
+ remove_typedefs(braces_open);
+ remove_variables(braces_open--);
+ if (braces_open == 0)
+ {
+ free(current_function);
+ current_function = NULL;
+ }
+ fputs("}", base_yyout);
+ }
+ ;
+
+CreateAsStmt: CREATE OptTemp TABLE create_as_target AS {FoundInto = 0;} SelectStmt opt_with_data
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ $$ = cat_str(7, mm_strdup("create"), $2, mm_strdup("table"), $4, mm_strdup("as"), $7, $8);
+ }
+ | CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS {FoundInto = 0;} SelectStmt opt_with_data
+ {
+ if (FoundInto == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE AS cannot specify INTO");
+
+ $$ = cat_str(7, mm_strdup("create"), $2, mm_strdup("table if not exists"), $7, mm_strdup("as"), $10, $11);
+ }
+ ;
+
+at: AT connection_object
+ {
+ connection = $2;
+ /*
+ * Do we have a variable as connection target? Remove the variable
+ * from the variable list or else it will be used twice.
+ */
+ if (argsinsert != NULL)
+ argsinsert = NULL;
+ }
+ ;
+
+/*
+ * the exec sql connect statement: connect to the given database
+ */
+ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user
+ { $$ = cat_str(5, $3, mm_strdup(","), $5, mm_strdup(","), $4); }
+ | SQL_CONNECT TO DEFAULT
+ { $$ = mm_strdup("NULL, NULL, NULL, \"DEFAULT\""); }
+ /* also allow ORACLE syntax */
+ | SQL_CONNECT ora_user
+ { $$ = cat_str(3, mm_strdup("NULL,"), $2, mm_strdup(", NULL")); }
+ | DATABASE connection_target
+ { $$ = cat2_str($2, mm_strdup(", NULL, NULL, NULL")); }
+ ;
+
+connection_target: opt_database_name opt_server opt_port
+ {
+ /* old style: dbname[@server][:port] */
+ if (strlen($2) > 0 && *($2) != '@')
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\", found \"%s\"", $2);
+
+ /* C strings need to be handled differently */
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), make3_str($1, $2, $3), mm_strdup("\""));
+ }
+ | db_prefix ':' server opt_port '/' opt_database_name opt_options
+ {
+ /* new style: <tcp|unix>:postgresql://server[:port][/dbname] */
+ if (strncmp($1, "unix:postgresql", strlen("unix:postgresql")) != 0 && strncmp($1, "tcp:postgresql", strlen("tcp:postgresql")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported");
+
+ if (strncmp($3, "//", strlen("//")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"://\", found \"%s\"", $3);
+
+ if (strncmp($1, "unix", strlen("unix")) == 0 &&
+ strncmp($3 + strlen("//"), "localhost", strlen("localhost")) != 0 &&
+ strncmp($3 + strlen("//"), "127.0.0.1", strlen("127.0.0.1")) != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "Unix-domain sockets only work on \"localhost\" but not on \"%s\"", $3 + strlen("//"));
+
+ $$ = make3_str(make3_str(mm_strdup("\""), $1, mm_strdup(":")), $3, make3_str(make3_str($4, mm_strdup("/"), $6), $7, mm_strdup("\"")));
+ }
+ | char_variable
+ {
+ $$ = $1;
+ }
+ | ecpg_sconst
+ {
+ /* We can only process double quoted strings not single quotes ones,
+ * so we change the quotes.
+ * Note, that the rule for ecpg_sconst adds these single quotes. */
+ $1[0] = '\"';
+ $1[strlen($1)-1] = '\"';
+ $$ = $1;
+ }
+ ;
+
+opt_database_name: name { $$ = $1; }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+db_prefix: ecpg_ident cvariable
+ {
+ if (strcmp($2, "postgresql") != 0 && strcmp($2, "postgres") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"postgresql\", found \"%s\"", $2);
+
+ if (strcmp($1, "tcp") != 0 && strcmp($1, "unix") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid connection type: %s", $1);
+
+ $$ = make3_str($1, mm_strdup(":"), $2);
+ }
+ ;
+
+server: Op server_name
+ {
+ if (strcmp($1, "@") != 0 && strcmp($1, "//") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\" or \"://\", found \"%s\"", $1);
+
+ $$ = make2_str($1, $2);
+ }
+ ;
+
+opt_server: server { $$ = $1; }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+server_name: ColId { $$ = $1; }
+ | ColId '.' server_name { $$ = make3_str($1, mm_strdup("."), $3); }
+ | IP { $$ = make_name(); }
+ ;
+
+opt_port: ':' Iconst { $$ = make2_str(mm_strdup(":"), $2); }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+opt_connection_name: AS connection_object { $$ = $2; }
+ | /*EMPTY*/ { $$ = mm_strdup("NULL"); }
+ ;
+
+opt_user: USER ora_user { $$ = $2; }
+ | /*EMPTY*/ { $$ = mm_strdup("NULL, NULL"); }
+ ;
+
+ora_user: user_name
+ { $$ = cat2_str($1, mm_strdup(", NULL")); }
+ | user_name '/' user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ | user_name SQL_IDENTIFIED BY user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $4); }
+ | user_name USING user_name
+ { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ ;
+
+user_name: RoleId
+ {
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ | ecpg_sconst
+ {
+ if ($1[0] == '\"')
+ $$ = $1;
+ else
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ | civar
+ {
+ enum ECPGttype type = argsinsert->variable->type->type;
+
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = argsinsert->variable->type->u.element->type;
+
+ /* handle varchars */
+ if (type == ECPGt_varchar)
+ $$ = make2_str(mm_strdup(argsinsert->variable->name), mm_strdup(".arr"));
+ else
+ $$ = mm_strdup(argsinsert->variable->name);
+ }
+ ;
+
+char_variable: cvariable
+ {
+ /* check if we have a string variable */
+ struct variable *p = find_variable($1);
+ enum ECPGttype type = p->type->type;
+
+ /* If we have just one character this is not a string */
+ if (atol(p->type->size) == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ else
+ {
+ /* if array see what's inside */
+ if (type == ECPGt_array)
+ type = p->type->u.element->type;
+
+ switch (type)
+ {
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ $$ = $1;
+ break;
+ case ECPGt_varchar:
+ $$ = make2_str($1, mm_strdup(".arr"));
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid data type");
+ $$ = $1;
+ break;
+ }
+ }
+ }
+ ;
+
+opt_options: Op connect_options
+ {
+ if (strlen($1) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp($1, "?") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $1);
+
+ $$ = make2_str(mm_strdup("?"), $2);
+ }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+connect_options: ColId opt_opt_value
+ {
+ $$ = make2_str($1, $2);
+ }
+ | ColId opt_opt_value Op connect_options
+ {
+ if (strlen($3) == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement");
+
+ if (strcmp($3, "&") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $3);
+
+ $$ = cat_str(3, make2_str($1, $2), $3, $4);
+ }
+ ;
+
+opt_opt_value: /*EMPTY*/
+ { $$ = EMPTY; }
+ | '=' Iconst
+ { $$ = make2_str(mm_strdup("="), $2); }
+ | '=' ecpg_ident
+ { $$ = make2_str(mm_strdup("="), $2); }
+ | '=' civar
+ { $$ = make2_str(mm_strdup("="), $2); }
+ ;
+
+prepared_name: name
+ {
+ if ($1[0] == '\"' && $1[strlen($1)-1] == '\"') /* already quoted? */
+ $$ = $1;
+ else /* not quoted => convert to lowercase */
+ {
+ size_t i;
+
+ for (i = 0; i< strlen($1); i++)
+ $1[i] = tolower((unsigned char) $1[i]);
+
+ $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\""));
+ }
+ }
+ | char_variable { $$ = $1; }
+ ;
+
+/*
+ * Declare Statement
+ */
+ECPGDeclareStmt: DECLARE prepared_name STATEMENT
+ {
+ struct declared_list *ptr = NULL;
+ /* Check whether the declared name has been defined or not */
+ for (ptr = g_declared_list; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp($2, ptr->name) == 0)
+ {
+ /* re-definition is not allowed */
+ mmerror(PARSE_ERROR, ET_ERROR, "name \"%s\" is already declared", ptr->name);
+ }
+ }
+
+ /* Add a new declared name into the g_declared_list */
+ ptr = NULL;
+ ptr = (struct declared_list *)mm_alloc(sizeof(struct declared_list));
+ if (ptr)
+ {
+ /* initial definition */
+ ptr -> name = $2;
+ if (connection)
+ ptr -> connection = mm_strdup(connection);
+ else
+ ptr -> connection = NULL;
+
+ ptr -> next = g_declared_list;
+ g_declared_list = ptr;
+ }
+
+ $$ = cat_str(3 , mm_strdup("/* declare "), mm_strdup($2), mm_strdup(" as an SQL identifier */"));
+ }
+;
+
+/*
+ * Declare a prepared cursor. The syntax is different from the standard
+ * declare statement, so we create a new rule.
+ */
+ECPGCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR prepared_name
+ {
+ struct cursor *ptr, *this;
+ char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
+ int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
+ struct variable *thisquery = (struct variable *)mm_alloc(sizeof(struct variable));
+ char *comment;
+ char *con;
+
+ if (INFORMIX_MODE && pg_strcasecmp($2, "database") == 0)
+ mmfatal(PARSE_ERROR, "\"database\" cannot be used as cursor name in INFORMIX mode");
+
+ check_declared_list($7);
+ con = connection ? connection : "NULL";
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp_fn($2, ptr->name) == 0)
+ {
+ /* re-definition is a bug */
+ if ($2[0] == ':')
+ mmerror(PARSE_ERROR, ET_ERROR, "using variable \"%s\" in different declare statements is not supported", $2+1);
+ else
+ mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" is already defined", $2);
+ }
+ }
+
+ this = (struct cursor *) mm_alloc(sizeof(struct cursor));
+
+ /* initial definition */
+ this->next = cur;
+ this->name = $2;
+ this->function = (current_function ? mm_strdup(current_function) : NULL);
+ this->connection = connection ? mm_strdup(connection) : NULL;
+ this->command = cat_str(6, mm_strdup("declare"), cursor_marker, $3, mm_strdup("cursor"), $5, mm_strdup("for $1"));
+ this->argsresult = NULL;
+ this->argsresult_oos = NULL;
+
+ thisquery->type = &ecpg_query;
+ thisquery->brace_level = 0;
+ thisquery->next = NULL;
+ thisquery->name = (char *) mm_alloc(sizeof("ECPGprepared_statement(, , __LINE__)") + strlen(con) + strlen($7));
+ sprintf(thisquery->name, "ECPGprepared_statement(%s, %s, __LINE__)", con, $7);
+
+ this->argsinsert = NULL;
+ this->argsinsert_oos = NULL;
+ if ($2[0] == ':')
+ {
+ struct variable *var = find_variable($2 + 1);
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&(this->argsinsert), var, &no_indicator);
+ }
+ add_variable_to_head(&(this->argsinsert), thisquery, &no_indicator);
+
+ cur = this;
+
+ comment = cat_str(3, mm_strdup("/*"), mm_strdup(this->command), mm_strdup("*/"));
+
+ $$ = cat_str(2, adjust_outofscope_cursor_vars(this),
+ comment);
+ }
+ ;
+
+ECPGExecuteImmediateStmt: EXECUTE IMMEDIATE execstring
+ {
+ /* execute immediate means prepare the statement and
+ * immediately execute it */
+ $$ = $3;
+ };
+/*
+ * variable declaration outside exec sql declare block
+ */
+ECPGVarDeclaration: single_vt_declaration;
+
+single_vt_declaration: type_declaration { $$ = $1; }
+ | var_declaration { $$ = $1; }
+ ;
+
+precision: NumericOnly { $$ = $1; };
+
+opt_scale: ',' NumericOnly { $$ = $2; }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+ecpg_interval: opt_interval { $$ = $1; }
+ | YEAR_P TO MINUTE_P { $$ = mm_strdup("year to minute"); }
+ | YEAR_P TO SECOND_P { $$ = mm_strdup("year to second"); }
+ | DAY_P TO DAY_P { $$ = mm_strdup("day to day"); }
+ | MONTH_P TO MONTH_P { $$ = mm_strdup("month to month"); }
+ ;
+
+/*
+ * variable declaration inside exec sql declare block
+ */
+ECPGDeclaration: sql_startdeclare
+ { fputs("/* exec sql begin declare section */", base_yyout); }
+ var_type_declarations sql_enddeclare
+ {
+ fprintf(base_yyout, "%s/* exec sql end declare section */", $3);
+ free($3);
+ output_line_number();
+ }
+ ;
+
+sql_startdeclare: ecpgstart BEGIN_P DECLARE SQL_SECTION ';' {};
+
+sql_enddeclare: ecpgstart END_P DECLARE SQL_SECTION ';' {};
+
+var_type_declarations: /*EMPTY*/ { $$ = EMPTY; }
+ | vt_declarations { $$ = $1; }
+ ;
+
+vt_declarations: single_vt_declaration { $$ = $1; }
+ | CPP_LINE { $$ = $1; }
+ | vt_declarations single_vt_declaration { $$ = cat2_str($1, $2); }
+ | vt_declarations CPP_LINE { $$ = cat2_str($1, $2); }
+ ;
+
+variable_declarations: var_declaration { $$ = $1; }
+ | variable_declarations var_declaration { $$ = cat2_str($1, $2); }
+ ;
+
+type_declaration: S_TYPEDEF
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ var_type opt_pointer ECPGColLabelCommon opt_array_bounds ';'
+ {
+ add_typedef($5, $6.index1, $6.index2, $3.type_enum, $3.type_dimension, $3.type_index, initializer, *$4 ? 1 : 0);
+
+ fprintf(base_yyout, "typedef %s %s %s %s;\n", $3.type_str, *$4 ? "*" : "", $5, $6.str);
+ output_line_number();
+ $$ = mm_strdup("");
+ };
+
+var_declaration: storage_declaration
+ var_type
+ {
+ actual_type[struct_level].type_enum = $2.type_enum;
+ actual_type[struct_level].type_str = $2.type_str;
+ actual_type[struct_level].type_dimension = $2.type_dimension;
+ actual_type[struct_level].type_index = $2.type_index;
+ actual_type[struct_level].type_sizeof = $2.type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+ variable_list ';'
+ {
+ $$ = cat_str(5, actual_startline[struct_level], $1, $2.type_str, $4, mm_strdup(";\n"));
+ }
+ | var_type
+ {
+ actual_type[struct_level].type_enum = $1.type_enum;
+ actual_type[struct_level].type_str = $1.type_str;
+ actual_type[struct_level].type_dimension = $1.type_dimension;
+ actual_type[struct_level].type_index = $1.type_index;
+ actual_type[struct_level].type_sizeof = $1.type_sizeof;
+
+ actual_startline[struct_level] = hashline_number();
+ }
+ variable_list ';'
+ {
+ $$ = cat_str(4, actual_startline[struct_level], $1.type_str, $3, mm_strdup(";\n"));
+ }
+ | struct_union_type_with_symbol ';'
+ {
+ $$ = cat2_str($1, mm_strdup(";"));
+ }
+ ;
+
+opt_bit_field: ':' Iconst { $$ =cat2_str(mm_strdup(":"), $2); }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+storage_declaration: storage_clause storage_modifier
+ {$$ = cat2_str ($1, $2); }
+ | storage_clause {$$ = $1; }
+ | storage_modifier {$$ = $1; }
+ ;
+
+storage_clause : S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_AUTO { $$ = mm_strdup("auto"); }
+ ;
+
+storage_modifier : S_CONST { $$ = mm_strdup("const"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ ;
+
+var_type: simple_type
+ {
+ $$.type_enum = $1;
+ $$.type_str = mm_strdup(ecpg_type_name($1));
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | struct_union_type
+ {
+ $$.type_str = $1;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+
+ if (strncmp($1, "struct", sizeof("struct")-1) == 0)
+ {
+ $$.type_enum = ECPGt_struct;
+ $$.type_sizeof = ECPGstruct_sizeof;
+ }
+ else
+ {
+ $$.type_enum = ECPGt_union;
+ $$.type_sizeof = NULL;
+ }
+ }
+ | enum_type
+ {
+ $$.type_str = $1;
+ $$.type_enum = ECPGt_int;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | ECPGColLabelCommon '(' precision opt_scale ')'
+ {
+ if (strcmp($1, "numeric") == 0)
+ {
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ }
+ else if (strcmp($1, "decimal") == 0)
+ {
+ $$.type_enum = ECPGt_decimal;
+ $$.type_str = mm_strdup("decimal");
+ }
+ else
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "only data types numeric and decimal have precision/scale argument");
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ }
+
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ | ECPGColLabelCommon ecpg_interval
+ {
+ if (strlen($2) != 0 && strcmp ($1, "datetime") != 0 && strcmp ($1, "interval") != 0)
+ mmerror (PARSE_ERROR, ET_ERROR, "interval specification not allowed here");
+
+ /*
+ * Check for type names that the SQL grammar treats as
+ * unreserved keywords
+ */
+ if (strcmp($1, "varchar") == 0)
+ {
+ $$.type_enum = ECPGt_varchar;
+ $$.type_str = EMPTY; /*mm_strdup("varchar");*/
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "bytea") == 0)
+ {
+ $$.type_enum = ECPGt_bytea;
+ $$.type_str = EMPTY;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "float") == 0)
+ {
+ $$.type_enum = ECPGt_float;
+ $$.type_str = mm_strdup("float");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "double") == 0)
+ {
+ $$.type_enum = ECPGt_double;
+ $$.type_str = mm_strdup("double");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "numeric") == 0)
+ {
+ $$.type_enum = ECPGt_numeric;
+ $$.type_str = mm_strdup("numeric");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "decimal") == 0)
+ {
+ $$.type_enum = ECPGt_decimal;
+ $$.type_str = mm_strdup("decimal");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "date") == 0)
+ {
+ $$.type_enum = ECPGt_date;
+ $$.type_str = mm_strdup("date");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "timestamp") == 0)
+ {
+ $$.type_enum = ECPGt_timestamp;
+ $$.type_str = mm_strdup("timestamp");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "interval") == 0)
+ {
+ $$.type_enum = ECPGt_interval;
+ $$.type_str = mm_strdup("interval");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if (strcmp($1, "datetime") == 0)
+ {
+ $$.type_enum = ECPGt_timestamp;
+ $$.type_str = mm_strdup("timestamp");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else if ((strcmp($1, "string") == 0) && INFORMIX_MODE)
+ {
+ $$.type_enum = ECPGt_string;
+ $$.type_str = mm_strdup("char");
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = NULL;
+ }
+ else
+ {
+ /* this is for typedef'ed types */
+ struct typedefs *this = get_typedef($1);
+
+ $$.type_str = (this->type->type_enum == ECPGt_varchar || this->type->type_enum == ECPGt_bytea) ? EMPTY : mm_strdup(this->name);
+ $$.type_enum = this->type->type_enum;
+ $$.type_dimension = this->type->type_dimension;
+ $$.type_index = this->type->type_index;
+ if (this->type->type_sizeof && strlen(this->type->type_sizeof) != 0)
+ $$.type_sizeof = this->type->type_sizeof;
+ else
+ $$.type_sizeof = cat_str(3, mm_strdup("sizeof("), mm_strdup(this->name), mm_strdup(")"));
+
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ }
+ }
+ | s_struct_union_symbol
+ {
+ /* this is for named structs/unions */
+ char *name;
+ struct typedefs *this;
+ bool forward = (forward_name != NULL && strcmp($1.symbol, forward_name) == 0 && strcmp($1.su, "struct") == 0);
+
+ name = cat2_str($1.su, $1.symbol);
+ /* Do we have a forward definition? */
+ if (!forward)
+ {
+ /* No */
+
+ this = get_typedef(name);
+ $$.type_str = mm_strdup(this->name);
+ $$.type_enum = this->type->type_enum;
+ $$.type_dimension = this->type->type_dimension;
+ $$.type_index = this->type->type_index;
+ $$.type_sizeof = this->type->type_sizeof;
+ struct_member_list[struct_level] = ECPGstruct_member_dup(this->struct_member_list);
+ free(name);
+ }
+ else
+ {
+ $$.type_str = name;
+ $$.type_enum = ECPGt_long;
+ $$.type_dimension = mm_strdup("-1");
+ $$.type_index = mm_strdup("-1");
+ $$.type_sizeof = mm_strdup("");
+ struct_member_list[struct_level] = NULL;
+ }
+ }
+ ;
+
+enum_type: ENUM_P symbol enum_definition
+ { $$ = cat_str(3, mm_strdup("enum"), $2, $3); }
+ | ENUM_P enum_definition
+ { $$ = cat2_str(mm_strdup("enum"), $2); }
+ | ENUM_P symbol
+ { $$ = cat2_str(mm_strdup("enum"), $2); }
+ ;
+
+enum_definition: '{' c_list '}'
+ { $$ = cat_str(3, mm_strdup("{"), $2, mm_strdup("}")); };
+
+struct_union_type_with_symbol: s_struct_union_symbol
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ forward_name = mm_strdup($1.symbol);
+ }
+ '{' variable_declarations '}'
+ {
+ struct typedefs *ptr, *this;
+ struct this_type su_type;
+
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ if (strncmp($1.su, "struct", sizeof("struct")-1) == 0)
+ su_type.type_enum = ECPGt_struct;
+ else
+ su_type.type_enum = ECPGt_union;
+ su_type.type_str = cat2_str($1.su, $1.symbol);
+ free(forward_name);
+ forward_name = NULL;
+
+ /* This is essentially a typedef but needs the keyword struct/union as well.
+ * So we create the typedef for each struct definition with symbol */
+ for (ptr = types; ptr != NULL; ptr = ptr->next)
+ {
+ if (strcmp(su_type.type_str, ptr->name) == 0)
+ /* re-definition is a bug */
+ mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" is already defined", su_type.type_str);
+ }
+
+ this = (struct typedefs *) mm_alloc(sizeof(struct typedefs));
+
+ /* initial definition */
+ this->next = types;
+ this->name = mm_strdup(su_type.type_str);
+ this->brace_level = braces_open;
+ this->type = (struct this_type *) mm_alloc(sizeof(struct this_type));
+ this->type->type_enum = su_type.type_enum;
+ this->type->type_str = mm_strdup(su_type.type_str);
+ this->type->type_dimension = mm_strdup("-1"); /* dimension of array */
+ this->type->type_index = mm_strdup("-1"); /* length of string */
+ this->type->type_sizeof = ECPGstruct_sizeof;
+ this->struct_member_list = struct_member_list[struct_level];
+
+ types = this;
+ $$ = cat_str(4, su_type.type_str, mm_strdup("{"), $4, mm_strdup("}"));
+ }
+ ;
+
+struct_union_type: struct_union_type_with_symbol { $$ = $1; }
+ | s_struct_union
+ {
+ struct_member_list[struct_level++] = NULL;
+ if (struct_level >= STRUCT_DEPTH)
+ mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition");
+ }
+ '{' variable_declarations '}'
+ {
+ ECPGfree_struct_member(struct_member_list[struct_level]);
+ struct_member_list[struct_level] = NULL;
+ struct_level--;
+ $$ = cat_str(4, $1, mm_strdup("{"), $4, mm_strdup("}"));
+ }
+ ;
+
+s_struct_union_symbol: SQL_STRUCT symbol
+ {
+ $$.su = mm_strdup("struct");
+ $$.symbol = $2;
+ ECPGstruct_sizeof = cat_str(3, mm_strdup("sizeof("), cat2_str(mm_strdup($$.su), mm_strdup($$.symbol)), mm_strdup(")"));
+ }
+ | UNION symbol
+ {
+ $$.su = mm_strdup("union");
+ $$.symbol = $2;
+ }
+ ;
+
+s_struct_union: SQL_STRUCT
+ {
+ ECPGstruct_sizeof = mm_strdup(""); /* This must not be NULL to distinguish from simple types. */
+ $$ = mm_strdup("struct");
+ }
+ | UNION
+ {
+ $$ = mm_strdup("union");
+ }
+ ;
+
+simple_type: unsigned_type { $$=$1; }
+ | opt_signed signed_type { $$=$2; }
+ ;
+
+unsigned_type: SQL_UNSIGNED SQL_SHORT { $$ = ECPGt_unsigned_short; }
+ | SQL_UNSIGNED SQL_SHORT INT_P { $$ = ECPGt_unsigned_short; }
+ | SQL_UNSIGNED { $$ = ECPGt_unsigned_int; }
+ | SQL_UNSIGNED INT_P { $$ = ECPGt_unsigned_int; }
+ | SQL_UNSIGNED SQL_LONG { $$ = ECPGt_unsigned_long; }
+ | SQL_UNSIGNED SQL_LONG INT_P { $$ = ECPGt_unsigned_long; }
+ | SQL_UNSIGNED SQL_LONG SQL_LONG { $$ = ECPGt_unsigned_long_long; }
+ | SQL_UNSIGNED SQL_LONG SQL_LONG INT_P { $$ = ECPGt_unsigned_long_long; }
+ | SQL_UNSIGNED CHAR_P { $$ = ECPGt_unsigned_char; }
+ ;
+
+signed_type: SQL_SHORT { $$ = ECPGt_short; }
+ | SQL_SHORT INT_P { $$ = ECPGt_short; }
+ | INT_P { $$ = ECPGt_int; }
+ | SQL_LONG { $$ = ECPGt_long; }
+ | SQL_LONG INT_P { $$ = ECPGt_long; }
+ | SQL_LONG SQL_LONG { $$ = ECPGt_long_long; }
+ | SQL_LONG SQL_LONG INT_P { $$ = ECPGt_long_long; }
+ | SQL_BOOL { $$ = ECPGt_bool; }
+ | CHAR_P { $$ = ECPGt_char; }
+ | DOUBLE_P { $$ = ECPGt_double; }
+ ;
+
+opt_signed: SQL_SIGNED
+ | /* EMPTY */
+ ;
+
+variable_list: variable
+ { $$ = $1; }
+ | variable_list ',' variable
+ {
+ if (actual_type[struct_level].type_enum == ECPGt_varchar || actual_type[struct_level].type_enum == ECPGt_bytea)
+ $$ = cat_str(3, $1, mm_strdup(";"), $3);
+ else
+ $$ = cat_str(3, $1, mm_strdup(","), $3);
+ }
+ ;
+
+variable: opt_pointer ECPGColLabel opt_array_bounds opt_bit_field opt_initializer
+ {
+ struct ECPGtype * type;
+ char *dimension = $3.index1; /* dimension of array */
+ char *length = $3.index2; /* length of string */
+ char *dim_str;
+ char *vcn;
+ int *varlen_type_counter;
+ char *struct_name;
+
+ adjust_array(actual_type[struct_level].type_enum, &dimension, &length, actual_type[struct_level].type_dimension, actual_type[struct_level].type_index, strlen($1), false);
+ switch (actual_type[struct_level].type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], actual_type[struct_level].type_enum, actual_type[struct_level].type_str, actual_type[struct_level].type_sizeof), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (actual_type[struct_level].type_enum == ECPGt_varchar)
+ {
+ varlen_type_counter = &varchar_counter;
+ struct_name = " struct varchar_";
+ }
+ else
+ {
+ varlen_type_counter = &bytea_counter;
+ struct_name = " struct bytea_";
+ }
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, *varlen_type_counter), dimension);
+
+ if (strcmp(dimension, "0") == 0 || abs(atoi(dimension)) == 1)
+ dim_str=mm_strdup("");
+ else
+ dim_str=cat_str(3, mm_strdup("["), mm_strdup(dimension), mm_strdup("]"));
+ /* cannot check for atoi <= 0 because a defined constant will yield 0 here as well */
+ if (atoi(length) < 0 || strcmp(length, "0") == 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "pointers to varchar are not implemented");
+
+ /* make sure varchar struct name is unique by adding a unique counter to its definition */
+ vcn = (char *) mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ sprintf(vcn, "%d", *varlen_type_counter);
+ if (strcmp(dimension, "0") == 0)
+ $$ = cat_str(7, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } *"), mm_strdup($2), $4, $5);
+ else
+ $$ = cat_str(8, make2_str(mm_strdup(struct_name), vcn), mm_strdup(" { int len; char arr["), mm_strdup(length), mm_strdup("]; } "), mm_strdup($2), dim_str, $4, $5);
+ (*varlen_type_counter)++;
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ {
+ int i = strlen($5);
+
+ if (atoi(length) == -1 && i > 0) /* char <var>[] = "string" */
+ {
+ /* if we have an initializer but no string size set, let's use the initializer's length */
+ free(length);
+ length = mm_alloc(i+sizeof("sizeof()"));
+ sprintf(length, "sizeof(%s)", $5+2);
+ }
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0);
+ }
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, length, 0), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+
+ default:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(actual_type[struct_level].type_enum, mm_strdup("1"), 0), dimension);
+
+ $$ = cat_str(5, $1, mm_strdup($2), $3.str, $4, $5);
+ break;
+ }
+
+ if (struct_level == 0)
+ new_variable($2, type, braces_open);
+ else
+ ECPGmake_struct_member($2, type, &(struct_member_list[struct_level - 1]));
+
+ free($2);
+ }
+ ;
+
+opt_initializer: /*EMPTY*/
+ { $$ = EMPTY; }
+ | '=' c_term
+ {
+ initializer = 1;
+ $$ = cat2_str(mm_strdup("="), $2);
+ }
+ ;
+
+opt_pointer: /*EMPTY*/ { $$ = EMPTY; }
+ | '*' { $$ = mm_strdup("*"); }
+ | '*' '*' { $$ = mm_strdup("**"); }
+ ;
+
+/*
+ * We try to simulate the correct DECLARE syntax here so we get dynamic SQL
+ */
+ECPGDeclare: DECLARE STATEMENT ecpg_ident
+ {
+ /* this is only supported for compatibility */
+ $$ = cat_str(3, mm_strdup("/* declare statement"), $3, mm_strdup("*/"));
+ }
+ ;
+/*
+ * the exec sql disconnect statement: disconnect from the given database
+ */
+ECPGDisconnect: SQL_DISCONNECT dis_name { $$ = $2; }
+ ;
+
+dis_name: connection_object { $$ = $1; }
+ | CURRENT_P { $$ = mm_strdup("\"CURRENT\""); }
+ | ALL { $$ = mm_strdup("\"ALL\""); }
+ | /* EMPTY */ { $$ = mm_strdup("\"CURRENT\""); }
+ ;
+
+connection_object: name { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ | DEFAULT { $$ = mm_strdup("\"DEFAULT\""); }
+ | char_variable { $$ = $1; }
+ ;
+
+execstring: char_variable
+ { $$ = $1; }
+ | CSTRING
+ { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ ;
+
+/*
+ * the exec sql free command to deallocate a previously
+ * prepared statement
+ */
+ECPGFree: SQL_FREE cursor_name { $$ = $2; }
+ | SQL_FREE ALL { $$ = mm_strdup("all"); }
+ ;
+
+/*
+ * open is an open cursor, at the moment this has to be removed
+ */
+ECPGOpen: SQL_OPEN cursor_name opt_ecpg_using
+ {
+ if ($2[0] == ':')
+ remove_variable_from_list(&argsinsert, find_variable($2 + 1));
+ $$ = $2;
+ }
+ ;
+
+opt_ecpg_using: /*EMPTY*/ { $$ = EMPTY; }
+ | ecpg_using { $$ = $1; }
+ ;
+
+ecpg_using: USING using_list { $$ = EMPTY; }
+ | using_descriptor { $$ = $1; }
+ ;
+
+using_descriptor: USING SQL_P SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_variable_to_head(&argsinsert, descriptor_variable($4,0), &no_indicator);
+ $$ = EMPTY;
+ }
+ | USING SQL_DESCRIPTOR name
+ {
+ add_variable_to_head(&argsinsert, sqlda_variable($3), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+into_descriptor: INTO SQL_P SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_variable_to_head(&argsresult, descriptor_variable($4,1), &no_indicator);
+ $$ = EMPTY;
+ }
+ | INTO SQL_DESCRIPTOR name
+ {
+ add_variable_to_head(&argsresult, sqlda_variable($3), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+into_sqlda: INTO name
+ {
+ add_variable_to_head(&argsresult, sqlda_variable($2), &no_indicator);
+ $$ = EMPTY;
+ }
+ ;
+
+using_list: UsingValue | UsingValue ',' using_list;
+
+UsingValue: UsingConst
+ {
+ char *length = mm_alloc(32);
+
+ sprintf(length, "%zu", strlen($1));
+ add_variable_to_head(&argsinsert, new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
+ }
+ | civar { $$ = EMPTY; }
+ | civarind { $$ = EMPTY; }
+ ;
+
+UsingConst: Iconst { $$ = $1; }
+ | '+' Iconst { $$ = cat_str(2, mm_strdup("+"), $2); }
+ | '-' Iconst { $$ = cat_str(2, mm_strdup("-"), $2); }
+ | ecpg_fconst { $$ = $1; }
+ | '+' ecpg_fconst { $$ = cat_str(2, mm_strdup("+"), $2); }
+ | '-' ecpg_fconst { $$ = cat_str(2, mm_strdup("-"), $2); }
+ | ecpg_sconst { $$ = $1; }
+ | ecpg_bconst { $$ = $1; }
+ | ecpg_xconst { $$ = $1; }
+ ;
+
+/*
+ * We accept DESCRIBE [OUTPUT] but do nothing with DESCRIBE INPUT so far.
+ */
+ECPGDescribe: SQL_DESCRIBE INPUT_P prepared_name using_descriptor
+ {
+ $$.input = 1;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name using_descriptor
+ {
+ struct variable *var;
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_descriptor
+ {
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE INPUT_P prepared_name into_sqlda
+ {
+ $$.input = 1;
+ $$.stmt_name = $3;
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_sqlda
+ {
+ $$.input = 0;
+ $$.stmt_name = $3;
+ }
+ ;
+
+opt_output: SQL_OUTPUT { $$ = mm_strdup("output"); }
+ | /* EMPTY */ { $$ = EMPTY; }
+ ;
+
+/*
+ * dynamic SQL: descriptor based access
+ * originally written by Christof Petig <christof.petig@wtal.de>
+ * and Peter Eisentraut <peter.eisentraut@credativ.de>
+ */
+
+/*
+ * allocate a descriptor
+ */
+ECPGAllocateDescr: SQL_ALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ add_descriptor($3,connection);
+ $$ = $3;
+ }
+ ;
+
+
+/*
+ * deallocate a descriptor
+ */
+ECPGDeallocateDescr: DEALLOCATE SQL_DESCRIPTOR quoted_ident_stringvar
+ {
+ drop_descriptor($3,connection);
+ $$ = $3;
+ }
+ ;
+
+/*
+ * manipulate a descriptor header
+ */
+
+ECPGGetDescriptorHeader: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar ECPGGetDescHeaderItems
+ { $$ = $3; }
+ ;
+
+ECPGGetDescHeaderItems: ECPGGetDescHeaderItem
+ | ECPGGetDescHeaderItems ',' ECPGGetDescHeaderItem
+ ;
+
+ECPGGetDescHeaderItem: cvariable '=' desc_header_item
+ { push_assignment($1, $3); }
+ ;
+
+
+ECPGSetDescriptorHeader: SET SQL_DESCRIPTOR quoted_ident_stringvar ECPGSetDescHeaderItems
+ { $$ = $3; }
+ ;
+
+ECPGSetDescHeaderItems: ECPGSetDescHeaderItem
+ | ECPGSetDescHeaderItems ',' ECPGSetDescHeaderItem
+ ;
+
+ECPGSetDescHeaderItem: desc_header_item '=' IntConstVar
+ {
+ push_assignment($3, $1);
+ }
+ ;
+
+IntConstVar: Iconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen($1));
+ new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = $1;
+ }
+ | cvariable
+ {
+ $$ = $1;
+ }
+ ;
+
+desc_header_item: SQL_COUNT { $$ = ECPGd_count; }
+ ;
+
+/*
+ * manipulate a descriptor
+ */
+
+ECPGGetDescriptor: SQL_GET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGGetDescItems
+ { $$.str = $5; $$.name = $3; }
+ ;
+
+ECPGGetDescItems: ECPGGetDescItem
+ | ECPGGetDescItems ',' ECPGGetDescItem
+ ;
+
+ECPGGetDescItem: cvariable '=' descriptor_item { push_assignment($1, $3); };
+
+
+ECPGSetDescriptor: SET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGSetDescItems
+ { $$.str = $5; $$.name = $3; }
+ ;
+
+ECPGSetDescItems: ECPGSetDescItem
+ | ECPGSetDescItems ',' ECPGSetDescItem
+ ;
+
+ECPGSetDescItem: descriptor_item '=' AllConstVar
+ {
+ push_assignment($3, $1);
+ }
+ ;
+
+AllConstVar: ecpg_fconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+
+ sprintf(length, "%zu", strlen($1));
+ new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = $1;
+ }
+
+ | IntConstVar
+ {
+ $$ = $1;
+ }
+
+ | '-' ecpg_fconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), $2);
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+
+ | '-' Iconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = cat2_str(mm_strdup("-"), $2);
+
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+
+ | ecpg_sconst
+ {
+ char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
+ char *var = $1 + 1;
+
+ var[strlen(var) - 1] = '\0';
+ sprintf(length, "%zu", strlen(var));
+ new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
+ $$ = var;
+ }
+ ;
+
+descriptor_item: SQL_CARDINALITY { $$ = ECPGd_cardinality; }
+ | DATA_P { $$ = ECPGd_data; }
+ | SQL_DATETIME_INTERVAL_CODE { $$ = ECPGd_di_code; }
+ | SQL_DATETIME_INTERVAL_PRECISION { $$ = ECPGd_di_precision; }
+ | SQL_INDICATOR { $$ = ECPGd_indicator; }
+ | SQL_KEY_MEMBER { $$ = ECPGd_key_member; }
+ | SQL_LENGTH { $$ = ECPGd_length; }
+ | NAME_P { $$ = ECPGd_name; }
+ | SQL_NULLABLE { $$ = ECPGd_nullable; }
+ | SQL_OCTET_LENGTH { $$ = ECPGd_octet; }
+ | PRECISION { $$ = ECPGd_precision; }
+ | SQL_RETURNED_LENGTH { $$ = ECPGd_length; }
+ | SQL_RETURNED_OCTET_LENGTH { $$ = ECPGd_ret_octet; }
+ | SQL_SCALE { $$ = ECPGd_scale; }
+ | TYPE_P { $$ = ECPGd_type; }
+ ;
+
+/*
+ * set/reset the automatic transaction mode, this needs a different handling
+ * as the other set commands
+ */
+ECPGSetAutocommit: SET SQL_AUTOCOMMIT '=' on_off { $$ = $4; }
+ | SET SQL_AUTOCOMMIT TO on_off { $$ = $4; }
+ ;
+
+on_off: ON { $$ = mm_strdup("on"); }
+ | OFF { $$ = mm_strdup("off"); }
+ ;
+
+/*
+ * set the actual connection, this needs a different handling as the other
+ * set commands
+ */
+ECPGSetConnection: SET CONNECTION TO connection_object { $$ = $4; }
+ | SET CONNECTION '=' connection_object { $$ = $4; }
+ | SET CONNECTION connection_object { $$ = $3; }
+ ;
+
+/*
+ * define a new type for embedded SQL
+ */
+ECPGTypedef: TYPE_P
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ ECPGColLabelCommon IS var_type opt_array_bounds opt_reference
+ {
+ add_typedef($3, $6.index1, $6.index2, $5.type_enum, $5.type_dimension, $5.type_index, initializer, *$7 ? 1 : 0);
+
+ if (auto_create_c == false)
+ $$ = cat_str(7, mm_strdup("/* exec sql type"), mm_strdup($3), mm_strdup("is"), mm_strdup($5.type_str), mm_strdup($6.str), $7, mm_strdup("*/"));
+ else
+ $$ = cat_str(6, mm_strdup("typedef "), mm_strdup($5.type_str), *$7?mm_strdup("*"):mm_strdup(""), mm_strdup($3), mm_strdup($6.str), mm_strdup(";"));
+ }
+ ;
+
+opt_reference: SQL_REFERENCE { $$ = mm_strdup("reference"); }
+ | /*EMPTY*/ { $$ = EMPTY; }
+ ;
+
+/*
+ * define the type of one variable for embedded SQL
+ */
+ECPGVar: SQL_VAR
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+ ColLabel IS var_type opt_array_bounds opt_reference
+ {
+ struct variable *p = find_variable($3);
+ char *dimension = $6.index1;
+ char *length = $6.index2;
+ struct ECPGtype * type;
+
+ if (($5.type_enum == ECPGt_struct ||
+ $5.type_enum == ECPGt_union) &&
+ initializer == 1)
+ mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in EXEC SQL VAR command");
+ else
+ {
+ adjust_array($5.type_enum, &dimension, &length, $5.type_dimension, $5.type_index, *$7?1:0, false);
+
+ switch ($5.type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ if (atoi(dimension) < 0)
+ type = ECPGmake_struct_type(struct_member_list[struct_level], $5.type_enum, $5.type_str, $5.type_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_struct_type(struct_member_list[struct_level], $5.type_enum, $5.type_str, $5.type_sizeof), dimension);
+ break;
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type($5.type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, length, 0), dimension);
+ break;
+
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ if (atoi(dimension) == -1)
+ type = ECPGmake_simple_type($5.type_enum, length, 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, length, 0), dimension);
+ break;
+
+ default:
+ if (atoi(length) >= 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ if (atoi(dimension) < 0)
+ type = ECPGmake_simple_type($5.type_enum, mm_strdup("1"), 0);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type($5.type_enum, mm_strdup("1"), 0), dimension);
+ break;
+ }
+
+ ECPGfree_type(p->type);
+ p->type = type;
+ }
+
+ $$ = cat_str(7, mm_strdup("/* exec sql var"), mm_strdup($3), mm_strdup("is"), mm_strdup($5.type_str), mm_strdup($6.str), $7, mm_strdup("*/"));
+ }
+ ;
+
+/*
+ * whenever statement: decide what to do in case of error/no data found
+ * according to SQL standards we lack: SQLSTATE, CONSTRAINT and SQLEXCEPTION
+ */
+ECPGWhenever: SQL_WHENEVER SQL_SQLERROR action
+ {
+ when_error.code = $<action>3.code;
+ when_error.command = $<action>3.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever sqlerror "), $3.str, mm_strdup("; */"));
+ }
+ | SQL_WHENEVER NOT SQL_FOUND action
+ {
+ when_nf.code = $<action>4.code;
+ when_nf.command = $<action>4.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever not found "), $4.str, mm_strdup("; */"));
+ }
+ | SQL_WHENEVER SQL_SQLWARNING action
+ {
+ when_warn.code = $<action>3.code;
+ when_warn.command = $<action>3.command;
+ $$ = cat_str(3, mm_strdup("/* exec sql whenever sql_warning "), $3.str, mm_strdup("; */"));
+ }
+ ;
+
+action : CONTINUE_P
+ {
+ $<action>$.code = W_NOTHING;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("continue");
+ }
+ | SQL_SQLPRINT
+ {
+ $<action>$.code = W_SQLPRINT;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("sqlprint");
+ }
+ | SQL_STOP
+ {
+ $<action>$.code = W_STOP;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("stop");
+ }
+ | SQL_GOTO name
+ {
+ $<action>$.code = W_GOTO;
+ $<action>$.command = mm_strdup($2);
+ $<action>$.str = cat2_str(mm_strdup("goto "), $2);
+ }
+ | SQL_GO TO name
+ {
+ $<action>$.code = W_GOTO;
+ $<action>$.command = mm_strdup($3);
+ $<action>$.str = cat2_str(mm_strdup("goto "), $3);
+ }
+ | DO name '(' c_args ')'
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat_str(4, $2, mm_strdup("("), $4, mm_strdup(")"));
+ $<action>$.str = cat2_str(mm_strdup("do"), mm_strdup($<action>$.command));
+ }
+ | DO SQL_BREAK
+ {
+ $<action>$.code = W_BREAK;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("break");
+ }
+ | DO CONTINUE_P
+ {
+ $<action>$.code = W_CONTINUE;
+ $<action>$.command = NULL;
+ $<action>$.str = mm_strdup("continue");
+ }
+ | CALL name '(' c_args ')'
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat_str(4, $2, mm_strdup("("), $4, mm_strdup(")"));
+ $<action>$.str = cat2_str(mm_strdup("call"), mm_strdup($<action>$.command));
+ }
+ | CALL name
+ {
+ $<action>$.code = W_DO;
+ $<action>$.command = cat2_str($2, mm_strdup("()"));
+ $<action>$.str = cat2_str(mm_strdup("call"), mm_strdup($<action>$.command));
+ }
+ ;
+
+/* some other stuff for ecpg */
+
+/* additional unreserved keywords */
+ECPGKeywords: ECPGKeywords_vanames { $$ = $1; }
+ | ECPGKeywords_rest { $$ = $1; }
+ ;
+
+ECPGKeywords_vanames: SQL_BREAK { $$ = mm_strdup("break"); }
+ | SQL_CARDINALITY { $$ = mm_strdup("cardinality"); }
+ | SQL_COUNT { $$ = mm_strdup("count"); }
+ | SQL_DATETIME_INTERVAL_CODE { $$ = mm_strdup("datetime_interval_code"); }
+ | SQL_DATETIME_INTERVAL_PRECISION { $$ = mm_strdup("datetime_interval_precision"); }
+ | SQL_FOUND { $$ = mm_strdup("found"); }
+ | SQL_GO { $$ = mm_strdup("go"); }
+ | SQL_GOTO { $$ = mm_strdup("goto"); }
+ | SQL_IDENTIFIED { $$ = mm_strdup("identified"); }
+ | SQL_INDICATOR { $$ = mm_strdup("indicator"); }
+ | SQL_KEY_MEMBER { $$ = mm_strdup("key_member"); }
+ | SQL_LENGTH { $$ = mm_strdup("length"); }
+ | SQL_NULLABLE { $$ = mm_strdup("nullable"); }
+ | SQL_OCTET_LENGTH { $$ = mm_strdup("octet_length"); }
+ | SQL_RETURNED_LENGTH { $$ = mm_strdup("returned_length"); }
+ | SQL_RETURNED_OCTET_LENGTH { $$ = mm_strdup("returned_octet_length"); }
+ | SQL_SCALE { $$ = mm_strdup("scale"); }
+ | SQL_SECTION { $$ = mm_strdup("section"); }
+ | SQL_SQLERROR { $$ = mm_strdup("sqlerror"); }
+ | SQL_SQLPRINT { $$ = mm_strdup("sqlprint"); }
+ | SQL_SQLWARNING { $$ = mm_strdup("sqlwarning"); }
+ | SQL_STOP { $$ = mm_strdup("stop"); }
+ ;
+
+ECPGKeywords_rest: SQL_CONNECT { $$ = mm_strdup("connect"); }
+ | SQL_DESCRIBE { $$ = mm_strdup("describe"); }
+ | SQL_DISCONNECT { $$ = mm_strdup("disconnect"); }
+ | SQL_OPEN { $$ = mm_strdup("open"); }
+ | SQL_VAR { $$ = mm_strdup("var"); }
+ | SQL_WHENEVER { $$ = mm_strdup("whenever"); }
+ ;
+
+/* additional keywords that can be SQL type names (but not ECPGColLabels) */
+ECPGTypeName: SQL_BOOL { $$ = mm_strdup("bool"); }
+ | SQL_LONG { $$ = mm_strdup("long"); }
+ | SQL_OUTPUT { $$ = mm_strdup("output"); }
+ | SQL_SHORT { $$ = mm_strdup("short"); }
+ | SQL_STRUCT { $$ = mm_strdup("struct"); }
+ | SQL_SIGNED { $$ = mm_strdup("signed"); }
+ | SQL_UNSIGNED { $$ = mm_strdup("unsigned"); }
+ ;
+
+symbol: ColLabel { $$ = $1; }
+ ;
+
+ECPGColId: ecpg_ident { $$ = $1; }
+ | unreserved_keyword { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ ;
+
+/*
+ * Name classification hierarchy.
+ *
+ * These productions should match those in the core grammar, except that
+ * we use all_unreserved_keyword instead of unreserved_keyword, and
+ * where possible include ECPG keywords as well as core keywords.
+ */
+
+/* Column identifier --- names that can be column, table, etc names.
+ */
+ColId: ecpg_ident { $$ = $1; }
+ | all_unreserved_keyword { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ ;
+
+/* Type/function identifier --- names that can be type or function names.
+ */
+type_function_name: ecpg_ident { $$ = $1; }
+ | all_unreserved_keyword { $$ = $1; }
+ | type_func_name_keyword { $$ = $1; }
+ | ECPGKeywords { $$ = $1; }
+ | ECPGCKeywords { $$ = $1; }
+ | ECPGTypeName { $$ = $1; }
+ ;
+
+/* Column label --- allowed labels in "AS" clauses.
+ * This presently includes *all* Postgres keywords.
+ */
+ColLabel: ECPGColLabel { $$ = $1; }
+ | ECPGTypeName { $$ = $1; }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | CURRENT_P { $$ = mm_strdup("current"); }
+ | INPUT_P { $$ = mm_strdup("input"); }
+ | INT_P { $$ = mm_strdup("int"); }
+ | TO { $$ = mm_strdup("to"); }
+ | UNION { $$ = mm_strdup("union"); }
+ | VALUES { $$ = mm_strdup("values"); }
+ | ECPGCKeywords { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ ;
+
+ECPGColLabel: ECPGColLabelCommon { $$ = $1; }
+ | unreserved_keyword { $$ = $1; }
+ | reserved_keyword { $$ = $1; }
+ | ECPGKeywords_rest { $$ = $1; }
+ | CONNECTION { $$ = mm_strdup("connection"); }
+ ;
+
+ECPGColLabelCommon: ecpg_ident { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | type_func_name_keyword { $$ = $1; }
+ | ECPGKeywords_vanames { $$ = $1; }
+ ;
+
+ECPGCKeywords: S_AUTO { $$ = mm_strdup("auto"); }
+ | S_CONST { $$ = mm_strdup("const"); }
+ | S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_TYPEDEF { $$ = mm_strdup("typedef"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ ;
+
+/* "Unreserved" keywords --- available for use as any kind of name.
+ */
+
+/*
+ * The following symbols must be excluded from ECPGColLabel and directly
+ * included into ColLabel to enable C variables to get names from ECPGColLabel:
+ * DAY_P, HOUR_P, MINUTE_P, MONTH_P, SECOND_P, YEAR_P.
+ *
+ * We also have to exclude CONNECTION, CURRENT, and INPUT for various reasons.
+ * CONNECTION can be added back in all_unreserved_keyword, but CURRENT and
+ * INPUT are reserved for ecpg purposes.
+ *
+ * The mentioned exclusions are done by $replace_line settings in parse.pl.
+ */
+all_unreserved_keyword: unreserved_keyword { $$ = $1; }
+ | ECPGunreserved_interval { $$ = $1; }
+ | CONNECTION { $$ = mm_strdup("connection"); }
+ ;
+
+ECPGunreserved_interval: DAY_P { $$ = mm_strdup("day"); }
+ | HOUR_P { $$ = mm_strdup("hour"); }
+ | MINUTE_P { $$ = mm_strdup("minute"); }
+ | MONTH_P { $$ = mm_strdup("month"); }
+ | SECOND_P { $$ = mm_strdup("second"); }
+ | YEAR_P { $$ = mm_strdup("year"); }
+ ;
+
+
+into_list : coutputvariable | into_list ',' coutputvariable
+ ;
+
+ecpgstart: SQL_START {
+ reset_variables();
+ pacounter = 1;
+ }
+ ;
+
+c_args: /*EMPTY*/ { $$ = EMPTY; }
+ | c_list { $$ = $1; }
+ ;
+
+coutputvariable: cvariable indicator
+ { add_variable_to_head(&argsresult, find_variable($1), find_variable($2)); }
+ | cvariable
+ { add_variable_to_head(&argsresult, find_variable($1), &no_indicator); }
+ ;
+
+
+civarind: cvariable indicator
+ {
+ if (find_variable($2)->type->type == ECPGt_array)
+ mmerror(PARSE_ERROR, ET_ERROR, "arrays of indicators are not allowed on input");
+
+ add_variable_to_head(&argsinsert, find_variable($1), find_variable($2));
+ $$ = create_questionmarks($1, false);
+ }
+ ;
+
+char_civar: char_variable
+ {
+ char *ptr = strstr($1, ".arr");
+
+ if (ptr) /* varchar, we need the struct name here, not the struct element */
+ *ptr = '\0';
+ add_variable_to_head(&argsinsert, find_variable($1), &no_indicator);
+ $$ = $1;
+ }
+ ;
+
+civar: cvariable
+ {
+ add_variable_to_head(&argsinsert, find_variable($1), &no_indicator);
+ $$ = create_questionmarks($1, false);
+ }
+ ;
+
+indicator: cvariable { check_indicator((find_variable($1))->type); $$ = $1; }
+ | SQL_INDICATOR cvariable { check_indicator((find_variable($2))->type); $$ = $2; }
+ | SQL_INDICATOR name { check_indicator((find_variable($2))->type); $$ = $2; }
+ ;
+
+cvariable: CVARIABLE
+ {
+ /* As long as multidimensional arrays are not implemented we have to check for those here */
+ char *ptr = $1;
+ int brace_open=0, brace = false;
+
+ for (; *ptr; ptr++)
+ {
+ switch (*ptr)
+ {
+ case '[':
+ if (brace)
+ mmfatal(PARSE_ERROR, "multidimensional arrays for simple data types are not supported");
+ brace_open++;
+ break;
+ case ']':
+ brace_open--;
+ if (brace_open == 0)
+ brace = true;
+ break;
+ case '\t':
+ case ' ':
+ break;
+ default:
+ if (brace_open == 0)
+ brace = false;
+ break;
+ }
+ }
+ $$ = $1;
+ }
+ ;
+
+ecpg_param: PARAM { $$ = make_name(); } ;
+
+ecpg_bconst: BCONST { $$ = $1; } ;
+
+ecpg_fconst: FCONST { $$ = make_name(); } ;
+
+ecpg_sconst: SCONST { $$ = $1; } ;
+
+ecpg_xconst: XCONST { $$ = $1; } ;
+
+ecpg_ident: IDENT { $$ = $1; }
+ | CSTRING { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ ;
+
+quoted_ident_stringvar: name
+ { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
+ | char_variable
+ { $$ = make3_str(mm_strdup("("), $1, mm_strdup(")")); }
+ ;
+
+/*
+ * C stuff
+ */
+
+c_stuff_item: c_anything { $$ = $1; }
+ | '(' ')' { $$ = mm_strdup("()"); }
+ | '(' c_stuff ')'
+ { $$ = cat_str(3, mm_strdup("("), $2, mm_strdup(")")); }
+ ;
+
+c_stuff: c_stuff_item { $$ = $1; }
+ | c_stuff c_stuff_item
+ { $$ = cat2_str($1, $2); }
+ ;
+
+c_list: c_term { $$ = $1; }
+ | c_list ',' c_term { $$ = cat_str(3, $1, mm_strdup(","), $3); }
+ ;
+
+c_term: c_stuff { $$ = $1; }
+ | '{' c_list '}' { $$ = cat_str(3, mm_strdup("{"), $2, mm_strdup("}")); }
+ ;
+
+c_thing: c_anything { $$ = $1; }
+ | '(' { $$ = mm_strdup("("); }
+ | ')' { $$ = mm_strdup(")"); }
+ | ',' { $$ = mm_strdup(","); }
+ | ';' { $$ = mm_strdup(";"); }
+ ;
+
+c_anything: ecpg_ident { $$ = $1; }
+ | Iconst { $$ = $1; }
+ | ecpg_fconst { $$ = $1; }
+ | ecpg_sconst { $$ = $1; }
+ | '*' { $$ = mm_strdup("*"); }
+ | '+' { $$ = mm_strdup("+"); }
+ | '-' { $$ = mm_strdup("-"); }
+ | '/' { $$ = mm_strdup("/"); }
+ | '%' { $$ = mm_strdup("%"); }
+ | NULL_P { $$ = mm_strdup("NULL"); }
+ | S_ADD { $$ = mm_strdup("+="); }
+ | S_AND { $$ = mm_strdup("&&"); }
+ | S_ANYTHING { $$ = make_name(); }
+ | S_AUTO { $$ = mm_strdup("auto"); }
+ | S_CONST { $$ = mm_strdup("const"); }
+ | S_DEC { $$ = mm_strdup("--"); }
+ | S_DIV { $$ = mm_strdup("/="); }
+ | S_DOTPOINT { $$ = mm_strdup(".*"); }
+ | S_EQUAL { $$ = mm_strdup("=="); }
+ | S_EXTERN { $$ = mm_strdup("extern"); }
+ | S_INC { $$ = mm_strdup("++"); }
+ | S_LSHIFT { $$ = mm_strdup("<<"); }
+ | S_MEMBER { $$ = mm_strdup("->"); }
+ | S_MEMPOINT { $$ = mm_strdup("->*"); }
+ | S_MOD { $$ = mm_strdup("%="); }
+ | S_MUL { $$ = mm_strdup("*="); }
+ | S_NEQUAL { $$ = mm_strdup("!="); }
+ | S_OR { $$ = mm_strdup("||"); }
+ | S_REGISTER { $$ = mm_strdup("register"); }
+ | S_RSHIFT { $$ = mm_strdup(">>"); }
+ | S_STATIC { $$ = mm_strdup("static"); }
+ | S_SUB { $$ = mm_strdup("-="); }
+ | S_TYPEDEF { $$ = mm_strdup("typedef"); }
+ | S_VOLATILE { $$ = mm_strdup("volatile"); }
+ | SQL_BOOL { $$ = mm_strdup("bool"); }
+ | ENUM_P { $$ = mm_strdup("enum"); }
+ | HOUR_P { $$ = mm_strdup("hour"); }
+ | INT_P { $$ = mm_strdup("int"); }
+ | SQL_LONG { $$ = mm_strdup("long"); }
+ | MINUTE_P { $$ = mm_strdup("minute"); }
+ | MONTH_P { $$ = mm_strdup("month"); }
+ | SECOND_P { $$ = mm_strdup("second"); }
+ | SQL_SHORT { $$ = mm_strdup("short"); }
+ | SQL_SIGNED { $$ = mm_strdup("signed"); }
+ | SQL_STRUCT { $$ = mm_strdup("struct"); }
+ | SQL_UNSIGNED { $$ = mm_strdup("unsigned"); }
+ | YEAR_P { $$ = mm_strdup("year"); }
+ | CHAR_P { $$ = mm_strdup("char"); }
+ | FLOAT_P { $$ = mm_strdup("float"); }
+ | TO { $$ = mm_strdup("to"); }
+ | UNION { $$ = mm_strdup("union"); }
+ | VARCHAR { $$ = mm_strdup("varchar"); }
+ | '[' { $$ = mm_strdup("["); }
+ | ']' { $$ = mm_strdup("]"); }
+ | '=' { $$ = mm_strdup("="); }
+ | ':' { $$ = mm_strdup(":"); }
+ ;
+
+DeallocateStmt: DEALLOCATE prepared_name { check_declared_list($2); $$ = $2; }
+ | DEALLOCATE PREPARE prepared_name { check_declared_list($3); $$ = $3; }
+ | DEALLOCATE ALL { $$ = mm_strdup("all"); }
+ | DEALLOCATE PREPARE ALL { $$ = mm_strdup("all"); }
+ ;
+
+Iresult: Iconst { $$ = $1; }
+ | '(' Iresult ')' { $$ = cat_str(3, mm_strdup("("), $2, mm_strdup(")")); }
+ | Iresult '+' Iresult { $$ = cat_str(3, $1, mm_strdup("+"), $3); }
+ | Iresult '-' Iresult { $$ = cat_str(3, $1, mm_strdup("-"), $3); }
+ | Iresult '*' Iresult { $$ = cat_str(3, $1, mm_strdup("*"), $3); }
+ | Iresult '/' Iresult { $$ = cat_str(3, $1, mm_strdup("/"), $3); }
+ | Iresult '%' Iresult { $$ = cat_str(3, $1, mm_strdup("%"), $3); }
+ | ecpg_sconst { $$ = $1; }
+ | ColId { $$ = $1; }
+ | ColId '(' var_type ')' { if (pg_strcasecmp($1, "sizeof") != 0)
+ mmerror(PARSE_ERROR, ET_ERROR, "operator not allowed in variable definition");
+ else
+ $$ = cat_str(4, $1, mm_strdup("("), $3.type_str, mm_strdup(")"));
+ }
+ ;
+
+execute_rest: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_using opt_ecpg_into { $$ = EMPTY; }
+ | ecpg_into ecpg_using { $$ = EMPTY; }
+ | ecpg_into { $$ = EMPTY; }
+ ;
+
+ecpg_into: INTO into_list { $$ = EMPTY; }
+ | into_descriptor { $$ = $1; }
+ ;
+
+opt_ecpg_into: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_into { $$ = $1; }
+ ;
+
+ecpg_fetch_into: ecpg_into { $$ = $1; }
+ | using_descriptor
+ {
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+ $$ = $1;
+ }
+ ;
+
+opt_ecpg_fetch_into: /* EMPTY */ { $$ = EMPTY; }
+ | ecpg_fetch_into { $$ = $1; }
+ ;
+
+%%
+
+void base_yyerror(const char *error)
+{
+ /* translator: %s is typically the translation of "syntax error" */
+ mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
+ _(error), token_start ? token_start : base_yytext);
+}
+
+void parser_init(void)
+{
+ /* This function is empty. It only exists for compatibility with the backend parser right now. */
+}
diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h
new file mode 100644
index 0000000..992797b
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -0,0 +1,128 @@
+/* src/interfaces/ecpg/preproc/preproc_extern.h */
+
+#ifndef _ECPG_PREPROC_EXTERN_H
+#define _ECPG_PREPROC_EXTERN_H
+
+#include "common/keywords.h"
+#include "type.h"
+
+#ifndef CHAR_BIT
+#include <limits.h>
+#endif
+
+/* defines */
+
+#define STRUCT_DEPTH 128
+#define EMPTY mm_strdup("")
+
+/* variables */
+
+extern bool autocommit,
+ auto_create_c,
+ system_includes,
+ force_indicator,
+ questionmarks,
+ regression_mode,
+ auto_prepare;
+extern int braces_open,
+ ret_value,
+ struct_level,
+ ecpg_internal_var;
+extern char *current_function;
+extern char *descriptor_name;
+extern char *connection;
+extern char *input_filename;
+extern char *base_yytext,
+ *token_start;
+
+#ifdef YYDEBUG
+extern int base_yydebug;
+#endif
+extern int base_yylineno;
+extern FILE *base_yyin,
+ *base_yyout;
+extern char *output_filename;
+
+extern struct _include_path *include_paths;
+extern struct cursor *cur;
+extern struct typedefs *types;
+extern struct _defines *defines;
+extern struct declared_list *g_declared_list;
+extern struct ECPGtype ecpg_no_indicator;
+extern struct variable no_indicator;
+extern struct arguments *argsinsert;
+extern struct arguments *argsresult;
+extern struct when when_error,
+ when_nf,
+ when_warn;
+extern struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH];
+
+/* Globals from keywords.c */
+extern const uint16 SQLScanKeywordTokens[];
+
+/* functions */
+
+extern const char *get_dtype(enum ECPGdtype);
+extern void lex_init(void);
+extern void output_line_number(void);
+extern void output_statement(char *, int, enum ECPG_statement_type);
+extern void output_prepare_statement(char *, char *);
+extern void output_deallocate_prepare_statement(char *);
+extern void output_simple_statement(char *, int);
+extern char *hashline_number(void);
+extern int base_yyparse(void);
+extern int base_yylex(void);
+extern void base_yyerror(const char *);
+extern void *mm_alloc(size_t);
+extern char *mm_strdup(const char *);
+extern void mmerror(int errorcode, enum errortype type, const char *error,...) pg_attribute_printf(3, 4);
+extern void mmfatal(int errorcode, const char *error,...) pg_attribute_printf(2, 3) pg_attribute_noreturn();
+extern void output_get_descr_header(char *);
+extern void output_get_descr(char *, char *);
+extern void output_set_descr_header(char *);
+extern void output_set_descr(char *, char *);
+extern void push_assignment(char *, enum ECPGdtype);
+extern struct variable *find_variable(char *);
+extern void whenever_action(int);
+extern void add_descriptor(char *, char *);
+extern void drop_descriptor(char *, char *);
+extern struct descriptor *lookup_descriptor(char *, char *);
+extern struct variable *descriptor_variable(const char *name, int input);
+extern struct variable *sqlda_variable(const char *name);
+extern void add_variable_to_head(struct arguments **, struct variable *, struct variable *);
+extern void add_variable_to_tail(struct arguments **, struct variable *, struct variable *);
+extern void remove_variable_from_list(struct arguments **list, struct variable *var);
+extern void dump_variables(struct arguments *, int);
+extern struct typedefs *get_typedef(char *);
+extern void adjust_array(enum ECPGttype, char **, char **, char *, char *, int, bool);
+extern void reset_variables(void);
+extern void check_indicator(struct ECPGtype *);
+extern void remove_typedefs(int);
+extern void remove_variables(int);
+extern struct variable *new_variable(const char *, struct ECPGtype *, int);
+extern int ScanCKeywordLookup(const char *text);
+extern int ScanECPGKeywordLookup(const char *text);
+extern void parser_init(void);
+extern int filtered_base_yylex(void);
+
+/* return codes */
+
+#define ILLEGAL_OPTION 1
+#define NO_INCLUDE_FILE 2
+#define PARSE_ERROR 3
+#define INDICATOR_NOT_ARRAY 4
+#define OUT_OF_MEMORY 5
+#define INDICATOR_NOT_STRUCT 6
+#define INDICATOR_NOT_SIMPLE 7
+
+enum COMPAT_MODE
+{
+ ECPG_COMPAT_PGSQL = 0, ECPG_COMPAT_INFORMIX, ECPG_COMPAT_INFORMIX_SE, ECPG_COMPAT_ORACLE
+};
+extern enum COMPAT_MODE compat;
+
+#define INFORMIX_MODE (compat == ECPG_COMPAT_INFORMIX || compat == ECPG_COMPAT_INFORMIX_SE)
+#define ORACLE_MODE (compat == ECPG_COMPAT_ORACLE)
+
+
+#endif /* _ECPG_PREPROC_EXTERN_H */
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
new file mode 100644
index 0000000..d4b4da5
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -0,0 +1,748 @@
+/* src/interfaces/ecpg/preproc/type.c */
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+
+#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
+
+static struct ECPGstruct_member struct_no_indicator = {"no_indicator", &ecpg_no_indicator, NULL};
+
+/* malloc + error check */
+void *
+mm_alloc(size_t size)
+{
+ void *ptr = malloc(size);
+
+ if (ptr == NULL)
+ mmfatal(OUT_OF_MEMORY, "out of memory");
+
+ return ptr;
+}
+
+/* strdup + error check */
+char *
+mm_strdup(const char *string)
+{
+ char *new = strdup(string);
+
+ if (new == NULL)
+ mmfatal(OUT_OF_MEMORY, "out of memory");
+
+ return new;
+}
+
+/* duplicate memberlist */
+struct ECPGstruct_member *
+ECPGstruct_member_dup(struct ECPGstruct_member *rm)
+{
+ struct ECPGstruct_member *new = NULL;
+
+ while (rm)
+ {
+ struct ECPGtype *type;
+
+ switch (rm->type->type)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ type = ECPGmake_struct_type(rm->type->u.members, rm->type->type, rm->type->type_name, rm->type->struct_sizeof);
+ break;
+ case ECPGt_array:
+
+ /*
+ * if this array does contain a struct again, we have to
+ * create the struct too
+ */
+ if (rm->type->u.element->type == ECPGt_struct || rm->type->u.element->type == ECPGt_union)
+ type = ECPGmake_struct_type(rm->type->u.element->u.members, rm->type->u.element->type, rm->type->u.element->type_name, rm->type->u.element->struct_sizeof);
+ else
+ type = ECPGmake_array_type(ECPGmake_simple_type(rm->type->u.element->type, rm->type->u.element->size, rm->type->u.element->counter), rm->type->size);
+ break;
+ default:
+ type = ECPGmake_simple_type(rm->type->type, rm->type->size, rm->type->counter);
+ break;
+ }
+
+ ECPGmake_struct_member(rm->name, type, &new);
+
+ rm = rm->next;
+ }
+
+ return new;
+}
+
+/* The NAME argument is copied. The type argument is preserved as a pointer. */
+void
+ECPGmake_struct_member(const char *name, struct ECPGtype *type, struct ECPGstruct_member **start)
+{
+ struct ECPGstruct_member *ptr,
+ *ne =
+ (struct ECPGstruct_member *) mm_alloc(sizeof(struct ECPGstruct_member));
+
+ ne->name = mm_strdup(name);
+ ne->type = type;
+ ne->next = NULL;
+
+ for (ptr = *start; ptr && ptr->next; ptr = ptr->next);
+
+ if (ptr)
+ ptr->next = ne;
+ else
+ *start = ne;
+}
+
+struct ECPGtype *
+ECPGmake_simple_type(enum ECPGttype type, char *size, int counter)
+{
+ struct ECPGtype *ne = (struct ECPGtype *) mm_alloc(sizeof(struct ECPGtype));
+
+ ne->type = type;
+ ne->type_name = NULL;
+ ne->size = size;
+ ne->u.element = NULL;
+ ne->struct_sizeof = NULL;
+ ne->counter = counter; /* only needed for varchar and bytea */
+
+ return ne;
+}
+
+struct ECPGtype *
+ECPGmake_array_type(struct ECPGtype *type, char *size)
+{
+ struct ECPGtype *ne = ECPGmake_simple_type(ECPGt_array, size, 0);
+
+ ne->u.element = type;
+
+ return ne;
+}
+
+struct ECPGtype *
+ECPGmake_struct_type(struct ECPGstruct_member *rm, enum ECPGttype type, char *type_name, char *struct_sizeof)
+{
+ struct ECPGtype *ne = ECPGmake_simple_type(type, mm_strdup("1"), 0);
+
+ ne->type_name = mm_strdup(type_name);
+ ne->u.members = ECPGstruct_member_dup(rm);
+ ne->struct_sizeof = struct_sizeof;
+
+ return ne;
+}
+
+static const char *
+get_type(enum ECPGttype type)
+{
+ switch (type)
+ {
+ case ECPGt_char:
+ return "ECPGt_char";
+ break;
+ case ECPGt_unsigned_char:
+ return "ECPGt_unsigned_char";
+ break;
+ case ECPGt_short:
+ return "ECPGt_short";
+ break;
+ case ECPGt_unsigned_short:
+ return "ECPGt_unsigned_short";
+ break;
+ case ECPGt_int:
+ return "ECPGt_int";
+ break;
+ case ECPGt_unsigned_int:
+ return "ECPGt_unsigned_int";
+ break;
+ case ECPGt_long:
+ return "ECPGt_long";
+ break;
+ case ECPGt_unsigned_long:
+ return "ECPGt_unsigned_long";
+ break;
+ case ECPGt_long_long:
+ return "ECPGt_long_long";
+ break;
+ case ECPGt_unsigned_long_long:
+ return "ECPGt_unsigned_long_long";
+ break;
+ case ECPGt_float:
+ return "ECPGt_float";
+ break;
+ case ECPGt_double:
+ return "ECPGt_double";
+ break;
+ case ECPGt_bool:
+ return "ECPGt_bool";
+ break;
+ case ECPGt_varchar:
+ return "ECPGt_varchar";
+ case ECPGt_bytea:
+ return "ECPGt_bytea";
+ case ECPGt_NO_INDICATOR: /* no indicator */
+ return "ECPGt_NO_INDICATOR";
+ break;
+ case ECPGt_char_variable: /* string that should not be quoted */
+ return "ECPGt_char_variable";
+ break;
+ case ECPGt_const: /* constant string quoted */
+ return "ECPGt_const";
+ break;
+ case ECPGt_decimal:
+ return "ECPGt_decimal";
+ break;
+ case ECPGt_numeric:
+ return "ECPGt_numeric";
+ break;
+ case ECPGt_interval:
+ return "ECPGt_interval";
+ break;
+ case ECPGt_descriptor:
+ return "ECPGt_descriptor";
+ break;
+ case ECPGt_sqlda:
+ return "ECPGt_sqlda";
+ break;
+ case ECPGt_date:
+ return "ECPGt_date";
+ break;
+ case ECPGt_timestamp:
+ return "ECPGt_timestamp";
+ break;
+ case ECPGt_string:
+ return "ECPGt_string";
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized variable type code %d", type);
+ }
+
+ return NULL;
+}
+
+/* Dump a type.
+ The type is dumped as:
+ type-tag <comma> - enum ECPGttype
+ reference-to-variable <comma> - char *
+ size <comma> - long size of this field (if varchar)
+ arrsize <comma> - long number of elements in the arr
+ offset <comma> - offset to the next element
+ Where:
+ type-tag is one of the simple types or varchar.
+ reference-to-variable can be a reference to a struct element.
+ arrsize is the size of the array in case of array fetches. Otherwise 0.
+ size is the maxsize in case it is a varchar. Otherwise it is the size of
+ the variable (required to do array fetches of structs).
+ */
+static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
+ char *varcharsize,
+ char *arrsize, const char *size, const char *prefix, int);
+static void ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize,
+ struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix);
+
+void
+ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype *type, const int brace_level,
+ const char *ind_name, struct ECPGtype *ind_type, const int ind_brace_level,
+ const char *prefix, const char *ind_prefix,
+ char *arr_str_size, const char *struct_sizeof,
+ const char *ind_struct_sizeof)
+{
+ struct variable *var;
+
+ if (type->type != ECPGt_descriptor && type->type != ECPGt_sqlda &&
+ type->type != ECPGt_char_variable && type->type != ECPGt_const &&
+ brace_level >= 0)
+ {
+ char *str;
+
+ str = mm_strdup(name);
+ var = find_variable(str);
+ free(str);
+
+ if ((var->type->type != type->type) ||
+ (var->type->type_name && !type->type_name) ||
+ (!var->type->type_name && type->type_name) ||
+ (var->type->type_name && type->type_name && strcmp(var->type->type_name, type->type_name) != 0))
+ mmerror(PARSE_ERROR, ET_ERROR, "variable \"%s\" is hidden by a local variable of a different type", name);
+ else if (var->brace_level != brace_level)
+ mmerror(PARSE_ERROR, ET_WARNING, "variable \"%s\" is hidden by a local variable", name);
+
+ if (ind_name && ind_type && ind_type->type != ECPGt_NO_INDICATOR && ind_brace_level >= 0)
+ {
+ str = mm_strdup(ind_name);
+ var = find_variable(str);
+ free(str);
+
+ if ((var->type->type != ind_type->type) ||
+ (var->type->type_name && !ind_type->type_name) ||
+ (!var->type->type_name && ind_type->type_name) ||
+ (var->type->type_name && ind_type->type_name && strcmp(var->type->type_name, ind_type->type_name) != 0))
+ mmerror(PARSE_ERROR, ET_ERROR, "indicator variable \"%s\" is hidden by a local variable of a different type", ind_name);
+ else if (var->brace_level != ind_brace_level)
+ mmerror(PARSE_ERROR, ET_WARNING, "indicator variable \"%s\" is hidden by a local variable", ind_name);
+ }
+ }
+
+ switch (type->type)
+ {
+ case ECPGt_array:
+ if (indicator_set && ind_type->type != ECPGt_array)
+ mmfatal(INDICATOR_NOT_ARRAY, "indicator for array/pointer has to be array/pointer");
+ switch (type->u.element->type)
+ {
+ case ECPGt_array:
+ mmerror(PARSE_ERROR, ET_ERROR, "nested arrays are not supported (except strings)"); /* array of array */
+ break;
+ case ECPGt_struct:
+ case ECPGt_union:
+ ECPGdump_a_struct(o, name,
+ ind_name,
+ type->size,
+ type->u.element,
+ (ind_type == NULL) ? NULL : ((ind_type->type == ECPGt_NO_INDICATOR) ? ind_type : ind_type->u.element),
+ prefix, ind_prefix);
+ break;
+ default:
+ if (!IS_SIMPLE_TYPE(type->u.element->type))
+ base_yyerror("internal error: unknown datatype, please report this to <" PACKAGE_BUGREPORT ">");
+
+ ECPGdump_a_simple(o, name,
+ type->u.element->type,
+ type->u.element->size, type->size, struct_sizeof ? struct_sizeof : NULL,
+ prefix, type->u.element->counter);
+
+ if (ind_type != NULL)
+ {
+ if (ind_type->type == ECPGt_NO_INDICATOR)
+ {
+ char *str_neg_one = mm_strdup("-1");
+
+ ECPGdump_a_simple(o, ind_name, ind_type->type, ind_type->size, str_neg_one, NULL, ind_prefix, 0);
+ free(str_neg_one);
+ }
+ else
+ {
+ ECPGdump_a_simple(o, ind_name, ind_type->u.element->type,
+ ind_type->u.element->size, ind_type->size, NULL, ind_prefix, 0);
+ }
+ }
+ }
+ break;
+ case ECPGt_struct:
+ {
+ char *str_one = mm_strdup("1");
+
+ if (indicator_set && ind_type->type != ECPGt_struct)
+ mmfatal(INDICATOR_NOT_STRUCT, "indicator for struct has to be a struct");
+
+ ECPGdump_a_struct(o, name, ind_name, str_one, type, ind_type, prefix, ind_prefix);
+ free(str_one);
+ }
+ break;
+ case ECPGt_union: /* cannot dump a complete union */
+ base_yyerror("type of union has to be specified");
+ break;
+ case ECPGt_char_variable:
+ {
+ /*
+ * Allocate for each, as there are code-paths where the values
+ * get stomped on.
+ */
+ char *str_varchar_one = mm_strdup("1");
+ char *str_arr_one = mm_strdup("1");
+ char *str_neg_one = mm_strdup("-1");
+
+ if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array))
+ mmfatal(INDICATOR_NOT_SIMPLE, "indicator for simple data type has to be simple");
+
+ ECPGdump_a_simple(o, name, type->type, str_varchar_one, (arr_str_size && strcmp(arr_str_size, "0") != 0) ? arr_str_size : str_arr_one, struct_sizeof, prefix, 0);
+ if (ind_type != NULL)
+ ECPGdump_a_simple(o, ind_name, ind_type->type, ind_type->size, (arr_str_size && strcmp(arr_str_size, "0") != 0) ? arr_str_size : str_neg_one, ind_struct_sizeof, ind_prefix, 0);
+
+ free(str_varchar_one);
+ free(str_arr_one);
+ free(str_neg_one);
+ }
+ break;
+ case ECPGt_descriptor:
+ {
+ /*
+ * Allocate for each, as there are code-paths where the values
+ * get stomped on.
+ */
+ char *str_neg_one = mm_strdup("-1");
+ char *ind_type_neg_one = mm_strdup("-1");
+
+ if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array))
+ mmfatal(INDICATOR_NOT_SIMPLE, "indicator for simple data type has to be simple");
+
+ ECPGdump_a_simple(o, name, type->type, NULL, str_neg_one, NULL, prefix, 0);
+ if (ind_type != NULL)
+ ECPGdump_a_simple(o, ind_name, ind_type->type, ind_type->size, ind_type_neg_one, NULL, ind_prefix, 0);
+
+ free(str_neg_one);
+ free(ind_type_neg_one);
+ }
+ break;
+ default:
+ {
+ /*
+ * Allocate for each, as there are code-paths where the values
+ * get stomped on.
+ */
+ char *str_neg_one = mm_strdup("-1");
+ char *ind_type_neg_one = mm_strdup("-1");
+
+ if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array))
+ mmfatal(INDICATOR_NOT_SIMPLE, "indicator for simple data type has to be simple");
+
+ ECPGdump_a_simple(o, name, type->type, type->size, (arr_str_size && strcmp(arr_str_size, "0") != 0) ? arr_str_size : str_neg_one, struct_sizeof, prefix, type->counter);
+ if (ind_type != NULL)
+ ECPGdump_a_simple(o, ind_name, ind_type->type, ind_type->size, (arr_str_size && strcmp(arr_str_size, "0") != 0) ? arr_str_size : ind_type_neg_one, ind_struct_sizeof, ind_prefix, 0);
+
+ free(str_neg_one);
+ free(ind_type_neg_one);
+ }
+ break;
+ }
+}
+
+
+/* If size is NULL, then the offset is 0, if not use size as a
+ string, it represents the offset needed if we are in an array of structs. */
+static void
+ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
+ char *varcharsize,
+ char *arrsize,
+ const char *size,
+ const char *prefix,
+ int counter)
+{
+ if (type == ECPGt_NO_INDICATOR)
+ fprintf(o, "\n\tECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ");
+ else if (type == ECPGt_descriptor)
+ /* remember that name here already contains quotes (if needed) */
+ fprintf(o, "\n\tECPGt_descriptor, %s, 1L, 1L, 1L, ", name);
+ else if (type == ECPGt_sqlda)
+ fprintf(o, "\n\tECPGt_sqlda, &%s, 0L, 0L, 0L, ", name);
+ else
+ {
+ char *variable = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 4);
+ char *offset = (char *) mm_alloc(strlen(name) + strlen("sizeof(struct varchar_)") + 1 + strlen(varcharsize) + sizeof(int) * CHAR_BIT * 10 / 3);
+ char *struct_name;
+
+ switch (type)
+ {
+ /*
+ * we have to use the & operator except for arrays and
+ * pointers
+ */
+
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+
+ /*
+ * we have to use the pointer except for arrays with given
+ * bounds
+ */
+ if (((atoi(arrsize) > 0) ||
+ (atoi(arrsize) == 0 && strcmp(arrsize, "0") != 0)) &&
+ size == NULL)
+ sprintf(variable, "(%s%s)", prefix ? prefix : "", name);
+ else
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+
+ /*
+ * If we created a varchar structure automatically, counter is
+ * greater than 0.
+ */
+ if (type == ECPGt_varchar)
+ struct_name = "struct varchar";
+ else
+ struct_name = "struct bytea";
+
+ if (counter)
+ sprintf(offset, "sizeof(%s_%d)", struct_name, counter);
+ else
+ sprintf(offset, "sizeof(%s)", struct_name);
+ break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_char_variable:
+ case ECPGt_string:
+ {
+ char *sizeof_name = "char";
+
+ /*
+ * we have to use the pointer except for arrays with given
+ * bounds, ecpglib will distinguish between * and []
+ */
+ if ((atoi(varcharsize) > 1 ||
+ (atoi(arrsize) > 0) ||
+ (atoi(varcharsize) == 0 && strcmp(varcharsize, "0") != 0) ||
+ (atoi(arrsize) == 0 && strcmp(arrsize, "0") != 0))
+ && size == NULL)
+ {
+ sprintf(variable, "(%s%s)", prefix ? prefix : "", name);
+ if ((type == ECPGt_char || type == ECPGt_unsigned_char) &&
+ strcmp(varcharsize, "0") == 0)
+ {
+ /*
+ * If this is an array of char *, the offset would
+ * be sizeof(char *) and not sizeof(char).
+ */
+ sizeof_name = "char *";
+ }
+ }
+ else
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+
+ sprintf(offset, "(%s)*sizeof(%s)", strcmp(varcharsize, "0") == 0 ? "1" : varcharsize, sizeof_name);
+ break;
+ }
+ case ECPGt_numeric:
+
+ /*
+ * we have to use a pointer here
+ */
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+ sprintf(offset, "sizeof(numeric)");
+ break;
+ case ECPGt_interval:
+
+ /*
+ * we have to use a pointer here
+ */
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+ sprintf(offset, "sizeof(interval)");
+ break;
+ case ECPGt_date:
+
+ /*
+ * we have to use a pointer and translate the variable type
+ */
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+ sprintf(offset, "sizeof(date)");
+ break;
+ case ECPGt_timestamp:
+
+ /*
+ * we have to use a pointer and translate the variable type
+ */
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+ sprintf(offset, "sizeof(timestamp)");
+ break;
+ case ECPGt_const:
+
+ /*
+ * just dump the const as string
+ */
+ sprintf(variable, "\"%s\"", name);
+ sprintf(offset, "strlen(\"%s\")", name);
+ break;
+ default:
+
+ /*
+ * we have to use the pointer except for arrays with given
+ * bounds
+ */
+ if (((atoi(arrsize) > 0) ||
+ (atoi(arrsize) == 0 && strcmp(arrsize, "0") != 0)) &&
+ size == NULL)
+ sprintf(variable, "(%s%s)", prefix ? prefix : "", name);
+ else
+ sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
+
+ sprintf(offset, "sizeof(%s)", ecpg_type_name(type));
+ break;
+ }
+
+ /*
+ * Array size would be -1 for addresses of members within structure,
+ * when pointer to structure is being dumped.
+ */
+ if (atoi(arrsize) < 0 && !size)
+ strcpy(arrsize, "1");
+
+ /*
+ * If size i.e. the size of structure of which this variable is part
+ * of, that gives the offset to the next element, if required
+ */
+ if (size == NULL || strlen(size) == 0)
+ fprintf(o, "\n\t%s,%s,(long)%s,(long)%s,%s, ", get_type(type), variable, varcharsize, arrsize, offset);
+ else
+ fprintf(o, "\n\t%s,%s,(long)%s,(long)%s,%s, ", get_type(type), variable, varcharsize, arrsize, size);
+
+ free(variable);
+ free(offset);
+ }
+}
+
+
+/* Penetrate a struct and dump the contents. */
+static void
+ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize, struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix)
+{
+ /*
+ * If offset is NULL, then this is the first recursive level. If not then
+ * we are in a struct and the offset is used as offset.
+ */
+ struct ECPGstruct_member *p,
+ *ind_p = NULL;
+ char *pbuf = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 3);
+ char *ind_pbuf = (char *) mm_alloc(strlen(ind_name) + ((ind_prefix == NULL) ? 0 : strlen(ind_prefix)) + 3);
+
+ if (atoi(arrsize) == 1)
+ sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
+ else
+ sprintf(pbuf, "%s%s->", prefix ? prefix : "", name);
+
+ prefix = pbuf;
+
+ if (ind_type == &ecpg_no_indicator)
+ ind_p = &struct_no_indicator;
+ else if (ind_type != NULL)
+ {
+ if (atoi(arrsize) == 1)
+ sprintf(ind_pbuf, "%s%s.", ind_prefix ? ind_prefix : "", ind_name);
+ else
+ sprintf(ind_pbuf, "%s%s->", ind_prefix ? ind_prefix : "", ind_name);
+
+ ind_prefix = ind_pbuf;
+ ind_p = ind_type->u.members;
+ }
+
+ for (p = type->u.members; p; p = p->next)
+ {
+ ECPGdump_a_type(o, p->name, p->type, -1,
+ (ind_p != NULL) ? ind_p->name : NULL,
+ (ind_p != NULL) ? ind_p->type : NULL,
+ -1,
+ prefix, ind_prefix, arrsize, type->struct_sizeof,
+ (ind_p != NULL) ? ind_type->struct_sizeof : NULL);
+ if (ind_p != NULL && ind_p != &struct_no_indicator)
+ {
+ ind_p = ind_p->next;
+ if (ind_p == NULL && p->next != NULL)
+ {
+ mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too few members", ind_name);
+ ind_p = &struct_no_indicator;
+ }
+ }
+ }
+
+ if (ind_type != NULL && ind_p != NULL && ind_p != &struct_no_indicator)
+ {
+ mmerror(PARSE_ERROR, ET_WARNING, "indicator struct \"%s\" has too many members", ind_name);
+ }
+
+ free(pbuf);
+ free(ind_pbuf);
+}
+
+void
+ECPGfree_struct_member(struct ECPGstruct_member *rm)
+{
+ while (rm)
+ {
+ struct ECPGstruct_member *p = rm;
+
+ rm = rm->next;
+ free(p->name);
+ free(p->type);
+ free(p);
+ }
+}
+
+void
+ECPGfree_type(struct ECPGtype *type)
+{
+ if (!IS_SIMPLE_TYPE(type->type))
+ {
+ switch (type->type)
+ {
+ case ECPGt_array:
+ switch (type->u.element->type)
+ {
+ case ECPGt_array:
+ base_yyerror("internal error: found multidimensional array\n");
+ break;
+ case ECPGt_struct:
+ case ECPGt_union:
+ /* Array of structs. */
+ ECPGfree_struct_member(type->u.element->u.members);
+ free(type->u.element);
+ break;
+ default:
+ if (!IS_SIMPLE_TYPE(type->u.element->type))
+ base_yyerror("internal error: unknown datatype, please report this to <" PACKAGE_BUGREPORT ">");
+
+ free(type->u.element);
+ }
+ break;
+ case ECPGt_struct:
+ case ECPGt_union:
+ ECPGfree_struct_member(type->u.members);
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized variable type code %d", type->type);
+ break;
+ }
+ }
+ free(type);
+}
+
+const char *
+get_dtype(enum ECPGdtype type)
+{
+ switch (type)
+ {
+ case ECPGd_count:
+ return "ECPGd_countr";
+ break;
+ case ECPGd_data:
+ return "ECPGd_data";
+ break;
+ case ECPGd_di_code:
+ return "ECPGd_di_code";
+ break;
+ case ECPGd_di_precision:
+ return "ECPGd_di_precision";
+ break;
+ case ECPGd_indicator:
+ return "ECPGd_indicator";
+ break;
+ case ECPGd_key_member:
+ return "ECPGd_key_member";
+ break;
+ case ECPGd_length:
+ return "ECPGd_length";
+ break;
+ case ECPGd_name:
+ return "ECPGd_name";
+ break;
+ case ECPGd_nullable:
+ return "ECPGd_nullable";
+ break;
+ case ECPGd_octet:
+ return "ECPGd_octet";
+ break;
+ case ECPGd_precision:
+ return "ECPGd_precision";
+ break;
+ case ECPGd_ret_length:
+ return "ECPGd_ret_length";
+ case ECPGd_ret_octet:
+ return "ECPGd_ret_octet";
+ break;
+ case ECPGd_scale:
+ return "ECPGd_scale";
+ break;
+ case ECPGd_type:
+ return "ECPGd_type";
+ break;
+ case ECPGd_cardinality:
+ return "ECPGd_cardinality";
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "unrecognized descriptor item code %d", type);
+ }
+
+ return NULL;
+}
diff --git a/src/interfaces/ecpg/preproc/type.h b/src/interfaces/ecpg/preproc/type.h
new file mode 100644
index 0000000..fb20be5
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/type.h
@@ -0,0 +1,216 @@
+/*
+ * src/interfaces/ecpg/preproc/type.h
+ */
+#ifndef _ECPG_PREPROC_TYPE_H
+#define _ECPG_PREPROC_TYPE_H
+
+#include "ecpgtype.h"
+
+struct ECPGtype;
+struct ECPGstruct_member
+{
+ char *name;
+ struct ECPGtype *type;
+ struct ECPGstruct_member *next;
+};
+
+struct ECPGtype
+{
+ enum ECPGttype type;
+ char *type_name; /* For struct and union types it is the struct
+ * name */
+ char *size; /* For array it is the number of elements. For
+ * varchar it is the maxsize of the area. */
+ char *struct_sizeof; /* For a struct this is the sizeof() type as
+ * string */
+ union
+ {
+ struct ECPGtype *element; /* For an array this is the type of the
+ * element */
+ struct ECPGstruct_member *members; /* A pointer to a list of members. */
+ } u;
+ int counter;
+};
+
+/* Everything is malloced. */
+void ECPGmake_struct_member(const char *, struct ECPGtype *, struct ECPGstruct_member **);
+struct ECPGtype *ECPGmake_simple_type(enum ECPGttype, char *, int);
+struct ECPGtype *ECPGmake_array_type(struct ECPGtype *, char *);
+struct ECPGtype *ECPGmake_struct_type(struct ECPGstruct_member *, enum ECPGttype, char *, char *);
+struct ECPGstruct_member *ECPGstruct_member_dup(struct ECPGstruct_member *);
+
+/* Frees a type. */
+void ECPGfree_struct_member(struct ECPGstruct_member *);
+void ECPGfree_type(struct ECPGtype *);
+
+/* Dump a type.
+ The type is dumped as:
+ type-tag <comma> reference-to-variable <comma> arrsize <comma> size <comma>
+ Where:
+ type-tag is one of the simple types or varchar.
+ reference-to-variable can be a reference to a struct element.
+ arrsize is the size of the array in case of array fetches. Otherwise 0.
+ size is the maxsize in case it is a varchar. Otherwise it is the size of
+ the variable (required to do array fetches of structs).
+ */
+void ECPGdump_a_type(FILE *, const char *, struct ECPGtype *, const int,
+ const char *, struct ECPGtype *, const int,
+ const char *, const char *, char *,
+ const char *, const char *);
+
+/* A simple struct to keep a variable and its type. */
+struct ECPGtemp_type
+{
+ struct ECPGtype *type;
+ const char *name;
+};
+
+extern const char *ecpg_type_name(enum ECPGttype type);
+
+/* some stuff for whenever statements */
+enum WHEN_TYPE
+{
+ W_NOTHING,
+ W_CONTINUE,
+ W_BREAK,
+ W_SQLPRINT,
+ W_GOTO,
+ W_DO,
+ W_STOP
+};
+
+struct when
+{
+ enum WHEN_TYPE code;
+ char *command;
+ char *str;
+};
+
+struct index
+{
+ char *index1;
+ char *index2;
+ char *str;
+};
+
+struct su_symbol
+{
+ char *su;
+ char *symbol;
+};
+
+struct prep
+{
+ char *name;
+ char *stmt;
+ char *type;
+};
+
+struct exec
+{
+ char *name;
+ char *type;
+};
+
+struct this_type
+{
+ enum ECPGttype type_enum;
+ char *type_str;
+ char *type_dimension;
+ char *type_index;
+ char *type_sizeof;
+};
+
+struct _include_path
+{
+ char *path;
+ struct _include_path *next;
+};
+
+struct cursor
+{
+ char *name;
+ char *function;
+ char *command;
+ char *connection;
+ bool opened;
+ struct arguments *argsinsert;
+ struct arguments *argsinsert_oos;
+ struct arguments *argsresult;
+ struct arguments *argsresult_oos;
+ struct cursor *next;
+};
+
+struct declared_list
+{
+ char *name;
+ char *connection;
+ struct declared_list *next;
+};
+
+struct typedefs
+{
+ char *name;
+ struct this_type *type;
+ struct ECPGstruct_member *struct_member_list;
+ int brace_level;
+ struct typedefs *next;
+};
+
+struct _defines
+{
+ char *olddef;
+ char *newdef;
+ int pertinent;
+ void *used;
+ struct _defines *next;
+};
+
+/* This is a linked list of the variable names and types. */
+struct variable
+{
+ char *name;
+ struct ECPGtype *type;
+ int brace_level;
+ struct variable *next;
+};
+
+struct arguments
+{
+ struct variable *variable;
+ struct variable *indicator;
+ struct arguments *next;
+};
+
+struct descriptor
+{
+ char *name;
+ char *connection;
+ struct descriptor *next;
+};
+
+struct assignment
+{
+ char *variable;
+ enum ECPGdtype value;
+ struct assignment *next;
+};
+
+enum errortype
+{
+ ET_WARNING, ET_ERROR
+};
+
+struct fetch_desc
+{
+ char *str;
+ char *name;
+};
+
+struct describe
+{
+ int input;
+ char *stmt_name;
+};
+
+#endif /* _ECPG_PREPROC_TYPE_H */
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
new file mode 100644
index 0000000..887d479
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -0,0 +1,625 @@
+/* src/interfaces/ecpg/preproc/variable.c */
+
+#include "postgres_fe.h"
+
+#include "preproc_extern.h"
+
+static struct variable *allvariables = NULL;
+
+struct variable *
+new_variable(const char *name, struct ECPGtype *type, int brace_level)
+{
+ struct variable *p = (struct variable *) mm_alloc(sizeof(struct variable));
+
+ p->name = mm_strdup(name);
+ p->type = type;
+ p->brace_level = brace_level;
+
+ p->next = allvariables;
+ allvariables = p;
+
+ return p;
+}
+
+static struct variable *
+find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int brace_level)
+{
+ char *next = strpbrk(++str, ".-["),
+ *end,
+ c = '\0';
+
+ if (next != NULL)
+ {
+ c = *next;
+ *next = '\0';
+ }
+
+ for (; members; members = members->next)
+ {
+ if (strcmp(members->name, str) == 0)
+ {
+ if (next == NULL)
+ {
+ /* found the end */
+ switch (members->type->type)
+ {
+ case ECPGt_array:
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), members->type->size), brace_level);
+ case ECPGt_struct:
+ case ECPGt_union:
+ return new_variable(name, ECPGmake_struct_type(members->type->u.members, members->type->type, members->type->type_name, members->type->struct_sizeof), brace_level);
+ default:
+ return new_variable(name, ECPGmake_simple_type(members->type->type, members->type->size, members->type->counter), brace_level);
+ }
+ }
+ else
+ {
+ *next = c;
+ if (c == '[')
+ {
+ int count;
+
+ /*
+ * We don't care about what's inside the array braces so
+ * just eat up the character
+ */
+ for (count = 1, end = next + 1; count; end++)
+ {
+ switch (*end)
+ {
+ case '[':
+ count++;
+ break;
+ case ']':
+ count--;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ end = next;
+
+ switch (*end)
+ {
+ case '\0': /* found the end, but this time it has to be
+ * an array element */
+ if (members->type->type != ECPGt_array)
+ mmfatal(PARSE_ERROR, "incorrectly formed variable \"%s\"", name);
+
+ switch (members->type->u.element->type)
+ {
+ case ECPGt_array:
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->u.element->type, members->type->u.element->u.element->size, members->type->u.element->u.element->counter), members->type->u.element->size), brace_level);
+ case ECPGt_struct:
+ case ECPGt_union:
+ return new_variable(name, ECPGmake_struct_type(members->type->u.element->u.members, members->type->u.element->type, members->type->u.element->type_name, members->type->u.element->struct_sizeof), brace_level);
+ default:
+ return new_variable(name, ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), brace_level);
+ }
+ break;
+ case '-':
+ if (members->type->type == ECPGt_array)
+ return find_struct_member(name, ++end, members->type->u.element->u.members, brace_level);
+ else
+ return find_struct_member(name, ++end, members->type->u.members, brace_level);
+ break;
+ break;
+ case '.':
+ if (members->type->type == ECPGt_array)
+ return find_struct_member(name, end, members->type->u.element->u.members, brace_level);
+ else
+ return find_struct_member(name, end, members->type->u.members, brace_level);
+ break;
+ default:
+ mmfatal(PARSE_ERROR, "incorrectly formed variable \"%s\"", name);
+ break;
+ }
+ }
+ }
+ }
+
+ return NULL;
+}
+
+static struct variable *
+find_struct(char *name, char *next, char *end)
+{
+ struct variable *p;
+ char c = *next;
+
+ /* first get the mother structure entry */
+ *next = '\0';
+ p = find_variable(name);
+
+ if (c == '-')
+ {
+ if (p->type->type != ECPGt_array)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not a pointer", name);
+
+ if (p->type->u.element->type != ECPGt_struct && p->type->u.element->type != ECPGt_union)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not a pointer to a structure or a union", name);
+
+ /* restore the name, we will need it later */
+ *next = c;
+
+ return find_struct_member(name, ++end, p->type->u.element->u.members, p->brace_level);
+ }
+ else
+ {
+ if (next == end)
+ {
+ if (p->type->type != ECPGt_struct && p->type->type != ECPGt_union)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is neither a structure nor a union", name);
+
+ /* restore the name, we will need it later */
+ *next = c;
+
+ return find_struct_member(name, end, p->type->u.members, p->brace_level);
+ }
+ else
+ {
+ if (p->type->type != ECPGt_array)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not an array", name);
+
+ if (p->type->u.element->type != ECPGt_struct && p->type->u.element->type != ECPGt_union)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not a pointer to a structure or a union", name);
+
+ /* restore the name, we will need it later */
+ *next = c;
+
+ return find_struct_member(name, end, p->type->u.element->u.members, p->brace_level);
+ }
+ }
+}
+
+static struct variable *
+find_simple(char *name)
+{
+ struct variable *p;
+
+ for (p = allvariables; p; p = p->next)
+ {
+ if (strcmp(p->name, name) == 0)
+ return p;
+ }
+
+ return NULL;
+}
+
+/* Note that this function will end the program in case of an unknown */
+/* variable */
+struct variable *
+find_variable(char *name)
+{
+ char *next,
+ *end;
+ struct variable *p;
+ int count;
+
+ next = strpbrk(name, ".[-");
+ if (next)
+ {
+ if (*next == '[')
+ {
+ /*
+ * We don't care about what's inside the array braces so just eat
+ * up the characters
+ */
+ for (count = 1, end = next + 1; count; end++)
+ {
+ switch (*end)
+ {
+ case '[':
+ count++;
+ break;
+ case ']':
+ count--;
+ break;
+ default:
+ break;
+ }
+ }
+ if (*end == '.')
+ p = find_struct(name, next, end);
+ else
+ {
+ char c = *next;
+
+ *next = '\0';
+ p = find_simple(name);
+ if (p == NULL)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not declared", name);
+
+ *next = c;
+ switch (p->type->u.element->type)
+ {
+ case ECPGt_array:
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(p->type->u.element->u.element->type, p->type->u.element->u.element->size, p->type->u.element->u.element->counter), p->type->u.element->size), p->brace_level);
+ case ECPGt_struct:
+ case ECPGt_union:
+ return new_variable(name, ECPGmake_struct_type(p->type->u.element->u.members, p->type->u.element->type, p->type->u.element->type_name, p->type->u.element->struct_sizeof), p->brace_level);
+ default:
+ return new_variable(name, ECPGmake_simple_type(p->type->u.element->type, p->type->u.element->size, p->type->u.element->counter), p->brace_level);
+ }
+ }
+ }
+ else
+ p = find_struct(name, next, next);
+ }
+ else
+ p = find_simple(name);
+
+ if (p == NULL)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not declared", name);
+
+ return p;
+}
+
+void
+remove_typedefs(int brace_level)
+{
+ struct typedefs *p,
+ *prev;
+
+ for (p = prev = types; p;)
+ {
+ if (p->brace_level >= brace_level)
+ {
+ /* remove it */
+ if (p == types)
+ prev = types = p->next;
+ else
+ prev->next = p->next;
+
+ if (p->type->type_enum == ECPGt_struct || p->type->type_enum == ECPGt_union)
+ free(p->struct_member_list);
+ free(p->type);
+ free(p->name);
+ free(p);
+ if (prev == types)
+ p = types;
+ else
+ p = prev ? prev->next : NULL;
+ }
+ else
+ {
+ prev = p;
+ p = prev->next;
+ }
+ }
+}
+
+void
+remove_variables(int brace_level)
+{
+ struct variable *p,
+ *prev;
+
+ for (p = prev = allvariables; p;)
+ {
+ if (p->brace_level >= brace_level)
+ {
+ /* is it still referenced by a cursor? */
+ struct cursor *ptr;
+
+ for (ptr = cur; ptr != NULL; ptr = ptr->next)
+ {
+ struct arguments *varptr,
+ *prevvar;
+
+ for (varptr = prevvar = ptr->argsinsert; varptr != NULL; varptr = varptr->next)
+ {
+ if (p == varptr->variable)
+ {
+ /* remove from list */
+ if (varptr == ptr->argsinsert)
+ ptr->argsinsert = varptr->next;
+ else
+ prevvar->next = varptr->next;
+ }
+ }
+ for (varptr = prevvar = ptr->argsresult; varptr != NULL; varptr = varptr->next)
+ {
+ if (p == varptr->variable)
+ {
+ /* remove from list */
+ if (varptr == ptr->argsresult)
+ ptr->argsresult = varptr->next;
+ else
+ prevvar->next = varptr->next;
+ }
+ }
+ }
+
+ /* remove it */
+ if (p == allvariables)
+ prev = allvariables = p->next;
+ else
+ prev->next = p->next;
+
+ ECPGfree_type(p->type);
+ free(p->name);
+ free(p);
+ if (prev == allvariables)
+ p = allvariables;
+ else
+ p = prev ? prev->next : NULL;
+ }
+ else
+ {
+ prev = p;
+ p = prev->next;
+ }
+ }
+}
+
+
+/*
+ * Here are the variables that need to be handled on every request.
+ * These are of two kinds: input and output.
+ * I will make two lists for them.
+ */
+
+struct arguments *argsinsert = NULL;
+struct arguments *argsresult = NULL;
+
+void
+reset_variables(void)
+{
+ argsinsert = NULL;
+ argsresult = NULL;
+}
+
+/* Insert a new variable into our request list.
+ * Note: The list is dumped from the end,
+ * so we have to add new entries at the beginning */
+void
+add_variable_to_head(struct arguments **list, struct variable *var, struct variable *ind)
+{
+ struct arguments *p = (struct arguments *) mm_alloc(sizeof(struct arguments));
+
+ p->variable = var;
+ p->indicator = ind;
+ p->next = *list;
+ *list = p;
+}
+
+/* Append a new variable to our request list. */
+void
+add_variable_to_tail(struct arguments **list, struct variable *var, struct variable *ind)
+{
+ struct arguments *p,
+ *new = (struct arguments *) mm_alloc(sizeof(struct arguments));
+
+ for (p = *list; p && p->next; p = p->next);
+
+ new->variable = var;
+ new->indicator = ind;
+ new->next = NULL;
+
+ if (p)
+ p->next = new;
+ else
+ *list = new;
+}
+
+void
+remove_variable_from_list(struct arguments **list, struct variable *var)
+{
+ struct arguments *p,
+ *prev = NULL;
+ bool found = false;
+
+ for (p = *list; p; p = p->next)
+ {
+ if (p->variable == var)
+ {
+ found = true;
+ break;
+ }
+ prev = p;
+ }
+ if (found)
+ {
+ if (prev)
+ prev->next = p->next;
+ else
+ *list = p->next;
+ }
+}
+
+/* Dump out a list of all the variable on this list.
+ This is a recursive function that works from the end of the list and
+ deletes the list as we go on.
+ */
+void
+dump_variables(struct arguments *list, int mode)
+{
+ char *str_zero;
+
+ if (list == NULL)
+ return;
+
+ str_zero = mm_strdup("0");
+
+ /*
+ * The list is build up from the beginning so lets first dump the end of
+ * the list:
+ */
+
+ dump_variables(list->next, mode);
+
+ /* Then the current element and its indicator */
+ ECPGdump_a_type(base_yyout, list->variable->name, list->variable->type, list->variable->brace_level,
+ list->indicator->name, list->indicator->type, list->indicator->brace_level,
+ NULL, NULL, str_zero, NULL, NULL);
+
+ /* Then release the list element. */
+ if (mode != 0)
+ free(list);
+
+ free(str_zero);
+}
+
+void
+check_indicator(struct ECPGtype *var)
+{
+ /* make sure this is a valid indicator variable */
+ switch (var->type)
+ {
+ struct ECPGstruct_member *p;
+
+ case ECPGt_short:
+ case ECPGt_int:
+ case ECPGt_long:
+ case ECPGt_long_long:
+ case ECPGt_unsigned_short:
+ case ECPGt_unsigned_int:
+ case ECPGt_unsigned_long:
+ case ECPGt_unsigned_long_long:
+ break;
+
+ case ECPGt_struct:
+ case ECPGt_union:
+ for (p = var->u.members; p; p = p->next)
+ check_indicator(p->type);
+ break;
+
+ case ECPGt_array:
+ check_indicator(var->u.element);
+ break;
+ default:
+ mmerror(PARSE_ERROR, ET_ERROR, "indicator variable must have an integer type");
+ break;
+ }
+}
+
+struct typedefs *
+get_typedef(char *name)
+{
+ struct typedefs *this;
+
+ for (this = types; this && strcmp(this->name, name) != 0; this = this->next);
+ if (!this)
+ mmfatal(PARSE_ERROR, "unrecognized data type name \"%s\"", name);
+
+ return this;
+}
+
+void
+adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *type_dimension, char *type_index, int pointer_len, bool type_definition)
+{
+ if (atoi(type_index) >= 0)
+ {
+ if (atoi(*length) >= 0)
+ mmfatal(PARSE_ERROR, "multidimensional arrays are not supported");
+
+ *length = type_index;
+ }
+
+ if (atoi(type_dimension) >= 0)
+ {
+ if (atoi(*dimension) >= 0 && atoi(*length) >= 0)
+ mmfatal(PARSE_ERROR, "multidimensional arrays are not supported");
+
+ if (atoi(*dimension) >= 0)
+ *length = *dimension;
+
+ *dimension = type_dimension;
+ }
+
+ if (pointer_len > 2)
+ mmfatal(PARSE_ERROR, ngettext("multilevel pointers (more than 2 levels) are not supported; found %d level",
+ "multilevel pointers (more than 2 levels) are not supported; found %d levels", pointer_len),
+ pointer_len);
+
+ if (pointer_len > 1 && type_enum != ECPGt_char && type_enum != ECPGt_unsigned_char && type_enum != ECPGt_string)
+ mmfatal(PARSE_ERROR, "pointer to pointer is not supported for this data type");
+
+ if (pointer_len > 1 && (atoi(*length) >= 0 || atoi(*dimension) >= 0))
+ mmfatal(PARSE_ERROR, "multidimensional arrays are not supported");
+
+ if (atoi(*length) >= 0 && atoi(*dimension) >= 0 && pointer_len)
+ mmfatal(PARSE_ERROR, "multidimensional arrays are not supported");
+
+ switch (type_enum)
+ {
+ case ECPGt_struct:
+ case ECPGt_union:
+ /* pointer has to get dimension 0 */
+ if (pointer_len)
+ {
+ *length = *dimension;
+ *dimension = mm_strdup("0");
+ }
+
+ if (atoi(*length) >= 0)
+ mmfatal(PARSE_ERROR, "multidimensional arrays for structures are not supported");
+
+ break;
+ case ECPGt_varchar:
+ case ECPGt_bytea:
+ /* pointer has to get dimension 0 */
+ if (pointer_len)
+ *dimension = mm_strdup("0");
+
+ /* one index is the string length */
+ if (atoi(*length) < 0)
+ {
+ *length = *dimension;
+ *dimension = mm_strdup("-1");
+ }
+
+ break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ case ECPGt_string:
+ /* char ** */
+ if (pointer_len == 2)
+ {
+ *length = *dimension = mm_strdup("0");
+ break;
+ }
+
+ /* pointer has to get length 0 */
+ if (pointer_len == 1)
+ *length = mm_strdup("0");
+
+ /* one index is the string length */
+ if (atoi(*length) < 0)
+ {
+ /*
+ * make sure we return length = -1 for arrays without given
+ * bounds
+ */
+ if (atoi(*dimension) < 0 && !type_definition)
+
+ /*
+ * do not change this for typedefs since it will be
+ * changed later on when the variable is defined
+ */
+ *length = mm_strdup("1");
+ else if (strcmp(*dimension, "0") == 0)
+ *length = mm_strdup("-1");
+ else
+ *length = *dimension;
+
+ *dimension = mm_strdup("-1");
+ }
+ break;
+ default:
+ /* a pointer has dimension = 0 */
+ if (pointer_len)
+ {
+ *length = *dimension;
+ *dimension = mm_strdup("0");
+ }
+
+ if (atoi(*length) >= 0)
+ mmfatal(PARSE_ERROR, "multidimensional arrays for simple data types are not supported");
+
+ break;
+ }
+}
diff --git a/src/interfaces/ecpg/test/.gitignore b/src/interfaces/ecpg/test/.gitignore
new file mode 100644
index 0000000..d60b197
--- /dev/null
+++ b/src/interfaces/ecpg/test/.gitignore
@@ -0,0 +1,5 @@
+/pg_regress
+# Exclude subdirectories
+/log/
+/results/
+/tmp_check/
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
new file mode 100644
index 0000000..be53b7b
--- /dev/null
+++ b/src/interfaces/ecpg/test/Makefile
@@ -0,0 +1,101 @@
+# src/interfaces/ecpg/test/Makefile
+
+PGFILEDESC = "ECPG Test - regression tests for ECPG"
+PGAPPICON = win32
+
+subdir = src/interfaces/ecpg/test
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+override CPPFLAGS := \
+ '-I$(top_builddir)/src/port' \
+ '-I$(top_srcdir)/src/test/regress' \
+ '-DHOST_TUPLE="$(host_tuple)"' \
+ '-DSHELLPROG="$(SHELL)"' \
+ '-DDLSUFFIX="$(DLSUFFIX)"' \
+ $(CPPFLAGS)
+
+# default encoding for regression tests
+ENCODING = SQL_ASCII
+
+ifneq ($(build_os),mingw32)
+abs_builddir := $(shell pwd)
+else
+abs_builddir := $(shell sh -c "pwd -W")
+endif
+
+all install installdirs uninstall distprep:
+ $(MAKE) -C connect $@
+ $(MAKE) -C sql $@
+ $(MAKE) -C pgtypeslib $@
+ $(MAKE) -C preproc $@
+ $(MAKE) -C compat_informix $@
+ $(MAKE) -C compat_oracle $@
+ $(MAKE) -C thread $@
+
+clean distclean maintainer-clean:
+ $(MAKE) -C connect $@
+ $(MAKE) -C sql $@
+ $(MAKE) -C pgtypeslib $@
+ $(MAKE) -C preproc $@
+ $(MAKE) -C compat_informix $@
+ $(MAKE) -C compat_oracle $@
+ $(MAKE) -C thread $@
+ rm -rf tmp_check results log
+ rm -f pg_regress regression.diffs regression.out pg_regress_ecpg.o $(WIN32RES)
+
+# Build regression test driver
+
+all: pg_regress$(X)
+
+pg_regress$(X): pg_regress_ecpg.o $(WIN32RES) $(top_builddir)/src/test/regress/pg_regress.o
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+
+$(top_builddir)/src/test/regress/pg_regress.o:
+ $(MAKE) -C $(dir $@) $(notdir $@)
+
+# dependencies ensure that path changes propagate
+pg_regress_ecpg.o: pg_regress_ecpg.c $(top_builddir)/src/port/pg_config_paths.h
+
+$(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
+ $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
+
+# When doing a VPATH build, copy over the .pgc, .stdout and .stderr
+# files so that the driver script can find them. We have to use an
+# absolute path for the targets, because otherwise make will try to
+# locate the missing files using VPATH, and will find them in
+# $(srcdir), but the point here is that we want to copy them from
+# $(srcdir) to the build directory.
+
+ifdef VPATH
+remaining_files_src := $(wildcard $(srcdir)/*/*.pgc) $(wildcard $(srcdir)/expected/*.c) $(wildcard $(srcdir)/expected/*.stdout) $(wildcard $(srcdir)/expected/*.stderr)
+remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
+
+all: $(remaining_files_build)
+$(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
+ ln -s $< $@
+endif
+
+# Common options for tests. Also pick up anything passed in EXTRA_REGRESS_OPTS
+REGRESS_OPTS = --dbname=ecpg1_regression,ecpg2_regression --create-role=regress_ecpg_user1,regress_ecpg_user2 $(EXTRA_REGRESS_OPTS)
+
+check: all
+ $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule sql/twophase
+
+# Connect to the server using TCP, and add a TCP-specific test.
+checktcp: all | temp-install
+ $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --host=localhost sql/twophase connect/test1
+
+installcheck: all
+ ./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
+
+# Versions of the check tests that include the twophase commit test.
+# It only makes sense to run these if set up to use prepared transactions,
+# via TEMP_CONFIG for the check case, or via the postgresql.conf for the
+# installcheck case.
+
+installcheck-prepared-txns: all
+ ./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule sql/twophase
+
+check-prepared-txns: all | temp-install
+ $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule sql/twophase
diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress
new file mode 100644
index 0000000..b0647cd
--- /dev/null
+++ b/src/interfaces/ecpg/test/Makefile.regress
@@ -0,0 +1,31 @@
+# This file is included into the Makefiles of subdirectories of ecpg/test/,
+# so the file references have one more level of .. than you might expect.
+
+override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I$(libpq_srcdir) $(CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq)
+
+override LIBS += $(PTHREAD_LIBS)
+
+# Standard way to invoke the ecpg preprocessor
+ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir)
+
+# Files that most or all ecpg preprocessor test outputs depend on
+ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \
+ $(srcdir)/../regression.h \
+ $(srcdir)/../printf_hack.h \
+ $(srcdir)/../../include/sqlca.h \
+ $(srcdir)/../../include/sqlda.h \
+ $(srcdir)/../../include/sqltypes.h \
+ $(srcdir)/../../include/sql3types.h
+
+# Caution: this build rule is overridden in some child Makefiles
+# where it's necessary to use nondefault switches to ecpg;
+# make sure those rules match except for the extra switches.
+%.c: %.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -o $@ $<
+
+clean:
+ rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c)
diff --git a/src/interfaces/ecpg/test/compat_informix/.gitignore b/src/interfaces/ecpg/test/compat_informix/.gitignore
new file mode 100644
index 0000000..f97706b
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/.gitignore
@@ -0,0 +1,18 @@
+/charfuncs
+/charfuncs.c
+/dec_test
+/dec_test.c
+/describe
+/describe.c
+/rfmtdate
+/rfmtdate.c
+/rfmtlong
+/rfmtlong.c
+/rnull
+/rnull.c
+/sqlda
+/sqlda.c
+/test_informix
+/test_informix.c
+/test_informix2
+/test_informix2.c
diff --git a/src/interfaces/ecpg/test/compat_informix/Makefile b/src/interfaces/ecpg/test/compat_informix/Makefile
new file mode 100644
index 0000000..d50fdc2
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/Makefile
@@ -0,0 +1,24 @@
+subdir = src/interfaces/ecpg/test/compat_informix
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+# Use special informix compatibility switch for all tests in this directory
+ECPG += -C INFORMIX
+
+LDFLAGS_INTERNAL += -L../../compatlib -lecpg_compat
+
+TESTS = test_informix test_informix.c \
+ test_informix2 test_informix2.c \
+ dec_test dec_test.c \
+ rfmtdate rfmtdate.c \
+ rfmtlong rfmtlong.c \
+ rnull rnull.c \
+ sqlda sqlda.c \
+ describe describe.c \
+ charfuncs charfuncs.c
+
+all: $(TESTS)
+
+rnull.c: rnull.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -r no_indicator -o $@ $<
diff --git a/src/interfaces/ecpg/test/compat_informix/charfuncs.pgc b/src/interfaces/ecpg/test/compat_informix/charfuncs.pgc
new file mode 100644
index 0000000..3605c9d
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/charfuncs.pgc
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <sqltypes.h>
+
+int main(void)
+{
+ char t1[] = "abc def ghi ";
+ /* 123456789012345 */
+ char buf[50];
+ int k;
+
+ printf("t1: _%s_\n", t1);
+ rupshift(t1);
+ printf("t1: _%s_\n", t1);
+
+ k = 2;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 5;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 9;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 15;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
new file mode 100644
index 0000000..f6a9f42
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
@@ -0,0 +1,238 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_error.h>
+#include <decimal.h>
+#include <sqltypes.h>
+
+exec sql include ../regression;
+
+exec sql include ../printf_hack;
+
+
+/*
+TODO:
+ deccmp => DECUNKNOWN
+ decimal point: , and/or . ?
+ ECPG_INFORMIX_BAD_EXPONENT ?
+*/
+
+char* decs[] = { "2E394", "-2", ".794", "3.44", "592.49E21", "-32.84e4",
+ "2E-394", ".1E-2", "+.0", "-592.49E-07", "+32.84e-4",
+ ".500001", "-.5000001",
+ "1234567890123456789012345678.91", /* 30 digits should fit
+ into decimal */
+ "1234567890123456789012345678.921", /* 31 digits should NOT
+ fit into decimal */
+ "not a number",
+ NULL};
+
+
+static void
+check_errno(void);
+
+#define BUFSIZE 200
+
+int
+main(void)
+{
+ decimal *dec, *din;
+ char buf[BUFSIZE];
+ long l;
+ int i, j, k, q, r, count = 0;
+ double dbl;
+ decimal **decarr = (decimal **) calloc(1, sizeof(decimal));
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; decs[i]; i++)
+ {
+ dec = PGTYPESdecimal_new();
+ r = deccvasc(decs[i], strlen(decs[i]), dec);
+ if (r)
+ {
+ check_errno();
+ printf("dec[%d,0]: r: %d\n", i, r);
+ PGTYPESdecimal_free(dec);
+ continue;
+ }
+ decarr = realloc(decarr, sizeof(decimal *) * (count + 1));
+ decarr[count++] = dec;
+
+ r = dectoasc(dec, buf, BUFSIZE-1, -1);
+ if (r < 0) check_errno();
+ printf("dec[%d,1]: r: %d, %s\n", i, r, buf);
+
+ r = dectoasc(dec, buf, BUFSIZE-1, 0);
+ if (r < 0) check_errno();
+ printf("dec[%d,2]: r: %d, %s\n", i, r, buf);
+ r = dectoasc(dec, buf, BUFSIZE-1, 1);
+ if (r < 0) check_errno();
+ printf("dec[%d,3]: r: %d, %s\n", i, r, buf);
+ r = dectoasc(dec, buf, BUFSIZE-1, 2);
+ if (r < 0) check_errno();
+ printf("dec[%d,4]: r: %d, %s\n", i, r, buf);
+
+ din = PGTYPESdecimal_new();
+ r = dectoasc(din, buf, BUFSIZE-1, 2);
+ if (r < 0) check_errno();
+ printf("dec[%d,5]: r: %d, %s\n", i, r, buf);
+
+ r = dectolong(dec, &l);
+ if (r) check_errno();
+ printf("dec[%d,6]: %ld (r: %d)\n", i, r?0L:l, r);
+ if (r == 0)
+ {
+ r = deccvlong(l, din);
+ if (r) check_errno();
+ dectoasc(din, buf, BUFSIZE-1, 2);
+ q = deccmp(dec, din);
+ printf("dec[%d,7]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
+ }
+
+ r = dectoint(dec, &k);
+ if (r) check_errno();
+ printf("dec[%d,8]: %d (r: %d)\n", i, r?0:k, r);
+ if (r == 0)
+ {
+ r = deccvint(k, din);
+ if (r) check_errno();
+ dectoasc(din, buf, BUFSIZE-1, 2);
+ q = deccmp(dec, din);
+ printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
+ }
+
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+ r = dectodbl(dec, &dbl);
+ if (r) check_errno();
+ printf("dec[%d,10]: ", i);
+ print_double(r ? 0.0 : dbl);
+ printf(" (r: %d)\n", r);
+ }
+
+ PGTYPESdecimal_free(din);
+ printf("\n");
+ }
+
+ /* add a NULL value */
+ dec = PGTYPESdecimal_new();
+ decarr = realloc(decarr, sizeof(decimal *) * (count + 1));
+ decarr[count++] = dec;
+
+ rsetnull(CDECIMALTYPE, (char *) decarr[count-1]);
+ printf("dec[%d]: %sNULL\n", count-1,
+ risnull(CDECIMALTYPE, (char *) decarr[count-1]) ? "" : "NOT ");
+ printf("dec[0]: %sNULL\n",
+ risnull(CDECIMALTYPE, (char *) decarr[0]) ? "" : "NOT ");
+
+ r = dectoasc(decarr[3], buf, -1, -1);
+ check_errno(); printf("dectoasc with len == -1: r: %d\n", r);
+ r = dectoasc(decarr[3], buf, 0, -1);
+ check_errno(); printf("dectoasc with len == 0: r: %d\n", r);
+
+ for (i = 0; i < count; i++)
+ {
+ for (j = 0; j < count; j++)
+ {
+ decimal a, s, m, d;
+ int c;
+ c = deccmp(decarr[i], decarr[j]);
+ printf("dec[c,%d,%d]: %d\n", i, j, c);
+
+ r = decadd(decarr[i], decarr[j], &a);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&a, buf, BUFSIZE-1, -1);
+ printf("dec[a,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decsub(decarr[i], decarr[j], &s);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&s, buf, BUFSIZE-1, -1);
+ printf("dec[s,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decmul(decarr[i], decarr[j], &m);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&m, buf, BUFSIZE-1, -1);
+ printf("dec[m,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decdiv(decarr[i], decarr[j], &d);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&d, buf, BUFSIZE-1, -1);
+ printf("dec[d,%d,%d]: %s\n", i, j, buf);
+ }
+ }
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ dectoasc(decarr[i], buf, BUFSIZE-1, -1);
+ printf("%d: %s\n", i, buf);
+
+ PGTYPESdecimal_free(decarr[i]);
+ }
+ free(decarr);
+
+ return 0;
+}
+
+static void
+check_errno(void)
+{
+ switch(errno)
+ {
+ case 0:
+ printf("(no errno set) - ");
+ break;
+ case ECPG_INFORMIX_NUM_OVERFLOW:
+ printf("(errno == ECPG_INFORMIX_NUM_OVERFLOW) - ");
+ break;
+ case ECPG_INFORMIX_NUM_UNDERFLOW:
+ printf("(errno == ECPG_INFORMIX_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_OVERFLOW:
+ printf("(errno == PGTYPES_NUM_OVERFLOW) - ");
+ break;
+ case PGTYPES_NUM_UNDERFLOW:
+ printf("(errno == PGTYPES_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_BAD_NUMERIC:
+ printf("(errno == PGTYPES_NUM_BAD_NUMERIC) - ");
+ break;
+ case PGTYPES_NUM_DIVIDE_ZERO:
+ printf("(errno == PGTYPES_NUM_DIVIDE_ZERO) - ");
+ break;
+ default:
+ printf("(unknown errno (%d))\n", errno);
+ printf("(libc: (%s)) ", strerror(errno));
+ break;
+ }
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/describe.pgc b/src/interfaces/ecpg/test/compat_informix/describe.pgc
new file mode 100644
index 0000000..4ee7254
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/describe.pgc
@@ -0,0 +1,199 @@
+#include <stdlib.h>
+#include <string.h>
+
+exec sql include ../regression;
+exec sql include sqlda.h;
+
+exec sql whenever sqlerror stop;
+
+sqlda_t *sqlda1, *sqlda2, *sqlda3;
+
+int
+main (void)
+{
+exec sql begin declare section;
+ char *stmt1 = "SELECT id, t FROM descr_t1";
+ char *stmt2 = "SELECT id, t FROM descr_t1 WHERE id = -1";
+ int i, count1, count2;
+ char field_name1[30] = "not set";
+ char field_name2[30] = "not set";
+exec sql end declare section;
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table descr_t1(id serial primary key, t text);
+
+ strcpy(msg, "insert");
+ exec sql insert into descr_t1(id, t) values (default, 'a');
+ exec sql insert into descr_t1(id, t) values (default, 'b');
+ exec sql insert into descr_t1(id, t) values (default, 'c');
+ exec sql insert into descr_t1(id, t) values (default, 'd');
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ /*
+ * Test DESCRIBE with a query producing tuples.
+ * DESCRIPTOR and SQL DESCRIPTOR are NOT the same in
+ * Informix-compat mode.
+ */
+
+ strcpy(msg, "allocate");
+ exec sql allocate descriptor desc1;
+ exec sql allocate descriptor desc2;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id1 FROM :stmt1;
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ exec sql describe st_id1 into sql descriptor desc1;
+ exec sql describe st_id1 using sql descriptor desc2;
+
+ exec sql describe st_id1 into descriptor sqlda1;
+ exec sql describe st_id1 using descriptor sqlda2;
+ exec sql describe st_id1 into sqlda3;
+
+ if (sqlda1 == NULL)
+ {
+ printf("sqlda1 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda2 == NULL)
+ {
+ printf("sqlda2 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda3 == NULL)
+ {
+ printf("sqlda3 NULL\n");
+ exit(1);
+ }
+
+ strcpy(msg, "get descriptor");
+ exec sql get descriptor desc1 :count1 = count;
+ exec sql get descriptor desc1 :count2 = count;
+
+ if (count1 != count2)
+ {
+ printf("count1 (%d) != count2 (%d)\n", count1, count2);
+ exit(1);
+ }
+
+ if (count1 != sqlda1->sqld)
+ {
+ printf("count1 (%d) != sqlda1->sqld (%d)\n", count1, sqlda1->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda2->sqld)
+ {
+ printf("count1 (%d) != sqlda2->sqld (%d)\n", count1, sqlda2->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda3->sqld)
+ {
+ printf("count1 (%d) != sqlda3->sqld (%d)\n", count1, sqlda3->sqld);
+ exit(1);
+ }
+
+ for (i = 1; i <= count1; i++)
+ {
+ exec sql get descriptor desc1 value :i :field_name1 = name;
+ exec sql get descriptor desc2 value :i :field_name2 = name;
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname,
+ sqlda2->sqlvar[i-1].sqlname,
+ sqlda3->sqlvar[i-1].sqlname);
+ }
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate descriptor desc1;
+ exec sql deallocate descriptor desc2;
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ exec sql deallocate prepare st_id1;
+
+ /* Test DESCRIBE with a query not producing tuples */
+
+ strcpy(msg, "allocate");
+ exec sql allocate descriptor desc1;
+ exec sql allocate descriptor desc2;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id2 FROM :stmt2;
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ exec sql describe st_id2 into sql descriptor desc1;
+ exec sql describe st_id2 using sql descriptor desc2;
+
+ exec sql describe st_id2 into descriptor sqlda1;
+ exec sql describe st_id2 using descriptor sqlda2;
+ exec sql describe st_id2 into sqlda3;
+
+ if (sqlda1 == NULL || sqlda2 == NULL || sqlda3 == NULL)
+ exit(1);
+
+ strcpy(msg, "get descriptor");
+ exec sql get descriptor desc1 :count1 = count;
+ exec sql get descriptor desc1 :count2 = count;
+
+ if (!( count1 == count2 &&
+ count1 == sqlda1->sqld &&
+ count1 == sqlda2->sqld &&
+ count1 == sqlda3->sqld))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ exec sql get descriptor desc1 value :i :field_name1 = name;
+ exec sql get descriptor desc2 value :i :field_name2 = name;
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname,
+ sqlda2->sqlvar[i-1].sqlname,
+ sqlda3->sqlvar[i-1].sqlname);
+ }
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate descriptor desc1;
+ exec sql deallocate descriptor desc2;
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ exec sql deallocate prepare st_id2;
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ exec sql drop table descr_t1;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc b/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc
new file mode 100644
index 0000000..a147f40
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc
@@ -0,0 +1,175 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_error.h>
+#include <sqltypes.h>
+
+/*
+ * This file tests various forms of date-input/output by means of
+ * rfmtdate / rdefmtdate / rstrdate
+ */
+
+
+static void
+check_return(int ret);
+
+static void
+date_test_strdate(const char *input)
+{
+ static int i;
+ date d;
+ int r, q;
+ char dbuf[11];
+
+ r = rstrdate(input, &d);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ q = rdatestr(d, dbuf);
+ printf("q: %d ", q);
+ if (q == 0)
+ {
+ printf("date %d: %s\n", i++, dbuf);
+ }
+ else
+ printf("\n");
+ }
+ else
+ check_return(r);
+}
+
+static void
+date_test_defmt(const char *fmt, const char *input)
+{
+ static int i;
+ char dbuf[11];
+ date d;
+ int q, r;
+
+ r = rdefmtdate(&d, fmt, input);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ q = rdatestr(d, dbuf);
+ printf("q: %d ", q);
+ if (q == 0)
+ {
+ printf("date %d: %s\n", i++, dbuf);
+ }
+ else
+ printf("\n");
+ }
+ else
+ check_return(r);
+}
+
+static void
+date_test_fmt(date d, const char *fmt)
+{
+ static int i;
+ char buf[200];
+ int r;
+
+ r = rfmtdate(d, fmt, buf);
+ printf("r: %d ", r);
+ if (r != 0)
+ check_return(r);
+ else
+ printf("date: %d: %s\n", i++, buf);
+}
+
+
+int
+main(void)
+{
+ short mdy[3] = { 11, 23, 1959 };
+ char dbuf[11];
+ date d;
+ int r;
+
+ ECPGdebug(1, stderr);
+
+ r = rmdyjul(mdy, &d);
+ printf("create: r: %d\n", r);
+ if (r == 0)
+ {
+ rdatestr(d, dbuf);
+ printf("date: %s\n", dbuf);
+ }
+
+ /* input mask is mmddyyyy */
+ date_test_strdate("12031994");
+ date_test_strdate("9.6.1994");
+
+ date_test_fmt(d, "mmddyy");
+ date_test_fmt(d, "ddmmyy");
+ date_test_fmt(d, "yymmdd");
+ date_test_fmt(d, "yy/mm/dd");
+ date_test_fmt(d, "yy mm dd");
+ date_test_fmt(d, "yy.mm.dd");
+ date_test_fmt(d, ".mm.yyyy.dd.");
+ date_test_fmt(d, "mmm. dd, yyyy");
+ date_test_fmt(d, "mmm dd yyyy");
+ date_test_fmt(d, "yyyy dd mm");
+ date_test_fmt(d, "ddd, mmm. dd, yyyy");
+ date_test_fmt(d, "(ddd) mmm. dd, yyyy");
+
+ date_test_defmt("ddmmyy", "21-2-54");
+ date_test_defmt("ddmmyy", "2-12-54");
+ date_test_defmt("ddmmyy", "20111954");
+ date_test_defmt("ddmmyy", "130464");
+ date_test_defmt("mmm.dd.yyyy", "MAR-12-1967");
+ date_test_defmt("yy/mm/dd", "1954, February 3rd");
+ date_test_defmt("mmm.dd.yyyy", "041269");
+ date_test_defmt("yy/mm/dd", "In the year 2525, in the month of July, mankind will be alive on the 28th day");
+ date_test_defmt("dd-mm-yy", "I said on the 28th of July in the year 2525");
+ date_test_defmt("mmm.dd.yyyy", "9/14/58");
+ date_test_defmt("yy/mm/dd", "47/03/29");
+ date_test_defmt("mmm.dd.yyyy", "oct 28 1975");
+ date_test_defmt("mmddyy", "Nov 14th, 1985");
+ /* ok: still contains dd mm yy */
+ date_test_defmt("bladdfoommbaryybong", "20/11/1954");
+ /* 1994 is not a leap year, it accepts the date as 01-03-1994 */
+ date_test_defmt("ddmmyy", "29-02-1994");
+
+ /* ECPG_INFORMIX_ENOTDMY, need "dd", "mm" and "yy" */
+ date_test_defmt("dmy", "20/11/1954");
+
+ /* ECPG_INFORMIX_ENOSHORTDATE */
+ date_test_defmt("ddmmyy", "21254");
+ date_test_defmt("ddmmyy", " 21254 ");
+
+ /* ECPG_INFORMIX_BAD_DAY */
+ date_test_defmt("ddmmyy", "320494");
+
+ /* ECPG_INFORMIX_BAD_MONTH */
+ date_test_defmt("mm-yyyy-dd", "13-1993-21");
+
+ /* ECPG_INFORMIX_BAD_YEAR */
+ /* ??? */
+
+ return 0;
+}
+
+static void
+check_return(int ret)
+{
+ switch(ret)
+ {
+ case ECPG_INFORMIX_ENOTDMY:
+ printf("(ECPG_INFORMIX_ENOTDMY)");
+ break;
+ case ECPG_INFORMIX_ENOSHORTDATE:
+ printf("(ECPG_INFORMIX_ENOSHORTDATE)");
+ break;
+ case ECPG_INFORMIX_BAD_DAY:
+ printf("(ECPG_INFORMIX_BAD_DAY)");
+ break;
+ case ECPG_INFORMIX_BAD_MONTH:
+ printf("(ECPG_INFORMIX_BAD_MONTH)");
+ break;
+ default:
+ printf("(unknown ret: %d)", ret);
+ break;
+ }
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc b/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc
new file mode 100644
index 0000000..2ecf09c
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc
@@ -0,0 +1,73 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_error.h>
+#include <sqltypes.h>
+
+/*
+ * This file tests various forms of long-input/output by means of
+ * rfmtlong
+ */
+
+
+static void
+check_return(int ret);
+
+static void
+fmtlong(long lng, const char *fmt)
+{
+ static int i;
+ int r;
+ char buf[30];
+
+ r = rfmtlong(lng, fmt, buf);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ printf("%d: %s (fmt was: %s)\n", i++, buf, fmt);
+ }
+ else
+ check_return(r);
+}
+
+int
+main(void)
+{
+ ECPGdebug(1, stderr);
+
+ fmtlong(-8494493, "-<<<<,<<<,<<<,<<<");
+ fmtlong(-8494493, "################");
+ fmtlong(-8494493, "+++$$$$$$$$$$$$$.##");
+ fmtlong(-8494493, "(&,&&&,&&&,&&&.)");
+ fmtlong(-8494493, "<<<<,<<<,<<<,<<<");
+ fmtlong(-8494493, "$************.**");
+ fmtlong(-8494493, "---$************.**");
+ fmtlong(-8494493, "+-+################");
+ fmtlong(-8494493, "abc: ################+-+");
+ fmtlong(-8494493, "+<<<<,<<<,<<<,<<<");
+
+ return 0;
+}
+
+static void
+check_return(int ret)
+{
+ switch(ret)
+ {
+ case ECPG_INFORMIX_ENOTDMY:
+ printf("(ECPG_INFORMIX_ENOTDMY)");
+ break;
+ case ECPG_INFORMIX_ENOSHORTDATE:
+ printf("(ECPG_INFORMIX_ENOSHORTDATE)");
+ break;
+ case ECPG_INFORMIX_BAD_DAY:
+ printf("(ECPG_INFORMIX_BAD_DAY)");
+ break;
+ case ECPG_INFORMIX_BAD_MONTH:
+ printf("(ECPG_INFORMIX_BAD_MONTH)");
+ break;
+ default:
+ printf("(unknown ret: %d)", ret);
+ break;
+ }
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/rnull.pgc b/src/interfaces/ecpg/test/compat_informix/rnull.pgc
new file mode 100644
index 0000000..a6ad35e
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/rnull.pgc
@@ -0,0 +1,97 @@
+#include "sqltypes.h"
+#include <stdlib.h>
+
+$include ../regression;
+$define NUMBER 12;
+
+static void
+test_null(int type, char *ptr)
+{
+ printf("null: %d\n", risnull(type, ptr));
+}
+
+int main(void)
+{
+ $char c[] = "abc";
+ $short s = 17;
+ $int i = -74874;
+ $bool b = 1;
+ $float f = 3.71;
+ $long l = 487444;
+ $double dbl = 404.404;
+ $decimal dec;
+ $date dat;
+ $timestamp tmp;
+
+ ECPGdebug(1, stderr);
+ $whenever sqlerror do sqlprint();
+
+ $connect to REGRESSDB1;
+
+ $create table test(id int, c char(10), s smallint, i int, b bool,
+ f float, l bigint, dbl double precision,
+ dec decimal, dat date, tmp timestamptz);
+ $commit;
+
+ $insert into test (id, c, s, i, b, f, l, dbl) values (
+ 1, :c, :s, :i, :b, :f, :l, :dbl
+ );
+ $commit;
+
+ rsetnull(CCHARTYPE, (char *) c);
+ rsetnull(CSHORTTYPE, (char *) &s);
+ rsetnull(CINTTYPE, (char *) &i);
+ rsetnull(CBOOLTYPE, (char *) &b);
+ rsetnull(CFLOATTYPE, (char *) &f);
+ rsetnull(CLONGTYPE, (char *) &l);
+ rsetnull(CDOUBLETYPE, (char *) &dbl);
+ rsetnull(CDECIMALTYPE, (char *) &dec);
+ rsetnull(CDATETYPE, (char *) &dat);
+ rsetnull(CDTIMETYPE, (char *) &tmp);
+
+ $insert into test (id, c, s, i, b, f, l, dbl, dec, dat, tmp) values (
+ 2, :c, :s, :i, :b, :f, :l, :dbl, :dec, :dat, :tmp
+ );
+ $commit;
+
+ printf("first select\n");
+
+ $select c, s, i, b, f, l, dbl, dec, dat, tmp
+ into :c, :s, :i, :b, :f, :l, :dbl, :dec, :dat, :tmp
+ from test where id = 1;
+
+ test_null(CCHARTYPE, (char *) c);
+ test_null(CSHORTTYPE, (char *) &s);
+ test_null(CINTTYPE, (char *) &i);
+ test_null(CBOOLTYPE, (char *) &b);
+ test_null(CFLOATTYPE, (char *) &f);
+ test_null(CLONGTYPE, (char *) &l);
+ test_null(CDOUBLETYPE, (char *) &dbl);
+ test_null(CDECIMALTYPE, (char *) &dec);
+ test_null(CDATETYPE, (char *) &dat);
+ test_null(CDTIMETYPE, (char *) &tmp);
+
+ printf("second select\n");
+
+ $select c, s, i, b, f, l, dbl, dec, dat, tmp
+ into :c, :s, :i, :b, :f, :l, :dbl, :dec, :dat, :tmp
+ from test where id = 2;
+
+ test_null(CCHARTYPE, (char *) c);
+ test_null(CSHORTTYPE, (char *) &s);
+ test_null(CINTTYPE, (char *) &i);
+ test_null(CBOOLTYPE, (char *) &b);
+ test_null(CFLOATTYPE, (char *) &f);
+ test_null(CLONGTYPE, (char *) &l);
+ test_null(CDOUBLETYPE, (char *) &dbl);
+ test_null(CDECIMALTYPE, (char *) &dec);
+ test_null(CDATETYPE, (char *) &dat);
+ test_null(CDTIMETYPE, (char *) &tmp);
+
+ $drop table test;
+ $commit;
+
+ $close database;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/sqlda.pgc b/src/interfaces/ecpg/test/compat_informix/sqlda.pgc
new file mode 100644
index 0000000..87e0110
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/sqlda.pgc
@@ -0,0 +1,250 @@
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+exec sql include ../regression;
+
+exec sql include sqlda.h;
+exec sql include sqltypes.h;
+
+exec sql whenever sqlerror stop;
+
+/* These shouldn't be under DECLARE SECTION */
+sqlda_t *inp_sqlda, *outp_sqlda;
+
+static void
+dump_sqlda(sqlda_t *sqlda)
+{
+ int i;
+
+ if (sqlda == NULL)
+ {
+ printf("dump_sqlda called with NULL sqlda\n");
+ return;
+ }
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ if (sqlda->sqlvar[i].sqlind && *(sqlda->sqlvar[i].sqlind) == -1)
+ printf("name sqlda descriptor: '%s' value NULL'\n", sqlda->sqlvar[i].sqlname);
+ else
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case SQLCHAR:
+ printf("name sqlda descriptor: '%s' value '%s'\n", sqlda->sqlvar[i].sqlname, sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLINT:
+ printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname, *(int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLFLOAT:
+ printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname, *(double *)sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLDECIMAL:
+ {
+ char val[64];
+ dectoasc((dec_t *)sqlda->sqlvar[i].sqldata, val, 64, -1);
+ printf("name sqlda descriptor: '%s' value DECIMAL '%s'\n", sqlda->sqlvar[i].sqlname, val);
+ break;
+ }
+ }
+ }
+}
+
+int
+main (void)
+{
+exec sql begin declare section;
+ char *stmt1 = "SELECT * FROM t1";
+ char *stmt2 = "SELECT * FROM t1 WHERE id = ?";
+ int rec;
+ int id;
+exec sql end declare section;
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1 as regress1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table t1(
+ id integer,
+ t text,
+ d1 numeric,
+ d2 float8,
+ c char(10));
+
+ strcpy(msg, "insert");
+ exec sql insert into t1 values
+ (1, 'a', 1.0, 1, 'a'),
+ (2, null, null, null, null),
+ (4, 'd', 4.0, 4, 'd');
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ /* SQLDA test for getting all records from a table */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id1 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql declare mycur1 cursor for st_id1;
+
+ strcpy(msg, "open");
+ exec sql open mycur1;
+
+ exec sql whenever not found do break;
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ exec sql fetch 1 from mycur1 into descriptor outp_sqlda;
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ exec sql whenever not found continue;
+
+ strcpy(msg, "close");
+ exec sql close mycur1;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id1;
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting all records from a table
+ using the Informix-specific FETCH ... USING DESCRIPTOR
+ */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id2 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql declare mycur2 cursor for st_id2;
+
+ strcpy(msg, "open");
+ exec sql open mycur2;
+
+ exec sql whenever not found do break;
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ exec sql fetch from mycur2 using descriptor outp_sqlda;
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ exec sql whenever not found continue;
+
+ strcpy(msg, "close");
+ exec sql close mycur2;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id2;
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor */
+
+ /* Input sqlda has to be built manually */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqld = 1;
+ inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
+ memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
+
+ inp_sqlda->sqlvar[0].sqltype = SQLINT;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id3 FROM :stmt2;
+
+ strcpy(msg, "execute");
+ exec sql execute st_id3 using descriptor inp_sqlda into descriptor outp_sqlda;
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id3;
+
+ free(inp_sqlda->sqlvar);
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor
+ * on a named connection
+ */
+
+ exec sql connect to REGRESSDB1 as con2;
+
+ /* Input sqlda has to be built manually */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqld = 1;
+ inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
+ memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
+
+ inp_sqlda->sqlvar[0].sqltype = SQLINT;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql at con2 prepare st_id4 FROM :stmt2;
+
+ strcpy(msg, "execute");
+ exec sql at con2 execute st_id4 using descriptor inp_sqlda into descriptor outp_sqlda;
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "commit");
+ exec sql at con2 commit;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id4;
+
+ free(inp_sqlda->sqlvar);
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect con2;
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ exec sql drop table t1;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/test_informix.pgc b/src/interfaces/ecpg/test/compat_informix/test_informix.pgc
new file mode 100644
index 0000000..0911efe
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/test_informix.pgc
@@ -0,0 +1,95 @@
+#include "sqltypes.h"
+#include <stdlib.h>
+
+$include ../regression;
+$define NUMBER 12;
+
+static void openit(void);
+static void dosqlprint(void) {
+ printf("doSQLprint: Error: %s\n", sqlca.sqlerrm.sqlerrmc);
+}
+
+int main(void)
+{
+ $int i = 14, loopcount;
+ $decimal j, m, n;
+ $string c[10];
+
+ ECPGdebug(1, stderr);
+ $whenever sqlerror do dosqlprint();
+
+ $connect to REGRESSDB1;
+ if (sqlca.sqlcode != 0) exit(1);
+
+ $create table test(i int primary key, j int, c text);
+
+ /* this INSERT works */
+ rsetnull(CDECIMALTYPE, (char *)&j);
+ $insert into test (i, j, c) values (7, :j, 'test ');
+ $commit;
+
+ /* this INSERT should fail because i is a unique column */
+ $insert into test (i, j, c) values (7, NUMBER, 'a');
+ printf("INSERT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ if (sqlca.sqlcode != 0) $rollback;
+
+ $insert into test (i, j, c) values (:i, 1, 'a ');
+ $commit;
+
+ /* this will fail (more than one row in subquery) */
+ $select i from test where j=(select j from test);
+ $rollback;
+
+ /* this however should be ok */
+ $select i from test where j=(select j from test order by i limit 1);
+ printf("SELECT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ if (sqlca.sqlcode != 0) $rollback;
+
+ sqlca.sqlcode = 100;
+ $declare c cursor for select * from test where i <= :i;
+ printf ("%ld\n", sqlca.sqlcode);
+ openit();
+
+ deccvint(0, &j);
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ $fetch forward c into :i, :j, :c;
+ if (sqlca.sqlcode == 100) break;
+
+ if (risnull(CDECIMALTYPE, (char *)&j))
+ printf("%d NULL\n", i);
+ else
+ {
+ int a;
+
+ dectoint(&j, &a);
+ printf("%d %d \"%s\"\n", i, a, c);
+ }
+ }
+
+ deccvint(7, &j);
+ deccvint(14, &m);
+ decadd(&j, &m, &n);
+ $delete from test where i= :n::decimal;
+ printf("DELETE: %ld\n", sqlca.sqlcode);
+
+ $select 1 from test where i=14;
+ printf("Exists: %ld\n", sqlca.sqlcode);
+
+ $select 1 from test where i=147;
+ printf("Does not exist: %ld\n", sqlca.sqlcode);
+
+ $commit;
+ $drop table test;
+ $commit;
+
+ $close database;
+
+ return 0;
+}
+
+static void openit(void)
+{
+ $open c;
+}
diff --git a/src/interfaces/ecpg/test/compat_informix/test_informix2.pgc b/src/interfaces/ecpg/test/compat_informix/test_informix2.pgc
new file mode 100644
index 0000000..224f2da
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_informix/test_informix2.pgc
@@ -0,0 +1,122 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "sqltypes.h"
+
+EXEC SQL include sqlca.h;
+EXEC SQL include ../regression;
+EXEC SQL DEFINE MAXDBLEN 30;
+
+/* Check SQLCODE, and produce a "standard error" if it's wrong! */
+static void sql_check(const char *fn, const char *caller, int ignore)
+{
+ char errorstring[255];
+
+ if (SQLCODE == ignore)
+ return;
+ else
+ {
+ if (SQLCODE != 0)
+ {
+
+ sprintf(errorstring, "**SQL error %ld doing '%s' in function '%s'. [%s]",
+ SQLCODE, caller, fn, sqlca.sqlerrm.sqlerrmc);
+ fprintf(stderr, "%s", errorstring);
+ printf("%s\n", errorstring);
+
+ /* attempt a ROLLBACK */
+ EXEC SQL rollback;
+
+ if (SQLCODE == 0)
+ {
+ sprintf(errorstring, "Rollback successful.\n");
+ } else {
+ sprintf(errorstring, "Rollback failed with code %ld.\n", SQLCODE);
+ }
+
+ fprintf(stderr, "%s", errorstring);
+ printf("%s\n", errorstring);
+
+ exit(1);
+ }
+ }
+}
+
+int main(void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ int c;
+ timestamp d;
+ timestamp e;
+ timestamp maxd;
+ char dbname[30];
+ EXEC SQL END DECLARE SECTION;
+
+ interval *intvl;
+
+ EXEC SQL whenever sqlerror stop;
+
+ ECPGdebug(1, stderr);
+
+ strcpy(dbname, "ecpg1_regression");
+ EXEC SQL connect to :dbname;
+ sql_check("main", "connect", 0);
+
+ EXEC SQL SET DateStyle TO 'DMY';
+
+ EXEC SQL create table history (customerid integer, timestamp timestamp without time zone, action_taken char(5), narrative varchar(100));
+ sql_check("main", "create", 0);
+
+ EXEC SQL insert into history
+ (customerid, timestamp, action_taken, narrative)
+ values(1, '2003-05-07 13:28:34 CEST', 'test', 'test');
+ sql_check("main", "insert", 0);
+
+ EXEC SQL select max(timestamp)
+ into :maxd
+ from history;
+ sql_check("main", "select max", 100);
+
+ EXEC SQL select customerid, timestamp
+ into :c, :d
+ from history
+ where timestamp = :maxd
+ limit 1;
+ sql_check("main", "select", 0);
+
+ printf("Read in customer %d\n", c);
+
+ intvl = PGTYPESinterval_from_asc("1 day 2 hours 24 minutes 65 seconds", NULL);
+ PGTYPEStimestamp_add_interval(&d, intvl, &e);
+ free(intvl);
+ c++;
+
+ EXEC SQL insert into history
+ (customerid, timestamp, action_taken, narrative)
+ values(:c, :e, 'test', 'test');
+ sql_check("main", "update", 0);
+
+ EXEC SQL commit;
+
+ EXEC SQL drop table history;
+ sql_check("main", "drop", 0);
+
+ EXEC SQL commit;
+
+ EXEC SQL disconnect;
+ sql_check("main", "disconnect", 0);
+
+ printf("All OK!\n");
+
+ exit(0);
+
+/*
+ Table "public.history"
+ Column | Type | Nullable
+--------------+-----------------------------+----------
+ customerid | integer | not null
+ timestamp | timestamp without time zone | not null
+ action_taken | character(5) | not null
+ narrative | character varying(100) |
+*/
+
+}
diff --git a/src/interfaces/ecpg/test/compat_oracle/.gitignore b/src/interfaces/ecpg/test/compat_oracle/.gitignore
new file mode 100644
index 0000000..63b3766
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_oracle/.gitignore
@@ -0,0 +1,2 @@
+/char_array
+/char_array.c
diff --git a/src/interfaces/ecpg/test/compat_oracle/Makefile b/src/interfaces/ecpg/test/compat_oracle/Makefile
new file mode 100644
index 0000000..cd4e7e8
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_oracle/Makefile
@@ -0,0 +1,11 @@
+subdir = src/interfaces/ecpg/test/compat_oracle
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+# Use special oracle compatibility switch for all tests in this directory
+ECPG += -C ORACLE
+
+TESTS = char_array char_array.c
+
+all: $(TESTS)
diff --git a/src/interfaces/ecpg/test/compat_oracle/char_array.pgc b/src/interfaces/ecpg/test/compat_oracle/char_array.pgc
new file mode 100644
index 0000000..6a5d383
--- /dev/null
+++ b/src/interfaces/ecpg/test/compat_oracle/char_array.pgc
@@ -0,0 +1,64 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+static void warn(void)
+{
+ fprintf(stderr, "Warning: At least one column was truncated\n");
+}
+
+/* Compatible handling of char array to retrieve varchar field to char array
+ should be fixed-length, blank-padded, then null-terminated.
+ Conforms to the ANSI Fixed Character type. */
+
+int main() {
+
+ EXEC SQL WHENEVER SQLWARNING do warn();
+ EXEC SQL WHENEVER SQLERROR STOP;
+
+ const char *ppppp = "XXXXX";
+ int loopcount;
+ EXEC SQL BEGIN DECLARE SECTION;
+ char shortstr[5];
+ char bigstr[11];
+ short shstr_ind = 0;
+ short bigstr_ind = 0;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL CREATE TABLE strdbase (strval varchar(10));
+ EXEC SQL INSERT INTO strdbase values ('');
+ EXEC SQL INSERT INTO strdbase values ('AB');
+ EXEC SQL INSERT INTO strdbase values ('ABCD');
+ EXEC SQL INSERT INTO strdbase values ('ABCDE');
+ EXEC SQL INSERT INTO strdbase values ('ABCDEF');
+ EXEC SQL INSERT INTO strdbase values ('ABCDEFGHIJ');
+
+ EXEC SQL declare C cursor for select strval, strval from strdbase;
+ EXEC SQL OPEN C;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+
+ printf("Full Str. : Short Ind.\n");
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ strncpy(shortstr, ppppp, sizeof shortstr);
+ memset(bigstr, 0, sizeof bigstr);
+ EXEC SQL FETCH C into :bigstr :bigstr_ind, :shortstr :shstr_ind;
+ printf("\"%s\": \"%s\" %d\n", bigstr, shortstr, shstr_ind);
+ }
+
+ EXEC SQL CLOSE C;
+ EXEC SQL DROP TABLE strdbase;
+
+ printf("\nGOOD-BYE!!\n\n");
+
+ EXEC SQL COMMIT WORK;
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/connect/.gitignore b/src/interfaces/ecpg/test/connect/.gitignore
new file mode 100644
index 0000000..e0639f3
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/.gitignore
@@ -0,0 +1,10 @@
+/test1
+/test1.c
+/test2
+/test2.c
+/test3
+/test3.c
+/test4
+/test4.c
+/test5
+/test5.c
diff --git a/src/interfaces/ecpg/test/connect/Makefile b/src/interfaces/ecpg/test/connect/Makefile
new file mode 100644
index 0000000..2602d5d
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/Makefile
@@ -0,0 +1,12 @@
+subdir = src/interfaces/ecpg/test/connect
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+TESTS = test1 test1.c \
+ test2 test2.c \
+ test3 test3.c \
+ test4 test4.c \
+ test5 test5.c
+
+all: $(TESTS)
diff --git a/src/interfaces/ecpg/test/connect/README b/src/interfaces/ecpg/test/connect/README
new file mode 100644
index 0000000..3bbfbc5
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/README
@@ -0,0 +1,9 @@
+src/interfaces/ecpg/test/connect/README
+
+Programs in this directory test all sorts of connections.
+
+All other programs just use one standard connection method.
+
+If any details of the regression database get changed (port, unix socket file,
+user names, passwords, ...), these programs here have to be changed as well
+because they contain hardcoded values.
diff --git a/src/interfaces/ecpg/test/connect/test1.pgc b/src/interfaces/ecpg/test/connect/test1.pgc
new file mode 100644
index 0000000..961bd72
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/test1.pgc
@@ -0,0 +1,65 @@
+/*
+ * this file tests all sorts of connecting to one single database.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/* do not include regression.h */
+
+int
+main(void)
+{
+exec sql begin declare section;
+ char db[200];
+ char pw[200];
+exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to ecpg2_regression as main;
+ exec sql alter user regress_ecpg_user1 ENCRYPTED PASSWORD 'connectpw';
+ exec sql disconnect; /* <-- "main" not specified */
+
+ exec sql connect to ecpg2_regression@localhost as main;
+ exec sql disconnect main;
+
+ exec sql connect to @localhost as main user regress_ecpg_user2;
+ exec sql disconnect main;
+
+ /* exec sql connect to :@TEMP_PORT@ as main user regress_ecpg_user2;
+ exec sql disconnect main; */
+
+ exec sql connect to tcp:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
+ exec sql disconnect;
+
+ exec sql connect to tcp:postgresql://localhost/ user regress_ecpg_user2;
+ exec sql disconnect;
+
+ strcpy(pw, "connectpw");
+ strcpy(db, "tcp:postgresql://localhost/ecpg2_regression");
+ exec sql connect to :db user regress_ecpg_user1 using :pw;
+ exec sql disconnect;
+
+ exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 using "connectpw";
+ exec sql disconnect;
+
+ exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 user regress_ecpg_user1;
+ exec sql disconnect;
+
+ /* wrong db */
+ exec sql connect to tcp:postgresql://localhost/nonexistent user regress_ecpg_user1 identified by connectpw;
+ exec sql disconnect;
+
+ /* wrong port */
+ exec sql connect to tcp:postgresql://127.0.0.1:20/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
+ /* no disconnect necessary */
+
+ /* wrong password */
+ exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by "wrongpw";
+ /* no disconnect necessary */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/connect/test2.pgc b/src/interfaces/ecpg/test/connect/test2.pgc
new file mode 100644
index 0000000..f31a7f9
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/test2.pgc
@@ -0,0 +1,46 @@
+/*
+ * this file tests multiple connections to databases and switches
+ * between them.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+int
+main(void)
+{
+exec sql begin declare section;
+ char id[200];
+ char res[200];
+exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ strcpy(id, "first");
+ exec sql connect to ecpg2_regression as :id;
+ exec sql connect to REGRESSDB1 as second;
+
+ /* this selects from "second" which was opened last */
+ exec sql select current_database() into :res;
+ exec sql at first select current_database() into :res;
+ exec sql at second select current_database() into :res;
+
+ exec sql set connection first;
+ exec sql select current_database() into :res;
+
+ /* this will disconnect from "first" */
+ exec sql disconnect;
+ exec sql select current_database() into :res;
+
+ /* error here since "first" is already disconnected */
+ exec sql disconnect :id;
+
+ /* disconnect from "second" */
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/connect/test3.pgc b/src/interfaces/ecpg/test/connect/test3.pgc
new file mode 100644
index 0000000..5d075f0
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/test3.pgc
@@ -0,0 +1,52 @@
+/*
+ * this file just tests the several possibilities you have for a disconnect
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+int
+main(void)
+{
+exec sql begin declare section;
+ char id[200];
+ char res[200];
+exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ strcpy(id, "first");
+ exec sql connect to ecpg2_regression as :id;
+ exec sql connect to REGRESSDB1 as second;
+
+ /* this selects from "second" which was opened last */
+ exec sql select current_database() into :res;
+
+ /* will close "second" */
+ exec sql disconnect CURRENT;
+ exec sql select current_database() into :res;
+
+ exec sql connect to REGRESSDB1 as second;
+ /* will close "second" */
+ exec sql disconnect DEFAULT;
+
+ exec sql connect to "ecpg2_regression" as second;
+ exec sql disconnect ALL;
+
+ exec sql disconnect CURRENT;
+ exec sql disconnect DEFAULT;
+ exec sql disconnect ALL;
+
+ /*
+ * exec sql disconnect;
+ * exec sql disconnect name;
+ *
+ * are used in other tests
+ */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/connect/test4.pgc b/src/interfaces/ecpg/test/connect/test4.pgc
new file mode 100644
index 0000000..b20b174
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/test4.pgc
@@ -0,0 +1,20 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+int
+main(void)
+{
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1 as main;
+
+ exec sql set connection to main;
+
+ exec sql disconnect DEFAULT;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/connect/test5.pgc b/src/interfaces/ecpg/test/connect/test5.pgc
new file mode 100644
index 0000000..de29160
--- /dev/null
+++ b/src/interfaces/ecpg/test/connect/test5.pgc
@@ -0,0 +1,76 @@
+/*
+ * this file tests all sorts of connecting to one single database.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/* do not include regression.h */
+
+int
+main(void)
+{
+exec sql begin declare section;
+ char db[200];
+ char id[200];
+ char *user="regress_ecpg_user1";
+exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to ecpg2_regression as main;
+ exec sql alter user regress_ecpg_user2 ENCRYPTED PASSWORD 'insecure';
+ exec sql alter user regress_ecpg_user1 ENCRYPTED PASSWORD 'connectpw';
+ exec sql commit;
+ exec sql disconnect; /* <-- "main" not specified */
+
+ strcpy(db, "ecpg2_regression");
+ strcpy(id, "main");
+ exec sql connect to :db as :id;
+ exec sql disconnect :id;
+
+ exec sql connect to ecpg2_regression as main;
+ exec sql disconnect main;
+
+ exec sql connect to "ecpg2_regression" as main;
+ exec sql disconnect main;
+
+ exec sql connect to 'ecpg2_regression' as main;
+ exec sql disconnect main;
+
+ /* exec sql connect to as main user regress_ecpg_user2/insecure;
+ exec sql disconnect main; */
+
+ exec sql connect to ecpg2_regression as main user regress_ecpg_user1/connectpw;
+ exec sql disconnect main;
+
+ exec sql connect to unix:postgresql://localhost/ecpg2_regression as main user regress_ecpg_user1/connectpw;
+ exec sql disconnect main;
+
+ exec sql connect to "unix:postgresql://localhost/ecpg2_regression" as main user regress_ecpg_user1/connectpw;
+ exec sql disconnect main;
+
+ exec sql connect to 'unix:postgresql://localhost/ecpg2_regression' as main user :user USING "connectpw";
+ exec sql disconnect main;
+
+ exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180&client_encoding=latin1 as main user regress_ecpg_user1/connectpw;
+ exec sql disconnect main;
+
+ exec sql connect to "unix:postgresql://200.46.204.71/ecpg2_regression" as main user regress_ecpg_user1/connectpw;
+ exec sql disconnect main;
+
+ exec sql connect to "unix:postgresql://localhost/?gssencmode=disable" as main user regress_ecpg_user2 IDENTIFIED BY insecure;
+ exec sql disconnect main;
+
+ /* connect twice */
+ exec sql connect to ecpg2_regression as main;
+ exec sql connect to ecpg2_regression as main;
+ exec sql disconnect main;
+
+ /* not connected */
+ exec sql disconnect nonexistent;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/ecpg_schedule b/src/interfaces/ecpg/test/ecpg_schedule
new file mode 100644
index 0000000..e034c5a
--- /dev/null
+++ b/src/interfaces/ecpg/test/ecpg_schedule
@@ -0,0 +1,61 @@
+test: compat_informix/dec_test
+test: compat_informix/charfuncs
+test: compat_informix/rfmtdate
+test: compat_informix/rfmtlong
+test: compat_informix/rnull
+test: compat_informix/sqlda
+test: compat_informix/describe
+test: compat_informix/test_informix
+test: compat_informix/test_informix2
+test: compat_oracle/char_array
+test: connect/test2
+test: connect/test3
+test: connect/test4
+test: connect/test5
+test: pgtypeslib/dt_test
+test: pgtypeslib/dt_test2
+test: pgtypeslib/num_test
+test: pgtypeslib/num_test2
+test: pgtypeslib/nan_test
+test: preproc/array_of_struct
+test: preproc/pointer_to_struct
+test: preproc/autoprep
+test: preproc/comment
+test: preproc/cursor
+test: preproc/define
+test: preproc/init
+test: preproc/strings
+test: preproc/type
+test: preproc/variable
+test: preproc/outofscope
+test: preproc/whenever
+test: preproc/whenever_do_continue
+test: sql/array
+test: sql/binary
+test: sql/bytea
+test: sql/code100
+test: sql/copystdout
+test: sql/createtableas
+test: sql/define
+test: sql/desc
+test: sql/sqlda
+test: sql/describe
+test: sql/dynalloc
+test: sql/dynalloc2
+test: sql/dyntest
+test: sql/execute
+test: sql/fetch
+test: sql/func
+test: sql/indicators
+test: sql/oldexec
+test: sql/quote
+test: sql/show
+test: sql/insupd
+test: sql/parser
+test: sql/prepareas
+test: sql/declare
+test: thread/thread
+test: thread/thread_implicit
+test: thread/prep
+test: thread/alloc
+test: thread/descriptor
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
new file mode 100644
index 0000000..86b71a4
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
@@ -0,0 +1,42 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "charfuncs.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sqltypes.h>
+
+int main(void)
+{
+ char t1[] = "abc def ghi ";
+ /* 123456789012345 */
+ char buf[50];
+ int k;
+
+ printf("t1: _%s_\n", t1);
+ rupshift(t1);
+ printf("t1: _%s_\n", t1);
+
+ k = 2;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 5;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 9;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+ k = 15;
+ ldchar(t1, k, buf);
+ printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stderr b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stderr
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stdout b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stdout
new file mode 100644
index 0000000..a177579
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.stdout
@@ -0,0 +1,6 @@
+t1: _abc def ghi _
+t1: _ABC DEF GHI _
+byleng(t1, 2): 2, ldchar: _AB_
+byleng(t1, 5): 3, ldchar: _ABC_
+byleng(t1, 9): 8, ldchar: _ABC DEF_
+byleng(t1, 15): 13, ldchar: _ABC DEF GHI_
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
new file mode 100644
index 0000000..8586650
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
@@ -0,0 +1,291 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dec_test.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_error.h>
+#include <decimal.h>
+#include <sqltypes.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 8 "dec_test.pgc"
+
+
+
+#line 1 "printf_hack.h"
+/*
+ * print_double(x) has the same effect as printf("%g", x), but is intended
+ * to produce the same formatting across all platforms.
+ */
+static void
+print_double(double x)
+{
+#ifdef WIN32
+ /* Change Windows' 3-digit exponents to look like everyone else's */
+ char convert[128];
+ int vallen;
+
+ sprintf(convert, "%g", x);
+ vallen = strlen(convert);
+
+ if (vallen >= 6 &&
+ convert[vallen - 5] == 'e' &&
+ convert[vallen - 3] == '0')
+ {
+ convert[vallen - 3] = convert[vallen - 2];
+ convert[vallen - 2] = convert[vallen - 1];
+ convert[vallen - 1] = '\0';
+ }
+
+ printf("%s", convert);
+#else
+ printf("%g", x);
+#endif
+}
+
+#line 10 "dec_test.pgc"
+
+
+
+/*
+TODO:
+ deccmp => DECUNKNOWN
+ decimal point: , and/or . ?
+ ECPG_INFORMIX_BAD_EXPONENT ?
+*/
+
+char* decs[] = { "2E394", "-2", ".794", "3.44", "592.49E21", "-32.84e4",
+ "2E-394", ".1E-2", "+.0", "-592.49E-07", "+32.84e-4",
+ ".500001", "-.5000001",
+ "1234567890123456789012345678.91", /* 30 digits should fit
+ into decimal */
+ "1234567890123456789012345678.921", /* 31 digits should NOT
+ fit into decimal */
+ "not a number",
+ NULL};
+
+
+static void
+check_errno(void);
+
+#define BUFSIZE 200
+
+int
+main(void)
+{
+ decimal *dec, *din;
+ char buf[BUFSIZE];
+ long l;
+ int i, j, k, q, r, count = 0;
+ double dbl;
+ decimal **decarr = (decimal **) calloc(1, sizeof(decimal));
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; decs[i]; i++)
+ {
+ dec = PGTYPESdecimal_new();
+ r = deccvasc(decs[i], strlen(decs[i]), dec);
+ if (r)
+ {
+ check_errno();
+ printf("dec[%d,0]: r: %d\n", i, r);
+ PGTYPESdecimal_free(dec);
+ continue;
+ }
+ decarr = realloc(decarr, sizeof(decimal *) * (count + 1));
+ decarr[count++] = dec;
+
+ r = dectoasc(dec, buf, BUFSIZE-1, -1);
+ if (r < 0) check_errno();
+ printf("dec[%d,1]: r: %d, %s\n", i, r, buf);
+
+ r = dectoasc(dec, buf, BUFSIZE-1, 0);
+ if (r < 0) check_errno();
+ printf("dec[%d,2]: r: %d, %s\n", i, r, buf);
+ r = dectoasc(dec, buf, BUFSIZE-1, 1);
+ if (r < 0) check_errno();
+ printf("dec[%d,3]: r: %d, %s\n", i, r, buf);
+ r = dectoasc(dec, buf, BUFSIZE-1, 2);
+ if (r < 0) check_errno();
+ printf("dec[%d,4]: r: %d, %s\n", i, r, buf);
+
+ din = PGTYPESdecimal_new();
+ r = dectoasc(din, buf, BUFSIZE-1, 2);
+ if (r < 0) check_errno();
+ printf("dec[%d,5]: r: %d, %s\n", i, r, buf);
+
+ r = dectolong(dec, &l);
+ if (r) check_errno();
+ printf("dec[%d,6]: %ld (r: %d)\n", i, r?0L:l, r);
+ if (r == 0)
+ {
+ r = deccvlong(l, din);
+ if (r) check_errno();
+ dectoasc(din, buf, BUFSIZE-1, 2);
+ q = deccmp(dec, din);
+ printf("dec[%d,7]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
+ }
+
+ r = dectoint(dec, &k);
+ if (r) check_errno();
+ printf("dec[%d,8]: %d (r: %d)\n", i, r?0:k, r);
+ if (r == 0)
+ {
+ r = deccvint(k, din);
+ if (r) check_errno();
+ dectoasc(din, buf, BUFSIZE-1, 2);
+ q = deccmp(dec, din);
+ printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
+ }
+
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+ r = dectodbl(dec, &dbl);
+ if (r) check_errno();
+ printf("dec[%d,10]: ", i);
+ print_double(r ? 0.0 : dbl);
+ printf(" (r: %d)\n", r);
+ }
+
+ PGTYPESdecimal_free(din);
+ printf("\n");
+ }
+
+ /* add a NULL value */
+ dec = PGTYPESdecimal_new();
+ decarr = realloc(decarr, sizeof(decimal *) * (count + 1));
+ decarr[count++] = dec;
+
+ rsetnull(CDECIMALTYPE, (char *) decarr[count-1]);
+ printf("dec[%d]: %sNULL\n", count-1,
+ risnull(CDECIMALTYPE, (char *) decarr[count-1]) ? "" : "NOT ");
+ printf("dec[0]: %sNULL\n",
+ risnull(CDECIMALTYPE, (char *) decarr[0]) ? "" : "NOT ");
+
+ r = dectoasc(decarr[3], buf, -1, -1);
+ check_errno(); printf("dectoasc with len == -1: r: %d\n", r);
+ r = dectoasc(decarr[3], buf, 0, -1);
+ check_errno(); printf("dectoasc with len == 0: r: %d\n", r);
+
+ for (i = 0; i < count; i++)
+ {
+ for (j = 0; j < count; j++)
+ {
+ decimal a, s, m, d;
+ int c;
+ c = deccmp(decarr[i], decarr[j]);
+ printf("dec[c,%d,%d]: %d\n", i, j, c);
+
+ r = decadd(decarr[i], decarr[j], &a);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&a, buf, BUFSIZE-1, -1);
+ printf("dec[a,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decsub(decarr[i], decarr[j], &s);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&s, buf, BUFSIZE-1, -1);
+ printf("dec[s,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decmul(decarr[i], decarr[j], &m);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&m, buf, BUFSIZE-1, -1);
+ printf("dec[m,%d,%d]: %s\n", i, j, buf);
+ }
+
+ r = decdiv(decarr[i], decarr[j], &d);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ dectoasc(&d, buf, BUFSIZE-1, -1);
+ printf("dec[d,%d,%d]: %s\n", i, j, buf);
+ }
+ }
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ dectoasc(decarr[i], buf, BUFSIZE-1, -1);
+ printf("%d: %s\n", i, buf);
+
+ PGTYPESdecimal_free(decarr[i]);
+ }
+ free(decarr);
+
+ return 0;
+}
+
+static void
+check_errno(void)
+{
+ switch(errno)
+ {
+ case 0:
+ printf("(no errno set) - ");
+ break;
+ case ECPG_INFORMIX_NUM_OVERFLOW:
+ printf("(errno == ECPG_INFORMIX_NUM_OVERFLOW) - ");
+ break;
+ case ECPG_INFORMIX_NUM_UNDERFLOW:
+ printf("(errno == ECPG_INFORMIX_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_OVERFLOW:
+ printf("(errno == PGTYPES_NUM_OVERFLOW) - ");
+ break;
+ case PGTYPES_NUM_UNDERFLOW:
+ printf("(errno == PGTYPES_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_BAD_NUMERIC:
+ printf("(errno == PGTYPES_NUM_BAD_NUMERIC) - ");
+ break;
+ case PGTYPES_NUM_DIVIDE_ZERO:
+ printf("(errno == PGTYPES_NUM_DIVIDE_ZERO) - ");
+ break;
+ default:
+ printf("(unknown errno (%d))\n", errno);
+ printf("(libc: (%s)) ", strerror(errno));
+ break;
+ }
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stderr b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stderr
new file mode 100644
index 0000000..1a3639d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stderr
@@ -0,0 +1,2 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout
new file mode 100644
index 0000000..1f8675b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout
@@ -0,0 +1,1293 @@
+(no errno set) - dec[0,1]: r: -1, *
+(no errno set) - dec[0,2]: r: -1, *
+(no errno set) - dec[0,3]: r: -1, *
+(no errno set) - dec[0,4]: r: -1, *
+dec[0,5]: r: 0, 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - dec[0,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - dec[0,8]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - dec[0,10]: 0 (r: -1)
+
+dec[1,1]: r: 0, -2
+dec[1,2]: r: 0, -2
+dec[1,3]: r: 0, -2.0
+dec[1,4]: r: 0, -2.00
+dec[1,5]: r: 0, 0.00
+dec[1,6]: -2 (r: 0)
+dec[1,7]: -2.00 (r: 0 - cmp: 0)
+dec[1,8]: -2 (r: 0)
+dec[1,9]: -2.00 (r: 0 - cmp: 0)
+dec[1,10]: -2 (r: 0)
+
+dec[2,1]: r: 0, 0.794
+dec[2,2]: r: 0, 1
+dec[2,3]: r: 0, 0.8
+dec[2,4]: r: 0, 0.79
+dec[2,5]: r: 0, 0.00
+dec[2,6]: 1 (r: 0)
+dec[2,7]: 1.00 (r: 0 - cmp: -1)
+dec[2,8]: 1 (r: 0)
+dec[2,9]: 1.00 (r: 0 - cmp: -1)
+dec[2,10]: 0.794 (r: 0)
+
+dec[3,1]: r: 0, 3.44
+dec[3,2]: r: 0, 3
+dec[3,3]: r: 0, 3.4
+dec[3,4]: r: 0, 3.44
+dec[3,5]: r: 0, 0.00
+dec[3,6]: 3 (r: 0)
+dec[3,7]: 3.00 (r: 0 - cmp: 1)
+dec[3,8]: 3 (r: 0)
+dec[3,9]: 3.00 (r: 0 - cmp: 1)
+dec[3,10]: 3.44 (r: 0)
+
+dec[4,1]: r: 0, 592490000000000000000000
+dec[4,2]: r: 0, 592490000000000000000000
+dec[4,3]: r: 0, 592490000000000000000000.0
+dec[4,4]: r: 0, 592490000000000000000000.00
+dec[4,5]: r: 0, 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - dec[4,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - dec[4,8]: 0 (r: -1)
+dec[4,10]: 5.9249e+23 (r: 0)
+
+dec[5,1]: r: 0, -328400
+dec[5,2]: r: 0, -328400
+dec[5,3]: r: 0, -328400.0
+dec[5,4]: r: 0, -328400.00
+dec[5,5]: r: 0, 0.00
+dec[5,6]: -328400 (r: 0)
+dec[5,7]: -328400.00 (r: 0 - cmp: 0)
+dec[5,8]: -328400 (r: 0)
+dec[5,9]: -328400.00 (r: 0 - cmp: 0)
+dec[5,10]: -328400 (r: 0)
+
+(no errno set) - dec[6,1]: r: -1, *
+dec[6,2]: r: 0, 0
+dec[6,3]: r: 0, 0.0
+dec[6,4]: r: 0, 0.00
+dec[6,5]: r: 0, 0.00
+dec[6,6]: 0 (r: 0)
+dec[6,7]: 0.00 (r: 0 - cmp: 1)
+dec[6,8]: 0 (r: 0)
+dec[6,9]: 0.00 (r: 0 - cmp: 1)
+
+dec[7,1]: r: 0, 0.001
+dec[7,2]: r: 0, 0
+dec[7,3]: r: 0, 0.0
+dec[7,4]: r: 0, 0.00
+dec[7,5]: r: 0, 0.00
+dec[7,6]: 0 (r: 0)
+dec[7,7]: 0.00 (r: 0 - cmp: 1)
+dec[7,8]: 0 (r: 0)
+dec[7,9]: 0.00 (r: 0 - cmp: 1)
+dec[7,10]: 0.001 (r: 0)
+
+dec[8,1]: r: 0, 0.0
+dec[8,2]: r: 0, 0
+dec[8,3]: r: 0, 0.0
+dec[8,4]: r: 0, 0.00
+dec[8,5]: r: 0, 0.00
+dec[8,6]: 0 (r: 0)
+dec[8,7]: 0.00 (r: 0 - cmp: 0)
+dec[8,8]: 0 (r: 0)
+dec[8,9]: 0.00 (r: 0 - cmp: 0)
+dec[8,10]: 0 (r: 0)
+
+dec[9,1]: r: 0, -0.000059249
+dec[9,2]: r: 0, -0
+dec[9,3]: r: 0, -0.0
+dec[9,4]: r: 0, -0.00
+dec[9,5]: r: 0, 0.00
+dec[9,6]: 0 (r: 0)
+dec[9,7]: 0.00 (r: 0 - cmp: -1)
+dec[9,8]: 0 (r: 0)
+dec[9,9]: 0.00 (r: 0 - cmp: -1)
+dec[9,10]: -5.9249e-05 (r: 0)
+
+dec[10,1]: r: 0, 0.003284
+dec[10,2]: r: 0, 0
+dec[10,3]: r: 0, 0.0
+dec[10,4]: r: 0, 0.00
+dec[10,5]: r: 0, 0.00
+dec[10,6]: 0 (r: 0)
+dec[10,7]: 0.00 (r: 0 - cmp: 1)
+dec[10,8]: 0 (r: 0)
+dec[10,9]: 0.00 (r: 0 - cmp: 1)
+dec[10,10]: 0.003284 (r: 0)
+
+dec[11,1]: r: 0, 0.500001
+dec[11,2]: r: 0, 1
+dec[11,3]: r: 0, 0.5
+dec[11,4]: r: 0, 0.50
+dec[11,5]: r: 0, 0.00
+dec[11,6]: 1 (r: 0)
+dec[11,7]: 1.00 (r: 0 - cmp: -1)
+dec[11,8]: 1 (r: 0)
+dec[11,9]: 1.00 (r: 0 - cmp: -1)
+dec[11,10]: 0.500001 (r: 0)
+
+dec[12,1]: r: 0, -0.5000001
+dec[12,2]: r: 0, -1
+dec[12,3]: r: 0, -0.5
+dec[12,4]: r: 0, -0.50
+dec[12,5]: r: 0, 0.00
+dec[12,6]: -1 (r: 0)
+dec[12,7]: -1.00 (r: 0 - cmp: 1)
+dec[12,8]: -1 (r: 0)
+dec[12,9]: -1.00 (r: 0 - cmp: 1)
+dec[12,10]: -0.5 (r: 0)
+
+dec[13,1]: r: 0, 1234567890123456789012345678.91
+dec[13,2]: r: 0, 1234567890123456789012345679
+dec[13,3]: r: 0, 1234567890123456789012345678.9
+dec[13,4]: r: 0, 1234567890123456789012345678.91
+dec[13,5]: r: 0, 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - dec[13,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - dec[13,8]: 0 (r: -1)
+dec[13,10]: 1.23457e+27 (r: 0)
+
+(errno == PGTYPES_NUM_OVERFLOW) - dec[14,0]: r: -1200
+(errno == PGTYPES_NUM_BAD_NUMERIC) - dec[15,0]: r: -1213
+dec[14]: NULL
+dec[0]: NOT NULL
+(errno == PGTYPES_NUM_BAD_NUMERIC) - dectoasc with len == -1: r: -1
+(errno == PGTYPES_NUM_BAD_NUMERIC) - dectoasc with len == 0: r: -1
+dec[c,0,0]: 0
+dec[a,0,0]: *
+dec[s,0,0]: 0
+dec[m,0,0]: *
+dec[d,0,0]: 1.00000000000000000
+dec[c,0,1]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,1]:
+dec[m,0,1]: *
+dec[d,0,1]: *
+dec[c,0,2]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,2]:
+dec[m,0,2]: *
+dec[d,0,2]:
+dec[c,0,3]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,3]:
+dec[m,0,3]: *
+dec[d,0,3]:
+dec[c,0,4]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,4]:
+dec[m,0,4]: *
+dec[d,0,4]:
+dec[c,0,5]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,5]:
+dec[m,0,5]: *
+dec[d,0,5]:
+dec[c,0,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,6]:
+dec[m,0,6]: *
+dec[d,0,6]: *
+dec[c,0,7]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,7]:
+dec[m,0,7]: *
+dec[d,0,7]: *
+dec[c,0,8]: 1
+dec[a,0,8]: *
+dec[s,0,8]: *
+dec[m,0,8]: 0.0
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,0,9]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,9]:
+dec[m,0,9]: *
+dec[d,0,9]:
+dec[c,0,10]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,10]:
+dec[m,0,10]: *
+dec[d,0,10]:
+dec[c,0,11]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,11]:
+dec[m,0,11]: *
+dec[d,0,11]:
+dec[c,0,12]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,12]:
+dec[m,0,12]: *
+dec[d,0,12]:
+dec[c,0,13]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,0,13]:
+dec[m,0,13]: *
+dec[d,0,13]:
+dec[c,0,14]: 2147483647
+dec[a,0,14]:
+dec[s,0,14]:
+dec[m,0,14]: *
+dec[d,0,14]:
+dec[c,1,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,1,0]:
+dec[m,1,0]: *
+dec[d,1,0]: *
+dec[c,1,1]: 0
+dec[a,1,1]: -4
+dec[s,1,1]: 0
+dec[m,1,1]: 4
+dec[d,1,1]: 1.00000000000000000
+dec[c,1,2]: -1
+dec[a,1,2]: -1.206
+dec[s,1,2]: -2.794
+dec[m,1,2]: -1.588
+dec[d,1,2]: -2.5188916876574307
+dec[c,1,3]: -1
+dec[a,1,3]: 1.44
+dec[s,1,3]: -5.44
+dec[m,1,3]: -6.88
+dec[d,1,3]: -0.58139534883720930
+dec[c,1,4]: -1
+dec[a,1,4]: 592489999999999999999998
+dec[s,1,4]: -592490000000000000000002
+dec[m,1,4]: -1184980000000000000000000
+dec[d,1,4]: -0.0000000000000000000000033755843980489122
+dec[c,1,5]: 1
+dec[a,1,5]: -328402
+dec[s,1,5]: 328398
+dec[m,1,5]: 656800
+dec[d,1,5]: 0.0000060901339829476248
+dec[c,1,6]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,1,6]:
+dec[m,1,6]: *
+dec[d,1,6]: *
+dec[c,1,7]: -1
+dec[a,1,7]: -1.999
+dec[s,1,7]: -2.001
+dec[m,1,7]: -0.002
+dec[d,1,7]: -2000.0000000000000
+dec[c,1,8]: -1
+dec[a,1,8]: -2.0
+dec[s,1,8]: -2.0
+dec[m,1,8]: 0.0
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,1,9]: -1
+dec[a,1,9]: -2.000059249
+dec[s,1,9]: -1.999940751
+dec[m,1,9]: 0.000118498
+dec[d,1,9]: 33755.843980489122
+dec[c,1,10]: -1
+dec[a,1,10]: -1.996716
+dec[s,1,10]: -2.003284
+dec[m,1,10]: -0.006568
+dec[d,1,10]: -609.01339829476248
+dec[c,1,11]: -1
+dec[a,1,11]: -1.499999
+dec[s,1,11]: -2.500001
+dec[m,1,11]: -1.000002
+dec[d,1,11]: -3.9999920000160000
+dec[c,1,12]: -1
+dec[a,1,12]: -2.5000001
+dec[s,1,12]: -1.4999999
+dec[m,1,12]: 1.0000002
+dec[d,1,12]: 3.9999992000001600
+dec[c,1,13]: -1
+dec[a,1,13]: 1234567890123456789012345676.91
+dec[s,1,13]: -1234567890123456789012345680.91
+dec[m,1,13]: -2469135780246913578024691357.82
+dec[d,1,13]: -0.0000000000000000000000000016200000145800001
+dec[c,1,14]: 2147483647
+dec[a,1,14]: 1234567890123456789012345676.91
+dec[s,1,14]: -1234567890123456789012345680.91
+dec[m,1,14]: -2469135780246913578024691357.82
+dec[d,1,14]: -0.0000000000000000000000000016200000145800001
+dec[c,2,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,2,0]:
+dec[m,2,0]: *
+dec[d,2,0]: *
+dec[c,2,1]: 1
+dec[a,2,1]: -1.206
+dec[s,2,1]: 2.794
+dec[m,2,1]: -1.588
+dec[d,2,1]: -0.39700000000000000
+dec[c,2,2]: 0
+dec[a,2,2]: 1.588
+dec[s,2,2]: 0.000
+dec[m,2,2]: 0.630436
+dec[d,2,2]: 1.00000000000000000
+dec[c,2,3]: -1
+dec[a,2,3]: 4.234
+dec[s,2,3]: -2.646
+dec[m,2,3]: 2.73136
+dec[d,2,3]: 0.23081395348837209
+dec[c,2,4]: -1
+dec[a,2,4]: 592490000000000000000000.794
+dec[s,2,4]: -592489999999999999999999.206
+dec[m,2,4]: 470437060000000000000000.000
+dec[d,2,4]: 0.0000000000000000000000013401070060254182
+dec[c,2,5]: 1
+dec[a,2,5]: -328399.206
+dec[s,2,5]: 328400.794
+dec[m,2,5]: -260749.600
+dec[d,2,5]: -0.0000024177831912302071
+dec[c,2,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,2,6]:
+dec[m,2,6]: *
+dec[d,2,6]: *
+dec[c,2,7]: 1
+dec[a,2,7]: 0.795
+dec[s,2,7]: 0.793
+dec[m,2,7]: 0.000794
+dec[d,2,7]: 794.00000000000000
+dec[c,2,8]: 1
+dec[a,2,8]: 0.794
+dec[s,2,8]: 0.794
+dec[m,2,8]: 0.0000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,2,9]: 1
+dec[a,2,9]: 0.793940751
+dec[s,2,9]: 0.794059249
+dec[m,2,9]: -0.000047043706
+dec[d,2,9]: -13401.070060254182
+dec[c,2,10]: 1
+dec[a,2,10]: 0.797284
+dec[s,2,10]: 0.790716
+dec[m,2,10]: 0.002607496
+dec[d,2,10]: 241.77831912302071
+dec[c,2,11]: 1
+dec[a,2,11]: 1.294001
+dec[s,2,11]: 0.293999
+dec[m,2,11]: 0.397000794
+dec[d,2,11]: 1.5879968240063520
+dec[c,2,12]: 1
+dec[a,2,12]: 0.2939999
+dec[s,2,12]: 1.2940001
+dec[m,2,12]: -0.3970000794
+dec[d,2,12]: -1.5879996824000635
+dec[c,2,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,2,13]:
+dec[m,2,13]:
+dec[d,2,13]: 0.00000000000000000000000000064314000578826005
+dec[c,2,14]: 2147483647
+dec[a,2,14]:
+dec[s,2,14]:
+dec[m,2,14]:
+dec[d,2,14]: 0.00000000000000000000000000064314000578826005
+dec[c,3,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,3,0]:
+dec[m,3,0]: *
+dec[d,3,0]: *
+dec[c,3,1]: 1
+dec[a,3,1]: 1.44
+dec[s,3,1]: 5.44
+dec[m,3,1]: -6.88
+dec[d,3,1]: -1.7200000000000000
+dec[c,3,2]: 1
+dec[a,3,2]: 4.234
+dec[s,3,2]: 2.646
+dec[m,3,2]: 2.73136
+dec[d,3,2]: 4.3324937027707809
+dec[c,3,3]: 0
+dec[a,3,3]: 6.88
+dec[s,3,3]: 0.00
+dec[m,3,3]: 11.8336
+dec[d,3,3]: 1.00000000000000000
+dec[c,3,4]: -1
+dec[a,3,4]: 592490000000000000000003.44
+dec[s,3,4]: -592489999999999999999996.56
+dec[m,3,4]: 2038165600000000000000000.00
+dec[d,3,4]: 0.0000000000000000000000058060051646441290
+dec[c,3,5]: 1
+dec[a,3,5]: -328396.56
+dec[s,3,5]: 328403.44
+dec[m,3,5]: -1129696.00
+dec[d,3,5]: -0.0000104750304506699147
+dec[c,3,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,3,6]:
+dec[m,3,6]: *
+dec[d,3,6]: *
+dec[c,3,7]: 1
+dec[a,3,7]: 3.441
+dec[s,3,7]: 3.439
+dec[m,3,7]: 0.00344
+dec[d,3,7]: 3440.0000000000000
+dec[c,3,8]: 1
+dec[a,3,8]: 3.44
+dec[s,3,8]: 3.44
+dec[m,3,8]: 0.000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,3,9]: 1
+dec[a,3,9]: 3.439940751
+dec[s,3,9]: 3.440059249
+dec[m,3,9]: -0.00020381656
+dec[d,3,9]: -58060.051646441290
+dec[c,3,10]: 1
+dec[a,3,10]: 3.443284
+dec[s,3,10]: 3.436716
+dec[m,3,10]: 0.01129696
+dec[d,3,10]: 1047.50304506699147
+dec[c,3,11]: 1
+dec[a,3,11]: 3.940001
+dec[s,3,11]: 2.939999
+dec[m,3,11]: 1.72000344
+dec[d,3,11]: 6.8799862400275199
+dec[c,3,12]: 1
+dec[a,3,12]: 2.9399999
+dec[s,3,12]: 3.9400001
+dec[m,3,12]: -1.720000344
+dec[d,3,12]: -6.8799986240002752
+dec[c,3,13]: -1
+dec[a,3,13]: 1234567890123456789012345682.35
+dec[s,3,13]: -1234567890123456789012345675.47
+dec[m,3,13]:
+dec[d,3,13]: 0.0000000000000000000000000027864000250776002
+dec[c,3,14]: 2147483647
+dec[a,3,14]: 1234567890123456789012345682.35
+dec[s,3,14]: -1234567890123456789012345675.47
+dec[m,3,14]:
+dec[d,3,14]: 0.0000000000000000000000000027864000250776002
+dec[c,4,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,4,0]:
+dec[m,4,0]: *
+dec[d,4,0]: *
+dec[c,4,1]: 1
+dec[a,4,1]: 592489999999999999999998
+dec[s,4,1]: 592490000000000000000002
+dec[m,4,1]: -1184980000000000000000000
+dec[d,4,1]: -296245000000000000000000
+dec[c,4,2]: 1
+dec[a,4,2]: 592490000000000000000000.794
+dec[s,4,2]: 592489999999999999999999.206
+dec[m,4,2]: 470437060000000000000000.000
+dec[d,4,2]:
+dec[c,4,3]: 1
+dec[a,4,3]: 592490000000000000000003.44
+dec[s,4,3]: 592489999999999999999996.56
+dec[m,4,3]: 2038165600000000000000000.00
+dec[d,4,3]: 172235465116279069767441.86
+dec[c,4,4]: 0
+dec[a,4,4]: 1184980000000000000000000
+dec[s,4,4]: 0
+dec[m,4,4]: 351044400100000000000000000000000000000000000000
+dec[d,4,4]: 1.00000000000000000
+dec[c,4,5]: 1
+dec[a,4,5]: 592489999999999999671600
+dec[s,4,5]: 592490000000000000328400
+dec[m,4,5]: -194573716000000000000000000000
+dec[d,4,5]: -1804171741778319123
+dec[c,4,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,4,6]:
+dec[m,4,6]: *
+dec[d,4,6]: *
+dec[c,4,7]: 1
+dec[a,4,7]: 592490000000000000000000.001
+dec[s,4,7]: 592489999999999999999999.999
+dec[m,4,7]: 592490000000000000000.000
+dec[d,4,7]: 592490000000000000000000000.000
+dec[c,4,8]: 1
+dec[a,4,8]: 592490000000000000000000.0
+dec[s,4,8]: 592490000000000000000000.0
+dec[m,4,8]: 0.0
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,4,9]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,4,9]:
+dec[m,4,9]: -35104440010000000000.000000000
+dec[d,4,9]: -10000000000000000000000000000.000000000
+dec[c,4,10]: 1
+dec[a,4,10]: 592490000000000000000000.003284
+dec[s,4,10]: 592489999999999999999999.996716
+dec[m,4,10]: 1945737160000000000000.000000
+dec[d,4,10]:
+dec[c,4,11]: 1
+dec[a,4,11]: 592490000000000000000000.500001
+dec[s,4,11]: 592489999999999999999999.499999
+dec[m,4,11]: 296245592490000000000000.000000
+dec[d,4,11]:
+dec[c,4,12]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,4,12]:
+dec[m,4,12]: -296245059249000000000000.0000000
+dec[d,4,12]:
+dec[c,4,13]: -1
+dec[a,4,13]: 1235160380123456789012345678.91
+dec[s,4,13]: -1233975400123456789012345678.91
+dec[m,4,13]:
+dec[d,4,13]: 0.00047991690431925214
+dec[c,4,14]: 2147483647
+dec[a,4,14]: 1235160380123456789012345678.91
+dec[s,4,14]: -1233975400123456789012345678.91
+dec[m,4,14]:
+dec[d,4,14]: 0.00047991690431925214
+dec[c,5,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,5,0]:
+dec[m,5,0]: *
+dec[d,5,0]: *
+dec[c,5,1]: -1
+dec[a,5,1]: -328402
+dec[s,5,1]: -328398
+dec[m,5,1]: 656800
+dec[d,5,1]: 164200.00000000000
+dec[c,5,2]: -1
+dec[a,5,2]: -328399.206
+dec[s,5,2]: -328400.794
+dec[m,5,2]: -260749.600
+dec[d,5,2]: -413602.01511335013
+dec[c,5,3]: -1
+dec[a,5,3]: -328396.56
+dec[s,5,3]: -328403.44
+dec[m,5,3]: -1129696.00
+dec[d,5,3]: -95465.116279069767
+dec[c,5,4]: -1
+dec[a,5,4]: 592489999999999999671600
+dec[s,5,4]: -592490000000000000328400
+dec[m,5,4]: -194573716000000000000000000000
+dec[d,5,4]: -0.00000000000000000055427095815963139
+dec[c,5,5]: 0
+dec[a,5,5]: -656800
+dec[s,5,5]: 0
+dec[m,5,5]: 107846560000
+dec[d,5,5]: 1.00000000000000000
+dec[c,5,6]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,5,6]:
+dec[m,5,6]: *
+dec[d,5,6]: *
+dec[c,5,7]: -1
+dec[a,5,7]: -328399.999
+dec[s,5,7]: -328400.001
+dec[m,5,7]: -328.400
+dec[d,5,7]: -328400000.00000000
+dec[c,5,8]: -1
+dec[a,5,8]: -328400.0
+dec[s,5,8]: -328400.0
+dec[m,5,8]: 0.0
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,5,9]: -1
+dec[a,5,9]: -328400.000059249
+dec[s,5,9]: -328399.999940751
+dec[m,5,9]: 19.457371600
+dec[d,5,9]: 5542709581.596313862
+dec[c,5,10]: -1
+dec[a,5,10]: -328399.996716
+dec[s,5,10]: -328400.003284
+dec[m,5,10]: -1078.465600
+dec[d,5,10]: -100000000.000000000
+dec[c,5,11]: -1
+dec[a,5,11]: -328399.499999
+dec[s,5,11]: -328400.500001
+dec[m,5,11]: -164200.328400
+dec[d,5,11]: -656798.68640262719
+dec[c,5,12]: -1
+dec[a,5,12]: -328400.5000001
+dec[s,5,12]: -328399.4999999
+dec[m,5,12]: 164200.0328400
+dec[d,5,12]: 656799.86864002627
+dec[c,5,13]: -1
+dec[a,5,13]: 1234567890123456789012017278.91
+dec[s,5,13]: -1234567890123456789012674078.91
+dec[m,5,13]:
+dec[d,5,13]: -0.00000000000000000000026600400239403602
+dec[c,5,14]: 2147483647
+dec[a,5,14]: 1234567890123456789012017278.91
+dec[s,5,14]: -1234567890123456789012674078.91
+dec[m,5,14]:
+dec[d,5,14]: -0.00000000000000000000026600400239403602
+dec[c,6,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,0]:
+dec[m,6,0]: *
+dec[d,6,0]: *
+dec[c,6,1]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,1]:
+dec[m,6,1]: *
+dec[d,6,1]: *
+dec[c,6,2]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,2]:
+dec[m,6,2]: *
+dec[d,6,2]: *
+dec[c,6,3]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,3]:
+dec[m,6,3]: *
+dec[d,6,3]: *
+dec[c,6,4]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,4]:
+dec[m,6,4]: *
+dec[d,6,4]: *
+dec[c,6,5]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,5]:
+dec[m,6,5]: *
+dec[d,6,5]: *
+dec[c,6,6]: 0
+dec[a,6,6]: *
+dec[s,6,6]: *
+dec[m,6,6]: *
+dec[d,6,6]: *
+dec[c,6,7]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,7]:
+dec[m,6,7]: *
+dec[d,6,7]: *
+dec[c,6,8]: 1
+dec[a,6,8]: *
+dec[s,6,8]: *
+dec[m,6,8]: *
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,6,9]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,9]:
+dec[m,6,9]: *
+dec[d,6,9]: *
+dec[c,6,10]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,10]:
+dec[m,6,10]: *
+dec[d,6,10]: *
+dec[c,6,11]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,11]:
+dec[m,6,11]: *
+dec[d,6,11]: *
+dec[c,6,12]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,12]:
+dec[m,6,12]: *
+dec[d,6,12]: *
+dec[c,6,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,6,13]:
+dec[m,6,13]: *
+dec[d,6,13]: *
+dec[c,6,14]: 2147483647
+dec[a,6,14]:
+dec[s,6,14]:
+dec[m,6,14]: *
+dec[d,6,14]: *
+dec[c,7,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,7,0]:
+dec[m,7,0]: *
+dec[d,7,0]: *
+dec[c,7,1]: 1
+dec[a,7,1]: -1.999
+dec[s,7,1]: 2.001
+dec[m,7,1]: -0.002
+dec[d,7,1]: -0.00050000000000000000
+dec[c,7,2]: -1
+dec[a,7,2]: 0.795
+dec[s,7,2]: -0.793
+dec[m,7,2]: 0.000794
+dec[d,7,2]: 0.0012594458438287154
+dec[c,7,3]: -1
+dec[a,7,3]: 3.441
+dec[s,7,3]: -3.439
+dec[m,7,3]: 0.00344
+dec[d,7,3]: 0.00029069767441860465
+dec[c,7,4]: -1
+dec[a,7,4]: 592490000000000000000000.001
+dec[s,7,4]: -592489999999999999999999.999
+dec[m,7,4]: 592490000000000000000.000
+dec[d,7,4]: 0.0000000000000000000000000016877921990244561
+dec[c,7,5]: 1
+dec[a,7,5]: -328399.999
+dec[s,7,5]: 328400.001
+dec[m,7,5]: -328.400
+dec[d,7,5]: -0.0000000030450669914738124
+dec[c,7,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,7,6]:
+dec[m,7,6]: *
+dec[d,7,6]: *
+dec[c,7,7]: 0
+dec[a,7,7]: 0.002
+dec[s,7,7]: 0.000
+dec[m,7,7]: 0.000001
+dec[d,7,7]: 1.00000000000000000
+dec[c,7,8]: 1
+dec[a,7,8]: 0.001
+dec[s,7,8]: 0.001
+dec[m,7,8]: 0.0000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,7,9]: 1
+dec[a,7,9]: 0.000940751
+dec[s,7,9]: 0.001059249
+dec[m,7,9]: -0.000000059249
+dec[d,7,9]: -16.877921990244561
+dec[c,7,10]: -1
+dec[a,7,10]: 0.004284
+dec[s,7,10]: -0.002284
+dec[m,7,10]: 0.000003284
+dec[d,7,10]: 0.30450669914738124
+dec[c,7,11]: -1
+dec[a,7,11]: 0.501001
+dec[s,7,11]: -0.499001
+dec[m,7,11]: 0.000500001
+dec[d,7,11]: 0.0019999960000080000
+dec[c,7,12]: 1
+dec[a,7,12]: -0.4990001
+dec[s,7,12]: 0.5010001
+dec[m,7,12]: -0.0005000001
+dec[d,7,12]: -0.0019999996000000800
+dec[c,7,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,7,13]:
+dec[m,7,13]: 1234567890123456789012345.67891
+dec[d,7,13]: 0.00000000000000000000000000000081000000729000007
+dec[c,7,14]: 2147483647
+dec[a,7,14]:
+dec[s,7,14]:
+dec[m,7,14]: 1234567890123456789012345.67891
+dec[d,7,14]: 0.00000000000000000000000000000081000000729000007
+dec[c,8,0]: -1
+dec[a,8,0]: *
+dec[s,8,0]: *
+dec[m,8,0]: 0.0
+dec[d,8,0]: 0
+dec[c,8,1]: 1
+dec[a,8,1]: -2.0
+dec[s,8,1]: 2.0
+dec[m,8,1]: 0.0
+dec[d,8,1]: 0
+dec[c,8,2]: -1
+dec[a,8,2]: 0.794
+dec[s,8,2]: -0.794
+dec[m,8,2]: 0.0000
+dec[d,8,2]: 0
+dec[c,8,3]: -1
+dec[a,8,3]: 3.44
+dec[s,8,3]: -3.44
+dec[m,8,3]: 0.000
+dec[d,8,3]: 0
+dec[c,8,4]: -1
+dec[a,8,4]: 592490000000000000000000.0
+dec[s,8,4]: -592490000000000000000000.0
+dec[m,8,4]: 0.0
+dec[d,8,4]: 0
+dec[c,8,5]: 1
+dec[a,8,5]: -328400.0
+dec[s,8,5]: 328400.0
+dec[m,8,5]: 0.0
+dec[d,8,5]: 0
+dec[c,8,6]: -1
+dec[a,8,6]: *
+dec[s,8,6]: *
+dec[m,8,6]: *
+dec[d,8,6]: 0
+dec[c,8,7]: -1
+dec[a,8,7]: 0.001
+dec[s,8,7]: -0.001
+dec[m,8,7]: 0.0000
+dec[d,8,7]: 0
+dec[c,8,8]: 0
+dec[a,8,8]: 0.0
+dec[s,8,8]: 0.0
+dec[m,8,8]: 0.00
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,8,9]: 1
+dec[a,8,9]: -0.000059249
+dec[s,8,9]: 0.000059249
+dec[m,8,9]: 0.0000000000
+dec[d,8,9]: 0
+dec[c,8,10]: -1
+dec[a,8,10]: 0.003284
+dec[s,8,10]: -0.003284
+dec[m,8,10]: 0.0000000
+dec[d,8,10]: 0
+dec[c,8,11]: -1
+dec[a,8,11]: 0.500001
+dec[s,8,11]: -0.500001
+dec[m,8,11]: 0.0000000
+dec[d,8,11]: 0
+dec[c,8,12]: 1
+dec[a,8,12]: -0.5000001
+dec[s,8,12]: 0.5000001
+dec[m,8,12]: 0.00000000
+dec[d,8,12]: 0
+dec[c,8,13]: -1
+dec[a,8,13]: 1234567890123456789012345678.91
+dec[s,8,13]: -1234567890123456789012345678.91
+dec[m,8,13]: 0.000
+dec[d,8,13]: 0
+dec[c,8,14]: 2147483647
+dec[a,8,14]: 1234567890123456789012345678.91
+dec[s,8,14]: -1234567890123456789012345678.91
+dec[m,8,14]: 0.000
+dec[d,8,14]: 0
+dec[c,9,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,9,0]:
+dec[m,9,0]: *
+dec[d,9,0]: *
+dec[c,9,1]: 1
+dec[a,9,1]: -2.000059249
+dec[s,9,1]: 1.999940751
+dec[m,9,1]: 0.000118498
+dec[d,9,1]: 0.000029624500000000000
+dec[c,9,2]: -1
+dec[a,9,2]: 0.793940751
+dec[s,9,2]: -0.794059249
+dec[m,9,2]: -0.000047043706
+dec[d,9,2]: -0.000074620906801007557
+dec[c,9,3]: -1
+dec[a,9,3]: 3.439940751
+dec[s,9,3]: -3.440059249
+dec[m,9,3]: -0.00020381656
+dec[d,9,3]: -0.000017223546511627907
+dec[c,9,4]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,9,4]:
+dec[m,9,4]: -35104440010000000000.000000000
+dec[d,9,4]: -0.000000000000000000000000000100000000000000000
+dec[c,9,5]: 1
+dec[a,9,5]: -328400.000059249
+dec[s,9,5]: 328399.999940751
+dec[m,9,5]: 19.457371600
+dec[d,9,5]: 0.00000000018041717417783191
+dec[c,9,6]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,9,6]:
+dec[m,9,6]: *
+dec[d,9,6]: *
+dec[c,9,7]: -1
+dec[a,9,7]: 0.000940751
+dec[s,9,7]: -0.001059249
+dec[m,9,7]: -0.000000059249
+dec[d,9,7]: -0.059249000000000000
+dec[c,9,8]: -1
+dec[a,9,8]: -0.000059249
+dec[s,9,8]: -0.000059249
+dec[m,9,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,9,9]: 0
+dec[a,9,9]: -0.000118498
+dec[s,9,9]: 0.000000000
+dec[m,9,9]: 0.000000003510444001
+dec[d,9,9]: 1.00000000000000000
+dec[c,9,10]: -1
+dec[a,9,10]: 0.003224751
+dec[s,9,10]: -0.003343249
+dec[m,9,10]: -0.000000194573716
+dec[d,9,10]: -0.018041717417783191
+dec[c,9,11]: -1
+dec[a,9,11]: 0.499941751
+dec[s,9,11]: -0.500060249
+dec[m,9,11]: -0.000029624559249
+dec[d,9,11]: -0.000118497763004473991
+dec[c,9,12]: 1
+dec[a,9,12]: -0.500059349
+dec[s,9,12]: 0.499940851
+dec[m,9,12]: 0.0000296245059249
+dec[d,9,12]: 0.000118497976300404740
+dec[c,9,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,9,13]:
+dec[m,9,13]:
+dec[d,9,13]: -0.000000000000000000000000000000047991690431925214
+dec[c,9,14]: 2147483647
+dec[a,9,14]:
+dec[s,9,14]:
+dec[m,9,14]:
+dec[d,9,14]: -0.000000000000000000000000000000047991690431925214
+dec[c,10,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,10,0]:
+dec[m,10,0]: *
+dec[d,10,0]: *
+dec[c,10,1]: 1
+dec[a,10,1]: -1.996716
+dec[s,10,1]: 2.003284
+dec[m,10,1]: -0.006568
+dec[d,10,1]: -0.0016420000000000000
+dec[c,10,2]: -1
+dec[a,10,2]: 0.797284
+dec[s,10,2]: -0.790716
+dec[m,10,2]: 0.002607496
+dec[d,10,2]: 0.0041360201511335013
+dec[c,10,3]: -1
+dec[a,10,3]: 3.443284
+dec[s,10,3]: -3.436716
+dec[m,10,3]: 0.01129696
+dec[d,10,3]: 0.00095465116279069767
+dec[c,10,4]: -1
+dec[a,10,4]: 592490000000000000000000.003284
+dec[s,10,4]: -592489999999999999999999.996716
+dec[m,10,4]: 1945737160000000000000.000000
+dec[d,10,4]: 0.0000000000000000000000000055427095815963139
+dec[c,10,5]: 1
+dec[a,10,5]: -328399.996716
+dec[s,10,5]: 328400.003284
+dec[m,10,5]: -1078.465600
+dec[d,10,5]: -0.0000000100000000000000000
+dec[c,10,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,10,6]:
+dec[m,10,6]: *
+dec[d,10,6]: *
+dec[c,10,7]: 1
+dec[a,10,7]: 0.004284
+dec[s,10,7]: 0.002284
+dec[m,10,7]: 0.000003284
+dec[d,10,7]: 3.2840000000000000
+dec[c,10,8]: 1
+dec[a,10,8]: 0.003284
+dec[s,10,8]: 0.003284
+dec[m,10,8]: 0.0000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,10,9]: 1
+dec[a,10,9]: 0.003224751
+dec[s,10,9]: 0.003343249
+dec[m,10,9]: -0.000000194573716
+dec[d,10,9]: -55.427095815963139
+dec[c,10,10]: 0
+dec[a,10,10]: 0.006568
+dec[s,10,10]: 0.000000
+dec[m,10,10]: 0.000010784656
+dec[d,10,10]: 1.00000000000000000
+dec[c,10,11]: -1
+dec[a,10,11]: 0.503285
+dec[s,10,11]: -0.496717
+dec[m,10,11]: 0.001642003284
+dec[d,10,11]: 0.0065679868640262719
+dec[c,10,12]: 1
+dec[a,10,12]: -0.4967161
+dec[s,10,12]: 0.5032841
+dec[m,10,12]: -0.0016420003284
+dec[d,10,12]: -0.0065679986864002627
+dec[c,10,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,10,13]:
+dec[m,10,13]:
+dec[d,10,13]: 0.0000000000000000000000000000026600400239403602
+dec[c,10,14]: 2147483647
+dec[a,10,14]:
+dec[s,10,14]:
+dec[m,10,14]:
+dec[d,10,14]: 0.0000000000000000000000000000026600400239403602
+dec[c,11,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,11,0]:
+dec[m,11,0]: *
+dec[d,11,0]: *
+dec[c,11,1]: 1
+dec[a,11,1]: -1.499999
+dec[s,11,1]: 2.500001
+dec[m,11,1]: -1.000002
+dec[d,11,1]: -0.25000050000000000
+dec[c,11,2]: -1
+dec[a,11,2]: 1.294001
+dec[s,11,2]: -0.293999
+dec[m,11,2]: 0.397000794
+dec[d,11,2]: 0.62972418136020151
+dec[c,11,3]: -1
+dec[a,11,3]: 3.940001
+dec[s,11,3]: -2.939999
+dec[m,11,3]: 1.72000344
+dec[d,11,3]: 0.14534912790697674
+dec[c,11,4]: -1
+dec[a,11,4]: 592490000000000000000000.500001
+dec[s,11,4]: -592489999999999999999999.499999
+dec[m,11,4]: 296245592490000000000000.000000
+dec[d,11,4]: 0.00000000000000000000000084389778730442708
+dec[c,11,5]: 1
+dec[a,11,5]: -328399.499999
+dec[s,11,5]: 328400.500001
+dec[m,11,5]: -164200.328400
+dec[d,11,5]: -0.0000015225365408038977
+dec[c,11,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,11,6]:
+dec[m,11,6]: *
+dec[d,11,6]: *
+dec[c,11,7]: 1
+dec[a,11,7]: 0.501001
+dec[s,11,7]: 0.499001
+dec[m,11,7]: 0.000500001
+dec[d,11,7]: 500.00100000000000
+dec[c,11,8]: 1
+dec[a,11,8]: 0.500001
+dec[s,11,8]: 0.500001
+dec[m,11,8]: 0.0000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,11,9]: 1
+dec[a,11,9]: 0.499941751
+dec[s,11,9]: 0.500060249
+dec[m,11,9]: -0.000029624559249
+dec[d,11,9]: -8438.9778730442708
+dec[c,11,10]: 1
+dec[a,11,10]: 0.503285
+dec[s,11,10]: 0.496717
+dec[m,11,10]: 0.001642003284
+dec[d,11,10]: 152.25365408038977
+dec[c,11,11]: 0
+dec[a,11,11]: 1.000002
+dec[s,11,11]: 0.000000
+dec[m,11,11]: 0.250001000001
+dec[d,11,11]: 1.00000000000000000
+dec[c,11,12]: 1
+dec[a,11,12]: 0.0000009
+dec[s,11,12]: 1.0000011
+dec[m,11,12]: -0.2500005500001
+dec[d,11,12]: -1.00000179999964000
+dec[c,11,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,11,13]:
+dec[m,11,13]:
+dec[d,11,13]: 0.00000000000000000000000000040500081364500732
+dec[c,11,14]: 2147483647
+dec[a,11,14]:
+dec[s,11,14]:
+dec[m,11,14]:
+dec[d,11,14]: 0.00000000000000000000000000040500081364500732
+dec[c,12,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,12,0]:
+dec[m,12,0]: *
+dec[d,12,0]: *
+dec[c,12,1]: 1
+dec[a,12,1]: -2.5000001
+dec[s,12,1]: 1.4999999
+dec[m,12,1]: 1.0000002
+dec[d,12,1]: 0.25000005000000000
+dec[c,12,2]: -1
+dec[a,12,2]: 0.2939999
+dec[s,12,2]: -1.2940001
+dec[m,12,2]: -0.3970000794
+dec[d,12,2]: -0.62972304785894207
+dec[c,12,3]: -1
+dec[a,12,3]: 2.9399999
+dec[s,12,3]: -3.9400001
+dec[m,12,3]: -1.720000344
+dec[d,12,3]: -0.14534886627906977
+dec[c,12,4]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,12,4]:
+dec[m,12,4]: -296245059249000000000000.0000000
+dec[d,12,4]: -0.00000000000000000000000084389626829144796
+dec[c,12,5]: 1
+dec[a,12,5]: -328400.5000001
+dec[s,12,5]: 328399.4999999
+dec[m,12,5]: 164200.0328400
+dec[d,12,5]: 0.0000015225338002436054
+dec[c,12,6]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,12,6]:
+dec[m,12,6]: *
+dec[d,12,6]: *
+dec[c,12,7]: -1
+dec[a,12,7]: -0.4990001
+dec[s,12,7]: -0.5010001
+dec[m,12,7]: -0.0005000001
+dec[d,12,7]: -500.00010000000000
+dec[c,12,8]: -1
+dec[a,12,8]: -0.5000001
+dec[s,12,8]: -0.5000001
+dec[m,12,8]: 0.00000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,12,9]: -1
+dec[a,12,9]: -0.500059349
+dec[s,12,9]: -0.499940851
+dec[m,12,9]: 0.0000296245059249
+dec[d,12,9]: 8438.9626829144796
+dec[c,12,10]: -1
+dec[a,12,10]: -0.4967161
+dec[s,12,10]: -0.5032841
+dec[m,12,10]: -0.0016420003284
+dec[d,12,10]: -152.25338002436054
+dec[c,12,11]: -1
+dec[a,12,11]: 0.0000009
+dec[s,12,11]: -1.0000011
+dec[m,12,11]: -0.2500005500001
+dec[d,12,11]: -0.99999820000359999
+dec[c,12,12]: 0
+dec[a,12,12]: -1.0000002
+dec[s,12,12]: 0.0000000
+dec[m,12,12]: 0.25000010000001
+dec[d,12,12]: 1.00000000000000000
+dec[c,12,13]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,12,13]:
+dec[m,12,13]:
+dec[d,12,13]: -0.00000000000000000000000000040500008464500076
+dec[c,12,14]: 2147483647
+dec[a,12,14]:
+dec[s,12,14]:
+dec[m,12,14]:
+dec[d,12,14]: -0.00000000000000000000000000040500008464500076
+dec[c,13,0]: -1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,0]:
+dec[m,13,0]: *
+dec[d,13,0]: *
+dec[c,13,1]: 1
+dec[a,13,1]: 1234567890123456789012345676.91
+dec[s,13,1]: 1234567890123456789012345680.91
+dec[m,13,1]: -2469135780246913578024691357.82
+dec[d,13,1]: -617283945061728394506172839.46
+dec[c,13,2]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,2]:
+dec[m,13,2]:
+dec[d,13,2]:
+dec[c,13,3]: 1
+dec[a,13,3]: 1234567890123456789012345682.35
+dec[s,13,3]: 1234567890123456789012345675.47
+dec[m,13,3]:
+dec[d,13,3]:
+dec[c,13,4]: 1
+dec[a,13,4]: 1235160380123456789012345678.91
+dec[s,13,4]: 1233975400123456789012345678.91
+dec[m,13,4]:
+dec[d,13,4]: 2083.6940541164522
+dec[c,13,5]: 1
+dec[a,13,5]: 1234567890123456789012017278.91
+dec[s,13,5]: 1234567890123456789012674078.91
+dec[m,13,5]:
+dec[d,13,5]: -3759341930948406787491.92
+dec[c,13,6]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,6]:
+dec[m,13,6]: *
+dec[d,13,6]: *
+dec[c,13,7]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,7]:
+dec[m,13,7]: 1234567890123456789012345.67891
+dec[d,13,7]: 1234567890123456789012345678910.000
+dec[c,13,8]: 1
+dec[a,13,8]: 1234567890123456789012345678.91
+dec[s,13,8]: 1234567890123456789012345678.91
+dec[m,13,8]: 0.000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1202
+dec[c,13,9]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,9]:
+dec[m,13,9]:
+dec[d,13,9]:
+dec[c,13,10]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,10]:
+dec[m,13,10]:
+dec[d,13,10]:
+dec[c,13,11]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,11]:
+dec[m,13,11]:
+dec[d,13,11]:
+dec[c,13,12]: 1
+(errno == PGTYPES_NUM_OVERFLOW) - r: -1200
+dec[s,13,12]:
+dec[m,13,12]:
+dec[d,13,12]:
+dec[c,13,13]: 0
+dec[a,13,13]: 2469135780246913578024691357.82
+dec[s,13,13]: 0.00
+dec[m,13,13]:
+dec[d,13,13]: 1.00000000000000000
+dec[c,13,14]: 2147483647
+dec[a,13,14]: 2469135780246913578024691357.82
+dec[s,13,14]: 0.00
+dec[m,13,14]:
+dec[d,13,14]: 1.00000000000000000
+dec[c,14,0]: 2147483647
+dec[a,14,0]: 2469135780246913578024691357.82
+dec[s,14,0]: 0.00
+dec[m,14,0]:
+dec[d,14,0]: 1.00000000000000000
+dec[c,14,1]: 2147483647
+dec[a,14,1]: 2469135780246913578024691357.82
+dec[s,14,1]: 0.00
+dec[m,14,1]:
+dec[d,14,1]: 1.00000000000000000
+dec[c,14,2]: 2147483647
+dec[a,14,2]: 2469135780246913578024691357.82
+dec[s,14,2]: 0.00
+dec[m,14,2]:
+dec[d,14,2]: 1.00000000000000000
+dec[c,14,3]: 2147483647
+dec[a,14,3]: 2469135780246913578024691357.82
+dec[s,14,3]: 0.00
+dec[m,14,3]:
+dec[d,14,3]: 1.00000000000000000
+dec[c,14,4]: 2147483647
+dec[a,14,4]: 2469135780246913578024691357.82
+dec[s,14,4]: 0.00
+dec[m,14,4]:
+dec[d,14,4]: 1.00000000000000000
+dec[c,14,5]: 2147483647
+dec[a,14,5]: 2469135780246913578024691357.82
+dec[s,14,5]: 0.00
+dec[m,14,5]:
+dec[d,14,5]: 1.00000000000000000
+dec[c,14,6]: 2147483647
+dec[a,14,6]: 2469135780246913578024691357.82
+dec[s,14,6]: 0.00
+dec[m,14,6]:
+dec[d,14,6]: 1.00000000000000000
+dec[c,14,7]: 2147483647
+dec[a,14,7]: 2469135780246913578024691357.82
+dec[s,14,7]: 0.00
+dec[m,14,7]:
+dec[d,14,7]: 1.00000000000000000
+dec[c,14,8]: 2147483647
+dec[a,14,8]: 2469135780246913578024691357.82
+dec[s,14,8]: 0.00
+dec[m,14,8]:
+dec[d,14,8]: 1.00000000000000000
+dec[c,14,9]: 2147483647
+dec[a,14,9]: 2469135780246913578024691357.82
+dec[s,14,9]: 0.00
+dec[m,14,9]:
+dec[d,14,9]: 1.00000000000000000
+dec[c,14,10]: 2147483647
+dec[a,14,10]: 2469135780246913578024691357.82
+dec[s,14,10]: 0.00
+dec[m,14,10]:
+dec[d,14,10]: 1.00000000000000000
+dec[c,14,11]: 2147483647
+dec[a,14,11]: 2469135780246913578024691357.82
+dec[s,14,11]: 0.00
+dec[m,14,11]:
+dec[d,14,11]: 1.00000000000000000
+dec[c,14,12]: 2147483647
+dec[a,14,12]: 2469135780246913578024691357.82
+dec[s,14,12]: 0.00
+dec[m,14,12]:
+dec[d,14,12]: 1.00000000000000000
+dec[c,14,13]: 2147483647
+dec[a,14,13]: 2469135780246913578024691357.82
+dec[s,14,13]: 0.00
+dec[m,14,13]:
+dec[d,14,13]: 1.00000000000000000
+dec[c,14,14]: 2147483647
+dec[a,14,14]: 2469135780246913578024691357.82
+dec[s,14,14]: 0.00
+dec[m,14,14]:
+dec[d,14,14]: 1.00000000000000000
+0: *
+1: -2
+2: 0.794
+3: 3.44
+4: 592490000000000000000000
+5: -328400
+6: *
+7: 0.001
+8: 0.0
+9: -0.000059249
+10: 0.003284
+11: 0.500001
+12: -0.5000001
+13: 1234567890123456789012345678.91
+14:
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.c b/src/interfaces/ecpg/test/expected/compat_informix-describe.c
new file mode 100644
index 0000000..031a2d7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.c
@@ -0,0 +1,467 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "describe.pgc"
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "describe.pgc"
+
+
+#line 1 "sqlda.h"
+#ifndef ECPG_SQLDA_H
+#define ECPG_SQLDA_H
+
+#ifdef _ECPG_INFORMIX_H
+
+#include "sqlda-compat.h"
+typedef struct sqlvar_compat sqlvar_t;
+typedef struct sqlda_compat sqlda_t;
+
+#else
+
+#include "sqlda-native.h"
+typedef struct sqlvar_struct sqlvar_t;
+typedef struct sqlda_struct sqlda_t;
+
+#endif
+
+#endif /* ECPG_SQLDA_H */
+
+#line 5 "describe.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 7 "describe.pgc"
+
+
+sqlda_t *sqlda1, *sqlda2, *sqlda3;
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+#line 15 "describe.pgc"
+ char * stmt1 = "SELECT id, t FROM descr_t1" ;
+
+#line 16 "describe.pgc"
+ char * stmt2 = "SELECT id, t FROM descr_t1 WHERE id = -1" ;
+
+#line 17 "describe.pgc"
+ int i , count1 , count2 ;
+
+#line 18 "describe.pgc"
+ char field_name1 [ 30 ] = "not set" ;
+
+#line 19 "describe.pgc"
+ char field_name2 [ 30 ] = "not set" ;
+/* exec sql end declare section */
+#line 20 "describe.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 27 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 27 "describe.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 30 "describe.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table descr_t1 ( id serial primary key , t text )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 33 "describe.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into descr_t1 ( id , t ) values ( default , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 36 "describe.pgc"
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into descr_t1 ( id , t ) values ( default , 'b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "describe.pgc"
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into descr_t1 ( id , t ) values ( default , 'c' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "describe.pgc"
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into descr_t1 ( id , t ) values ( default , 'd' )", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 39 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 42 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 42 "describe.pgc"
+
+
+ /*
+ * Test DESCRIBE with a query producing tuples.
+ * DESCRIPTOR and SQL DESCRIPTOR are NOT the same in
+ * Informix-compat mode.
+ */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 51 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 51 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 52 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 52 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
+#line 55 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "describe.pgc"
+
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc1", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 60 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc2", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 61 "describe.pgc"
+
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda1, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 63 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda2, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 64 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda3, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 65 "describe.pgc"
+
+
+ if (sqlda1 == NULL)
+ {
+ printf("sqlda1 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda2 == NULL)
+ {
+ printf("sqlda2 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda3 == NULL)
+ {
+ printf("sqlda3 NULL\n");
+ exit(1);
+ }
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 86 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 86 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc1", &(count2));
+
+#line 87 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 87 "describe.pgc"
+
+
+ if (count1 != count2)
+ {
+ printf("count1 (%d) != count2 (%d)\n", count1, count2);
+ exit(1);
+ }
+
+ if (count1 != sqlda1->sqld)
+ {
+ printf("count1 (%d) != sqlda1->sqld (%d)\n", count1, sqlda1->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda2->sqld)
+ {
+ printf("count1 (%d) != sqlda2->sqld (%d)\n", count1, sqlda2->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda3->sqld)
+ {
+ printf("count1 (%d) != sqlda3->sqld (%d)\n", count1, sqlda3->sqld);
+ exit(1);
+ }
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 115 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 115 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 116 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 116 "describe.pgc"
+
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname,
+ sqlda2->sqlvar[i-1].sqlname,
+ sqlda3->sqlvar[i-1].sqlname);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 126 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 126 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 127 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 127 "describe.pgc"
+
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id1");
+#line 132 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 132 "describe.pgc"
+
+
+ /* Test DESCRIBE with a query not producing tuples */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 137 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 137 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 138 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 138 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt2);
+#line 141 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 141 "describe.pgc"
+
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc1", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 146 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc2", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 147 "describe.pgc"
+
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda1, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 149 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda2, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 150 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 1, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda3, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 151 "describe.pgc"
+
+
+ if (sqlda1 == NULL || sqlda2 == NULL || sqlda3 == NULL)
+ exit(1);
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 157 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 157 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc1", &(count2));
+
+#line 158 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 158 "describe.pgc"
+
+
+ if (!( count1 == count2 &&
+ count1 == sqlda1->sqld &&
+ count1 == sqlda2->sqld &&
+ count1 == sqlda3->sqld))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 168 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 168 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 169 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 169 "describe.pgc"
+
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname,
+ sqlda2->sqlvar[i-1].sqlname,
+ sqlda3->sqlvar[i-1].sqlname);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 179 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 179 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 180 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 180 "describe.pgc"
+
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id2");
+#line 185 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 185 "describe.pgc"
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table descr_t1", ECPGt_EOIT, ECPGt_EORT);
+#line 190 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 190 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 193 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 193 "describe.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 196 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 196 "describe.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.stderr b/src/interfaces/ecpg/test/expected/compat_informix-describe.stderr
new file mode 100644
index 0000000..8c4c9b7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.stderr
@@ -0,0 +1,112 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: create table descr_t1 ( id serial primary key , t text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into descr_t1 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: insert into descr_t1 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into descr_t1 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: insert into descr_t1 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 42: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 55: name st_id1; query: "SELECT id, t FROM descr_t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 63 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 64 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 65 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 132: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 141: name st_id2; query: "SELECT id, t FROM descr_t1 WHERE id = -1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 149 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 150 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 151 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 185: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 190: query: drop table descr_t1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 190: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 190: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 193: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.stdout b/src/interfaces/ecpg/test/expected/compat_informix-describe.stdout
new file mode 100644
index 0000000..1e3fe10
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.stdout
@@ -0,0 +1,24 @@
+1
+ field_name1 'id'
+ field_name2 'id'
+ sqlda1 'id'
+ sqlda2 'id'
+ sqlda3 'id'
+2
+ field_name1 't'
+ field_name2 't'
+ sqlda1 't'
+ sqlda2 't'
+ sqlda3 't'
+1
+ field_name1 'id'
+ field_name2 'id'
+ sqlda1 'id'
+ sqlda2 'id'
+ sqlda3 'id'
+2
+ field_name1 't'
+ field_name2 't'
+ sqlda1 't'
+ sqlda2 't'
+ sqlda3 't'
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
new file mode 100644
index 0000000..68be082
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
@@ -0,0 +1,186 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "rfmtdate.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_error.h>
+#include <sqltypes.h>
+
+/*
+ * This file tests various forms of date-input/output by means of
+ * rfmtdate / rdefmtdate / rstrdate
+ */
+
+
+static void
+check_return(int ret);
+
+static void
+date_test_strdate(const char *input)
+{
+ static int i;
+ date d;
+ int r, q;
+ char dbuf[11];
+
+ r = rstrdate(input, &d);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ q = rdatestr(d, dbuf);
+ printf("q: %d ", q);
+ if (q == 0)
+ {
+ printf("date %d: %s\n", i++, dbuf);
+ }
+ else
+ printf("\n");
+ }
+ else
+ check_return(r);
+}
+
+static void
+date_test_defmt(const char *fmt, const char *input)
+{
+ static int i;
+ char dbuf[11];
+ date d;
+ int q, r;
+
+ r = rdefmtdate(&d, fmt, input);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ q = rdatestr(d, dbuf);
+ printf("q: %d ", q);
+ if (q == 0)
+ {
+ printf("date %d: %s\n", i++, dbuf);
+ }
+ else
+ printf("\n");
+ }
+ else
+ check_return(r);
+}
+
+static void
+date_test_fmt(date d, const char *fmt)
+{
+ static int i;
+ char buf[200];
+ int r;
+
+ r = rfmtdate(d, fmt, buf);
+ printf("r: %d ", r);
+ if (r != 0)
+ check_return(r);
+ else
+ printf("date: %d: %s\n", i++, buf);
+}
+
+
+int
+main(void)
+{
+ short mdy[3] = { 11, 23, 1959 };
+ char dbuf[11];
+ date d;
+ int r;
+
+ ECPGdebug(1, stderr);
+
+ r = rmdyjul(mdy, &d);
+ printf("create: r: %d\n", r);
+ if (r == 0)
+ {
+ rdatestr(d, dbuf);
+ printf("date: %s\n", dbuf);
+ }
+
+ /* input mask is mmddyyyy */
+ date_test_strdate("12031994");
+ date_test_strdate("9.6.1994");
+
+ date_test_fmt(d, "mmddyy");
+ date_test_fmt(d, "ddmmyy");
+ date_test_fmt(d, "yymmdd");
+ date_test_fmt(d, "yy/mm/dd");
+ date_test_fmt(d, "yy mm dd");
+ date_test_fmt(d, "yy.mm.dd");
+ date_test_fmt(d, ".mm.yyyy.dd.");
+ date_test_fmt(d, "mmm. dd, yyyy");
+ date_test_fmt(d, "mmm dd yyyy");
+ date_test_fmt(d, "yyyy dd mm");
+ date_test_fmt(d, "ddd, mmm. dd, yyyy");
+ date_test_fmt(d, "(ddd) mmm. dd, yyyy");
+
+ date_test_defmt("ddmmyy", "21-2-54");
+ date_test_defmt("ddmmyy", "2-12-54");
+ date_test_defmt("ddmmyy", "20111954");
+ date_test_defmt("ddmmyy", "130464");
+ date_test_defmt("mmm.dd.yyyy", "MAR-12-1967");
+ date_test_defmt("yy/mm/dd", "1954, February 3rd");
+ date_test_defmt("mmm.dd.yyyy", "041269");
+ date_test_defmt("yy/mm/dd", "In the year 2525, in the month of July, mankind will be alive on the 28th day");
+ date_test_defmt("dd-mm-yy", "I said on the 28th of July in the year 2525");
+ date_test_defmt("mmm.dd.yyyy", "9/14/58");
+ date_test_defmt("yy/mm/dd", "47/03/29");
+ date_test_defmt("mmm.dd.yyyy", "oct 28 1975");
+ date_test_defmt("mmddyy", "Nov 14th, 1985");
+ /* ok: still contains dd mm yy */
+ date_test_defmt("bladdfoommbaryybong", "20/11/1954");
+ /* 1994 is not a leap year, it accepts the date as 01-03-1994 */
+ date_test_defmt("ddmmyy", "29-02-1994");
+
+ /* ECPG_INFORMIX_ENOTDMY, need "dd", "mm" and "yy" */
+ date_test_defmt("dmy", "20/11/1954");
+
+ /* ECPG_INFORMIX_ENOSHORTDATE */
+ date_test_defmt("ddmmyy", "21254");
+ date_test_defmt("ddmmyy", " 21254 ");
+
+ /* ECPG_INFORMIX_BAD_DAY */
+ date_test_defmt("ddmmyy", "320494");
+
+ /* ECPG_INFORMIX_BAD_MONTH */
+ date_test_defmt("mm-yyyy-dd", "13-1993-21");
+
+ /* ECPG_INFORMIX_BAD_YEAR */
+ /* ??? */
+
+ return 0;
+}
+
+static void
+check_return(int ret)
+{
+ switch(ret)
+ {
+ case ECPG_INFORMIX_ENOTDMY:
+ printf("(ECPG_INFORMIX_ENOTDMY)");
+ break;
+ case ECPG_INFORMIX_ENOSHORTDATE:
+ printf("(ECPG_INFORMIX_ENOSHORTDATE)");
+ break;
+ case ECPG_INFORMIX_BAD_DAY:
+ printf("(ECPG_INFORMIX_BAD_DAY)");
+ break;
+ case ECPG_INFORMIX_BAD_MONTH:
+ printf("(ECPG_INFORMIX_BAD_MONTH)");
+ break;
+ default:
+ printf("(unknown ret: %d)", ret);
+ break;
+ }
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stderr
new file mode 100644
index 0000000..1a3639d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stderr
@@ -0,0 +1,2 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stdout b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stdout
new file mode 100644
index 0000000..16880d4
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.stdout
@@ -0,0 +1,36 @@
+create: r: 0
+date: 1959-11-23
+r: 0 q: 0 date 0: 1994-12-03
+r: 0 q: 0 date 1: 1994-09-06
+r: 0 date: 0: 112359
+r: 0 date: 1: 231159
+r: 0 date: 2: 591123
+r: 0 date: 3: 59/11/23
+r: 0 date: 4: 59 11 23
+r: 0 date: 5: 59.11.23
+r: 0 date: 6: .11.1959.23.
+r: 0 date: 7: Nov. 23, 1959
+r: 0 date: 8: Nov 23 1959
+r: 0 date: 9: 1959 23 11
+r: 0 date: 10: Mon, Nov. 23, 1959
+r: 0 date: 11: (Mon) Nov. 23, 1959
+r: 0 q: 0 date 0: 0054-02-21
+r: 0 q: 0 date 1: 0054-12-02
+r: 0 q: 0 date 2: 1954-11-20
+r: 0 q: 0 date 3: 0064-04-13
+r: 0 q: 0 date 4: 1967-03-12
+r: 0 q: 0 date 5: 1954-02-03
+r: 0 q: 0 date 6: 0069-04-12
+r: 0 q: 0 date 7: 2525-07-28
+r: 0 q: 0 date 8: 2525-07-28
+r: 0 q: 0 date 9: 0058-09-14
+r: 0 q: 0 date 10: 0047-03-29
+r: 0 q: 0 date 11: 1975-10-28
+r: 0 q: 0 date 12: 1985-11-14
+r: 0 q: 0 date 13: 1954-11-20
+r: 0 q: 0 date 14: 1994-03-01
+r: -1212 (ECPG_INFORMIX_ENOTDMY)
+r: -1209 (ECPG_INFORMIX_ENOSHORTDATE)
+r: -1209 (ECPG_INFORMIX_ENOSHORTDATE)
+r: -1206 (ECPG_INFORMIX_BAD_DAY)
+r: -1205 (ECPG_INFORMIX_BAD_MONTH)
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
new file mode 100644
index 0000000..b2e397e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
@@ -0,0 +1,84 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "rfmtlong.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_error.h>
+#include <sqltypes.h>
+
+/*
+ * This file tests various forms of long-input/output by means of
+ * rfmtlong
+ */
+
+
+static void
+check_return(int ret);
+
+static void
+fmtlong(long lng, const char *fmt)
+{
+ static int i;
+ int r;
+ char buf[30];
+
+ r = rfmtlong(lng, fmt, buf);
+ printf("r: %d ", r);
+ if (r == 0)
+ {
+ printf("%d: %s (fmt was: %s)\n", i++, buf, fmt);
+ }
+ else
+ check_return(r);
+}
+
+int
+main(void)
+{
+ ECPGdebug(1, stderr);
+
+ fmtlong(-8494493, "-<<<<,<<<,<<<,<<<");
+ fmtlong(-8494493, "################");
+ fmtlong(-8494493, "+++$$$$$$$$$$$$$.##");
+ fmtlong(-8494493, "(&,&&&,&&&,&&&.)");
+ fmtlong(-8494493, "<<<<,<<<,<<<,<<<");
+ fmtlong(-8494493, "$************.**");
+ fmtlong(-8494493, "---$************.**");
+ fmtlong(-8494493, "+-+################");
+ fmtlong(-8494493, "abc: ################+-+");
+ fmtlong(-8494493, "+<<<<,<<<,<<<,<<<");
+
+ return 0;
+}
+
+static void
+check_return(int ret)
+{
+ switch(ret)
+ {
+ case ECPG_INFORMIX_ENOTDMY:
+ printf("(ECPG_INFORMIX_ENOTDMY)");
+ break;
+ case ECPG_INFORMIX_ENOSHORTDATE:
+ printf("(ECPG_INFORMIX_ENOSHORTDATE)");
+ break;
+ case ECPG_INFORMIX_BAD_DAY:
+ printf("(ECPG_INFORMIX_BAD_DAY)");
+ break;
+ case ECPG_INFORMIX_BAD_MONTH:
+ printf("(ECPG_INFORMIX_BAD_MONTH)");
+ break;
+ default:
+ printf("(unknown ret: %d)", ret);
+ break;
+ }
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stderr
new file mode 100644
index 0000000..1a3639d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stderr
@@ -0,0 +1,2 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stdout b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stdout
new file mode 100644
index 0000000..5965e6d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.stdout
@@ -0,0 +1,10 @@
+r: 0 0: -8,494,493 (fmt was: -<<<<,<<<,<<<,<<<)
+r: 0 1: 8494493 (fmt was: ################)
+r: 0 2: - $8494493.00 (fmt was: +++$$$$$$$$$$$$$.##)
+r: 0 3: (00008,494,493.) (fmt was: (&,&&&,&&&,&&&.))
+r: 0 4: 8,494,493 (fmt was: <<<<,<<<,<<<,<<<)
+r: 0 5: $*****8494493.00 (fmt was: $************.**)
+r: 0 6: -$*****8494493.00 (fmt was: ---$************.**)
+r: 0 7: - 8494493 (fmt was: +-+################)
+r: 0 8: abc: 8494493 (fmt was: abc: ################+-+)
+r: 0 9: -8,494,493 (fmt was: +<<<<,<<<,<<<,<<<)
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
new file mode 100644
index 0000000..d7ba69c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
@@ -0,0 +1,293 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "rnull.pgc"
+#include "sqltypes.h"
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "rnull.pgc"
+
+
+
+static void
+test_null(int type, char *ptr)
+{
+ printf("null: %d\n", risnull(type, ptr));
+}
+
+int main(void)
+{
+
+#line 15 "rnull.pgc"
+ char c [] = "abc" ;
+
+#line 15 "rnull.pgc"
+
+
+#line 16 "rnull.pgc"
+ short s = 17 ;
+
+#line 16 "rnull.pgc"
+
+
+#line 17 "rnull.pgc"
+ int i = - 74874 ;
+
+#line 17 "rnull.pgc"
+
+
+#line 18 "rnull.pgc"
+ bool b = 1 ;
+
+#line 18 "rnull.pgc"
+
+
+#line 19 "rnull.pgc"
+ float f = 3.71 ;
+
+#line 19 "rnull.pgc"
+
+
+#line 20 "rnull.pgc"
+ long l = 487444 ;
+
+#line 20 "rnull.pgc"
+
+
+#line 21 "rnull.pgc"
+ double dbl = 404.404 ;
+
+#line 21 "rnull.pgc"
+
+
+#line 22 "rnull.pgc"
+ decimal dec ;
+
+#line 22 "rnull.pgc"
+
+
+#line 23 "rnull.pgc"
+ date dat ;
+
+#line 23 "rnull.pgc"
+
+
+#line 24 "rnull.pgc"
+ timestamp tmp ;
+
+#line 24 "rnull.pgc"
+
+
+ ECPGdebug(1, stderr);
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 27 "rnull.pgc"
+
+
+ { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 29 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 29 "rnull.pgc"
+
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 33 "rnull.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 34 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 34 "rnull.pgc"
+
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 )",
+ ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 38 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 38 "rnull.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 39 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 39 "rnull.pgc"
+
+
+ rsetnull(CCHARTYPE, (char *) c);
+ rsetnull(CSHORTTYPE, (char *) &s);
+ rsetnull(CINTTYPE, (char *) &i);
+ rsetnull(CBOOLTYPE, (char *) &b);
+ rsetnull(CFLOATTYPE, (char *) &f);
+ rsetnull(CLONGTYPE, (char *) &l);
+ rsetnull(CDOUBLETYPE, (char *) &dbl);
+ rsetnull(CDECIMALTYPE, (char *) &dec);
+ rsetnull(CDATETYPE, (char *) &dat);
+ rsetnull(CDTIMETYPE, (char *) &tmp);
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 )",
+ ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 54 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 54 "rnull.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 55 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 55 "rnull.pgc"
+
+
+ printf("first select\n");
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1", ECPGt_EOIT,
+ ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 61 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 61 "rnull.pgc"
+
+
+ test_null(CCHARTYPE, (char *) c);
+ test_null(CSHORTTYPE, (char *) &s);
+ test_null(CINTTYPE, (char *) &i);
+ test_null(CBOOLTYPE, (char *) &b);
+ test_null(CFLOATTYPE, (char *) &f);
+ test_null(CLONGTYPE, (char *) &l);
+ test_null(CDOUBLETYPE, (char *) &dbl);
+ test_null(CDECIMALTYPE, (char *) &dec);
+ test_null(CDATETYPE, (char *) &dat);
+ test_null(CDTIMETYPE, (char *) &tmp);
+
+ printf("second select\n");
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2", ECPGt_EOIT,
+ ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 78 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 78 "rnull.pgc"
+
+
+ test_null(CCHARTYPE, (char *) c);
+ test_null(CSHORTTYPE, (char *) &s);
+ test_null(CINTTYPE, (char *) &i);
+ test_null(CBOOLTYPE, (char *) &b);
+ test_null(CFLOATTYPE, (char *) &f);
+ test_null(CLONGTYPE, (char *) &l);
+ test_null(CDOUBLETYPE, (char *) &dbl);
+ test_null(CDECIMALTYPE, (char *) &dec);
+ test_null(CDATETYPE, (char *) &dat);
+ test_null(CDTIMETYPE, (char *) &tmp);
+
+ { ECPGdo(__LINE__, 1, 0, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 91 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 91 "rnull.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 92 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 92 "rnull.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 94 "rnull.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 94 "rnull.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr
new file mode 100644
index 0000000..dd3d8b7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr
@@ -0,0 +1,124 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 34: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ); with 7 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 1 = abc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 2 = 17
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 3 = -74874
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 4 = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 5 = 3.71000003814697
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 6 = 487444
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 7 = 404.404
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 39: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: query: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 ); with 10 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 1 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 2 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 3 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 4 = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 5 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 6 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 7 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 8 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 9 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 52: parameter 10 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 55: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: query: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 59: correctly got 1 tuples with 10 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: abc offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 17 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: -74874 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 3.71000003814697 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 487444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 404.404 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: correctly got 1 tuples with 10 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 91: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 91: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 91: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 92: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stdout b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stdout
new file mode 100644
index 0000000..ff2e405
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stdout
@@ -0,0 +1,22 @@
+first select
+null: 0
+null: 0
+null: 0
+null: 0
+null: 0
+null: 0
+null: 0
+null: 1
+null: 1
+null: 1
+second select
+null: 1
+null: 1
+null: 1
+null: 0
+null: 1
+null: 1
+null: 1
+null: 1
+null: 1
+null: 1
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
new file mode 100644
index 0000000..7e19319
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
@@ -0,0 +1,530 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "sqlda.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "sqlda.pgc"
+
+
+
+#line 1 "sqlda.h"
+#ifndef ECPG_SQLDA_H
+#define ECPG_SQLDA_H
+
+#ifdef _ECPG_INFORMIX_H
+
+#include "sqlda-compat.h"
+typedef struct sqlvar_compat sqlvar_t;
+typedef struct sqlda_compat sqlda_t;
+
+#else
+
+#include "sqlda-native.h"
+typedef struct sqlvar_struct sqlvar_t;
+typedef struct sqlda_struct sqlda_t;
+
+#endif
+
+#endif /* ECPG_SQLDA_H */
+
+#line 7 "sqlda.pgc"
+
+
+#line 1 "sqltypes.h"
+#ifndef ECPG_SQLTYPES_H
+#define ECPG_SQLTYPES_H
+
+#include <limits.h>
+
+#define CCHARTYPE ECPGt_char
+#define CSHORTTYPE ECPGt_short
+#define CINTTYPE ECPGt_int
+#define CLONGTYPE ECPGt_long
+#define CFLOATTYPE ECPGt_float
+#define CDOUBLETYPE ECPGt_double
+#define CDECIMALTYPE ECPGt_decimal
+#define CFIXCHARTYPE 108
+#define CSTRINGTYPE ECPGt_char
+#define CDATETYPE ECPGt_date
+#define CMONEYTYPE 111
+#define CDTIMETYPE ECPGt_timestamp
+#define CLOCATORTYPE 113
+#define CVCHARTYPE ECPGt_varchar
+#define CINVTYPE 115
+#define CFILETYPE 116
+#define CINT8TYPE ECPGt_long_long
+#define CCOLLTYPE 118
+#define CLVCHARTYPE 119
+#define CFIXBINTYPE 120
+#define CVARBINTYPE 121
+#define CBOOLTYPE ECPGt_bool
+#define CROWTYPE 123
+#define CLVCHARPTRTYPE 124
+#define CTYPEMAX 25
+
+/*
+ * Values used in sqlda->sqlvar[i]->sqltype
+ */
+#define SQLCHAR ECPGt_char
+#define SQLSMINT ECPGt_short
+#define SQLINT ECPGt_int
+#define SQLFLOAT ECPGt_double
+#define SQLSMFLOAT ECPGt_float
+#define SQLDECIMAL ECPGt_decimal
+#define SQLSERIAL ECPGt_int
+#define SQLDATE ECPGt_date
+#define SQLDTIME ECPGt_timestamp
+#define SQLTEXT ECPGt_char
+#define SQLVCHAR ECPGt_char
+#define SQLINTERVAL ECPGt_interval
+#define SQLNCHAR ECPGt_char
+#define SQLNVCHAR ECPGt_char
+#ifdef HAVE_LONG_LONG_INT_64
+#define SQLINT8 ECPGt_long_long
+#define SQLSERIAL8 ECPGt_long_long
+#else
+#define SQLINT8 ECPGt_long
+#define SQLSERIAL8 ECPGt_long
+#endif
+
+#endif /* ndef ECPG_SQLTYPES_H */
+
+#line 8 "sqlda.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 10 "sqlda.pgc"
+
+
+/* These shouldn't be under DECLARE SECTION */
+sqlda_t *inp_sqlda, *outp_sqlda;
+
+static void
+dump_sqlda(sqlda_t *sqlda)
+{
+ int i;
+
+ if (sqlda == NULL)
+ {
+ printf("dump_sqlda called with NULL sqlda\n");
+ return;
+ }
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ if (sqlda->sqlvar[i].sqlind && *(sqlda->sqlvar[i].sqlind) == -1)
+ printf("name sqlda descriptor: '%s' value NULL'\n", sqlda->sqlvar[i].sqlname);
+ else
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case SQLCHAR:
+ printf("name sqlda descriptor: '%s' value '%s'\n", sqlda->sqlvar[i].sqlname, sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLINT:
+ printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname, *(int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLFLOAT:
+ printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname, *(double *)sqlda->sqlvar[i].sqldata);
+ break;
+ case SQLDECIMAL:
+ {
+ char val[64];
+ dectoasc((decimal *)sqlda->sqlvar[i].sqldata, val, 64, -1);
+ printf("name sqlda descriptor: '%s' value DECIMAL '%s'\n", sqlda->sqlvar[i].sqlname, val);
+ break;
+ }
+ }
+ }
+}
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+#line 57 "sqlda.pgc"
+ char * stmt1 = "SELECT * FROM t1" ;
+
+#line 58 "sqlda.pgc"
+ char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ;
+
+#line 59 "sqlda.pgc"
+ int rec ;
+
+#line 60 "sqlda.pgc"
+ int id ;
+/* exec sql end declare section */
+#line 61 "sqlda.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , "regress1", 0);
+#line 68 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 68 "sqlda.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 71 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 71 "sqlda.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 79 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 79 "sqlda.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' )", ECPGt_EOIT, ECPGt_EORT);
+#line 85 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 85 "sqlda.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 88 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 88 "sqlda.pgc"
+
+
+ /* SQLDA test for getting all records from a table */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
+#line 95 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 95 "sqlda.pgc"
+
+
+ strcpy(msg, "declare");
+ /* declare mycur1 cursor for $1 */
+#line 98 "sqlda.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare mycur1 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 101 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 101 "sqlda.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 103 "sqlda.pgc"
+
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 109 "sqlda.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 109 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 109 "sqlda.pgc"
+
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ /* exec sql whenever not found continue ; */
+#line 115 "sqlda.pgc"
+
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
+#line 118 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 118 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id1");
+#line 121 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 121 "sqlda.pgc"
+
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting all records from a table
+ using the Informix-specific FETCH ... USING DESCRIPTOR
+ */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1);
+#line 132 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 132 "sqlda.pgc"
+
+
+ strcpy(msg, "declare");
+ /* declare mycur2 cursor for $1 */
+#line 135 "sqlda.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 138 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 138 "sqlda.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 140 "sqlda.pgc"
+
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch from mycur2", ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 146 "sqlda.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 146 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 146 "sqlda.pgc"
+
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ /* exec sql whenever not found continue ; */
+#line 152 "sqlda.pgc"
+
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
+#line 155 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 155 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id2");
+#line 158 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 158 "sqlda.pgc"
+
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor */
+
+ /* Input sqlda has to be built manually */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqld = 1;
+ inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
+ memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
+
+ inp_sqlda->sqlvar[0].sqltype = SQLINT;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2);
+#line 181 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 181 "sqlda.pgc"
+
+
+ strcpy(msg, "execute");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_execute, "st_id3",
+ ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 184 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 184 "sqlda.pgc"
+
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id3");
+#line 189 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 189 "sqlda.pgc"
+
+
+ free(inp_sqlda->sqlvar);
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor
+ * on a named connection
+ */
+
+ { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , "con2", 0);
+#line 199 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 199 "sqlda.pgc"
+
+
+ /* Input sqlda has to be built manually */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqld = 1;
+ inp_sqlda->sqlvar = malloc(sizeof(sqlvar_t));
+ memset(inp_sqlda->sqlvar, 0, sizeof(sqlvar_t));
+
+ inp_sqlda->sqlvar[0].sqltype = SQLINT;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2);
+#line 218 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 218 "sqlda.pgc"
+
+
+ strcpy(msg, "execute");
+ { ECPGdo(__LINE__, 1, 1, "con2", 0, ECPGst_execute, "st_id4",
+ ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 221 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 221 "sqlda.pgc"
+
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, "con2", "commit");
+#line 226 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 226 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 1, NULL, "st_id4");
+#line 229 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 229 "sqlda.pgc"
+
+
+ free(inp_sqlda->sqlvar);
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "con2");
+#line 236 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 236 "sqlda.pgc"
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 241 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 241 "sqlda.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 244 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 244 "sqlda.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 247 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 247 "sqlda.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr
new file mode 100644
index 0000000..51cb46b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr
@@ -0,0 +1,340 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: query: set datestyle to iso; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 71: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) ); with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' ); with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 82: OK: INSERT 0 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 88: action "commit"; connection "regress1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 95: name st_id1; query: "SELECT * FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 101: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 101: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 101: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 109 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 1.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 109 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 1 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 2 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 3 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 4 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 109 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 4.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 109 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 109: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: correctly got 0 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 109: no data found on line 109
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 118: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 118: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 118: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 121: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 132: name st_id2; query: "SELECT * FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 138: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 138: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 138: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 146 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 1.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 146 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 1 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 2 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 3 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 4 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 146 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 4.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 146 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 146: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: query: fetch from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 146: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 146: correctly got 0 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 146: no data found on line 146
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 155: query: close mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 155: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 155: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 158: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 181: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 184: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 184: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 184: parameter 1 = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 184: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 184 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 184: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 184 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 184: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 184 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 184: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 184 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 184: RESULT: 4.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 184 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 184: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 184 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 184: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 184: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 189: name st_id3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 218: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 221: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 221: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 221: parameter 1 = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 221: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_compat_sqlda on line 221 sqld = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 221: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 221 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 221: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 221 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 221: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 221 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 221: RESULT: 4.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 221 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 221: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_compat_sqlda on line 221 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 221: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 221: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 226: action "commit"; connection "con2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 229: name st_id4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection con2 closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 241: query: drop table t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 241: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 241: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 244: action "commit"; connection "regress1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection regress1 closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stdout b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stdout
new file mode 100644
index 0000000..68335df
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stdout
@@ -0,0 +1,48 @@
+FETCH RECORD 1
+name sqlda descriptor: 'id' value 1
+name sqlda descriptor: 't' value 'a'
+name sqlda descriptor: 'd1' value DECIMAL '1.0'
+name sqlda descriptor: 'd2' value 1.000000
+name sqlda descriptor: 'c' value 'a '
+FETCH RECORD 2
+name sqlda descriptor: 'id' value 2
+name sqlda descriptor: 't' value NULL'
+name sqlda descriptor: 'd1' value NULL'
+name sqlda descriptor: 'd2' value NULL'
+name sqlda descriptor: 'c' value NULL'
+FETCH RECORD 3
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value DECIMAL '4.0'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+FETCH RECORD 1
+name sqlda descriptor: 'id' value 1
+name sqlda descriptor: 't' value 'a'
+name sqlda descriptor: 'd1' value DECIMAL '1.0'
+name sqlda descriptor: 'd2' value 1.000000
+name sqlda descriptor: 'c' value 'a '
+FETCH RECORD 2
+name sqlda descriptor: 'id' value 2
+name sqlda descriptor: 't' value NULL'
+name sqlda descriptor: 'd1' value NULL'
+name sqlda descriptor: 'd2' value NULL'
+name sqlda descriptor: 'c' value NULL'
+FETCH RECORD 3
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value DECIMAL '4.0'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+EXECUTE RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value DECIMAL '4.0'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+EXECUTE RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value DECIMAL '4.0'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
new file mode 100644
index 0000000..cc65049
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
@@ -0,0 +1,259 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test_informix.pgc"
+#include "sqltypes.h"
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "test_informix.pgc"
+
+
+
+static void openit(void);
+static void dosqlprint(void) {
+ printf("doSQLprint: Error: %s\n", sqlca.sqlerrm.sqlerrmc);
+}
+
+int main(void)
+{
+
+#line 14 "test_informix.pgc"
+ int i = 14 , loopcount ;
+
+#line 14 "test_informix.pgc"
+
+
+#line 15 "test_informix.pgc"
+ decimal j , m , n ;
+
+#line 15 "test_informix.pgc"
+
+
+#line 16 "test_informix.pgc"
+ char c [ 10 ] ;
+
+#line 16 "test_informix.pgc"
+
+
+ ECPGdebug(1, stderr);
+ /* exec sql whenever sqlerror do dosqlprint ( ) ; */
+#line 19 "test_informix.pgc"
+
+
+ { ECPGconnect(__LINE__, 1, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 21 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 21 "test_informix.pgc"
+
+ if (sqlca.sqlcode != 0) exit(1);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table test ( i int primary key , j int , c text )", ECPGt_EOIT, ECPGt_EORT);
+#line 24 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 24 "test_informix.pgc"
+
+
+ /* this INSERT works */
+ rsetnull(CDECIMALTYPE, (char *)&j);
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( 7 , $1 , 'test ' )",
+ ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 28 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 28 "test_informix.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 29 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 29 "test_informix.pgc"
+
+
+ /* this INSERT should fail because i is a unique column */
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( 7 , 12 , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 32 "test_informix.pgc"
+
+ printf("INSERT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ if (sqlca.sqlcode != 0) { ECPGtrans(__LINE__, NULL, "rollback");
+#line 34 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 34 "test_informix.pgc"
+
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( $1 , 1 , 'a ' )",
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 36 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 36 "test_informix.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 37 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 37 "test_informix.pgc"
+
+
+ /* this will fail (more than one row in subquery) */
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select i from test where j = ( select j from test )", ECPGt_EOIT, ECPGt_EORT);
+#line 40 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 40 "test_informix.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 41 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 41 "test_informix.pgc"
+
+
+ /* this however should be ok */
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select i from test where j = ( select j from test order by i limit 1 )", ECPGt_EOIT, ECPGt_EORT);
+#line 44 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 44 "test_informix.pgc"
+
+ printf("SELECT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ if (sqlca.sqlcode != 0) { ECPGtrans(__LINE__, NULL, "rollback");
+#line 46 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 46 "test_informix.pgc"
+
+
+ sqlca.sqlcode = 100;
+ ECPGset_var( 0, &( i ), __LINE__);\
+ /* declare c cursor for select * from test where i <= $1 */
+#line 49 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );
+#line 49 "test_informix.pgc"
+
+#line 49 "test_informix.pgc"
+
+ printf ("%ld\n", sqlca.sqlcode);
+ openit();
+
+ deccvint(0, &j);
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "fetch forward c", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_string,(c),(long)10,(long)1,(10)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 57 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 57 "test_informix.pgc"
+
+ if (sqlca.sqlcode == 100) break;
+
+ if (risnull(CDECIMALTYPE, (char *)&j))
+ printf("%d NULL\n", i);
+ else
+ {
+ int a;
+
+ dectoint(&j, &a);
+ printf("%d %d \"%s\"\n", i, a, c);
+ }
+ }
+
+ deccvint(7, &j);
+ deccvint(14, &m);
+ decadd(&j, &m, &n);
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "delete from test where i = $1 :: decimal",
+ ECPGt_decimal,&(n),(long)1,(long)1,sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 74 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 74 "test_informix.pgc"
+
+ printf("DELETE: %ld\n", sqlca.sqlcode);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select 1 from test where i = 14", ECPGt_EOIT, ECPGt_EORT);
+#line 77 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 77 "test_informix.pgc"
+
+ printf("Exists: %ld\n", sqlca.sqlcode);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select 1 from test where i = 147", ECPGt_EOIT, ECPGt_EORT);
+#line 80 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 80 "test_informix.pgc"
+
+ printf("Does not exist: %ld\n", sqlca.sqlcode);
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 83 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 83 "test_informix.pgc"
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 84 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 84 "test_informix.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 85 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 85 "test_informix.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 87 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 87 "test_informix.pgc"
+
+
+ return 0;
+}
+
+static void openit(void)
+{
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare c cursor for select * from test where i <= $1 ",
+ ECPGt_int,&(*( int *)(ECPGget_var( 0))),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 94 "test_informix.pgc"
+
+if (sqlca.sqlcode < 0) dosqlprint ( );}
+#line 94 "test_informix.pgc"
+
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr
new file mode 100644
index 0000000..d5e8712
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr
@@ -0,0 +1,133 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: create table test ( i int primary key , j int , c text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: insert into test ( i , j , c ) values ( 7 , $1 , 'test ' ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 28: parameter 1 = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 29: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: insert into test ( i , j , c ) values ( 7 , 12 , 'a' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 32: bad response - ERROR: duplicate key value violates unique constraint "test_pkey"
+DETAIL: Key (i)=(7) already exists.
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 23505 (sqlcode -239): duplicate key value violates unique constraint "test_pkey" on line 32
+[NO_PID]: sqlca: code: -239, state: 23505
+[NO_PID]: ECPGtrans on line 34: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into test ( i , j , c ) values ( $1 , 1 , 'a ' ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 1 = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 37: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: select i from test where j = ( select j from test ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 40: bad response - ERROR: more than one row returned by a subquery used as an expression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 21000 (sqlcode -284): more than one row returned by a subquery used as an expression on line 40
+[NO_PID]: sqlca: code: -284, state: 21000
+[NO_PID]: ECPGtrans on line 41: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 44: query: select i from test where j = ( select j from test order by i limit 1 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 44: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 44: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 94: query: declare c cursor for select * from test where i <= $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 94: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 94: parameter 1 = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 94: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: 7 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: 0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: test offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: 14 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: fetch forward c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 57: no data found on line 57
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 74: query: delete from test where i = $1 :: decimal; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 74: parameter 1 = 21.0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: OK: DELETE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 74: no data found on line 74
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 77: query: select 1 from test where i = 14; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 77: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: query: select 1 from test where i = 147; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 80: correctly got 0 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 80: no data found on line 80
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ECPGtrans on line 83: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 84: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 85: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stdout b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stdout
new file mode 100644
index 0000000..454fd18
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stdout
@@ -0,0 +1,10 @@
+doSQLprint: Error: duplicate key value violates unique constraint "test_pkey" on line 32
+INSERT: -239=duplicate key value violates unique constraint "test_pkey" on line 32
+doSQLprint: Error: more than one row returned by a subquery used as an expression on line 40
+SELECT: 0=
+0
+7 0 "test"
+14 1 "a"
+DELETE: 100
+Exists: 0
+Does not exist: 100
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
new file mode 100644
index 0000000..fc30e32
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
@@ -0,0 +1,290 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* Needed for informix compatibility */
+#include <ecpg_informix.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test_informix2.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include "sqltypes.h"
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 5 "test_informix2.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "test_informix2.pgc"
+
+
+
+/* Check SQLCODE, and produce a "standard error" if it's wrong! */
+static void sql_check(const char *fn, const char *caller, int ignore)
+{
+ char errorstring[255];
+
+ if (SQLCODE == ignore)
+ return;
+ else
+ {
+ if (SQLCODE != 0)
+ {
+
+ sprintf(errorstring, "**SQL error %ld doing '%s' in function '%s'. [%s]",
+ SQLCODE, caller, fn, sqlca.sqlerrm.sqlerrmc);
+ fprintf(stderr, "%s", errorstring);
+ printf("%s\n", errorstring);
+
+ /* attempt a ROLLBACK */
+ { ECPGtrans(__LINE__, NULL, "rollback");}
+#line 27 "test_informix2.pgc"
+
+
+ if (SQLCODE == 0)
+ {
+ sprintf(errorstring, "Rollback successful.\n");
+ } else {
+ sprintf(errorstring, "Rollback failed with code %ld.\n", SQLCODE);
+ }
+
+ fprintf(stderr, "%s", errorstring);
+ printf("%s\n", errorstring);
+
+ exit(1);
+ }
+ }
+}
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+#line 47 "test_informix2.pgc"
+ int c ;
+
+#line 48 "test_informix2.pgc"
+ timestamp d ;
+
+#line 49 "test_informix2.pgc"
+ timestamp e ;
+
+#line 50 "test_informix2.pgc"
+ timestamp maxd ;
+
+#line 51 "test_informix2.pgc"
+ char dbname [ 30 ] ;
+/* exec sql end declare section */
+#line 52 "test_informix2.pgc"
+
+
+ interval *intvl;
+
+ /* exec sql whenever sqlerror stop ; */
+#line 56 "test_informix2.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ strcpy(dbname, "ecpg1_regression");
+ { ECPGconnect(__LINE__, 1, dbname , NULL, NULL , NULL, 0);
+#line 61 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 61 "test_informix2.pgc"
+
+ sql_check("main", "connect", 0);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "set DateStyle to 'DMY'", ECPGt_EOIT, ECPGt_EORT);
+#line 64 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 64 "test_informix2.pgc"
+
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 66 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 66 "test_informix2.pgc"
+
+ sql_check("main", "create", 0);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' )", ECPGt_EOIT, ECPGt_EORT);
+#line 71 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 71 "test_informix2.pgc"
+
+ sql_check("main", "insert", 0);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select max ( timestamp ) from history", ECPGt_EOIT,
+ ECPGt_timestamp,&(maxd),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 76 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 76 "test_informix2.pgc"
+
+ sql_check("main", "select max", 100);
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select customerid , timestamp from history where timestamp = $1 limit 1",
+ ECPGt_timestamp,&(maxd),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(c),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(d),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 83 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 83 "test_informix2.pgc"
+
+ sql_check("main", "select", 0);
+
+ printf("Read in customer %d\n", c);
+
+ intvl = PGTYPESinterval_from_asc("1 day 2 hours 24 minutes 65 seconds", NULL);
+ PGTYPEStimestamp_add_interval(&d, intvl, &e);
+ free(intvl);
+ c++;
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into history ( customerid , timestamp , action_taken , narrative ) values ( $1 , $2 , 'test' , 'test' )",
+ ECPGt_int,&(c),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(e),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 95 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 95 "test_informix2.pgc"
+
+ sql_check("main", "update", 0);
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 98 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 98 "test_informix2.pgc"
+
+
+ { ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table history", ECPGt_EOIT, ECPGt_EORT);
+#line 100 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 100 "test_informix2.pgc"
+
+ sql_check("main", "drop", 0);
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 103 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 103 "test_informix2.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 105 "test_informix2.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 105 "test_informix2.pgc"
+
+ sql_check("main", "disconnect", 0);
+
+ printf("All OK!\n");
+
+ exit(0);
+
+/*
+ Table "public.history"
+ Column | Type | Nullable
+--------------+-----------------------------+----------
+ customerid | integer | not null
+ timestamp | timestamp without time zone | not null
+ action_taken | character(5) | not null
+ narrative | character varying(100) |
+*/
+
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr
new file mode 100644
index 0000000..3e90319
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr
@@ -0,0 +1,64 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: set DateStyle to 'DMY'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 66: query: create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 66: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 66: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: query: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 69: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: select max ( timestamp ) from history; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: Wed 07 May 13:28:34 2003 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 79: query: select customerid , timestamp from history where timestamp = $1 limit 1; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 79: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 79: parameter 1 = 2003-05-07 13:28:34
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 79: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 79: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 79: RESULT: Wed 07 May 13:28:34 2003 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 93: query: insert into history ( customerid , timestamp , action_taken , narrative ) values ( $1 , $2 , 'test' , 'test' ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 93: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 93: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 93: parameter 2 = 2003-05-08 15:53:39
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 93: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 98: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 100: query: drop table history; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 100: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 100: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 103: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stdout b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stdout
new file mode 100644
index 0000000..ce3f426
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stdout
@@ -0,0 +1,2 @@
+Read in customer 1
+All OK!
diff --git a/src/interfaces/ecpg/test/expected/compat_oracle-char_array.c b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.c
new file mode 100644
index 0000000..04d4e19
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.c
@@ -0,0 +1,223 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "char_array.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "char_array.pgc"
+
+
+static void warn(void)
+{
+ fprintf(stderr, "Warning: At least one column was truncated\n");
+}
+
+/* Compatible handling of char array to retrieve varchar field to char array
+ should be fixed-length, blank-padded, then null-terminated.
+ Conforms to the ANSI Fixed Character type. */
+
+int main() {
+
+ /* exec sql whenever sql_warning do warn ( ) ; */
+#line 18 "char_array.pgc"
+
+ /* exec sql whenever sqlerror stop ; */
+#line 19 "char_array.pgc"
+
+
+ const char *ppppp = "XXXXX";
+ int loopcount;
+ /* exec sql begin declare section */
+
+
+
+
+
+#line 24 "char_array.pgc"
+ char shortstr [ 5 ] ;
+
+#line 25 "char_array.pgc"
+ char bigstr [ 11 ] ;
+
+#line 26 "char_array.pgc"
+ short shstr_ind = 0 ;
+
+#line 27 "char_array.pgc"
+ short bigstr_ind = 0 ;
+/* exec sql end declare section */
+#line 28 "char_array.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 3, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 31 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 31 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 31 "char_array.pgc"
+
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "create table strdbase ( strval varchar ( 10 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 33 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 33 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( '' )", ECPGt_EOIT, ECPGt_EORT);
+#line 34 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 34 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 34 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( 'AB' )", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 35 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 35 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( 'ABCD' )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 36 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 36 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( 'ABCDE' )", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 37 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( 'ABCDEF' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 38 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "insert into strdbase values ( 'ABCDEFGHIJ' )", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 39 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 39 "char_array.pgc"
+
+
+ /* declare C cursor for select strval , strval from strdbase */
+#line 41 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "declare C cursor for select strval , strval from strdbase", ECPGt_EOIT, ECPGt_EORT);
+#line 42 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 42 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 42 "char_array.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 44 "char_array.pgc"
+
+
+ printf("Full Str. : Short Ind.\n");
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ strncpy(shortstr, ppppp, sizeof shortstr);
+ memset(bigstr, 0, sizeof bigstr);
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT,
+ ECPGt_char,(bigstr),(long)11,(long)1,(11)*sizeof(char),
+ ECPGt_short,&(bigstr_ind),(long)1,(long)1,sizeof(short),
+ ECPGt_char,(shortstr),(long)5,(long)1,(5)*sizeof(char),
+ ECPGt_short,&(shstr_ind),(long)1,(long)1,sizeof(short), ECPGt_EORT);
+#line 50 "char_array.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 50 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 50 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 50 "char_array.pgc"
+
+ printf("\"%s\": \"%s\" %d\n", bigstr, shortstr, shstr_ind);
+ }
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
+#line 54 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 54 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 54 "char_array.pgc"
+
+ { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "drop table strdbase", ECPGt_EOIT, ECPGt_EORT);
+#line 55 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 55 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "char_array.pgc"
+
+
+ printf("\nGOOD-BYE!!\n\n");
+
+ { ECPGtrans(__LINE__, NULL, "commit work");
+#line 59 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 59 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 59 "char_array.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 61 "char_array.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 61 "char_array.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 61 "char_array.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stderr b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stderr
new file mode 100644
index 0000000..40d9f7d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stderr
@@ -0,0 +1,139 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: create table strdbase ( strval varchar ( 10 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: insert into strdbase values ( '' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into strdbase values ( 'AB' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into strdbase values ( 'ABCD' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: insert into strdbase values ( 'ABCDE' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into strdbase values ( 'ABCDEF' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: insert into strdbase values ( 'ABCDEFGHIJ' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: declare C cursor for select strval , strval from strdbase; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: AB offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: AB offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCD offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCD offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDE offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDE offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+Warning: At least one column was truncated
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDEF offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDEF offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+Warning: At least one column was truncated
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDEFGHIJ offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 50: RESULT: ABCDEFGHIJ offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+Warning: At least one column was truncated
+[NO_PID]: ecpg_execute on line 50: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: correctly got 0 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 50: no data found on line 50
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 54: query: close C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: drop table strdbase; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 59: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stdout b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stdout
new file mode 100644
index 0000000..d58b3c7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/compat_oracle-char_array.stdout
@@ -0,0 +1,10 @@
+Full Str. : Short Ind.
+" ": " " -1
+"AB ": "AB " 0
+"ABCD ": "ABCD" 0
+"ABCDE ": "ABCD" 5
+"ABCDEF ": "ABCD" 6
+"ABCDEFGHIJ": "ABCD" 10
+
+GOOD-BYE!!
+
diff --git a/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr b/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr
new file mode 100644
index 0000000..c5b5248
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr
@@ -0,0 +1,73 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: alter user regress_ecpg_user1 encrypted password 'connectpw'; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: ALTER ROLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "regress_ecpg_user2" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 29: could not connect to database "<DEFAULT>" on line 29
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 30: connection "main" does not exist on line 30
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "regress_ecpg_user2" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection (null) closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 38: could not connect to database "<DEFAULT>" on line 38
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 39: connection "CURRENT" does not exist on line 39
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database nonexistent on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "nonexistent" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection nonexistent closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 53: could not connect to database "nonexistent" on line 53
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 54: connection "CURRENT" does not exist on line 54
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <REGRESSION_PORT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: Connection refused (0x0000274D/10061)
+ Is the server running on that host and accepting TCP/IP connections?
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 57: could not connect to database "ecpg2_regression" on line 57
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/connect-test1.c b/src/interfaces/ecpg/test/expected/connect-test1.c
new file mode 100644
index 0000000..ffd24e2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1.c
@@ -0,0 +1,124 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test1.pgc"
+/*
+ * this file tests all sorts of connecting to one single database.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/* do not include regression.h */
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+#line 16 "test1.pgc"
+ char db [ 200 ] ;
+
+#line 17 "test1.pgc"
+ char pw [ 200 ] ;
+/* exec sql end declare section */
+#line 18 "test1.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 22 "test1.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter user regress_ecpg_user1 encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);}
+#line 23 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 24 "test1.pgc"
+ /* <-- "main" not specified */
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression@localhost" , NULL, NULL , "main", 0); }
+#line 26 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 27 "test1.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "@localhost" , "regress_ecpg_user2" , NULL , "main", 0); }
+#line 29 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 30 "test1.pgc"
+
+
+ /* exec sql connect to :@TEMP_PORT@ as main user regress_ecpg_user2;
+ exec sql disconnect main; */
+
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , NULL, 0); }
+#line 35 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 36 "test1.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/" , "regress_ecpg_user2" , NULL , NULL, 0); }
+#line 38 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 39 "test1.pgc"
+
+
+ strcpy(pw, "connectpw");
+ strcpy(db, "tcp:postgresql://localhost/ecpg2_regression");
+ { ECPGconnect(__LINE__, 0, db , "regress_ecpg_user1" , pw , NULL, 0); }
+#line 43 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 44 "test1.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , NULL, 0); }
+#line 46 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 47 "test1.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=180" , "regress_ecpg_user1" , NULL , NULL, 0); }
+#line 49 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 50 "test1.pgc"
+
+
+ /* wrong db */
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/nonexistent" , "regress_ecpg_user1" , "connectpw" , NULL, 0); }
+#line 53 "test1.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 54 "test1.pgc"
+
+
+ /* wrong port */
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://127.0.0.1:20/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , NULL, 0); }
+#line 57 "test1.pgc"
+
+ /* no disconnect necessary */
+
+ /* wrong password */
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression" , "regress_ecpg_user1" , "wrongpw" , NULL, 0); }
+#line 61 "test1.pgc"
+
+ /* no disconnect necessary */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/connect-test1.stderr b/src/interfaces/ecpg/test/expected/connect-test1.stderr
new file mode 100644
index 0000000..073951c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1.stderr
@@ -0,0 +1,73 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: alter user regress_ecpg_user1 encrypted password 'connectpw'; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: ALTER ROLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "regress_ecpg_user2" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 29: could not connect to database "<DEFAULT>" on line 29
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 30: connection "main" does not exist on line 30
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "regress_ecpg_user2" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection (null) closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 38: could not connect to database "<DEFAULT>" on line 38
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 39: connection "CURRENT" does not exist on line 39
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database nonexistent on localhost port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "nonexistent" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection nonexistent closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 53: could not connect to database "nonexistent" on line 53
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 54: connection "CURRENT" does not exist on line 54
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on 127.0.0.1 port <REGRESSION_PORT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: Connection refused
+ Is the server running on that host and accepting TCP/IP connections?
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg2_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 57: could not connect to database "ecpg2_regression" on line 57
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/connect-test1.stdout b/src/interfaces/ecpg/test/expected/connect-test1.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1.stdout
diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c
new file mode 100644
index 0000000..deb7f19
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test2.c
@@ -0,0 +1,104 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test2.pgc"
+/*
+ * this file tests multiple connections to databases and switches
+ * between them.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 11 "test2.pgc"
+
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+#line 17 "test2.pgc"
+ char id [ 200 ] ;
+
+#line 18 "test2.pgc"
+ char res [ 200 ] ;
+/* exec sql end declare section */
+#line 19 "test2.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ strcpy(id, "first");
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , id, 0); }
+#line 24 "test2.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "second", 0); }
+#line 25 "test2.pgc"
+
+
+ /* this selects from "second" which was opened last */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 28 "test2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "first", 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 29 "test2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "second", 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 30 "test2.pgc"
+
+
+ { ECPGsetconn(__LINE__, "first");}
+#line 32 "test2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 33 "test2.pgc"
+
+
+ /* this will disconnect from "first" */
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 36 "test2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 37 "test2.pgc"
+
+
+ /* error here since "first" is already disconnected */
+ { ECPGdisconnect(__LINE__, id);}
+#line 40 "test2.pgc"
+
+
+ /* disconnect from "second" */
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 43 "test2.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/connect-test2.stderr b/src/interfaces/ecpg/test/expected/connect-test2.stderr
new file mode 100644
index 0000000..4c9c38b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test2.stderr
@@ -0,0 +1,52 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: select current_database ( ); with 0 parameter(s) on connection second
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: ecpg1_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: select current_database ( ); with 0 parameter(s) on connection first
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 29: RESULT: ecpg2_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: select current_database ( ); with 0 parameter(s) on connection second
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: ecpg1_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: select current_database ( ); with 0 parameter(s) on connection first
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 33: RESULT: ecpg2_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection first closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: select current_database ( ); with 0 parameter(s) on connection second
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 37: RESULT: ecpg1_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 40: connection "first" does not exist on line 40
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ecpg_finish: connection second closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/connect-test2.stdout b/src/interfaces/ecpg/test/expected/connect-test2.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test2.stdout
diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c
new file mode 100644
index 0000000..1a74a06
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test3.c
@@ -0,0 +1,106 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test3.pgc"
+/*
+ * this file just tests the several possibilities you have for a disconnect
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 10 "test3.pgc"
+
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+#line 16 "test3.pgc"
+ char id [ 200 ] ;
+
+#line 17 "test3.pgc"
+ char res [ 200 ] ;
+/* exec sql end declare section */
+#line 18 "test3.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ strcpy(id, "first");
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , id, 0); }
+#line 23 "test3.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "second", 0); }
+#line 24 "test3.pgc"
+
+
+ /* this selects from "second" which was opened last */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 27 "test3.pgc"
+
+
+ /* will close "second" */
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 30 "test3.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select current_database ( )", ECPGt_EOIT,
+ ECPGt_char,(res),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 31 "test3.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "second", 0); }
+#line 33 "test3.pgc"
+
+ /* will close "second" */
+ { ECPGdisconnect(__LINE__, "DEFAULT");}
+#line 35 "test3.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "second", 0); }
+#line 37 "test3.pgc"
+
+ { ECPGdisconnect(__LINE__, "ALL");}
+#line 38 "test3.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 40 "test3.pgc"
+
+ { ECPGdisconnect(__LINE__, "DEFAULT");}
+#line 41 "test3.pgc"
+
+ { ECPGdisconnect(__LINE__, "ALL");}
+#line 42 "test3.pgc"
+
+
+ /*
+ * exec sql disconnect;
+ * exec sql disconnect name;
+ *
+ * are used in other tests
+ */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/connect-test3.stderr b/src/interfaces/ecpg/test/expected/connect-test3.stderr
new file mode 100644
index 0000000..af5d051
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test3.stderr
@@ -0,0 +1,38 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: query: select current_database ( ); with 0 parameter(s) on connection second
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 27: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 27: RESULT: ecpg1_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection second closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: select current_database ( ); with 0 parameter(s) on connection first
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 31: RESULT: ecpg2_regression offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 35: connection "DEFAULT" does not exist on line 35
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: connection identifier second is already in use
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection second closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection first closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 40: connection "CURRENT" does not exist on line 40
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 41: connection "DEFAULT" does not exist on line 41
+[NO_PID]: sqlca: code: -220, state: 08003
diff --git a/src/interfaces/ecpg/test/expected/connect-test3.stdout b/src/interfaces/ecpg/test/expected/connect-test3.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test3.stdout
diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c
new file mode 100644
index 0000000..ff13e4ec
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test4.c
@@ -0,0 +1,44 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test4.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "test4.pgc"
+
+
+int
+main(void)
+{
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "main", 0); }
+#line 13 "test4.pgc"
+
+
+ { ECPGsetconn(__LINE__, "main");}
+#line 15 "test4.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "DEFAULT");}
+#line 17 "test4.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/connect-test4.stderr b/src/interfaces/ecpg/test/expected/connect-test4.stderr
new file mode 100644
index 0000000..47a9361
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test4.stderr
@@ -0,0 +1,6 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 17: connection "DEFAULT" does not exist on line 17
+[NO_PID]: sqlca: code: -220, state: 08003
diff --git a/src/interfaces/ecpg/test/expected/connect-test4.stdout b/src/interfaces/ecpg/test/expected/connect-test4.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test4.stdout
diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c
new file mode 100644
index 0000000..c1124c6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test5.c
@@ -0,0 +1,158 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "test5.pgc"
+/*
+ * this file tests all sorts of connecting to one single database.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/* do not include regression.h */
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+
+#line 16 "test5.pgc"
+ char db [ 200 ] ;
+
+#line 17 "test5.pgc"
+ char id [ 200 ] ;
+
+#line 18 "test5.pgc"
+ char * user = "regress_ecpg_user1" ;
+/* exec sql end declare section */
+#line 19 "test5.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 23 "test5.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter user regress_ecpg_user2 encrypted password 'insecure'", ECPGt_EOIT, ECPGt_EORT);}
+#line 24 "test5.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter user regress_ecpg_user1 encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);}
+#line 25 "test5.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 26 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 27 "test5.pgc"
+ /* <-- "main" not specified */
+
+ strcpy(db, "ecpg2_regression");
+ strcpy(id, "main");
+ { ECPGconnect(__LINE__, 0, db , NULL, NULL , id, 0); }
+#line 31 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, id);}
+#line 32 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 34 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 35 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 37 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 38 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 40 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 41 "test5.pgc"
+
+
+ /* exec sql connect to as main user regress_ecpg_user2/insecure;
+ exec sql disconnect main; */
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+#line 46 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 47 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+#line 49 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 50 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+#line 52 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 53 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression" , user , "connectpw" , "main", 0); }
+#line 55 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 56 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 & client_encoding=latin1" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+#line 58 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 59 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://200.46.204.71/ecpg2_regression" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+#line 61 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 62 "test5.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/?gssencmode=disable" , "regress_ecpg_user2" , "insecure" , "main", 0); }
+#line 64 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 65 "test5.pgc"
+
+
+ /* connect twice */
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 68 "test5.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "main", 0); }
+#line 69 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 70 "test5.pgc"
+
+
+ /* not connected */
+ { ECPGdisconnect(__LINE__, "nonexistent");}
+#line 73 "test5.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/connect-test5.stderr b/src/interfaces/ecpg/test/expected/connect-test5.stderr
new file mode 100644
index 0000000..01a6a0a
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test5.stderr
@@ -0,0 +1,80 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: alter user regress_ecpg_user2 encrypted password 'insecure'; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: ALTER ROLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: alter user regress_ecpg_user1 encrypted password 'connectpw'; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: ALTER ROLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 26: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 & client_encoding=latin1 for user regress_ecpg_user1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: non-localhost access via sockets on line 61
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 61: could not connect to database "ecpg2_regression" on line 61
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 62: connection "main" does not exist on line 62
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <DEFAULT> with options gssencmode=disable for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection to server failed: FATAL: database "regress_ecpg_user2" does not exist
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -402 on line 64: could not connect to database "<DEFAULT>" on line 64
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 65: connection "main" does not exist on line 65
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: connection identifier main is already in use
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 73: connection "nonexistent" does not exist on line 73
+[NO_PID]: sqlca: code: -220, state: 08003
diff --git a/src/interfaces/ecpg/test/expected/connect-test5.stdout b/src/interfaces/ecpg/test/expected/connect-test5.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test5.stdout
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
new file mode 100644
index 0000000..ee867b6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
@@ -0,0 +1,469 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dt_test.pgc"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <pgtypes_date.h>
+#include <pgtypes_timestamp.h>
+#include <pgtypes_interval.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 8 "dt_test.pgc"
+
+
+int
+main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+#line 14 "dt_test.pgc"
+ date date1 ;
+
+#line 15 "dt_test.pgc"
+ timestamp ts1 ;
+
+#line 16 "dt_test.pgc"
+ interval * iv1 , iv2 ;
+
+#line 17 "dt_test.pgc"
+ char * text ;
+/* exec sql end declare section */
+#line 18 "dt_test.pgc"
+
+ date date2;
+ int mdy[3] = { 4, 19, 1998 };
+ char *fmt, *out, *in;
+ char *d1 = "Mon Jan 17 1966";
+ char *t1 = "2000-7-12 17:34:29";
+ int i;
+
+ ECPGdebug(1, stderr);
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 27 "dt_test.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 28 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 28 "dt_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table date_test ( d date , ts timestamp )", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 29 "dt_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 30 "dt_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set intervalstyle to postgres_verbose", ECPGt_EOIT, ECPGt_EORT);
+#line 31 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 31 "dt_test.pgc"
+
+
+ date1 = PGTYPESdate_from_asc(d1, NULL);
+ ts1 = PGTYPEStimestamp_from_asc(t1, NULL);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into date_test ( d , ts ) values ( $1 , $2 )",
+ ECPGt_date,&(date1),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(ts1),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 36 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 36 "dt_test.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from date_test where d = $1 ",
+ ECPGt_date,&(date1),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_date,&(date1),(long)1,(long)1,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(ts1),(long)1,(long)1,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 38 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 38 "dt_test.pgc"
+
+
+ text = PGTYPESdate_to_asc(date1);
+ printf ("Date: %s\n", text);
+ PGTYPESchar_free(text);
+
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf ("timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+
+ iv1 = PGTYPESinterval_from_asc("13556 days 12 hours 34 minutes 14 seconds ", NULL);
+ PGTYPESinterval_copy(iv1, &iv2);
+ text = PGTYPESinterval_to_asc(&iv2);
+ printf ("interval: %s\n", text);
+ PGTYPESinterval_free(iv1);
+ PGTYPESchar_free(text);
+
+ PGTYPESdate_mdyjul(mdy, &date2);
+ printf("m: %d, d: %d, y: %d\n", mdy[0], mdy[1], mdy[2]);
+ /* reset */
+ mdy[0] = mdy[1] = mdy[2] = 0;
+
+ printf("date seems to get encoded to julian %ld\n", date2);
+
+ PGTYPESdate_julmdy(date2, mdy);
+ printf("m: %d, d: %d, y: %d\n", mdy[0], mdy[1], mdy[2]);
+
+ ts1 = PGTYPEStimestamp_from_asc("2003-12-04 17:34:29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ fmt = "(ddd), mmm. dd, yyyy, repeat: (ddd), mmm. dd, yyyy. end";
+ out = (char*) malloc(strlen(fmt) + 1);
+ date1 = PGTYPESdate_from_timestamp(ts1);
+ PGTYPESdate_fmt_asc(date1, fmt, out);
+ printf("date_day of %s is %d\n", text, PGTYPESdate_dayofweek(date1));
+ printf("Above date in format \"%s\" is \"%s\"\n", fmt, out);
+ PGTYPESchar_free(text);
+ free(out);
+
+ out = (char*) malloc(48);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 47, "Which is day number %j in %Y.");
+ printf("%s\n", out);
+ free(out);
+
+
+ /* rdate_defmt_asc() */
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "In the year 1995, the month of December, it is the 25th day";
+ /* 0123456789012345678901234567890123456789012345678901234567890
+ * 0 1 2 3 4 5 6
+ */
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc1: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmmm. dd. yyyy";
+ in = "12/25/95";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc2: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "95/12/25";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc3: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "1995, December 25th";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc4: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "dd-mm-yy";
+ in = "This is 25th day of December, 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc5: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmddyy";
+ in = "Dec. 25th, 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc6: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmm. dd. yyyy";
+ in = "dec 25th 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc7: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmm. dd. yyyy";
+ in = "DEC-25-1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc8: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mm yy dd.";
+ in = "12199525";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc9: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yyyy fierj mm dd.";
+ in = "19951225";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc10: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mm/dd/yy";
+ in = "122595";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc12: %s\n", text);
+ PGTYPESchar_free(text);
+
+ PGTYPEStimestamp_current(&ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ /* can't output this in regression mode */
+ /* printf("timestamp_current: Now: %s\n", text); */
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("96-02-29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc1: %s\n", text);
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("1994-02-11 3:10:35", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc2: %s\n", text);
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("1994-02-11 26:10:35", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc3: %s\n", text);
+ PGTYPESchar_free(text);
+
+/* abc-03:10:35-def-02/11/94-gh */
+/* 12345678901234567890123456789 */
+
+ out = (char*) malloc(32);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 31, "abc-%X-def-%x-ghi%%");
+ printf("timestamp_fmt_asc: %d: %s\n", i, out);
+ free(out);
+
+ fmt = "This is a %m/%d/%y %H-%Ml%Stest";
+ in = "This is a 4/12/80 3-39l12test";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 2000";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1900";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b %d %H:%M:%S %z %Y";
+ in = " Jul 31 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b %d %H:%M:%S %z %Y";
+ in = " Jul 32 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1997";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "a %";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b, %d %H_%M`%S %z %Y";
+ in = " Jul, 22 17_28 `44 +0200 2003 ";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %%%d %H:%M:%S %Z %Y";
+ in = "Tue Jul %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %%%d %H:%M:%S %Z %Y";
+ in = "Tue Jul %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "abc%n %C %B %%%d %H:%M:%S %Z %Y";
+ in = "abc\n 19 October %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "abc%n %C %B %%%d %H:%M:%S %Z %y";
+ in = "abc\n 18 October %34 17:28:44 CEST 80";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "";
+ in = "abc\n 18 October %34 17:28:44 CEST 80";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = NULL;
+ in = "1980-04-12 3:49:44 ";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, NULL) = %s, error: %d\n", in, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%B %d, %Y. Time: %I:%M%p";
+ in = "July 14, 1988. Time: 9:15am";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = "September 6 at 01:30 pm in the year 1983";
+ fmt = "%B %d at %I:%M %p in the year %Y";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, July 14. Time: 9:15am";
+ fmt = "%Y, %B %d. Time: %I:%M %p";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, July 14. Time: 9:15 am";
+ fmt = "%Y, %B %d. Time: %I:%M%p";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, P.M. July 14. Time: 9:15";
+ fmt = "%Y, %P %B %d. Time: %I:%M";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = "1234567890";
+ fmt = "%s";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ out = (char*) malloc(64);
+ fmt = "%a %b %d %H:%M:%S %Y";
+ in = "Mon Dec 30 17:28:44 2019";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 63, fmt);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, out, i);
+ free(out);
+
+ out = (char*) malloc(64);
+ fmt = "%a %b %d %H:%M:%S %Y";
+ in = "Mon December 30 17:28:44 2019";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 63, fmt);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, out, i);
+ free(out);
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 381 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 381 "dt_test.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 382 "dt_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 382 "dt_test.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr
new file mode 100644
index 0000000..6e9ed3d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr
@@ -0,0 +1,48 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: create table date_test ( d date , ts timestamp ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: set intervalstyle to postgres_verbose; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into date_test ( d , ts ) values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 1 = 1966-01-17
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 2 = 2000-07-12 17:34:29
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: select * from date_test where d = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 38: parameter 1 = 1966-01-17
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 38: RESULT: 1966-01-17 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 38: RESULT: 2000-07-12 17:34:29 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 381: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stdout
new file mode 100644
index 0000000..4b582fd
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stdout
@@ -0,0 +1,52 @@
+Date: 1966-01-17
+timestamp: 2000-07-12 17:34:29
+interval: @ 13556 days 12 hours 34 mins 14 secs
+m: 4, d: 19, y: 1998
+date seems to get encoded to julian -622
+m: 4, d: 19, y: 1998
+date_day of 2003-12-04 17:34:29 is 4
+Above date in format "(ddd), mmm. dd, yyyy, repeat: (ddd), mmm. dd, yyyy. end" is "(Thu), Dec. 04, 2003, repeat: (Thu), Dec. 04, 2003. end"
+Which is day number 338 in 2003.
+date_defmt_asc1: 1995-12-25
+date_defmt_asc2: 0095-12-25
+date_defmt_asc3: 0095-12-25
+date_defmt_asc4: 1995-12-25
+date_defmt_asc5: 1995-12-25
+date_defmt_asc6: 1995-12-25
+date_defmt_asc7: 1995-12-25
+date_defmt_asc8: 1995-12-25
+date_defmt_asc9: 1995-12-25
+date_defmt_asc10: 1995-12-25
+date_defmt_asc12: 0095-12-25
+timestamp_to_asc1: 1996-02-29 00:00:00
+timestamp_to_asc2: 1994-02-11 03:10:35
+timestamp_to_asc3: 2000-01-01 00:00:00
+timestamp_fmt_asc: 0: abc-00:00:00-def-01/01/00-ghi%
+timestamp_defmt_asc(This is a 4/12/80 3-39l12test, This is a %m/%d/%y %H-%Ml%Stest) = 1980-04-12 03:39:12, error: 0
+timestamp_defmt_asc(Tue Jul 22 17:28:44 +0200 2003, %a %b %d %H:%M:%S %z %Y) = 2003-07-22 15:28:44, error: 0
+timestamp_defmt_asc(Tue Feb 29 17:28:44 +0200 2000, %a %b %d %H:%M:%S %z %Y) = 2000-02-29 15:28:44, error: 0
+timestamp_defmt_asc(Tue Feb 29 17:28:44 +0200 1900, %a %b %d %H:%M:%S %z %Y) = 1900-02-28 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(Tue Feb 29 17:28:44 +0200 1996, %a %b %d %H:%M:%S %z %Y) = 1996-02-29 15:28:44, error: 0
+timestamp_defmt_asc( Jul 31 17:28:44 +0200 1996, %b %d %H:%M:%S %z %Y) = 1996-07-31 15:28:44, error: 0
+timestamp_defmt_asc( Jul 32 17:28:44 +0200 1996, %b %d %H:%M:%S %z %Y) = 1996-07-31 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(Tue Feb 29 17:28:44 +0200 1997, %a %b %d %H:%M:%S %z %Y) = 1997-02-28 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(Tue Jul 22 17:28:44 +0200 2003, %) = 1997-02-28 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(Tue Jul 22 17:28:44 +0200 2003, a %) = 1997-02-28 15:28:44, error (should be error!): 1
+timestamp_defmt_asc( Jul, 22 17_28 `44 +0200 2003 , %b, %d %H_%M`%S %z %Y) = 2003-07-22 15:28:44, error: 0
+timestamp_defmt_asc(Tue Jul %22 17:28:44 CEST 2003, %a %b %%%d %H:%M:%S %Z %Y) = 2003-07-22 15:28:44, error: 0
+timestamp_defmt_asc(Tue Jul %22 17:28:44 CEST 2003, %a %b %%%d %H:%M:%S %Z %Y) = 2003-07-22 15:28:44, error: 0
+timestamp_defmt_asc(abc
+ 19 October %22 17:28:44 CEST 2003, abc%n %C %B %%%d %H:%M:%S %Z %Y) = 2003-10-22 15:28:44, error: 0
+timestamp_defmt_asc(abc
+ 18 October %34 17:28:44 CEST 80, abc%n %C %B %%%d %H:%M:%S %Z %y) = 1880-10-31 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(abc
+ 18 October %34 17:28:44 CEST 80, ) = 1880-10-31 15:28:44, error (should be error!): 1
+timestamp_defmt_asc(1980-04-12 3:49:44 , NULL) = 1980-04-12 03:49:44, error: 0
+timestamp_defmt_asc(July 14, 1988. Time: 9:15am, %B %d, %Y. Time: %I:%M%p) = 1988-07-14 09:15:00, error: 0
+timestamp_defmt_asc(September 6 at 01:30 pm in the year 1983, %B %d at %I:%M %p in the year %Y) = 1983-09-06 13:30:00, error: 0
+timestamp_defmt_asc( 1976, July 14. Time: 9:15am, %Y, %B %d. Time: %I:%M %p) = 1976-07-14 09:15:00, error: 0
+timestamp_defmt_asc( 1976, July 14. Time: 9:15 am, %Y, %B %d. Time: %I:%M%p) = 1976-07-14 09:15:00, error: 0
+timestamp_defmt_asc( 1976, P.M. July 14. Time: 9:15, %Y, %P %B %d. Time: %I:%M) = 1976-07-14 21:15:00, error: 0
+timestamp_defmt_asc(1234567890, %s) = 2009-02-13 23:31:30, error: 0
+timestamp_defmt_asc(Mon Dec 30 17:28:44 2019, %a %b %d %H:%M:%S %Y) = Mon Dec 30 17:28:44 2019, error: 0
+timestamp_defmt_asc(Mon December 30 17:28:44 2019, %a %b %d %H:%M:%S %Y) = Mon Dec 30 17:28:44 2019, error: 0
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
new file mode 100644
index 0000000..b3e1e75
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
@@ -0,0 +1,186 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dt_test2.pgc"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <pgtypes_date.h>
+#include <pgtypes_timestamp.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 8 "dt_test2.pgc"
+
+
+char *dates[] = { "19990108foobar",
+ "19990108 foobar",
+ "1999-01-08 foobar",
+ "January 8, 1999",
+ "1999-01-08",
+ "1/8/1999",
+ "1/18/1999",
+ "01/02/03",
+ "1999-Jan-08",
+ "Jan-08-1999",
+ "08-Jan-1999",
+ "99-Jan-08",
+ "08-Jan-99",
+ "08-Jan-06",
+ "Jan-08-99",
+ "19990108",
+ "990108",
+ "1999.008",
+ "J2451187",
+ "January 8, 99 BC",
+ /*
+ * Maximize space usage in ParseDateTime() with 25
+ * (MAXDATEFIELDS) fields and 128 (MAXDATELEN) total length.
+ */
+ "........................Xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ /* 26 fields */
+ ".........................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ NULL };
+
+/* do not conflict with libc "times" symbol */
+static char *times[] = { "0:04",
+ "1:59 PDT",
+ "13:24:40 -8:00",
+ "13:24:40.495+3",
+ "13:24:40.123456123+3",
+ NULL };
+
+char *intervals[] = { "1 minute",
+ "1 12:59:10",
+ "2 day 12 hour 59 minute 10 second",
+ "1 days 12 hrs 59 mins 10 secs",
+ "1 days 1 hours 1 minutes 1 seconds",
+ "1 year 59 mins",
+ "1 year 59 mins foobar",
+ NULL };
+
+int
+main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+#line 62 "dt_test2.pgc"
+ date date1 ;
+
+#line 63 "dt_test2.pgc"
+ timestamp ts1 , ts2 ;
+
+#line 64 "dt_test2.pgc"
+ char * text ;
+
+#line 65 "dt_test2.pgc"
+ interval * i1 ;
+
+#line 66 "dt_test2.pgc"
+ date * dc ;
+/* exec sql end declare section */
+#line 67 "dt_test2.pgc"
+
+
+ int i, j;
+ char *endptr;
+
+ ECPGdebug(1, stderr);
+
+ ts1 = PGTYPEStimestamp_from_asc("2003-12-04 17:34:29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+
+ printf("timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = PGTYPESdate_from_timestamp(ts1);
+ dc = PGTYPESdate_new();
+ *dc = date1;
+ text = PGTYPESdate_to_asc(*dc);
+ printf("Date of timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESdate_free(dc);
+
+ for (i = 0; dates[i]; i++)
+ {
+ bool err = false;
+ date1 = PGTYPESdate_from_asc(dates[i], &endptr);
+ if (date1 == INT_MIN) {
+ err = true;
+ }
+ text = PGTYPESdate_to_asc(date1);
+ printf("Date[%d]: %s (%c - %c)\n",
+ i, err ? "-" : text,
+ endptr ? 'N' : 'Y',
+ err ? 'T' : 'F');
+ PGTYPESchar_free(text);
+ if (!err)
+ {
+ for (j = 0; times[j]; j++)
+ {
+ int length = strlen(dates[i])
+ + 1
+ + strlen(times[j])
+ + 1;
+ char* t = malloc(length);
+ sprintf(t, "%s %s", dates[i], times[j]);
+ ts1 = PGTYPEStimestamp_from_asc(t, NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("TS[%d,%d]: %s\n",
+ i, j, errno ? "-" : text);
+ PGTYPESchar_free(text);
+ free(t);
+ }
+ }
+ }
+
+ ts1 = PGTYPEStimestamp_from_asc("2004-04-04 23:23:23", NULL);
+
+ for (i = 0; intervals[i]; i++)
+ {
+ interval *ic;
+ i1 = PGTYPESinterval_from_asc(intervals[i], &endptr);
+ if (*endptr)
+ printf("endptr set to %s\n", endptr);
+ if (!i1)
+ {
+ printf("Error parsing interval %d\n", i);
+ continue;
+ }
+ j = PGTYPEStimestamp_add_interval(&ts1, i1, &ts2);
+ if (j < 0)
+ continue;
+ text = PGTYPESinterval_to_asc(i1);
+ printf("interval[%d]: %s\n", i, text ? text : "-");
+ PGTYPESchar_free(text);
+
+ ic = PGTYPESinterval_new();
+ PGTYPESinterval_copy(i1, ic);
+ text = PGTYPESinterval_to_asc(i1);
+ printf("interval_copy[%d]: %s\n", i, text ? text : "-");
+ PGTYPESchar_free(text);
+ PGTYPESinterval_free(ic);
+ PGTYPESinterval_free(i1);
+ }
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stderr
new file mode 100644
index 0000000..1a3639d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stderr
@@ -0,0 +1,2 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout
new file mode 100644
index 0000000..0fbcce6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout
@@ -0,0 +1,122 @@
+timestamp: 2003-12-04 17:34:29
+Date of timestamp: 2003-12-04
+Date[0]: - (N - T)
+Date[1]: - (N - T)
+Date[2]: - (N - T)
+Date[3]: 1999-01-08 (N - F)
+TS[3,0]: 1999-01-08 00:04:00
+TS[3,1]: 1999-01-08 01:59:00
+TS[3,2]: 1999-01-08 13:24:40
+TS[3,3]: 1999-01-08 13:24:40.495
+TS[3,4]: 1999-01-08 13:24:40.123456
+Date[4]: 1999-01-08 (N - F)
+TS[4,0]: 1999-01-08 00:04:00
+TS[4,1]: 1999-01-08 01:59:00
+TS[4,2]: 1999-01-08 13:24:40
+TS[4,3]: 1999-01-08 13:24:40.495
+TS[4,4]: 1999-01-08 13:24:40.123456
+Date[5]: 1999-01-08 (N - F)
+TS[5,0]: 1999-01-08 00:04:00
+TS[5,1]: 1999-01-08 01:59:00
+TS[5,2]: 1999-01-08 13:24:40
+TS[5,3]: 1999-01-08 13:24:40.495
+TS[5,4]: 1999-01-08 13:24:40.123456
+Date[6]: 1999-01-18 (N - F)
+TS[6,0]: 1999-01-18 00:04:00
+TS[6,1]: 1999-01-18 01:59:00
+TS[6,2]: 1999-01-18 13:24:40
+TS[6,3]: 1999-01-18 13:24:40.495
+TS[6,4]: 1999-01-18 13:24:40.123456
+Date[7]: 2003-01-02 (N - F)
+TS[7,0]: 2003-01-02 00:04:00
+TS[7,1]: 2003-01-02 01:59:00
+TS[7,2]: 2003-01-02 13:24:40
+TS[7,3]: 2003-01-02 13:24:40.495
+TS[7,4]: 2003-01-02 13:24:40.123456
+Date[8]: 1999-01-08 (N - F)
+TS[8,0]: 1999-01-08 00:04:00
+TS[8,1]: 1999-01-08 01:59:00
+TS[8,2]: 1999-01-08 13:24:40
+TS[8,3]: 1999-01-08 13:24:40.495
+TS[8,4]: 1999-01-08 13:24:40.123456
+Date[9]: 1999-01-08 (N - F)
+TS[9,0]: 1999-01-08 00:04:00
+TS[9,1]: 1999-01-08 01:59:00
+TS[9,2]: 1999-01-08 13:24:40
+TS[9,3]: 1999-01-08 13:24:40.495
+TS[9,4]: 1999-01-08 13:24:40.123456
+Date[10]: 1999-01-08 (N - F)
+TS[10,0]: 1999-01-08 00:04:00
+TS[10,1]: 1999-01-08 01:59:00
+TS[10,2]: 1999-01-08 13:24:40
+TS[10,3]: 1999-01-08 13:24:40.495
+TS[10,4]: 1999-01-08 13:24:40.123456
+Date[11]: 1999-01-08 (N - F)
+TS[11,0]: 1999-01-08 00:04:00
+TS[11,1]: 1999-01-08 01:59:00
+TS[11,2]: 1999-01-08 13:24:40
+TS[11,3]: 1999-01-08 13:24:40.495
+TS[11,4]: 1999-01-08 13:24:40.123456
+Date[12]: 1999-01-08 (N - F)
+TS[12,0]: 1999-01-08 00:04:00
+TS[12,1]: 1999-01-08 01:59:00
+TS[12,2]: 1999-01-08 13:24:40
+TS[12,3]: 1999-01-08 13:24:40.495
+TS[12,4]: 1999-01-08 13:24:40.123456
+Date[13]: 2006-01-08 (N - F)
+TS[13,0]: 2006-01-08 00:04:00
+TS[13,1]: 2006-01-08 01:59:00
+TS[13,2]: 2006-01-08 13:24:40
+TS[13,3]: 2006-01-08 13:24:40.495
+TS[13,4]: 2006-01-08 13:24:40.123456
+Date[14]: 1999-01-08 (N - F)
+TS[14,0]: 1999-01-08 00:04:00
+TS[14,1]: 1999-01-08 01:59:00
+TS[14,2]: 1999-01-08 13:24:40
+TS[14,3]: 1999-01-08 13:24:40.495
+TS[14,4]: 1999-01-08 13:24:40.123456
+Date[15]: 1999-01-08 (N - F)
+TS[15,0]: 1999-01-08 00:04:00
+TS[15,1]: 1999-01-08 01:59:00
+TS[15,2]: 1999-01-08 13:24:40
+TS[15,3]: 1999-01-08 13:24:40.495
+TS[15,4]: 1999-01-08 13:24:40.123456
+Date[16]: 1999-01-08 (N - F)
+TS[16,0]: 1999-01-08 00:04:00
+TS[16,1]: 1999-01-08 01:59:00
+TS[16,2]: 1999-01-08 13:24:40
+TS[16,3]: 1999-01-08 13:24:40.495
+TS[16,4]: 1999-01-08 13:24:40.123456
+Date[17]: 1999-01-08 (N - F)
+TS[17,0]: 1999-01-08 00:04:00
+TS[17,1]: 1999-01-08 01:59:00
+TS[17,2]: 1999-01-08 13:24:40
+TS[17,3]: 1999-01-08 13:24:40.495
+TS[17,4]: 1999-01-08 13:24:40.123456
+Date[18]: 1999-01-08 (N - F)
+TS[18,0]: 1999-01-08 00:04:00
+TS[18,1]: 1999-01-08 01:59:00
+TS[18,2]: 1999-01-08 13:24:40
+TS[18,3]: 1999-01-08 13:24:40.495
+TS[18,4]: 1999-01-08 13:24:40.123456
+Date[19]: 0099-01-08 BC (N - F)
+TS[19,0]: 0099-01-08 00:04:00 BC
+TS[19,1]: 0099-01-08 01:59:00 BC
+TS[19,2]: 0099-01-08 13:24:40 BC
+TS[19,3]: 0099-01-08 13:24:40.495 BC
+TS[19,4]: 0099-01-08 13:24:40.123456 BC
+Date[20]: - (N - T)
+Date[21]: - (N - T)
+interval[0]: @ 1 min
+interval_copy[0]: @ 1 min
+interval[1]: @ 1 day 12 hours 59 mins 10 secs
+interval_copy[1]: @ 1 day 12 hours 59 mins 10 secs
+interval[2]: @ 2 days 12 hours 59 mins 10 secs
+interval_copy[2]: @ 2 days 12 hours 59 mins 10 secs
+interval[3]: @ 1 day 12 hours 59 mins 10 secs
+interval_copy[3]: @ 1 day 12 hours 59 mins 10 secs
+interval[4]: @ 1 day 1 hour 1 min 1 sec
+interval_copy[4]: @ 1 day 1 hour 1 min 1 sec
+interval[5]: @ 1 year 59 mins
+interval_copy[5]: @ 1 year 59 mins
+Error parsing interval 6
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
new file mode 100644
index 0000000..586094c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
@@ -0,0 +1,266 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "nan_test.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+#include <pgtypes_numeric.h>
+#include <decimal.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 8 "nan_test.pgc"
+
+
+int
+main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+#line 14 "nan_test.pgc"
+ int id , loopcount ;
+
+#line 15 "nan_test.pgc"
+ double d ;
+
+#line 16 "nan_test.pgc"
+ numeric * num ;
+
+#line 17 "nan_test.pgc"
+ char val [ 16 ] ;
+/* exec sql end declare section */
+#line 18 "nan_test.pgc"
+
+
+ ECPGdebug(1, stderr);
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 21 "nan_test.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 23 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 23 "nan_test.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table nantest1 ( id int4 , d float8 )", ECPGt_EOIT, ECPGt_EORT);
+#line 25 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 25 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 )", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 26 "nan_test.pgc"
+
+
+ /* declare cur cursor for select id , d , d from nantest1 */
+#line 28 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 29 "nan_test.pgc"
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(d),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 32 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 32 "nan_test.pgc"
+
+ if (sqlca.sqlcode)
+ break;
+ if (isnan(d))
+ printf("%d NaN '%s'\n", id, val);
+ else if (isinf(d))
+ printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( $1 + 3 , $2 )",
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(d),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 40 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 40 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( $1 + 6 , $2 )",
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 41 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 41 "nan_test.pgc"
+
+ }
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
+#line 43 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 43 "nan_test.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT);
+#line 45 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 45 "nan_test.pgc"
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_double,&(d),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 48 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 48 "nan_test.pgc"
+
+ if (sqlca.sqlcode)
+ break;
+ if (isinf(d))
+ printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
+ if (isnan(d))
+ printf("%d NaN '%s'\n", id, val);
+ }
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
+#line 56 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 56 "nan_test.pgc"
+
+
+ num = PGTYPESnumeric_new();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table nantest2 ( id int4 , d numeric )", ECPGt_EOIT, ECPGt_EORT);
+#line 60 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 60 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric )", ECPGt_EOIT, ECPGt_EORT);
+#line 61 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 61 "nan_test.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select id , d , d from nantest2 where id = 4", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 63 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 63 "nan_test.pgc"
+
+
+ printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 5 , $1 )",
+ ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 67 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 67 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 6 , $1 )",
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 68 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 68 "nan_test.pgc"
+
+
+ /* declare cur1 cursor for select id , d , d from nantest2 */
+#line 70 "nan_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur1 cursor for select id , d , d from nantest2", ECPGt_EOIT, ECPGt_EORT);
+#line 71 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 71 "nan_test.pgc"
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cur1", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 74 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 74 "nan_test.pgc"
+
+ if (sqlca.sqlcode)
+ break;
+ printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
+ }
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
+#line 79 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 79 "nan_test.pgc"
+
+
+ PGTYPESnumeric_free(num);
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 83 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 83 "nan_test.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 84 "nan_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 84 "nan_test.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr
new file mode 100644
index 0000000..55471e9
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr
@@ -0,0 +1,360 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: create table nantest1 ( id int4 , d float8 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 2 = NaN
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 2 = NaN
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 2 = Infinity
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 2 = Infinity
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 1 = 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 40: parameter 2 = -Infinity
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 2 = -Infinity
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 32: no data found on line 32
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 43: query: close cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 43: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 43: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 45: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 7 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 8 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 6 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 9 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 48: no data found on line 48
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 56: query: close cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: query: create table nantest2 ( id int4 , d numeric ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: query: insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 61: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: query: select id , d , d from nantest2 where id = 4; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 63: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 63: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 63: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 63: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 67: query: insert into nantest2 ( id , d ) values ( 5 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 67: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 67: parameter 1 = NaN
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 67: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: query: insert into nantest2 ( id , d ) values ( 6 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 68: parameter 1 = NaN
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 68: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: query: declare cur1 cursor for select id , d , d from nantest2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 71: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: 6 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 74: no data found on line 74
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 79: query: close cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 79: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 79: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 83: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stdout
new file mode 100644
index 0000000..635ab23
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stdout
@@ -0,0 +1,16 @@
+1 NaN 'NaN'
+2 +Inf 'Infinity'
+3 -Inf '-Infinity'
+1 NaN 'NaN'
+2 +Inf 'Infinity'
+3 -Inf '-Infinity'
+4 NaN 'NaN'
+7 NaN 'NaN'
+5 +Inf 'Infinity'
+8 +Inf 'Infinity'
+6 -Inf '-Infinity'
+9 -Inf '-Infinity'
+4 NaN 'NaN'
+4 NaN 'NaN'
+5 NaN 'NaN'
+6 NaN 'NaN'
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
new file mode 100644
index 0000000..ddb7860
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
@@ -0,0 +1,202 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "num_test.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <decimal.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "num_test.pgc"
+
+
+
+#line 1 "printf_hack.h"
+/*
+ * print_double(x) has the same effect as printf("%g", x), but is intended
+ * to produce the same formatting across all platforms.
+ */
+static void
+print_double(double x)
+{
+#ifdef WIN32
+ /* Change Windows' 3-digit exponents to look like everyone else's */
+ char convert[128];
+ int vallen;
+
+ sprintf(convert, "%g", x);
+ vallen = strlen(convert);
+
+ if (vallen >= 6 &&
+ convert[vallen - 5] == 'e' &&
+ convert[vallen - 3] == '0')
+ {
+ convert[vallen - 3] = convert[vallen - 2];
+ convert[vallen - 2] = convert[vallen - 1];
+ convert[vallen - 1] = '\0';
+ }
+
+ printf("%s", convert);
+#else
+ printf("%g", x);
+#endif
+}
+
+#line 8 "num_test.pgc"
+
+
+
+int
+main(void)
+{
+ char *text="error\n";
+ numeric *value1, *value2, *res;
+ /* exec sql begin declare section */
+
+ /* = {0, 0, 0, 0, 0, NULL, NULL} ; */
+
+#line 17 "num_test.pgc"
+ numeric * des ;
+/* exec sql end declare section */
+#line 19 "num_test.pgc"
+
+ double d;
+ long l1, l2;
+ int i, min, max;
+
+ ECPGdebug(1, stderr);
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 25 "num_test.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 27 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 27 "num_test.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "off", NULL);
+#line 29 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 29 "num_test.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( text char ( 5 ) , num numeric ( 14 , 7 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 30 "num_test.pgc"
+
+
+ value1 = PGTYPESnumeric_new();
+ PGTYPESnumeric_from_int(1407, value1);
+ text = PGTYPESnumeric_to_asc(value1, -1);
+ printf("from int = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value1);
+
+ value1 = PGTYPESnumeric_from_asc("2369.7", NULL);
+ value2 = PGTYPESnumeric_from_asc("10.0", NULL);
+ res = PGTYPESnumeric_new();
+ PGTYPESnumeric_add(value1, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("add = %s\n", text);
+ PGTYPESchar_free(text);
+
+ PGTYPESnumeric_sub(res, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("sub = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value2);
+
+ des = PGTYPESnumeric_new();
+ PGTYPESnumeric_copy(res, des);
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( text , num ) values ( 'test' , $1 )",
+ ECPGt_numeric,&(des),(long)1,(long)0,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 55 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 55 "num_test.pgc"
+
+
+ value2 = PGTYPESnumeric_from_asc("2369.7", NULL);
+ PGTYPESnumeric_mul(value1, value2, res);
+ PGTYPESnumeric_free(value2);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select num from test where text = 'test'", ECPGt_EOIT,
+ ECPGt_numeric,&(des),(long)1,(long)0,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 61 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 61 "num_test.pgc"
+
+
+ PGTYPESnumeric_mul(res, des, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("mul = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(des);
+
+ value2 = PGTYPESnumeric_from_asc("10000", NULL);
+ PGTYPESnumeric_div(res, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ PGTYPESnumeric_to_double(res, &d);
+ printf("div = %s ", text);
+ print_double(d);
+ printf("\n");
+
+ PGTYPESnumeric_free(value1);
+ PGTYPESnumeric_free(value2);
+
+ value1 = PGTYPESnumeric_from_asc("2E7", NULL);
+ value2 = PGTYPESnumeric_from_asc("14", NULL);
+ i = PGTYPESnumeric_to_long(value1, &l1) | PGTYPESnumeric_to_long(value2, &l2);
+ printf("to long(%d) = %ld %ld\n", i, l1, l2);
+
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value1);
+ PGTYPESnumeric_free(value2);
+ PGTYPESnumeric_free(res);
+
+ /* check conversion of numeric to int */
+ value1 = PGTYPESnumeric_from_asc("-2147483648", NULL);
+ PGTYPESnumeric_to_int(value1, &min);
+ printf("min int = %d\n", min);
+ PGTYPESnumeric_free(value1);
+
+ value2 = PGTYPESnumeric_from_asc("2147483647", NULL);
+ PGTYPESnumeric_to_int(value2, &max);
+ printf("max int = %d\n", max);
+ PGTYPESnumeric_free(value2);
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 101 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 101 "num_test.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 102 "num_test.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 102 "num_test.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr
new file mode 100644
index 0000000..10cfd91
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr
@@ -0,0 +1,32 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 29: action "off"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: create table test ( text char ( 5 ) , num numeric ( 14 , 7 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: insert into test ( text , num ) values ( 'test' , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 55: parameter 1 = 2369.7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: query: select num from test where text = 'test'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 61: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 61: RESULT: 2369.7000000 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 101: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stdout
new file mode 100644
index 0000000..a47a044
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stdout
@@ -0,0 +1,8 @@
+from int = 1407.0
+add = 2379.7
+sub = 2369.7
+mul = 13306998429.873000000
+div = 1330699.84298730000 1.3307e+06
+to long(0) = 20000000 14
+min int = -2147483648
+max int = 2147483647
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
new file mode 100644
index 0000000..9debc34
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
@@ -0,0 +1,290 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "num_test2.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_error.h>
+#include <decimal.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 7 "num_test2.pgc"
+
+
+
+#line 1 "printf_hack.h"
+/*
+ * print_double(x) has the same effect as printf("%g", x), but is intended
+ * to produce the same formatting across all platforms.
+ */
+static void
+print_double(double x)
+{
+#ifdef WIN32
+ /* Change Windows' 3-digit exponents to look like everyone else's */
+ char convert[128];
+ int vallen;
+
+ sprintf(convert, "%g", x);
+ vallen = strlen(convert);
+
+ if (vallen >= 6 &&
+ convert[vallen - 5] == 'e' &&
+ convert[vallen - 3] == '0')
+ {
+ convert[vallen - 3] = convert[vallen - 2];
+ convert[vallen - 2] = convert[vallen - 1];
+ convert[vallen - 1] = '\0';
+ }
+
+ printf("%s", convert);
+#else
+ printf("%g", x);
+#endif
+}
+
+#line 9 "num_test2.pgc"
+
+
+
+char* nums[] = { "2E394", "-2", ".794", "3.44", "592.49E21", "-32.84e4",
+ "2E-394", ".1E-2", "+.0", "-592.49E-07", "+32.84e-4",
+ ".500001", "-.5000001",
+ "1234567890123456789012345678.91", /* 30 digits should fit
+ into decimal */
+ "1234567890123456789012345678.921", /* 31 digits should NOT
+ fit into decimal */
+ "not a number",
+ NULL};
+
+
+static void
+check_errno(void);
+
+int
+main(void)
+{
+ char *text="error\n";
+ char *endptr;
+ numeric *num, *nin;
+ decimal *dec;
+ long l;
+ int i, j, k, q, r, count = 0;
+ double d;
+ numeric **numarr = (numeric **) calloc(1, sizeof(numeric));
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; nums[i]; i++)
+ {
+ num = PGTYPESnumeric_from_asc(nums[i], &endptr);
+ if (!num) check_errno();
+ if (endptr != NULL)
+ {
+ printf("endptr of %d is not NULL\n", i);
+ if (*endptr != '\0')
+ printf("*endptr of %d is not \\0\n", i);
+ }
+ if (!num) continue;
+
+ numarr = realloc(numarr, sizeof(numeric *) * (count + 1));
+ numarr[count++] = num;
+
+ text = PGTYPESnumeric_to_asc(num, -1);
+ if (!text) check_errno();
+ printf("num[%d,1]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 0);
+ if (!text) check_errno();
+ printf("num[%d,2]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 1);
+ if (!text) check_errno();
+ printf("num[%d,3]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 2);
+ if (!text) check_errno();
+ printf("num[%d,4]: %s\n", i, text); PGTYPESchar_free(text);
+
+ nin = PGTYPESnumeric_new();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ if (!text) check_errno();
+ printf("num[%d,5]: %s\n", i, text); PGTYPESchar_free(text);
+
+ r = PGTYPESnumeric_to_long(num, &l);
+ if (r) check_errno();
+ printf("num[%d,6]: %ld (r: %d)\n", i, r?0L:l, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_long(l, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,7]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ r = PGTYPESnumeric_to_int(num, &k);
+ if (r) check_errno();
+ printf("num[%d,8]: %d (r: %d)\n", i, r?0:k, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_int(k, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,9]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+
+ r = PGTYPESnumeric_to_double(num, &d);
+ if (r) check_errno();
+ printf("num[%d,10]: ", i);
+ print_double(r ? 0.0 : d);
+ printf(" (r: %d)\n", r);
+ }
+
+ /* do not test double to numeric because
+ * - extra digits are different on different architectures
+ * - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
+ */
+
+ dec = PGTYPESdecimal_new();
+ r = PGTYPESnumeric_to_decimal(num, dec);
+ if (r) check_errno();
+ /* we have no special routine for outputting decimal, it would
+ * convert to a numeric anyway */
+ printf("num[%d,11]: - (r: %d)\n", i, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_decimal(dec, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,12]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ PGTYPESdecimal_free(dec);
+ PGTYPESnumeric_free(nin);
+ printf("\n");
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ for (j = 0; j < count; j++)
+ {
+ numeric* a = PGTYPESnumeric_new();
+ numeric* s = PGTYPESnumeric_new();
+ numeric* m = PGTYPESnumeric_new();
+ numeric* d = PGTYPESnumeric_new();
+ r = PGTYPESnumeric_add(numarr[i], numarr[j], a);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(a, 10);
+ printf("num[a,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_sub(numarr[i], numarr[j], s);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(s, 10);
+ printf("num[s,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_mul(numarr[i], numarr[j], m);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(m, 10);
+ printf("num[m,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_div(numarr[i], numarr[j], d);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(d, 10);
+ printf("num[d,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+
+ PGTYPESnumeric_free(a);
+ PGTYPESnumeric_free(s);
+ PGTYPESnumeric_free(m);
+ PGTYPESnumeric_free(d);
+ }
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ text = PGTYPESnumeric_to_asc(numarr[i], -1);
+ printf("%d: %s\n", i, text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(numarr[i]);
+ }
+ free(numarr);
+
+ return 0;
+}
+
+static void
+check_errno(void)
+{
+ switch(errno)
+ {
+ case 0:
+ printf("(no errno set) - ");
+ break;
+ case PGTYPES_NUM_OVERFLOW:
+ printf("(errno == PGTYPES_NUM_OVERFLOW) - ");
+ break;
+ case PGTYPES_NUM_UNDERFLOW:
+ printf("(errno == PGTYPES_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_BAD_NUMERIC:
+ printf("(errno == PGTYPES_NUM_BAD_NUMERIC) - ");
+ break;
+ case PGTYPES_NUM_DIVIDE_ZERO:
+ printf("(errno == PGTYPES_NUM_DIVIDE_ZERO) - ");
+ break;
+ default:
+ printf("(unknown errno (%d))\n", errno);
+ printf("(libc: (%s)) ", strerror(errno));
+ break;
+ }
+
+}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stderr
new file mode 100644
index 0000000..1a3639d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stderr
@@ -0,0 +1,2 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout
new file mode 100644
index 0000000..51a7459
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout
@@ -0,0 +1,1117 @@
+endptr of 0 is not NULL
+num[0,1]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+num[0,2]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+num[0,3]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0
+num[0,4]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00
+num[0,5]: 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - num[0,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - num[0,8]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - num[0,10]: 0 (r: -1)
+num[0,11]: - (r: 0)
+num[0,12]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 (r: 0 - cmp: 0)
+
+endptr of 1 is not NULL
+num[1,1]: -2
+num[1,2]: -2
+num[1,3]: -2.0
+num[1,4]: -2.00
+num[1,5]: 0.00
+num[1,6]: -2 (r: 0)
+num[1,7]: -2.00 (r: 0 - cmp: 0)
+num[1,8]: -2 (r: 0)
+num[1,9]: -2.00 (r: 0 - cmp: 0)
+num[1,10]: -2 (r: 0)
+num[1,11]: - (r: 0)
+num[1,12]: -2.00 (r: 0 - cmp: 0)
+
+endptr of 2 is not NULL
+num[2,1]: 0.794
+num[2,2]: 1
+num[2,3]: 0.8
+num[2,4]: 0.79
+num[2,5]: 0.00
+num[2,6]: 1 (r: 0)
+num[2,7]: 1.00 (r: 0 - cmp: -1)
+num[2,8]: 1 (r: 0)
+num[2,9]: 1.00 (r: 0 - cmp: -1)
+num[2,10]: 0.794 (r: 0)
+num[2,11]: - (r: 0)
+num[2,12]: 0.79 (r: 0 - cmp: 0)
+
+endptr of 3 is not NULL
+num[3,1]: 3.44
+num[3,2]: 3
+num[3,3]: 3.4
+num[3,4]: 3.44
+num[3,5]: 0.00
+num[3,6]: 3 (r: 0)
+num[3,7]: 3.00 (r: 0 - cmp: 1)
+num[3,8]: 3 (r: 0)
+num[3,9]: 3.00 (r: 0 - cmp: 1)
+num[3,10]: 3.44 (r: 0)
+num[3,11]: - (r: 0)
+num[3,12]: 3.44 (r: 0 - cmp: 0)
+
+endptr of 4 is not NULL
+num[4,1]: 592490000000000000000000
+num[4,2]: 592490000000000000000000
+num[4,3]: 592490000000000000000000.0
+num[4,4]: 592490000000000000000000.00
+num[4,5]: 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - num[4,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - num[4,8]: 0 (r: -1)
+num[4,10]: 5.9249e+23 (r: 0)
+num[4,11]: - (r: 0)
+num[4,12]: 592490000000000000000000.00 (r: 0 - cmp: 0)
+
+endptr of 5 is not NULL
+num[5,1]: -328400
+num[5,2]: -328400
+num[5,3]: -328400.0
+num[5,4]: -328400.00
+num[5,5]: 0.00
+num[5,6]: -328400 (r: 0)
+num[5,7]: -328400.00 (r: 0 - cmp: 0)
+num[5,8]: -328400 (r: 0)
+num[5,9]: -328400.00 (r: 0 - cmp: 0)
+num[5,10]: -328400 (r: 0)
+num[5,11]: - (r: 0)
+num[5,12]: -328400.00 (r: 0 - cmp: 0)
+
+endptr of 6 is not NULL
+num[6,1]: 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002
+num[6,2]: 0
+num[6,3]: 0.0
+num[6,4]: 0.00
+num[6,5]: 0.00
+num[6,6]: 0 (r: 0)
+num[6,7]: 0.00 (r: 0 - cmp: 1)
+num[6,8]: 0 (r: 0)
+num[6,9]: 0.00 (r: 0 - cmp: 1)
+num[6,11]: - (r: 0)
+num[6,12]: 0.00 (r: 0 - cmp: 0)
+
+endptr of 7 is not NULL
+num[7,1]: 0.001
+num[7,2]: 0
+num[7,3]: 0.0
+num[7,4]: 0.00
+num[7,5]: 0.00
+num[7,6]: 0 (r: 0)
+num[7,7]: 0.00 (r: 0 - cmp: 1)
+num[7,8]: 0 (r: 0)
+num[7,9]: 0.00 (r: 0 - cmp: 1)
+num[7,10]: 0.001 (r: 0)
+num[7,11]: - (r: 0)
+num[7,12]: 0.00 (r: 0 - cmp: 0)
+
+endptr of 8 is not NULL
+num[8,1]: 0.0
+num[8,2]: 0
+num[8,3]: 0.0
+num[8,4]: 0.00
+num[8,5]: 0.00
+num[8,6]: 0 (r: 0)
+num[8,7]: 0.00 (r: 0 - cmp: 0)
+num[8,8]: 0 (r: 0)
+num[8,9]: 0.00 (r: 0 - cmp: 0)
+num[8,10]: 0 (r: 0)
+num[8,11]: - (r: 0)
+num[8,12]: 0.00 (r: 0 - cmp: 0)
+
+endptr of 9 is not NULL
+num[9,1]: -0.000059249
+num[9,2]: -0
+num[9,3]: -0.0
+num[9,4]: -0.00
+num[9,5]: 0.00
+num[9,6]: 0 (r: 0)
+num[9,7]: 0.00 (r: 0 - cmp: -1)
+num[9,8]: 0 (r: 0)
+num[9,9]: 0.00 (r: 0 - cmp: -1)
+num[9,10]: -5.9249e-05 (r: 0)
+num[9,11]: - (r: 0)
+num[9,12]: -0.00 (r: 0 - cmp: 0)
+
+endptr of 10 is not NULL
+num[10,1]: 0.003284
+num[10,2]: 0
+num[10,3]: 0.0
+num[10,4]: 0.00
+num[10,5]: 0.00
+num[10,6]: 0 (r: 0)
+num[10,7]: 0.00 (r: 0 - cmp: 1)
+num[10,8]: 0 (r: 0)
+num[10,9]: 0.00 (r: 0 - cmp: 1)
+num[10,10]: 0.003284 (r: 0)
+num[10,11]: - (r: 0)
+num[10,12]: 0.00 (r: 0 - cmp: 0)
+
+endptr of 11 is not NULL
+num[11,1]: 0.500001
+num[11,2]: 1
+num[11,3]: 0.5
+num[11,4]: 0.50
+num[11,5]: 0.00
+num[11,6]: 1 (r: 0)
+num[11,7]: 1.00 (r: 0 - cmp: -1)
+num[11,8]: 1 (r: 0)
+num[11,9]: 1.00 (r: 0 - cmp: -1)
+num[11,10]: 0.500001 (r: 0)
+num[11,11]: - (r: 0)
+num[11,12]: 0.50 (r: 0 - cmp: 0)
+
+endptr of 12 is not NULL
+num[12,1]: -0.5000001
+num[12,2]: -1
+num[12,3]: -0.5
+num[12,4]: -0.50
+num[12,5]: 0.00
+num[12,6]: -1 (r: 0)
+num[12,7]: -1.00 (r: 0 - cmp: 1)
+num[12,8]: -1 (r: 0)
+num[12,9]: -1.00 (r: 0 - cmp: 1)
+num[12,10]: -0.5 (r: 0)
+num[12,11]: - (r: 0)
+num[12,12]: -0.50 (r: 0 - cmp: 0)
+
+endptr of 13 is not NULL
+num[13,1]: 1234567890123456789012345678.91
+num[13,2]: 1234567890123456789012345679
+num[13,3]: 1234567890123456789012345678.9
+num[13,4]: 1234567890123456789012345678.91
+num[13,5]: 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - num[13,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - num[13,8]: 0 (r: -1)
+num[13,10]: 1.23457e+27 (r: 0)
+num[13,11]: - (r: 0)
+num[13,12]: 1234567890123456789012345678.91 (r: 0 - cmp: 0)
+
+endptr of 14 is not NULL
+num[14,1]: 1234567890123456789012345678.921
+num[14,2]: 1234567890123456789012345679
+num[14,3]: 1234567890123456789012345678.9
+num[14,4]: 1234567890123456789012345678.92
+num[14,5]: 0.00
+(errno == PGTYPES_NUM_OVERFLOW) - num[14,6]: 0 (r: -1)
+(errno == PGTYPES_NUM_OVERFLOW) - num[14,8]: 0 (r: -1)
+num[14,10]: 1.23457e+27 (r: 0)
+(errno == PGTYPES_NUM_OVERFLOW) - num[14,11]: - (r: -1)
+
+(errno == PGTYPES_NUM_BAD_NUMERIC) - endptr of 15 is not NULL
+*endptr of 15 is not \0
+num[a,0,0]: 40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[s,0,0]: 0.0000000000
+num[m,0,0]: 400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,0]: 1.0000000000
+num[a,0,1]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.0000000000
+num[s,0,1]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.0000000000
+num[m,0,1]: -40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,1]: -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,0,2]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.7940000000
+num[s,0,2]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.2060000000
+num[m,0,2]: 15880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,2]: 25188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670025188916876574307304785894206549118387909319899244332493702770780856423173803526448362720403022670.0251889000
+num[a,0,3]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.4400000000
+num[s,0,3]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996.5600000000
+num[m,0,3]: 68800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,3]: 5813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093.0232560000
+num[a,0,4]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000592490000000000000000000.0000000000
+num[s,0,4]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999407510000000000000000000.0000000000
+num[m,0,4]: 11849800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,4]: 33755843980489122179277287380377727894141673277186112845786426775135445323971712602744350115613765633175243464024709277793718037435230974362436496818511704838900234603115664399399145977147293625208864284629276443484278215666087191345001603402589073233303515671150567942074971729480666340360174855271818933652888656348630356630491653867575824064541173690695201606778173471.2822000000
+num[a,0,5]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999671600.0000000000
+num[s,0,5]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000328400.0000000000
+num[m,0,5]: -6568000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,5]: -60901339829476248477466504263093788063337393422655298416565164433617539585870889159561510353227771010962241169305724725943970767356881851400730816077953714981729598051157125456760048721071863580998781973203410475030450669914738124238733252131546894031668696711327649208282582216808769792935444579780755176613885505481120584652862362971985383678440925700365408038976857490864799025578562728.3800000000
+num[a,0,6]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[s,0,6]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[m,0,6]: 4.0000000000
+num[d,0,6]: 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0010000000
+num[s,0,7]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9990000000
+num[m,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,7]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,0,8]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[s,0,8]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[m,0,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,0,9]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999407510
+num[s,0,9]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000592490
+num[m,0,9]: -1184980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,9]: -337558439804891221792772873803777278941416732771861128457864267751354453239717126027443501156137656331752434640247092777937180374352309743624364968185117048389002346031156643993991459771472936252088642846292764434842782156660871913450016034025890732333035156711505679420749717294806663403601748552718189336528886563486303566304916538675758240645411736906952016067781734712822157335988793059798477611.4364799406
+num[a,0,10]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0032840000
+num[s,0,10]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9967160000
+num[m,0,10]: 65680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,10]: 6090133982947624847746650426309378806333739342265529841656516443361753958587088915956151035322777101096224116930572472594397076735688185140073081607795371498172959805115712545676004872107186358099878197320341047503045066991473812423873325213154689403166869671132764920828258221680876979293544457978075517661388550548112058465286236297198538367844092570036540803897685749086479902557856272838002436.0535931790
+num[a,0,11]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000010000
+num[s,0,11]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999990000
+num[m,0,11]: 10000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,11]: 39999920000159999680000639998720002559994880010239979520040959918080163839672320655358689282621434757130485739028521942956114087771824456351087297825404349191301617396765206469587060825878348243303513392973214053571892856214287571424857150285699428601142797714404571190857618284763430473139053721892556214887570224859550280899438201123597752804494391011217977564044871910256179487641024717950564.0988718023
+num[a,0,12]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999999000
+num[s,0,12]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000001000
+num[m,0,12]: -10000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,12]: -39999992000001599999680000063999987200002559999488000102399979520004095999180800163839967232006553598689280262143947571210485757902848419430316113936777212644557471088505782298843540231291953741609251678149664370067125986574802685039462992107401578519684296063140787371842525631494873701025259794948041010391797921640415671916865616626876674624665075066984986603002679399464120107175978564804287.0391425922
+num[a,0,13]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9100000000
+num[s,0,13]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0900000000
+num[m,0,13]: 24691357802469135780246913578200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,13]: 16200000145800001326780012073583089868436639792144602011794432069173427871944627216535488452104037734402488812766825268543092076559937753306592463425498481952238394402210698594884666469792189859469175471551488967831431174229215285702844063565115973562205366453218447154498968406694142978268167639546201917272112583939026078314516169317627127550253962230423465305471042.6305370000
+num[a,0,14]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9210000000
+num[s,0,14]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0790000000
+num[m,0,14]: 24691357802469135780246913578420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,0,14]: 16200000145800001326780012073438747865838483756809679983855488190421495112429743605252505619668606245113387993074870449075163411519793685453399903975484793505772589916586682299621591493014451434717743879521702761509433606809200816287108380036339147553262638409152127519194255768451119299228069799803818551847328103399274511743550433402484767562070619244777160576307850.4589877000
+num[a,1,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998.0000000000
+num[s,1,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.0000000000
+num[m,1,0]: -40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,1,0]: -0.0000000000
+num[a,1,1]: -4.0000000000
+num[s,1,1]: 0.0000000000
+num[m,1,1]: 4.0000000000
+num[d,1,1]: 1.0000000000
+num[a,1,2]: -1.2060000000
+num[s,1,2]: -2.7940000000
+num[m,1,2]: -1.5880000000
+num[d,1,2]: -2.5188916877
+num[a,1,3]: 1.4400000000
+num[s,1,3]: -5.4400000000
+num[m,1,3]: -6.8800000000
+num[d,1,3]: -0.5813953488
+num[a,1,4]: 592489999999999999999998.0000000000
+num[s,1,4]: -592490000000000000000002.0000000000
+num[m,1,4]: -1184980000000000000000000.0000000000
+num[d,1,4]: -0.0000000000
+num[a,1,5]: -328402.0000000000
+num[s,1,5]: 328398.0000000000
+num[m,1,5]: 656800.0000000000
+num[d,1,5]: 0.0000060901
+num[a,1,6]: -2.0000000000
+num[s,1,6]: -2.0000000000
+num[m,1,6]: -0.0000000000
+num[d,1,6]: -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,1,7]: -1.9990000000
+num[s,1,7]: -2.0010000000
+num[m,1,7]: -0.0020000000
+num[d,1,7]: -2000.0000000000
+num[a,1,8]: -2.0000000000
+num[s,1,8]: -2.0000000000
+num[m,1,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,1,9]: -2.0000592490
+num[s,1,9]: -1.9999407510
+num[m,1,9]: 0.0001184980
+num[d,1,9]: 33755.8439804891
+num[a,1,10]: -1.9967160000
+num[s,1,10]: -2.0032840000
+num[m,1,10]: -0.0065680000
+num[d,1,10]: -609.0133982948
+num[a,1,11]: -1.4999990000
+num[s,1,11]: -2.5000010000
+num[m,1,11]: -1.0000020000
+num[d,1,11]: -3.9999920000
+num[a,1,12]: -2.5000001000
+num[s,1,12]: -1.4999999000
+num[m,1,12]: 1.0000002000
+num[d,1,12]: 3.9999992000
+num[a,1,13]: 1234567890123456789012345676.9100000000
+num[s,1,13]: -1234567890123456789012345680.9100000000
+num[m,1,13]: -2469135780246913578024691357.8200000000
+num[d,1,13]: -0.0000000000
+num[a,1,14]: 1234567890123456789012345676.9210000000
+num[s,1,14]: -1234567890123456789012345680.9210000000
+num[m,1,14]: -2469135780246913578024691357.8420000000
+num[d,1,14]: -0.0000000000
+num[a,2,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.7940000000
+num[s,2,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.2060000000
+num[m,2,0]: 15880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,2,0]: 0.0000000000
+num[a,2,1]: -1.2060000000
+num[s,2,1]: 2.7940000000
+num[m,2,1]: -1.5880000000
+num[d,2,1]: -0.3970000000
+num[a,2,2]: 1.5880000000
+num[s,2,2]: 0.0000000000
+num[m,2,2]: 0.6304360000
+num[d,2,2]: 1.0000000000
+num[a,2,3]: 4.2340000000
+num[s,2,3]: -2.6460000000
+num[m,2,3]: 2.7313600000
+num[d,2,3]: 0.2308139535
+num[a,2,4]: 592490000000000000000000.7940000000
+num[s,2,4]: -592489999999999999999999.2060000000
+num[m,2,4]: 470437060000000000000000.0000000000
+num[d,2,4]: 0.0000000000
+num[a,2,5]: -328399.2060000000
+num[s,2,5]: 328400.7940000000
+num[m,2,5]: -260749.6000000000
+num[d,2,5]: -0.0000024178
+num[a,2,6]: 0.7940000000
+num[s,2,6]: 0.7940000000
+num[m,2,6]: 0.0000000000
+num[d,2,6]: 3970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,2,7]: 0.7950000000
+num[s,2,7]: 0.7930000000
+num[m,2,7]: 0.0007940000
+num[d,2,7]: 794.0000000000
+num[a,2,8]: 0.7940000000
+num[s,2,8]: 0.7940000000
+num[m,2,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,2,9]: 0.7939407510
+num[s,2,9]: 0.7940592490
+num[m,2,9]: -0.0000470437
+num[d,2,9]: -13401.0700602542
+num[a,2,10]: 0.7972840000
+num[s,2,10]: 0.7907160000
+num[m,2,10]: 0.0026074960
+num[d,2,10]: 241.7783191230
+num[a,2,11]: 1.2940010000
+num[s,2,11]: 0.2939990000
+num[m,2,11]: 0.3970007940
+num[d,2,11]: 1.5879968240
+num[a,2,12]: 0.2939999000
+num[s,2,12]: 1.2940001000
+num[m,2,12]: -0.3970000794
+num[d,2,12]: -1.5879996824
+num[a,2,13]: 1234567890123456789012345679.7040000000
+num[s,2,13]: -1234567890123456789012345678.1160000000
+num[m,2,13]: 980246904758024690475802469.0545400000
+num[d,2,13]: 0.0000000000
+num[a,2,14]: 1234567890123456789012345679.7150000000
+num[s,2,14]: -1234567890123456789012345678.1270000000
+num[m,2,14]: 980246904758024690475802469.0632740000
+num[d,2,14]: 0.0000000000
+num[a,3,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.4400000000
+num[s,3,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996.5600000000
+num[m,3,0]: 68800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,3,0]: 0.0000000000
+num[a,3,1]: 1.4400000000
+num[s,3,1]: 5.4400000000
+num[m,3,1]: -6.8800000000
+num[d,3,1]: -1.7200000000
+num[a,3,2]: 4.2340000000
+num[s,3,2]: 2.6460000000
+num[m,3,2]: 2.7313600000
+num[d,3,2]: 4.3324937028
+num[a,3,3]: 6.8800000000
+num[s,3,3]: 0.0000000000
+num[m,3,3]: 11.8336000000
+num[d,3,3]: 1.0000000000
+num[a,3,4]: 592490000000000000000003.4400000000
+num[s,3,4]: -592489999999999999999996.5600000000
+num[m,3,4]: 2038165600000000000000000.0000000000
+num[d,3,4]: 0.0000000000
+num[a,3,5]: -328396.5600000000
+num[s,3,5]: 328403.4400000000
+num[m,3,5]: -1129696.0000000000
+num[d,3,5]: -0.0000104750
+num[a,3,6]: 3.4400000000
+num[s,3,6]: 3.4400000000
+num[m,3,6]: 0.0000000000
+num[d,3,6]: 17200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,3,7]: 3.4410000000
+num[s,3,7]: 3.4390000000
+num[m,3,7]: 0.0034400000
+num[d,3,7]: 3440.0000000000
+num[a,3,8]: 3.4400000000
+num[s,3,8]: 3.4400000000
+num[m,3,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,3,9]: 3.4399407510
+num[s,3,9]: 3.4400592490
+num[m,3,9]: -0.0002038166
+num[d,3,9]: -58060.0516464413
+num[a,3,10]: 3.4432840000
+num[s,3,10]: 3.4367160000
+num[m,3,10]: 0.0112969600
+num[d,3,10]: 1047.5030450670
+num[a,3,11]: 3.9400010000
+num[s,3,11]: 2.9399990000
+num[m,3,11]: 1.7200034400
+num[d,3,11]: 6.8799862400
+num[a,3,12]: 2.9399999000
+num[s,3,12]: 3.9400001000
+num[m,3,12]: -1.7200003440
+num[d,3,12]: -6.8799986240
+num[a,3,13]: 1234567890123456789012345682.3500000000
+num[s,3,13]: -1234567890123456789012345675.4700000000
+num[m,3,13]: 4246913542024691354202469135.4504000000
+num[d,3,13]: 0.0000000000
+num[a,3,14]: 1234567890123456789012345682.3610000000
+num[s,3,14]: -1234567890123456789012345675.4810000000
+num[m,3,14]: 4246913542024691354202469135.4882400000
+num[d,3,14]: 0.0000000000
+num[a,4,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000592490000000000000000000.0000000000
+num[s,4,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999407510000000000000000000.0000000000
+num[m,4,0]: 11849800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,4,0]: 0.0000000000
+num[a,4,1]: 592489999999999999999998.0000000000
+num[s,4,1]: 592490000000000000000002.0000000000
+num[m,4,1]: -1184980000000000000000000.0000000000
+num[d,4,1]: -296245000000000000000000.0000000000
+num[a,4,2]: 592490000000000000000000.7940000000
+num[s,4,2]: 592489999999999999999999.2060000000
+num[m,4,2]: 470437060000000000000000.0000000000
+num[d,4,2]: 746209068010075566750629.7229219000
+num[a,4,3]: 592490000000000000000003.4400000000
+num[s,4,3]: 592489999999999999999996.5600000000
+num[m,4,3]: 2038165600000000000000000.0000000000
+num[d,4,3]: 172235465116279069767441.8604650000
+num[a,4,4]: 1184980000000000000000000.0000000000
+num[s,4,4]: 0.0000000000
+num[m,4,4]: 351044400100000000000000000000000000000000000000.0000000000
+num[d,4,4]: 1.0000000000
+num[a,4,5]: 592489999999999999671600.0000000000
+num[s,4,5]: 592490000000000000328400.0000000000
+num[m,4,5]: -194573716000000000000000000000.0000000000
+num[d,4,5]: -1804171741778319123.0207000000
+num[a,4,6]: 592490000000000000000000.0000000000
+num[s,4,6]: 592490000000000000000000.0000000000
+num[m,4,6]: 0.0000000000
+num[d,4,6]: 2962450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,4,7]: 592490000000000000000000.0010000000
+num[s,4,7]: 592489999999999999999999.9990000000
+num[m,4,7]: 592490000000000000000.0000000000
+num[d,4,7]: 592490000000000000000000000.0000000000
+num[a,4,8]: 592490000000000000000000.0000000000
+num[s,4,8]: 592490000000000000000000.0000000000
+num[m,4,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,4,9]: 592489999999999999999999.9999407510
+num[s,4,9]: 592490000000000000000000.0000592490
+num[m,4,9]: -35104440010000000000.0000000000
+num[d,4,9]: -10000000000000000000000000000.0000000000
+num[a,4,10]: 592490000000000000000000.0032840000
+num[s,4,10]: 592489999999999999999999.9967160000
+num[m,4,10]: 1945737160000000000000.0000000000
+num[d,4,10]: 180417174177831912302070645.5542021924
+num[a,4,11]: 592490000000000000000000.5000010000
+num[s,4,11]: 592489999999999999999999.4999990000
+num[m,4,11]: 296245592490000000000000.0000000000
+num[d,4,11]: 1184977630044739910520178.9596420807
+num[a,4,12]: 592489999999999999999999.4999999000
+num[s,4,12]: 592490000000000000000000.5000001000
+num[m,4,12]: -296245059249000000000000.0000000000
+num[d,4,12]: -1184979763004047399190520.1618959676
+num[a,4,13]: 1235160380123456789012345678.9100000000
+num[s,4,13]: -1233975400123456789012345678.9100000000
+num[m,4,13]: 731469129219246912921924691297385900000000000000000.0000000000
+num[d,4,13]: 0.0004799169
+num[a,4,14]: 1235160380123456789012345678.9210000000
+num[s,4,14]: -1233975400123456789012345678.9210000000
+num[m,4,14]: 731469129219246912921924691303903290000000000000000.0000000000
+num[d,4,14]: 0.0004799169
+num[a,5,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999671600.0000000000
+num[s,5,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000328400.0000000000
+num[m,5,0]: -6568000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,5,0]: -0.0000000000
+num[a,5,1]: -328402.0000000000
+num[s,5,1]: -328398.0000000000
+num[m,5,1]: 656800.0000000000
+num[d,5,1]: 164200.0000000000
+num[a,5,2]: -328399.2060000000
+num[s,5,2]: -328400.7940000000
+num[m,5,2]: -260749.6000000000
+num[d,5,2]: -413602.0151133501
+num[a,5,3]: -328396.5600000000
+num[s,5,3]: -328403.4400000000
+num[m,5,3]: -1129696.0000000000
+num[d,5,3]: -95465.1162790698
+num[a,5,4]: 592489999999999999671600.0000000000
+num[s,5,4]: -592490000000000000328400.0000000000
+num[m,5,4]: -194573716000000000000000000000.0000000000
+num[d,5,4]: -0.0000000000
+num[a,5,5]: -656800.0000000000
+num[s,5,5]: 0.0000000000
+num[m,5,5]: 107846560000.0000000000
+num[d,5,5]: 1.0000000000
+num[a,5,6]: -328400.0000000000
+num[s,5,6]: -328400.0000000000
+num[m,5,6]: -0.0000000000
+num[d,5,6]: -1642000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,5,7]: -328399.9990000000
+num[s,5,7]: -328400.0010000000
+num[m,5,7]: -328.4000000000
+num[d,5,7]: -328400000.0000000000
+num[a,5,8]: -328400.0000000000
+num[s,5,8]: -328400.0000000000
+num[m,5,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,5,9]: -328400.0000592490
+num[s,5,9]: -328399.9999407510
+num[m,5,9]: 19.4573716000
+num[d,5,9]: 5542709581.5963138618
+num[a,5,10]: -328399.9967160000
+num[s,5,10]: -328400.0032840000
+num[m,5,10]: -1078.4656000000
+num[d,5,10]: -100000000.0000000000
+num[a,5,11]: -328399.4999990000
+num[s,5,11]: -328400.5000010000
+num[m,5,11]: -164200.3284000000
+num[d,5,11]: -656798.6864026272
+num[a,5,12]: -328400.5000001000
+num[s,5,12]: -328399.4999999000
+num[m,5,12]: 164200.0328400000
+num[d,5,12]: 656799.8686400263
+num[a,5,13]: 1234567890123456789012017278.9100000000
+num[s,5,13]: -1234567890123456789012674078.9100000000
+num[m,5,13]: -405432095116543209511654320954044.0000000000
+num[d,5,13]: -0.0000000000
+num[a,5,14]: 1234567890123456789012017278.9210000000
+num[s,5,14]: -1234567890123456789012674078.9210000000
+num[m,5,14]: -405432095116543209511654320957656.4000000000
+num[d,5,14]: -0.0000000000
+num[a,6,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[s,6,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[m,6,0]: 4.0000000000
+num[d,6,0]: 0.0000000000
+num[a,6,1]: -2.0000000000
+num[s,6,1]: 2.0000000000
+num[m,6,1]: -0.0000000000
+num[d,6,1]: -0.0000000000
+num[a,6,2]: 0.7940000000
+num[s,6,2]: -0.7940000000
+num[m,6,2]: 0.0000000000
+num[d,6,2]: 0.0000000000
+num[a,6,3]: 3.4400000000
+num[s,6,3]: -3.4400000000
+num[m,6,3]: 0.0000000000
+num[d,6,3]: 0.0000000000
+num[a,6,4]: 592490000000000000000000.0000000000
+num[s,6,4]: -592490000000000000000000.0000000000
+num[m,6,4]: 0.0000000000
+num[d,6,4]: 0.0000000000
+num[a,6,5]: -328400.0000000000
+num[s,6,5]: 328400.0000000000
+num[m,6,5]: -0.0000000000
+num[d,6,5]: -0.0000000000
+num[a,6,6]: 0.0000000000
+num[s,6,6]: 0.0000000000
+num[m,6,6]: 0.0000000000
+num[d,6,6]: 1.0000000000
+num[a,6,7]: 0.0010000000
+num[s,6,7]: -0.0010000000
+num[m,6,7]: 0.0000000000
+num[d,6,7]: 0.0000000000
+num[a,6,8]: 0.0000000000
+num[s,6,8]: 0.0000000000
+num[m,6,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,6,9]: -0.0000592490
+num[s,6,9]: 0.0000592490
+num[m,6,9]: -0.0000000000
+num[d,6,9]: -0.0000000000
+num[a,6,10]: 0.0032840000
+num[s,6,10]: -0.0032840000
+num[m,6,10]: 0.0000000000
+num[d,6,10]: 0.0000000000
+num[a,6,11]: 0.5000010000
+num[s,6,11]: -0.5000010000
+num[m,6,11]: 0.0000000000
+num[d,6,11]: 0.0000000000
+num[a,6,12]: -0.5000001000
+num[s,6,12]: 0.5000001000
+num[m,6,12]: -0.0000000000
+num[d,6,12]: -0.0000000000
+num[a,6,13]: 1234567890123456789012345678.9100000000
+num[s,6,13]: -1234567890123456789012345678.9100000000
+num[m,6,13]: 0.0000000000
+num[d,6,13]: 0.0000000000
+num[a,6,14]: 1234567890123456789012345678.9210000000
+num[s,6,14]: -1234567890123456789012345678.9210000000
+num[m,6,14]: 0.0000000000
+num[d,6,14]: 0.0000000000
+num[a,7,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0010000000
+num[s,7,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9990000000
+num[m,7,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,7,0]: 0.0000000000
+num[a,7,1]: -1.9990000000
+num[s,7,1]: 2.0010000000
+num[m,7,1]: -0.0020000000
+num[d,7,1]: -0.0005000000
+num[a,7,2]: 0.7950000000
+num[s,7,2]: -0.7930000000
+num[m,7,2]: 0.0007940000
+num[d,7,2]: 0.0012594458
+num[a,7,3]: 3.4410000000
+num[s,7,3]: -3.4390000000
+num[m,7,3]: 0.0034400000
+num[d,7,3]: 0.0002906977
+num[a,7,4]: 592490000000000000000000.0010000000
+num[s,7,4]: -592489999999999999999999.9990000000
+num[m,7,4]: 592490000000000000000.0000000000
+num[d,7,4]: 0.0000000000
+num[a,7,5]: -328399.9990000000
+num[s,7,5]: 328400.0010000000
+num[m,7,5]: -328.4000000000
+num[d,7,5]: -0.0000000030
+num[a,7,6]: 0.0010000000
+num[s,7,6]: 0.0010000000
+num[m,7,6]: 0.0000000000
+num[d,7,6]: 5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,7,7]: 0.0020000000
+num[s,7,7]: 0.0000000000
+num[m,7,7]: 0.0000010000
+num[d,7,7]: 1.0000000000
+num[a,7,8]: 0.0010000000
+num[s,7,8]: 0.0010000000
+num[m,7,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,7,9]: 0.0009407510
+num[s,7,9]: 0.0010592490
+num[m,7,9]: -0.0000000592
+num[d,7,9]: -16.8779219902
+num[a,7,10]: 0.0042840000
+num[s,7,10]: -0.0022840000
+num[m,7,10]: 0.0000032840
+num[d,7,10]: 0.3045066991
+num[a,7,11]: 0.5010010000
+num[s,7,11]: -0.4990010000
+num[m,7,11]: 0.0005000010
+num[d,7,11]: 0.0019999960
+num[a,7,12]: -0.4990001000
+num[s,7,12]: 0.5010001000
+num[m,7,12]: -0.0005000001
+num[d,7,12]: -0.0019999996
+num[a,7,13]: 1234567890123456789012345678.9110000000
+num[s,7,13]: -1234567890123456789012345678.9090000000
+num[m,7,13]: 1234567890123456789012345.6789100000
+num[d,7,13]: 0.0000000000
+num[a,7,14]: 1234567890123456789012345678.9220000000
+num[s,7,14]: -1234567890123456789012345678.9200000000
+num[m,7,14]: 1234567890123456789012345.6789210000
+num[d,7,14]: 0.0000000000
+num[a,8,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[s,8,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[m,8,0]: 0.0000000000
+num[d,8,0]: 0.0000000000
+num[a,8,1]: -2.0000000000
+num[s,8,1]: 2.0000000000
+num[m,8,1]: 0.0000000000
+num[d,8,1]: 0.0000000000
+num[a,8,2]: 0.7940000000
+num[s,8,2]: -0.7940000000
+num[m,8,2]: 0.0000000000
+num[d,8,2]: 0.0000000000
+num[a,8,3]: 3.4400000000
+num[s,8,3]: -3.4400000000
+num[m,8,3]: 0.0000000000
+num[d,8,3]: 0.0000000000
+num[a,8,4]: 592490000000000000000000.0000000000
+num[s,8,4]: -592490000000000000000000.0000000000
+num[m,8,4]: 0.0000000000
+num[d,8,4]: 0.0000000000
+num[a,8,5]: -328400.0000000000
+num[s,8,5]: 328400.0000000000
+num[m,8,5]: 0.0000000000
+num[d,8,5]: 0.0000000000
+num[a,8,6]: 0.0000000000
+num[s,8,6]: -0.0000000000
+num[m,8,6]: 0.0000000000
+num[d,8,6]: 0.0000000000
+num[a,8,7]: 0.0010000000
+num[s,8,7]: -0.0010000000
+num[m,8,7]: 0.0000000000
+num[d,8,7]: 0.0000000000
+num[a,8,8]: 0.0000000000
+num[s,8,8]: 0.0000000000
+num[m,8,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,8,9]: -0.0000592490
+num[s,8,9]: 0.0000592490
+num[m,8,9]: 0.0000000000
+num[d,8,9]: 0.0000000000
+num[a,8,10]: 0.0032840000
+num[s,8,10]: -0.0032840000
+num[m,8,10]: 0.0000000000
+num[d,8,10]: 0.0000000000
+num[a,8,11]: 0.5000010000
+num[s,8,11]: -0.5000010000
+num[m,8,11]: 0.0000000000
+num[d,8,11]: 0.0000000000
+num[a,8,12]: -0.5000001000
+num[s,8,12]: 0.5000001000
+num[m,8,12]: 0.0000000000
+num[d,8,12]: 0.0000000000
+num[a,8,13]: 1234567890123456789012345678.9100000000
+num[s,8,13]: -1234567890123456789012345678.9100000000
+num[m,8,13]: 0.0000000000
+num[d,8,13]: 0.0000000000
+num[a,8,14]: 1234567890123456789012345678.9210000000
+num[s,8,14]: -1234567890123456789012345678.9210000000
+num[m,8,14]: 0.0000000000
+num[d,8,14]: 0.0000000000
+num[a,9,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9999407510
+num[s,9,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000592490
+num[m,9,0]: -1184980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,9,0]: -0.0000000000
+num[a,9,1]: -2.0000592490
+num[s,9,1]: 1.9999407510
+num[m,9,1]: 0.0001184980
+num[d,9,1]: 0.0000296245
+num[a,9,2]: 0.7939407510
+num[s,9,2]: -0.7940592490
+num[m,9,2]: -0.0000470437
+num[d,9,2]: -0.0000746209
+num[a,9,3]: 3.4399407510
+num[s,9,3]: -3.4400592490
+num[m,9,3]: -0.0002038166
+num[d,9,3]: -0.0000172235
+num[a,9,4]: 592489999999999999999999.9999407510
+num[s,9,4]: -592490000000000000000000.0000592490
+num[m,9,4]: -35104440010000000000.0000000000
+num[d,9,4]: -0.0000000000
+num[a,9,5]: -328400.0000592490
+num[s,9,5]: 328399.9999407510
+num[m,9,5]: 19.4573716000
+num[d,9,5]: 0.0000000002
+num[a,9,6]: -0.0000592490
+num[s,9,6]: -0.0000592490
+num[m,9,6]: -0.0000000000
+num[d,9,6]: -296245000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,9,7]: 0.0009407510
+num[s,9,7]: -0.0010592490
+num[m,9,7]: -0.0000000592
+num[d,9,7]: -0.0592490000
+num[a,9,8]: -0.0000592490
+num[s,9,8]: -0.0000592490
+num[m,9,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,9,9]: -0.0001184980
+num[s,9,9]: 0.0000000000
+num[m,9,9]: 0.0000000035
+num[d,9,9]: 1.0000000000
+num[a,9,10]: 0.0032247510
+num[s,9,10]: -0.0033432490
+num[m,9,10]: -0.0000001946
+num[d,9,10]: -0.0180417174
+num[a,9,11]: 0.4999417510
+num[s,9,11]: -0.5000602490
+num[m,9,11]: -0.0000296246
+num[d,9,11]: -0.0001184978
+num[a,9,12]: -0.5000593490
+num[s,9,12]: 0.4999408510
+num[m,9,12]: 0.0000296245
+num[d,9,12]: 0.0001184980
+num[a,9,13]: 1234567890123456789012345678.9099407510
+num[s,9,13]: -1234567890123456789012345678.9100592490
+num[m,9,13]: -73146912921924691292192.4691297386
+num[d,9,13]: -0.0000000000
+num[a,9,14]: 1234567890123456789012345678.9209407510
+num[s,9,14]: -1234567890123456789012345678.9210592490
+num[m,9,14]: -73146912921924691292192.4691303903
+num[d,9,14]: -0.0000000000
+num[a,10,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0032840000
+num[s,10,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9967160000
+num[m,10,0]: 65680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,10,0]: 0.0000000000
+num[a,10,1]: -1.9967160000
+num[s,10,1]: 2.0032840000
+num[m,10,1]: -0.0065680000
+num[d,10,1]: -0.0016420000
+num[a,10,2]: 0.7972840000
+num[s,10,2]: -0.7907160000
+num[m,10,2]: 0.0026074960
+num[d,10,2]: 0.0041360202
+num[a,10,3]: 3.4432840000
+num[s,10,3]: -3.4367160000
+num[m,10,3]: 0.0112969600
+num[d,10,3]: 0.0009546512
+num[a,10,4]: 592490000000000000000000.0032840000
+num[s,10,4]: -592489999999999999999999.9967160000
+num[m,10,4]: 1945737160000000000000.0000000000
+num[d,10,4]: 0.0000000000
+num[a,10,5]: -328399.9967160000
+num[s,10,5]: 328400.0032840000
+num[m,10,5]: -1078.4656000000
+num[d,10,5]: -0.0000000100
+num[a,10,6]: 0.0032840000
+num[s,10,6]: 0.0032840000
+num[m,10,6]: 0.0000000000
+num[d,10,6]: 16420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,10,7]: 0.0042840000
+num[s,10,7]: 0.0022840000
+num[m,10,7]: 0.0000032840
+num[d,10,7]: 3.2840000000
+num[a,10,8]: 0.0032840000
+num[s,10,8]: 0.0032840000
+num[m,10,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,10,9]: 0.0032247510
+num[s,10,9]: 0.0033432490
+num[m,10,9]: -0.0000001946
+num[d,10,9]: -55.4270958160
+num[a,10,10]: 0.0065680000
+num[s,10,10]: 0.0000000000
+num[m,10,10]: 0.0000107847
+num[d,10,10]: 1.0000000000
+num[a,10,11]: 0.5032850000
+num[s,10,11]: -0.4967170000
+num[m,10,11]: 0.0016420033
+num[d,10,11]: 0.0065679869
+num[a,10,12]: -0.4967161000
+num[s,10,12]: 0.5032841000
+num[m,10,12]: -0.0016420003
+num[d,10,12]: -0.0065679987
+num[a,10,13]: 1234567890123456789012345678.9132840000
+num[s,10,13]: -1234567890123456789012345678.9067160000
+num[m,10,13]: 4054320951165432095116543.2095404400
+num[d,10,13]: 0.0000000000
+num[a,10,14]: 1234567890123456789012345678.9242840000
+num[s,10,14]: -1234567890123456789012345678.9177160000
+num[m,10,14]: 4054320951165432095116543.2095765640
+num[d,10,14]: 0.0000000000
+num[a,11,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000010000
+num[s,11,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999990000
+num[m,11,0]: 10000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,11,0]: 0.0000000000
+num[a,11,1]: -1.4999990000
+num[s,11,1]: 2.5000010000
+num[m,11,1]: -1.0000020000
+num[d,11,1]: -0.2500005000
+num[a,11,2]: 1.2940010000
+num[s,11,2]: -0.2939990000
+num[m,11,2]: 0.3970007940
+num[d,11,2]: 0.6297241814
+num[a,11,3]: 3.9400010000
+num[s,11,3]: -2.9399990000
+num[m,11,3]: 1.7200034400
+num[d,11,3]: 0.1453491279
+num[a,11,4]: 592490000000000000000000.5000010000
+num[s,11,4]: -592489999999999999999999.4999990000
+num[m,11,4]: 296245592490000000000000.0000000000
+num[d,11,4]: 0.0000000000
+num[a,11,5]: -328399.4999990000
+num[s,11,5]: 328400.5000010000
+num[m,11,5]: -164200.3284000000
+num[d,11,5]: -0.0000015225
+num[a,11,6]: 0.5000010000
+num[s,11,6]: 0.5000010000
+num[m,11,6]: 0.0000000000
+num[d,11,6]: 2500005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,11,7]: 0.5010010000
+num[s,11,7]: 0.4990010000
+num[m,11,7]: 0.0005000010
+num[d,11,7]: 500.0010000000
+num[a,11,8]: 0.5000010000
+num[s,11,8]: 0.5000010000
+num[m,11,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,11,9]: 0.4999417510
+num[s,11,9]: 0.5000602490
+num[m,11,9]: -0.0000296246
+num[d,11,9]: -8438.9778730443
+num[a,11,10]: 0.5032850000
+num[s,11,10]: 0.4967170000
+num[m,11,10]: 0.0016420033
+num[d,11,10]: 152.2536540804
+num[a,11,11]: 1.0000020000
+num[s,11,11]: 0.0000000000
+num[m,11,11]: 0.2500010000
+num[d,11,11]: 1.0000000000
+num[a,11,12]: 0.0000009000
+num[s,11,12]: 1.0000011000
+num[m,11,12]: -0.2500005500
+num[d,11,12]: -1.0000018000
+num[a,11,13]: 1234567890123456789012345679.4100010000
+num[s,11,13]: -1234567890123456789012345678.4099990000
+num[m,11,13]: 617285179629618517962961851.8006789100
+num[d,11,13]: 0.0000000000
+num[a,11,14]: 1234567890123456789012345679.4210010000
+num[s,11,14]: -1234567890123456789012345678.4209990000
+num[m,11,14]: 617285179629618517962961851.8061789210
+num[d,11,14]: 0.0000000000
+num[a,12,0]: 19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.4999999000
+num[s,12,0]: -20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5000001000
+num[m,12,0]: -10000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,12,0]: -0.0000000000
+num[a,12,1]: -2.5000001000
+num[s,12,1]: 1.4999999000
+num[m,12,1]: 1.0000002000
+num[d,12,1]: 0.2500000500
+num[a,12,2]: 0.2939999000
+num[s,12,2]: -1.2940001000
+num[m,12,2]: -0.3970000794
+num[d,12,2]: -0.6297230479
+num[a,12,3]: 2.9399999000
+num[s,12,3]: -3.9400001000
+num[m,12,3]: -1.7200003440
+num[d,12,3]: -0.1453488663
+num[a,12,4]: 592489999999999999999999.4999999000
+num[s,12,4]: -592490000000000000000000.5000001000
+num[m,12,4]: -296245059249000000000000.0000000000
+num[d,12,4]: -0.0000000000
+num[a,12,5]: -328400.5000001000
+num[s,12,5]: 328399.4999999000
+num[m,12,5]: 164200.0328400000
+num[d,12,5]: 0.0000015225
+num[a,12,6]: -0.5000001000
+num[s,12,6]: -0.5000001000
+num[m,12,6]: -0.0000000000
+num[d,12,6]: -2500000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,12,7]: -0.4990001000
+num[s,12,7]: -0.5010001000
+num[m,12,7]: -0.0005000001
+num[d,12,7]: -500.0001000000
+num[a,12,8]: -0.5000001000
+num[s,12,8]: -0.5000001000
+num[m,12,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,12,9]: -0.5000593490
+num[s,12,9]: -0.4999408510
+num[m,12,9]: 0.0000296245
+num[d,12,9]: 8438.9626829145
+num[a,12,10]: -0.4967161000
+num[s,12,10]: -0.5032841000
+num[m,12,10]: -0.0016420003
+num[d,12,10]: -152.2533800244
+num[a,12,11]: 0.0000009000
+num[s,12,11]: -1.0000011000
+num[m,12,11]: -0.2500005500
+num[d,12,11]: -0.9999982000
+num[a,12,12]: -1.0000002000
+num[s,12,12]: 0.0000000000
+num[m,12,12]: 0.2500001000
+num[d,12,12]: 1.0000000000
+num[a,12,13]: 1234567890123456789012345678.4099999000
+num[s,12,13]: -1234567890123456789012345679.4100001000
+num[m,12,13]: -617284068518517406851851740.6895678910
+num[d,12,13]: -0.0000000000
+num[a,12,14]: 1234567890123456789012345678.4209999000
+num[s,12,14]: -1234567890123456789012345679.4210001000
+num[m,12,14]: -617284068518517406851851740.6950678921
+num[d,12,14]: -0.0000000000
+num[a,13,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9100000000
+num[s,13,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0900000000
+num[m,13,0]: 24691357802469135780246913578200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,13,0]: 0.0000000000
+num[a,13,1]: 1234567890123456789012345676.9100000000
+num[s,13,1]: 1234567890123456789012345680.9100000000
+num[m,13,1]: -2469135780246913578024691357.8200000000
+num[d,13,1]: -617283945061728394506172839.4550000000
+num[a,13,2]: 1234567890123456789012345679.7040000000
+num[s,13,2]: 1234567890123456789012345678.1160000000
+num[m,13,2]: 980246904758024690475802469.0545400000
+num[d,13,2]: 1554871398140373789688092794.5969773000
+num[a,13,3]: 1234567890123456789012345682.3500000000
+num[s,13,3]: 1234567890123456789012345675.4700000000
+num[m,13,3]: 4246913542024691354202469135.4504000000
+num[d,13,3]: 358886014570772322387309790.3808140000
+num[a,13,4]: 1235160380123456789012345678.9100000000
+num[s,13,4]: 1233975400123456789012345678.9100000000
+num[m,13,4]: 731469129219246912921924691297385900000000000000000.0000000000
+num[d,13,4]: 2083.6940541165
+num[a,13,5]: 1234567890123456789012017278.9100000000
+num[s,13,5]: 1234567890123456789012674078.9100000000
+num[m,13,5]: -405432095116543209511654320954044.0000000000
+num[d,13,5]: -3759341930948406787491.9174140000
+num[a,13,6]: 1234567890123456789012345678.9100000000
+num[s,13,6]: 1234567890123456789012345678.9100000000
+num[m,13,6]: 0.0000000000
+num[d,13,6]: 6172839450617283945061728394550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,13,7]: 1234567890123456789012345678.9110000000
+num[s,13,7]: 1234567890123456789012345678.9090000000
+num[m,13,7]: 1234567890123456789012345.6789100000
+num[d,13,7]: 1234567890123456789012345678910.0000000000
+num[a,13,8]: 1234567890123456789012345678.9100000000
+num[s,13,8]: 1234567890123456789012345678.9100000000
+num[m,13,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,13,9]: 1234567890123456789012345678.9099407510
+num[s,13,9]: 1234567890123456789012345678.9100592490
+num[m,13,9]: -73146912921924691292192.4691297386
+num[d,13,9]: -20836940541164522422527733445458.9950885247
+num[a,13,10]: 1234567890123456789012345678.9132840000
+num[s,13,10]: 1234567890123456789012345678.9067160000
+num[m,13,10]: 4054320951165432095116543.2095404400
+num[d,13,10]: 375934193094840678749191741446.4068209501
+num[a,13,11]: 1234567890123456789012345679.4100010000
+num[s,13,11]: 1234567890123456789012345678.4099990000
+num[m,13,11]: 617285179629618517962961851.8006789100
+num[d,13,11]: 2469130841985229607565476226.8675462649
+num[a,13,12]: 1234567890123456789012345678.4099999000
+num[s,13,12]: 1234567890123456789012345679.4100001000
+num[m,13,12]: -617284068518517406851851740.6895678910
+num[d,13,12]: -2469135286419856294053432547.1334905733
+num[a,13,13]: 2469135780246913578024691357.8200000000
+num[s,13,13]: 0.0000000000
+num[m,13,13]: 1524157875323883675049535156278311236552659655767748818.7881000000
+num[d,13,13]: 1.0000000000
+num[a,13,14]: 2469135780246913578024691357.8310000000
+num[s,13,14]: -0.0110000000
+num[m,13,14]: 1524157875323883675049535156291891483344017680446884621.2561100000
+num[d,13,14]: 1.0000000000
+num[a,14,0]: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890123456789012345678.9210000000
+num[s,14,0]: -19999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998765432109876543210987654321.0790000000
+num[m,14,0]: 24691357802469135780246913578420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[d,14,0]: 0.0000000000
+num[a,14,1]: 1234567890123456789012345676.9210000000
+num[s,14,1]: 1234567890123456789012345680.9210000000
+num[m,14,1]: -2469135780246913578024691357.8420000000
+num[d,14,1]: -617283945061728394506172839.4605000000
+num[a,14,2]: 1234567890123456789012345679.7150000000
+num[s,14,2]: 1234567890123456789012345678.1270000000
+num[m,14,2]: 980246904758024690475802469.0632740000
+num[d,14,2]: 1554871398140373789688092794.6108312000
+num[a,14,3]: 1234567890123456789012345682.3610000000
+num[s,14,3]: 1234567890123456789012345675.4810000000
+num[m,14,3]: 4246913542024691354202469135.4882400000
+num[d,14,3]: 358886014570772322387309790.3840116000
+num[a,14,4]: 1235160380123456789012345678.9210000000
+num[s,14,4]: 1233975400123456789012345678.9210000000
+num[m,14,4]: 731469129219246912921924691303903290000000000000000.0000000000
+num[d,14,4]: 2083.6940541165
+num[a,14,5]: 1234567890123456789012017278.9210000000
+num[s,14,5]: 1234567890123456789012674078.9210000000
+num[m,14,5]: -405432095116543209511654320957656.4000000000
+num[d,14,5]: -3759341930948406787491.9174145000
+num[a,14,6]: 1234567890123456789012345678.9210000000
+num[s,14,6]: 1234567890123456789012345678.9210000000
+num[m,14,6]: 0.0000000000
+num[d,14,6]: 6172839450617283945061728394605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000
+num[a,14,7]: 1234567890123456789012345678.9220000000
+num[s,14,7]: 1234567890123456789012345678.9200000000
+num[m,14,7]: 1234567890123456789012345.6789210000
+num[d,14,7]: 1234567890123456789012345678921.0000000000
+num[a,14,8]: 1234567890123456789012345678.9210000000
+num[s,14,8]: 1234567890123456789012345678.9210000000
+num[m,14,8]: 0.0000000000
+(errno == PGTYPES_NUM_DIVIDE_ZERO) - r: -1
+num[a,14,9]: 1234567890123456789012345678.9209407510
+num[s,14,9]: 1234567890123456789012345678.9210592490
+num[m,14,9]: -73146912921924691292192.4691303903
+num[d,14,9]: -20836940541164522422527733445644.6522304174
+num[a,14,10]: 1234567890123456789012345678.9242840000
+num[s,14,10]: 1234567890123456789012345678.9177160000
+num[m,14,10]: 4054320951165432095116543.2095765640
+num[d,14,10]: 375934193094840678749191741449.7563946407
+num[a,14,11]: 1234567890123456789012345679.4210010000
+num[s,14,11]: 1234567890123456789012345678.4209990000
+num[m,14,11]: 617285179629618517962961851.8061789210
+num[d,14,11]: 2469130841985229607565476226.8895462209
+num[a,14,12]: 1234567890123456789012345678.4209999000
+num[s,14,12]: 1234567890123456789012345679.4210001000
+num[m,14,12]: -617284068518517406851851740.6950678921
+num[d,14,12]: -2469135286419856294053432547.1554905689
+num[a,14,13]: 2469135780246913578024691357.8310000000
+num[s,14,13]: 0.0110000000
+num[m,14,13]: 1524157875323883675049535156291891483344017680446884621.2561100000
+num[d,14,13]: 1.0000000000
+num[a,14,14]: 2469135780246913578024691357.8420000000
+num[s,14,14]: 0.0000000000
+num[m,14,14]: 1524157875323883675049535156305471730135375705126020423.7242410000
+num[d,14,14]: 1.0000000000
+0: 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+1: -2
+2: 0.794
+3: 3.44
+4: 592490000000000000000000
+5: -328400
+6: 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002
+7: 0.001
+8: 0.0
+9: -0.000059249
+10: 0.003284
+11: 0.500001
+12: -0.5000001
+13: 1234567890123456789012345678.91
+14: 1234567890123456789012345678.921
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
new file mode 100644
index 0000000..1cf3710
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
@@ -0,0 +1,288 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "array_of_struct.pgc"
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 3 "array_of_struct.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 5 "array_of_struct.pgc"
+
+/* exec sql whenever sql_warning sqlprint ; */
+#line 6 "array_of_struct.pgc"
+
+/* exec sql whenever not found sqlprint ; */
+#line 7 "array_of_struct.pgc"
+
+
+typedef struct {
+#line 12 "array_of_struct.pgc"
+ struct varchar_1 { int len; char arr[ 50 ]; } name ;
+
+#line 13 "array_of_struct.pgc"
+ int phone ;
+ } customer ;
+#line 14 "array_of_struct.pgc"
+
+
+typedef struct ind {
+#line 19 "array_of_struct.pgc"
+ short name_ind ;
+
+#line 20 "array_of_struct.pgc"
+ short phone_ind ;
+ } cust_ind ;
+#line 21 "array_of_struct.pgc"
+
+
+int main()
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+ typedef struct {
+#line 30 "array_of_struct.pgc"
+ struct varchar_2 { int len; char arr[ 50 ]; } name ;
+
+#line 31 "array_of_struct.pgc"
+ int phone ;
+ } customer2 ;
+
+#line 32 "array_of_struct.pgc"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 26 "array_of_struct.pgc"
+ customer custs1 [ 10 ] ;
+
+#line 27 "array_of_struct.pgc"
+ cust_ind inds [ 10 ] ;
+
+#line 33 "array_of_struct.pgc"
+ customer2 custs2 [ 10 ] ;
+
+#line 38 "array_of_struct.pgc"
+ struct customer3 {
+#line 36 "array_of_struct.pgc"
+ struct varchar_3 { int len; char arr[ 50 ]; } name ;
+
+#line 37 "array_of_struct.pgc"
+ int phone ;
+ } custs3 [ 10 ] ;
+
+#line 43 "array_of_struct.pgc"
+ struct customer4 {
+#line 41 "array_of_struct.pgc"
+ struct varchar_4 { int len; char arr[ 50 ]; } name ;
+
+#line 42 "array_of_struct.pgc"
+ int phone ;
+ } custs4 ;
+
+#line 44 "array_of_struct.pgc"
+ int r ;
+
+#line 45 "array_of_struct.pgc"
+ struct varchar_5 { int len; char arr[ 50 ]; } onlyname [ 2 ] ;
+/* exec sql end declare section */
+#line 46 "array_of_struct.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 50 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 50 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "array_of_struct.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table customers ( c varchar ( 50 ) , p int )", ECPGt_EOIT, ECPGt_EORT);
+#line 52 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 52 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 52 "array_of_struct.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'John Doe' , '12345' )", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 53 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 53 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "array_of_struct.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'Jane Doe' , '67890' )", ECPGt_EOIT, ECPGt_EORT);
+#line 54 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 54 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 54 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 54 "array_of_struct.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,&(custs1->name),(long)50,(long)10,sizeof( customer ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
+ ECPGt_int,&(custs1->phone),(long)1,(long)10,sizeof( customer ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
+#line 56 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 56 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 56 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 56 "array_of_struct.pgc"
+
+ printf("custs1:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs1[r].name.arr );
+ printf( "phone - %d\n", custs1[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,&(custs2->name),(long)50,(long)10,sizeof( customer2 ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
+ ECPGt_int,&(custs2->phone),(long)1,(long)10,sizeof( customer2 ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
+#line 64 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 64 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 64 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 64 "array_of_struct.pgc"
+
+ printf("\ncusts2:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs2[r].name.arr );
+ printf( "phone - %d\n", custs2[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,&(custs3->name),(long)50,(long)10,sizeof( struct customer3 ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)10,sizeof( struct ind ),
+ ECPGt_int,&(custs3->phone),(long)1,(long)10,sizeof( struct customer3 ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)10,sizeof( struct ind ), ECPGt_EORT);
+#line 72 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 72 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 72 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 72 "array_of_struct.pgc"
+
+ printf("\ncusts3:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs3[r].name.arr );
+ printf( "phone - %d\n", custs3[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 1", ECPGt_EOIT,
+ ECPGt_varchar,&(custs4.name),(long)50,(long)1,sizeof( struct customer4 ),
+ ECPGt_short,&(inds[0].name_ind),(long)1,(long)1,sizeof( struct ind ),
+ ECPGt_int,&(custs4.phone),(long)1,(long)1,sizeof( struct customer4 ),
+ ECPGt_short,&(inds[0].phone_ind),(long)1,(long)1,sizeof( struct ind ), ECPGt_EORT);
+#line 80 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 80 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 80 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 80 "array_of_struct.pgc"
+
+ printf("\ncusts4:\n");
+ printf( "name - %s\n", custs4.name.arr );
+ printf( "phone - %d\n", custs4.phone );
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_5),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 85 "array_of_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 85 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 85 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 85 "array_of_struct.pgc"
+
+ printf("\nname:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", onlyname[r].arr );
+ }
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 92 "array_of_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 92 "array_of_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 92 "array_of_struct.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
new file mode 100644
index 0000000..64aa462
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr
@@ -0,0 +1,86 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: insert into customers values ( 'John Doe' , '12345' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: query: insert into customers values ( 'Jane Doe' , '67890' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 56: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 56: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 56: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 56: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 64: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 64: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 64: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 64: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 80: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 80: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 80: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 85: correctly got 2 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stdout b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stdout
new file mode 100644
index 0000000..23f41ff
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stdout
@@ -0,0 +1,25 @@
+custs1:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs2:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs3:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs4:
+name - John Doe
+phone - 12345
+
+name:
+name - John Doe
+name - Jane Doe
diff --git a/src/interfaces/ecpg/test/expected/preproc-autoprep.c b/src/interfaces/ecpg/test/expected/preproc-autoprep.c
new file mode 100644
index 0000000..8ed5a2c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-autoprep.c
@@ -0,0 +1,256 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "autoprep.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* test automatic prepare for all statements */
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "autoprep.pgc"
+
+
+static void test(void) {
+ /* exec sql begin declare section */
+
+
+
+
+#line 10 "autoprep.pgc"
+ int item [ 4 ] , ind [ 4 ] , i = 1 ;
+
+#line 11 "autoprep.pgc"
+ int item1 , ind1 ;
+
+#line 12 "autoprep.pgc"
+ char sqlstr [ 64 ] = "SELECT item2 FROM T ORDER BY item2 NULLS LAST" ;
+/* exec sql end declare section */
+#line 13 "autoprep.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 16 "autoprep.pgc"
+
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 18 "autoprep.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 19 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table T ( Item1 int , Item2 int )", ECPGt_EOIT, ECPGt_EORT);
+#line 21 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 21 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 21 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 23 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 23 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 23 "autoprep.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 , $1 )",
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 24 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "autoprep.pgc"
+
+ i++;
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 , $1 )",
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 26 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 26 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "autoprep.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "i", " insert into T values ( 1 , 2 ) ");
+#line 27 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 27 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 27 "autoprep.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "i", ECPGt_EOIT, ECPGt_EORT);
+#line 28 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 28 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 28 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "select Item2 from T order by Item2 nulls last", ECPGt_EOIT,
+ ECPGt_int,(item),(long)1,(long)4,sizeof(int),
+ ECPGt_int,(ind),(long)1,(long)4,sizeof(int), ECPGt_EORT);
+#line 30 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 30 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 30 "autoprep.pgc"
+
+
+ for (i=0; i<4; i++)
+ printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
+
+ /* declare C cursor for select Item1 from T */
+#line 35 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select Item1 from T", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 37 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 37 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 39 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 39 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 39 "autoprep.pgc"
+
+ printf("i = %d\n", i);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
+#line 42 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 42 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 42 "autoprep.pgc"
+
+
+ { ECPGprepare(__LINE__, NULL, 0, "stmt1", sqlstr);
+#line 44 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 44 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 44 "autoprep.pgc"
+
+
+ /* declare cur1 cursor for $1 */
+#line 46 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur1 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "stmt1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 48 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 48 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 48 "autoprep.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 50 "autoprep.pgc"
+
+
+ i = 0;
+ while (i < 100)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur1", ECPGt_EOIT,
+ ECPGt_int,&(item1),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 55 "autoprep.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 55 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 55 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 55 "autoprep.pgc"
+
+ printf("item[%d] = %d\n", i, ind1 ? -1 : item1);
+ i++;
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT);
+#line 60 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 60 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 60 "autoprep.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table T", ECPGt_EOIT, ECPGt_EORT);
+#line 62 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 62 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 62 "autoprep.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 64 "autoprep.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 64 "autoprep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 64 "autoprep.pgc"
+
+}
+
+int main() {
+ test();
+ test(); /* retry */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr
new file mode 100644
index 0000000..bfeea59
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr
@@ -0,0 +1,320 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: query: create table T ( Item1 int , Item2 int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 21: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 23: statement not in cache; inserting
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 23: name ecpg1; query: "insert into T values ( 1 , null )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: insert into T values ( 1 , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexecPrepared for "insert into T values ( 1 , null )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 24: statement not in cache; inserting
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 24: name ecpg2; query: "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: insert into T values ( 1 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexecPrepared for "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 24: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 26: statement found in cache; entry 1633
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into T values ( 1 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecPrepared for "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 27: name i; query: " insert into T values ( 1 , 2 ) "
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: insert into T values ( 1 , 2 ) ; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexecPrepared for " insert into T values ( 1 , 2 ) "
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 30: statement not in cache; inserting
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 30: name ecpg3; query: "select Item2 from T order by Item2 nulls last"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: select Item2 from T order by Item2 nulls last; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexecPrepared for "select Item2 from T order by Item2 nulls last"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: correctly got 4 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: declare C cursor for select Item1 from T; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 39: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: close C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 44: name stmt1; query: "SELECT item2 FROM T ORDER BY item2 NULLS LAST"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: declare cur1 cursor for SELECT item2 FROM T ORDER BY item2 NULLS LAST; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 0 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 60: query: close cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 62: query: drop table T; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 62: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 62: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name stmt1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: query: create table T ( Item1 int , Item2 int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 21: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 23: statement found in cache; entry 15321
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 23: name ecpg1; query: "insert into T values ( 1 , null )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: insert into T values ( 1 , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexecPrepared for "insert into T values ( 1 , null )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 24: statement found in cache; entry 1633
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 24: name ecpg2; query: "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: insert into T values ( 1 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexecPrepared for "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 24: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 26: statement found in cache; entry 1633
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into T values ( 1 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecPrepared for "insert into T values ( 1 , $1 )"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 27: name i; query: " insert into T values ( 1 , 2 ) "
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: insert into T values ( 1 , 2 ) ; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexecPrepared for " insert into T values ( 1 , 2 ) "
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_auto_prepare on line 30: statement found in cache; entry 13049
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 30: name ecpg3; query: "select Item2 from T order by Item2 nulls last"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: select Item2 from T order by Item2 nulls last; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexecPrepared for "select Item2 from T order by Item2 nulls last"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: correctly got 4 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 30: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: declare C cursor for select Item1 from T; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 39: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: close C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 44: name stmt1; query: "SELECT item2 FROM T ORDER BY item2 NULLS LAST"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: declare cur1 cursor for SELECT item2 FROM T ORDER BY item2 NULLS LAST; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: fetch cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: correctly got 0 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 60: query: close cur1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 62: query: drop table T; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 62: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 62: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name stmt1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ecpg1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-autoprep.stdout b/src/interfaces/ecpg/test/expected/preproc-autoprep.stdout
new file mode 100644
index 0000000..16a3263
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-autoprep.stdout
@@ -0,0 +1,18 @@
+item[0] = 1
+item[1] = 2
+item[2] = 2
+item[3] = -1
+i = 1
+item[0] = 1
+item[1] = 2
+item[2] = 2
+item[3] = -1
+item[0] = 1
+item[1] = 2
+item[2] = 2
+item[3] = -1
+i = 1
+item[0] = 1
+item[1] = 2
+item[2] = 2
+item[3] = -1
diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.c b/src/interfaces/ecpg/test/expected/preproc-comment.c
new file mode 100644
index 0000000..9e00ec2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-comment.c
@@ -0,0 +1,42 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "comment.pgc"
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 3 "comment.pgc"
+
+
+/* just a test comment */ int i;
+/* just a test comment int j*/;
+
+/****************************************************************************/
+/* Test comment */
+/*--------------------------------------------------------------------------*/
+
+int main(void)
+{
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 17 "comment.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 19 "comment.pgc"
+
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.stderr b/src/interfaces/ecpg/test/expected/preproc-comment.stderr
new file mode 100644
index 0000000..a85d73c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-comment.stderr
@@ -0,0 +1,6 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.stdout b/src/interfaces/ecpg/test/expected/preproc-comment.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-comment.stdout
diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.c b/src/interfaces/ecpg/test/expected/preproc-cursor.c
new file mode 100644
index 0000000..a4e7b12
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-cursor.c
@@ -0,0 +1,859 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "cursor.pgc"
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "cursor.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 6 "cursor.pgc"
+
+
+/* exec sql type c is char reference */
+#line 8 "cursor.pgc"
+
+typedef char* c;
+
+/* exec sql type ind is union {
+#line 11 "cursor.pgc"
+ int integer ;
+
+#line 11 "cursor.pgc"
+ short smallint ;
+ } */
+#line 11 "cursor.pgc"
+
+typedef union { int integer; short smallint; } ind;
+
+#define BUFFERSIZ 8
+/* exec sql type str is [ BUFFERSIZ ] */
+#line 15 "cursor.pgc"
+
+
+#define CURNAME "mycur"
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+
+#line 23 "cursor.pgc"
+ char * stmt1 = "SELECT id, t FROM t1" ;
+
+#line 24 "cursor.pgc"
+ char * curname1 = CURNAME ;
+
+#line 25 "cursor.pgc"
+ char * curname2 = CURNAME ;
+
+#line 26 "cursor.pgc"
+ char * curname3 = CURNAME ;
+
+#line 27 "cursor.pgc"
+ struct varchar_1 { int len; char arr[ 50 ]; } curname4 ;
+
+#line 28 "cursor.pgc"
+ char * curname5 = CURNAME ;
+
+#line 29 "cursor.pgc"
+ int count ;
+
+#line 30 "cursor.pgc"
+ int id ;
+
+#line 31 "cursor.pgc"
+ char t [ 64 ] ;
+/* exec sql end declare section */
+#line 32 "cursor.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "test1", 0);
+#line 39 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 39 "cursor.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "test2", 0);
+#line 40 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 40 "cursor.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 43 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 43 "cursor.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "create table t1 ( id serial primary key , t text )", ECPGt_EOIT, ECPGt_EORT);
+#line 46 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 46 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "create table t1 ( id serial primary key , t text )", ECPGt_EOIT, ECPGt_EORT);
+#line 47 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 47 "cursor.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 50 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 50 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 51 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 51 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'c' )", ECPGt_EOIT, ECPGt_EORT);
+#line 52 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 52 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'd' )", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 53 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'e' )", ECPGt_EOIT, ECPGt_EORT);
+#line 54 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 54 "cursor.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, "test1", "commit");
+#line 57 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 57 "cursor.pgc"
+
+ { ECPGtrans(__LINE__, "test2", "commit");
+#line 58 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 58 "cursor.pgc"
+
+
+ /* Dynamic cursorname test with INTO list in FETCH stmts */
+
+ strcpy(msg, "declare");
+ ECPGset_var( 0, &( curname1 ), __LINE__);\
+ /* declare $0 cursor for select id , t from t1 */
+#line 64 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 64 "cursor.pgc"
+
+#line 64 "cursor.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 67 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 67 "cursor.pgc"
+
+
+ strcpy(msg, "fetch from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch forward from $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 70 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 70 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch forward $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 74 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 74 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 78 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 78 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 83 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 83 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move in");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 in $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 87 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 87 "cursor.pgc"
+
+
+ strcpy(msg, "fetch 1");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 90 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 90 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 95 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 95 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0",
+ ECPGt_char,&(curname1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 99 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 99 "cursor.pgc"
+
+
+ /* Dynamic cursorname test with INTO list in DECLARE stmt */
+
+ strcpy(msg, "declare");
+ ECPGset_var( 1, &( curname2 ), __LINE__);\
+ ECPGset_var( 2, ( t ), __LINE__);\
+ ECPGset_var( 3, &( id ), __LINE__);\
+ /* declare $0 cursor for select id , t from t1 */
+#line 105 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 105 "cursor.pgc"
+
+#line 105 "cursor.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 108 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 108 "cursor.pgc"
+
+
+ strcpy(msg, "fetch from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 111 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 111 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 115 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 115 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 119 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 119 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 124 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 124 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 128 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 128 "cursor.pgc"
+
+
+ strcpy(msg, "fetch 1");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 131 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 131 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 136 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 136 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0",
+ ECPGt_char,&(curname2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 140 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 140 "cursor.pgc"
+
+
+ /* Dynamic cursorname test with PREPARED stmt */
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, "test1", 0, "st_id1", stmt1);
+#line 145 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 145 "cursor.pgc"
+
+ { ECPGprepare(__LINE__, "test2", 0, "st_id1", stmt1);
+#line 146 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 146 "cursor.pgc"
+
+
+ strcpy(msg, "declare");
+ ECPGset_var( 4, &( curname3 ), __LINE__);\
+ /* declare $0 cursor for $1 */
+#line 149 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 149 "cursor.pgc"
+
+#line 149 "cursor.pgc"
+
+ ECPGset_var( 5, &( curname5 ), __LINE__);\
+ /* declare $0 cursor for $1 */
+#line 150 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 150 "cursor.pgc"
+
+#line 150 "cursor.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 153 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 153 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "declare $0 cursor for $1",
+ ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char_variable,(ECPGprepared_statement("test2", "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 154 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 154 "cursor.pgc"
+
+
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "fetch $0",
+ ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 157 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 157 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 161 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 161 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 165 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 165 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 170 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 170 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 174 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 174 "cursor.pgc"
+
+
+ strcpy(msg, "fetch 1");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 177 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 177 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 182 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 182 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0",
+ ECPGt_char,&(curname3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 186 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 186 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "close $0",
+ ECPGt_char,&(curname5),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 187 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 187 "cursor.pgc"
+
+
+ strcpy(msg, "deallocate prepare");
+ { ECPGdeallocate(__LINE__, 0, "test1", "st_id1");
+#line 190 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 190 "cursor.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, "test2", "st_id1");
+#line 191 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 191 "cursor.pgc"
+
+
+ /* Dynamic cursorname test with PREPARED stmt,
+ cursor name in varchar */
+
+ curname4.len = strlen(CURNAME);
+ strcpy(curname4.arr, CURNAME);
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, "test1", 0, "st_id2", stmt1);
+#line 200 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 200 "cursor.pgc"
+
+
+ strcpy(msg, "declare");
+ ECPGset_var( 6, &( curname4 ), __LINE__);\
+ /* declare $0 cursor for $1 */
+#line 203 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 203 "cursor.pgc"
+
+#line 203 "cursor.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char_variable,(ECPGprepared_statement("test1", "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 206 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 206 "cursor.pgc"
+
+
+ strcpy(msg, "fetch from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch from $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 209 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 209 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 213 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 213 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 from $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 217 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 217 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 from $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 222 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 222 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "move absolute 0 $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 226 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 226 "cursor.pgc"
+
+
+ strcpy(msg, "fetch 1");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch 1 $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 229 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 229 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "fetch $0 $0",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(t),(long)64,(long)1,(64)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 234 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 234 "cursor.pgc"
+
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "close $0",
+ ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 238 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 238 "cursor.pgc"
+
+
+ strcpy(msg, "deallocate prepare");
+ { ECPGdeallocate(__LINE__, 0, "test1", "st_id2");
+#line 241 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 241 "cursor.pgc"
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 246 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 246 "cursor.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "test2", 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 247 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 247 "cursor.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, "test1", "commit");
+#line 250 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 250 "cursor.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 253 "cursor.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 253 "cursor.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.stderr b/src/interfaces/ecpg/test/expected/preproc-cursor.stderr
new file mode 100644
index 0000000..5a9bc39
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-cursor.stderr
@@ -0,0 +1,412 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 43: query: set datestyle to iso; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 43: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 43: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 47: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: insert into t1 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: insert into t1 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: query: insert into t1 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: insert into t1 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: query: insert into t1 ( id , t ) values ( default , 'e' ); with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 57: action "commit"; connection "test1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 58: action "commit"; connection "test2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 67: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 67: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 67: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 70: query: fetch forward from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 70: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 70: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 70: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 70: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: fetch forward mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 74: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 78: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 78: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 78: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 78: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 78: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 83: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 83: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 83: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 83: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 83: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 87: query: move absolute 0 in mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 87: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 87: OK: MOVE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 90: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 90: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 90: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 90: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 90: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 95: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 95: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 95: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 95: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 95: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 99: query: close mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 99: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 99: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 108: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 111: query: fetch from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 111: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 111: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 115: query: fetch mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 115: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 115: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 115: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 115: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 119: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 119: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 119: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 119: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 119: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 124: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 124: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 124: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 128: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 128: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 128: OK: MOVE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 131: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 131: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 131: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 131: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 131: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 136: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 136: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 136: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 136: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 136: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 140: query: close mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 140: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 140: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 145: name st_id1; query: "SELECT id, t FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 146: name st_id1; query: "SELECT id, t FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 153: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 153: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 153: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 154: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 154: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 154: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 157: query: fetch mycur; with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 157: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 161: query: fetch from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 161: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 161: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 161: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 161: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 165: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 165: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 165: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 165: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 165: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 170: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 170: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 170: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 170: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 170: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 174: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 174: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 174: OK: MOVE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 177: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 177: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 177: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 177: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 177: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 182: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 182: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 182: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 182: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 182: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 186: query: close mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 186: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 186: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 187: query: close mycur; with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 187: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 187: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 190: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 191: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 200: name st_id2; query: "SELECT id, t FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 206: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 206: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 206: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 209: query: fetch from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 209: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 209: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 209: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 209: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 213: query: fetch mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 213: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 213: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 213: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 213: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 217: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 217: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 217: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 217: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 217: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 222: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 222: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 222: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 222: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 226: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 226: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 226: OK: MOVE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 229: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 229: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 229: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 229: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 229: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 234: query: fetch 1 mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 234: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 234: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 234: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 234: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 238: query: close mycur; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 238: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 238: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 241: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 246: query: drop table t1; with 0 parameter(s) on connection test1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 246: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 246: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 247: query: drop table t1; with 0 parameter(s) on connection test2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 247: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 247: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 250: action "commit"; connection "test1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection test2 closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection test1 closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.stdout b/src/interfaces/ecpg/test/expected/preproc-cursor.stdout
new file mode 100644
index 0000000..233dc03
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-cursor.stdout
@@ -0,0 +1,24 @@
+1 a
+2 b
+3 c
+4 d
+1 a
+2 b
+1 a
+2 b
+3 c
+4 d
+1 a
+2 b
+1 e
+1 a
+2 b
+3 c
+1 a
+2 b
+1 a
+2 b
+3 c
+4 d
+1 a
+2 b
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c
new file mode 100644
index 0000000..455e96a
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-define.c
@@ -0,0 +1,184 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "define.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "define.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 7 "define.pgc"
+
+
+
+
+
+/* exec sql type intarray is int [ 6 ] */
+#line 12 "define.pgc"
+
+typedef int intarray[ 6];
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+ typedef char string [ 8 ];
+
+#line 21 "define.pgc"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 22 "define.pgc"
+ intarray amount ;
+
+#line 23 "define.pgc"
+ char name [ 6 ] [ 8 ] ;
+
+#line 36 "define.pgc"
+ char letter [ 6 ] [ 1 ] ;
+
+#if 0
+
+#line 38 "define.pgc"
+ int not_used ;
+
+#endif
+/* exec sql end declare section */
+#line 45 "define.pgc"
+
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 50 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "define.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 52 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 52 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 53 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "define.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' )", ECPGt_EOIT, ECPGt_EORT);
+#line 55 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 55 "define.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' )", ECPGt_EOIT, ECPGt_EORT);
+#line 56 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 56 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 57 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "define.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from test", ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)6,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)6,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)6,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 59 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 59 "define.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ /* exec sql begin declare section */
+
+
+
+
+#line 64 "define.pgc"
+ string n ;
+
+#line 65 "define.pgc"
+ char l = letter [ i ] [ 0 ] ;
+
+#line 66 "define.pgc"
+ int a = amount [ i ] ;
+/* exec sql end declare section */
+#line 67 "define.pgc"
+
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 73 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 73 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 74 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "define.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 75 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 75 "define.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.stderr b/src/interfaces/ecpg/test/expected/preproc-define.stderr
new file mode 100644
index 0000000..3f05277
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-define.stderr
@@ -0,0 +1,54 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: query: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 53: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 57: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: query: select * from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 59: correctly got 2 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: false offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: true offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 59: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 73: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 74: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.stdout b/src/interfaces/ecpg/test/expected/preproc-define.stdout
new file mode 100644
index 0000000..8526a5c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-define.stdout
@@ -0,0 +1,2 @@
+name[0]=false amount[0]=1 letter[0]=f
+name[1]=true amount[1]=2 letter[1]=t
diff --git a/src/interfaces/ecpg/test/expected/preproc-describe.c b/src/interfaces/ecpg/test/expected/preproc-describe.c
new file mode 100644
index 0000000..143e966
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-describe.c
@@ -0,0 +1,481 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "describe.pgc"
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "describe.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 6 "describe.pgc"
+
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+
+
+#line 12 "describe.pgc"
+ char * stmt1 = "SELECT id, t FROM t1" ;
+
+#line 13 "describe.pgc"
+ char * stmt2 = "SELECT id, t FROM t1 WHERE id = -1" ;
+
+#line 14 "describe.pgc"
+ int i , count1 , count2 , count3 , count4 ;
+
+#line 15 "describe.pgc"
+ char field_name1 [ 30 ] = "not set" ;
+
+#line 16 "describe.pgc"
+ char field_name2 [ 30 ] = "not set" ;
+
+#line 17 "describe.pgc"
+ char field_name3 [ 30 ] = "not set" ;
+
+#line 18 "describe.pgc"
+ char field_name4 [ 30 ] = "not set" ;
+/* exec sql end declare section */
+#line 19 "describe.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 26 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 26 "describe.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 29 "describe.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table t1 ( id serial primary key , t text )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 32 "describe.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 35 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 36 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'c' )", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 ( id , t ) values ( default , 'd' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 41 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 41 "describe.pgc"
+
+
+ /*
+ * Test DESCRIBE with a query producing tuples.
+ * DESCRIPTOR and SQL DESCRIPTOR are the same in native mode.
+ */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 49 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 49 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 50 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 50 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc3");
+#line 51 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 51 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc4");
+#line 52 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 52 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
+#line 55 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "describe.pgc"
+
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc1", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 58 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc2", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 59 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc3", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 60 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc4", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 61 "describe.pgc"
+
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 64 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 64 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc2", &(count2));
+
+#line 65 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 65 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc3", &(count3));
+
+#line 66 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 66 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc4", &(count4));
+
+#line 67 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 67 "describe.pgc"
+
+
+ if (!(count1 == count2 && count1 == count3 && count1 == count4))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 74 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 74 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 75 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 75 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc3", i,ECPGd_name,
+ ECPGt_char,(field_name3),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 76 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 76 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc4", i,ECPGd_name,
+ ECPGt_char,(field_name4),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 77 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 77 "describe.pgc"
+
+ printf("field_name 1 '%s' 2 '%s' 3 '%s' 4 '%s'\n",
+ field_name1, field_name2, field_name3, field_name4);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 83 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 83 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 84 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 84 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc3");
+#line 85 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 85 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc4");
+#line 86 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 86 "describe.pgc"
+
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id1");
+#line 88 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 88 "describe.pgc"
+
+
+ /* Test DESCRIBE with a query not producing tuples */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 93 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 93 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 94 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 94 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc3");
+#line 95 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 95 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc4");
+#line 96 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 96 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt2);
+#line 99 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 99 "describe.pgc"
+
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc1", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 102 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc2", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 103 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc3", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 104 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc4", 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 105 "describe.pgc"
+
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 108 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 108 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc2", &(count2));
+
+#line 109 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 109 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc3", &(count3));
+
+#line 110 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 110 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc4", &(count4));
+
+#line 111 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 111 "describe.pgc"
+
+
+ if (!(count1 == count2 && count1 == count3 && count1 == count4))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 118 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 118 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 119 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 119 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc3", i,ECPGd_name,
+ ECPGt_char,(field_name3),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 120 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 120 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc4", i,ECPGd_name,
+ ECPGt_char,(field_name4),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 121 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 121 "describe.pgc"
+
+ printf("field_name 1 '%s' 2 '%s' 3 '%s' 4 '%s'\n",
+ field_name1, field_name2, field_name3, field_name4);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 127 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 127 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 128 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 128 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc3");
+#line 129 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 129 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc4");
+#line 130 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 130 "describe.pgc"
+
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id2");
+#line 132 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 132 "describe.pgc"
+
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 138 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 138 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 141 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 141 "describe.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 144 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 144 "describe.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-describe.stderr b/src/interfaces/ecpg/test/expected/preproc-describe.stderr
new file mode 100644
index 0000000..0537a0f
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-describe.stderr
@@ -0,0 +1,140 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into t1 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into t1 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: insert into t1 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into t1 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 41: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGprepare on line 55: name st_id1; query: "SELECT id, t FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGdeallocate on line 88: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGprepare on line 99: name st_id2; query: "SELECT id, t FROM t1 WHERE id = -1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGdeallocate on line 132: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 138: query: drop table t1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 138: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 138: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 141: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-describe.stdout b/src/interfaces/ecpg/test/expected/preproc-describe.stdout
new file mode 100644
index 0000000..d27324e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-describe.stdout
@@ -0,0 +1,4 @@
+field_name 1 'id' 2 'id' 3 'id' 4 'id'
+field_name 1 't' 2 't' 3 't' 4 't'
+field_name 1 'id' 2 'id' 3 'id' 4 'id'
+field_name 1 't' 2 't' 3 't' 4 't'
diff --git a/src/interfaces/ecpg/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c
new file mode 100644
index 0000000..b0e0473
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-init.c
@@ -0,0 +1,261 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "init.pgc"
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 1 "init.pgc"
+
+
+enum e { ENUM0, ENUM1 };
+struct sa { int member; };
+
+static int fa(void)
+{
+ printf("in fa\n");
+ return 2;
+}
+
+static int
+fb(int x)
+{
+ printf("in fb (%d)\n", x);
+ return x;
+}
+
+static int
+fc(const char *x)
+{
+ printf("in fc (%s)\n", x);
+ return *x;
+}
+
+static int fd(const char *x,int i)
+{
+ printf("in fd (%s, %d)\n", x, i);
+ return (*x)*i;
+}
+
+static int fe(enum e x)
+{
+ printf("in fe (%d)\n", (int) x);
+ return (int)x;
+}
+
+static void sqlnotice(const char *notice, short trans)
+{
+ if (!notice)
+ notice = "-empty-";
+ printf("in sqlnotice (%s, %d)\n", notice, trans);
+}
+
+
+
+#define YES 1
+
+#ifdef _cplusplus
+namespace N
+{
+ static const int i=2;
+};
+#endif
+
+int main(void)
+{
+ struct sa x = { 14 },*y = &x;
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+
+
+ /* = 1L */
+
+#line 60 "init.pgc"
+ int a = ( int ) 2 ;
+
+#line 61 "init.pgc"
+ int b = 2 + 2 ;
+
+#line 62 "init.pgc"
+ int b2 = ( 14 * 7 ) ;
+
+#line 63 "init.pgc"
+ int d = x . member ;
+
+#line 64 "init.pgc"
+ int g = fb ( 2 ) ;
+
+#line 65 "init.pgc"
+ int i = 3 ^ 1 ;
+
+#line 66 "init.pgc"
+ int j = 1 ? 1 : 2 ;
+
+#line 68 "init.pgc"
+ int e = y -> member ;
+
+#line 69 "init.pgc"
+ int c = 10 >> 2 ;
+
+#line 70 "init.pgc"
+ bool h = 2 || 1 ;
+
+#line 71 "init.pgc"
+ long iay ;
+/* exec sql end declare section */
+#line 72 "init.pgc"
+
+
+ int f=fa();
+
+#ifdef _cplusplus
+ /* exec sql begin declare section */
+ /* compile error */
+
+#line 78 "init.pgc"
+ int k = N : : i ;
+/* exec sql end declare section */
+#line 79 "init.pgc"
+
+#endif
+
+ ECPGdebug(1, stderr);
+
+ printf("%d %d %d %d %d %d %d %d %d %d %d\n", a, b, b2, c, d, e, f, g, h, i, j);
+ iay = 0;
+ printf("%ld\n", iay);
+ /* exec sql whenever sqlerror do fa ( ) ; */
+#line 87 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 88 "init.pgc"
+
+if (sqlca.sqlcode < 0) fa ( );}
+#line 88 "init.pgc"
+
+ /* exec sql whenever sqlerror do fb ( 20 ) ; */
+#line 89 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 90 "init.pgc"
+
+if (sqlca.sqlcode < 0) fb ( 20 );}
+#line 90 "init.pgc"
+
+ /* exec sql whenever sqlerror do fc ( \"50\" ) ; */
+#line 91 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 92 "init.pgc"
+
+if (sqlca.sqlcode < 0) fc ( "50" );}
+#line 92 "init.pgc"
+
+ /* exec sql whenever sqlerror do fd ( \"50\" , 1 ) ; */
+#line 93 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 94 "init.pgc"
+
+if (sqlca.sqlcode < 0) fd ( "50" , 1 );}
+#line 94 "init.pgc"
+
+ /* exec sql whenever sqlerror do fe ( ENUM0 ) ; */
+#line 95 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 96 "init.pgc"
+
+if (sqlca.sqlcode < 0) fe ( ENUM0 );}
+#line 96 "init.pgc"
+
+ /* exec sql whenever sqlerror do sqlnotice ( NULL , 0 ) ; */
+#line 97 "init.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select now ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 98 "init.pgc"
+
+if (sqlca.sqlcode < 0) sqlnotice ( NULL , 0 );}
+#line 98 "init.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-init.stderr b/src/interfaces/ecpg/test/expected/preproc-init.stderr
new file mode 100644
index 0000000..1b6fa18
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-init.stderr
@@ -0,0 +1,14 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -220 on line 88: connection "NULL" does not exist on line 88
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 90: connection "NULL" does not exist on line 90
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 92: connection "NULL" does not exist on line 92
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 94: connection "NULL" does not exist on line 94
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 96: connection "NULL" does not exist on line 96
+[NO_PID]: sqlca: code: -220, state: 08003
+[NO_PID]: raising sqlcode -220 on line 98: connection "NULL" does not exist on line 98
+[NO_PID]: sqlca: code: -220, state: 08003
diff --git a/src/interfaces/ecpg/test/expected/preproc-init.stdout b/src/interfaces/ecpg/test/expected/preproc-init.stdout
new file mode 100644
index 0000000..4738d79
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-init.stdout
@@ -0,0 +1,10 @@
+in fb (2)
+in fa
+2 4 98 2 14 14 2 2 1 2 1
+0
+in fa
+in fb (20)
+in fc (50)
+in fd (50, 1)
+in fe (0)
+in sqlnotice (-empty-, 0)
diff --git a/src/interfaces/ecpg/test/expected/preproc-outofscope.c b/src/interfaces/ecpg/test/expected/preproc-outofscope.c
new file mode 100644
index 0000000..3a27c53
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.c
@@ -0,0 +1,372 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "outofscope.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "outofscope.pgc"
+
+
+
+#line 1 "pgtypes_numeric.h"
+#ifndef PGTYPES_NUMERIC
+#define PGTYPES_NUMERIC
+
+#include <pgtypes.h>
+
+#define NUMERIC_POS 0x0000
+#define NUMERIC_NEG 0x4000
+#define NUMERIC_NAN 0xC000
+#define NUMERIC_NULL 0xF000
+#define NUMERIC_MAX_PRECISION 1000
+#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
+#define NUMERIC_MIN_DISPLAY_SCALE 0
+#define NUMERIC_MIN_SIG_DIGITS 16
+
+#define DECSIZE 30
+
+typedef unsigned char NumericDigit;
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit *buf; /* start of alloc'd space for digits[] */
+ NumericDigit *digits; /* decimal digits */
+} numeric;
+
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit digits[DECSIZE]; /* decimal digits */
+} decimal;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+numeric *PGTYPESnumeric_new(void);
+decimal *PGTYPESdecimal_new(void);
+void PGTYPESnumeric_free(numeric *);
+void PGTYPESdecimal_free(decimal *);
+numeric *PGTYPESnumeric_from_asc(char *, char **);
+char *PGTYPESnumeric_to_asc(numeric *, int);
+int PGTYPESnumeric_add(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_sub(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_mul(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_div(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_cmp(numeric *, numeric *);
+int PGTYPESnumeric_from_int(signed int, numeric *);
+int PGTYPESnumeric_from_long(signed long int, numeric *);
+int PGTYPESnumeric_copy(numeric *, numeric *);
+int PGTYPESnumeric_from_double(double, numeric *);
+int PGTYPESnumeric_to_double(numeric *, double *);
+int PGTYPESnumeric_to_int(numeric *, int *);
+int PGTYPESnumeric_to_long(numeric *, long *);
+int PGTYPESnumeric_to_decimal(numeric *, decimal *);
+int PGTYPESnumeric_from_decimal(decimal *, numeric *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_NUMERIC */
+
+#line 8 "outofscope.pgc"
+
+
+/* exec sql begin declare section */
+
+#line 1 "struct.h"
+
+
+
+
+ /* dec_t */
+
+
+
+ typedef struct mytype MYTYPE ;
+
+#line 9 "struct.h"
+
+
+
+
+
+
+
+
+
+
+ typedef struct mynulltype MYNULLTYPE ;
+
+#line 19 "struct.h"
+
+
+#line 11 "outofscope.pgc"
+
+struct mytype {
+#line 3 "struct.h"
+ int id ;
+
+#line 4 "struct.h"
+ char t [ 64 ] ;
+
+#line 5 "struct.h"
+ double d1 ;
+
+#line 6 "struct.h"
+ double d2 ;
+
+#line 7 "struct.h"
+ char c [ 30 ] ;
+ } ; struct mynulltype {
+#line 13 "struct.h"
+ int id ;
+
+#line 14 "struct.h"
+ int t ;
+
+#line 15 "struct.h"
+ int d1 ;
+
+#line 16 "struct.h"
+ int d2 ;
+
+#line 17 "struct.h"
+ int c ;
+ } ;/* exec sql end declare section */
+#line 12 "outofscope.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 14 "outofscope.pgc"
+
+
+/* Functions for test 1 */
+
+static void
+get_var1(MYTYPE **myvar0, MYNULLTYPE **mynullvar0)
+{
+ /* exec sql begin declare section */
+
+
+
+#line 22 "outofscope.pgc"
+ MYTYPE * myvar = malloc ( sizeof ( MYTYPE ) ) ;
+
+#line 23 "outofscope.pgc"
+ MYNULLTYPE * mynullvar = malloc ( sizeof ( MYNULLTYPE ) ) ;
+/* exec sql end declare section */
+#line 24 "outofscope.pgc"
+
+
+ /* Test DECLARE ... SELECT ... INTO with pointers */
+
+ ECPGset_var( 0, ( myvar ), __LINE__);\
+ ECPGset_var( 1, ( mynullvar ), __LINE__);\
+ /* declare mycur cursor for select * from a1 */
+#line 28 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 28 "outofscope.pgc"
+
+#line 28 "outofscope.pgc"
+
+
+ if (sqlca.sqlcode != 0)
+ exit(1);
+
+ *myvar0 = myvar;
+ *mynullvar0 = mynullvar;
+}
+
+static void
+open_cur1(void)
+{
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur cursor for select * from a1", ECPGt_EOIT,
+ ECPGt_int,&((*( MYTYPE *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_char,&((*( MYTYPE *)(ECPGget_var( 0)) ).t),(long)64,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).t),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_double,&((*( MYTYPE *)(ECPGget_var( 0)) ).d1),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).d1),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_double,&((*( MYTYPE *)(ECPGget_var( 0)) ).d2),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).d2),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_char,&((*( MYTYPE *)(ECPGget_var( 0)) ).c),(long)30,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).c),(long)1,(long)1,sizeof( struct mynulltype ), ECPGt_EORT);
+#line 40 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 40 "outofscope.pgc"
+
+}
+
+static void
+get_record1(void)
+{
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch mycur", ECPGt_EOIT,
+ ECPGt_int,&((*( MYTYPE *)(ECPGget_var( 0)) ).id),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).id),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_char,&((*( MYTYPE *)(ECPGget_var( 0)) ).t),(long)64,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).t),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_double,&((*( MYTYPE *)(ECPGget_var( 0)) ).d1),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).d1),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_double,&((*( MYTYPE *)(ECPGget_var( 0)) ).d2),(long)1,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).d2),(long)1,(long)1,sizeof( struct mynulltype ),
+ ECPGt_char,&((*( MYTYPE *)(ECPGget_var( 0)) ).c),(long)30,(long)1,sizeof( struct mytype ),
+ ECPGt_int,&((*( MYNULLTYPE *)(ECPGget_var( 1)) ).c),(long)1,(long)1,sizeof( struct mynulltype ), ECPGt_EORT);
+#line 46 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 46 "outofscope.pgc"
+
+}
+
+static void
+close_cur1(void)
+{
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur", ECPGt_EOIT, ECPGt_EORT);
+#line 52 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 52 "outofscope.pgc"
+
+}
+
+int
+main (void)
+{
+ MYTYPE *myvar;
+ MYNULLTYPE *mynullvar;
+ int loopcount;
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 66 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 66 "outofscope.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 69 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 69 "outofscope.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table a1 ( id serial primary key , t text , d1 numeric , d2 float8 , c character ( 10 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 72 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 72 "outofscope.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into a1 ( id , t , d1 , d2 , c ) values ( default , 'a' , 1.0 , 2 , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 75 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 75 "outofscope.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into a1 ( id , t , d1 , d2 , c ) values ( default , null , null , null , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 76 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 76 "outofscope.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into a1 ( id , t , d1 , d2 , c ) values ( default , 'b' , 2.0 , 3 , 'b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 77 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 77 "outofscope.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 80 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 80 "outofscope.pgc"
+
+
+ /* Test out-of-scope DECLARE/OPEN/FETCH/CLOSE */
+
+ get_var1(&myvar, &mynullvar);
+ open_cur1();
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ memset(myvar, 0, sizeof(MYTYPE));
+ get_record1();
+ if (sqlca.sqlcode == ECPG_NOT_FOUND)
+ break;
+ printf("id=%d%s t='%s'%s d1=%f%s d2=%f%s c = '%s'%s\n",
+ myvar->id, mynullvar->id ? " (NULL)" : "",
+ myvar->t, mynullvar->t ? " (NULL)" : "",
+ myvar->d1, mynullvar->d1 ? " (NULL)" : "",
+ myvar->d2, mynullvar->d2 ? " (NULL)" : "",
+ myvar->c, mynullvar->c ? " (NULL)" : "");
+ }
+
+ close_cur1();
+
+ free(myvar);
+ free(mynullvar);
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table a1", ECPGt_EOIT, ECPGt_EORT);
+#line 107 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 107 "outofscope.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 110 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 110 "outofscope.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 113 "outofscope.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 113 "outofscope.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr b/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr
new file mode 100644
index 0000000..2c97799
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.stderr
@@ -0,0 +1,114 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 69: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: create table a1 ( id serial primary key , t text , d1 numeric , d2 float8 , c character ( 10 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 75: query: insert into a1 ( id , t , d1 , d2 , c ) values ( default , 'a' , 1.0 , 2 , 'a' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 75: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 75: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: insert into a1 ( id , t , d1 , d2 , c ) values ( default , null , null , null , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: query: insert into a1 ( id , t , d1 , d2 , c ) values ( default , 'b' , 2.0 , 3 , 'b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 77: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 80: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: declare mycur cursor for select * from a1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch mycur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 1.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch mycur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch mycur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 2.0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch mycur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 0 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 46: no data found on line 46
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 52: query: close mycur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: query: drop table a1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 107: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 110: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-outofscope.stdout b/src/interfaces/ecpg/test/expected/preproc-outofscope.stdout
new file mode 100644
index 0000000..8c53ad7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.stdout
@@ -0,0 +1,3 @@
+id=1 t='a' d1=1.000000 d2=2.000000 c = 'a '
+id=2 t='' (NULL) d1=0.000000 (NULL) d2=0.000000 (NULL) c = '' (NULL)
+id=3 t='b' d1=2.000000 d2=3.000000 c = 'b '
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
new file mode 100644
index 0000000..7b1f58e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
@@ -0,0 +1,293 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "pointer_to_struct.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "pointer_to_struct.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 6 "pointer_to_struct.pgc"
+
+/* exec sql whenever sql_warning sqlprint ; */
+#line 7 "pointer_to_struct.pgc"
+
+/* exec sql whenever not found sqlprint ; */
+#line 8 "pointer_to_struct.pgc"
+
+
+typedef struct {
+#line 13 "pointer_to_struct.pgc"
+ struct varchar_1 { int len; char arr[ 50 ]; } name ;
+
+#line 14 "pointer_to_struct.pgc"
+ int phone ;
+ } customer ;
+#line 15 "pointer_to_struct.pgc"
+
+
+typedef struct ind {
+#line 20 "pointer_to_struct.pgc"
+ short name_ind ;
+
+#line 21 "pointer_to_struct.pgc"
+ short phone_ind ;
+ } cust_ind ;
+#line 22 "pointer_to_struct.pgc"
+
+
+int main()
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+ typedef struct {
+#line 31 "pointer_to_struct.pgc"
+ struct varchar_2 { int len; char arr[ 50 ]; } name ;
+
+#line 32 "pointer_to_struct.pgc"
+ int phone ;
+ } customer2 ;
+
+#line 33 "pointer_to_struct.pgc"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 27 "pointer_to_struct.pgc"
+ customer * custs1 = ( customer * ) malloc ( sizeof ( customer ) * 10 ) ;
+
+#line 28 "pointer_to_struct.pgc"
+ cust_ind * inds = ( cust_ind * ) malloc ( sizeof ( cust_ind ) * 10 ) ;
+
+#line 34 "pointer_to_struct.pgc"
+ customer2 * custs2 = ( customer2 * ) malloc ( sizeof ( customer2 ) * 10 ) ;
+
+#line 40 "pointer_to_struct.pgc"
+ struct customer3 {
+#line 38 "pointer_to_struct.pgc"
+ char name [ 50 ] ;
+
+#line 39 "pointer_to_struct.pgc"
+ int phone ;
+ } * custs3 = ( struct customer3 * ) malloc ( sizeof ( struct customer3 ) * 10 ) ;
+
+#line 46 "pointer_to_struct.pgc"
+ struct customer4 {
+#line 44 "pointer_to_struct.pgc"
+ struct varchar_3 { int len; char arr[ 50 ]; } name ;
+
+#line 45 "pointer_to_struct.pgc"
+ int phone ;
+ } * custs4 = ( struct customer4 * ) malloc ( sizeof ( struct customer4 ) ) ;
+
+#line 48 "pointer_to_struct.pgc"
+ int r ;
+
+#line 49 "pointer_to_struct.pgc"
+ struct varchar_4 { int len; char arr[ 50 ]; } onlyname [ 2 ] ;
+/* exec sql end declare section */
+#line 50 "pointer_to_struct.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 54 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 54 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 54 "pointer_to_struct.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table customers ( c varchar ( 50 ) , p int )", ECPGt_EOIT, ECPGt_EORT);
+#line 56 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 56 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 56 "pointer_to_struct.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'John Doe' , '12345' )", ECPGt_EOIT, ECPGt_EORT);
+#line 57 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 57 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 57 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "pointer_to_struct.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into customers values ( 'Jane Doe' , '67890' )", ECPGt_EOIT, ECPGt_EORT);
+#line 58 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 58 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 58 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 58 "pointer_to_struct.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,&(custs1->name),(long)50,(long)-1,sizeof( customer ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
+ ECPGt_int,&(custs1->phone),(long)1,(long)-1,sizeof( customer ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
+#line 60 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 60 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 60 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 60 "pointer_to_struct.pgc"
+
+ printf("custs1:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs1[r].name.arr );
+ printf( "phone - %d\n", custs1[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,&(custs2->name),(long)50,(long)-1,sizeof( customer2 ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
+ ECPGt_int,&(custs2->phone),(long)1,(long)-1,sizeof( customer2 ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
+#line 68 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 68 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 68 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 68 "pointer_to_struct.pgc"
+
+ printf("\ncusts2:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs2[r].name.arr );
+ printf( "phone - %d\n", custs2[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 2", ECPGt_EOIT,
+ ECPGt_char,&(custs3->name),(long)50,(long)-1,sizeof( struct customer3 ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
+ ECPGt_int,&(custs3->phone),(long)1,(long)-1,sizeof( struct customer3 ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
+#line 76 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 76 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 76 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 76 "pointer_to_struct.pgc"
+
+ printf("\ncusts3:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs3[r].name );
+ printf( "phone - %d\n", custs3[r].phone );
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 1", ECPGt_EOIT,
+ ECPGt_varchar,&(custs4->name),(long)50,(long)-1,sizeof( struct customer4 ),
+ ECPGt_short,&(inds->name_ind),(long)1,(long)-1,sizeof( struct ind ),
+ ECPGt_int,&(custs4->phone),(long)1,(long)-1,sizeof( struct customer4 ),
+ ECPGt_short,&(inds->phone_ind),(long)1,(long)-1,sizeof( struct ind ), ECPGt_EORT);
+#line 84 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 84 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 84 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 84 "pointer_to_struct.pgc"
+
+ printf("\ncusts4:\n");
+ printf( "name - %s\n", custs4->name.arr );
+ printf( "phone - %d\n", custs4->phone );
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c from customers limit 2", ECPGt_EOIT,
+ ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_4),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 89 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 89 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 89 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 89 "pointer_to_struct.pgc"
+
+ printf("\nname:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", onlyname[r].arr );
+ }
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 96 "pointer_to_struct.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 96 "pointer_to_struct.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 96 "pointer_to_struct.pgc"
+
+
+ /* All the memory will anyway be freed at the end */
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
new file mode 100644
index 0000000..7076408
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stderr
@@ -0,0 +1,86 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: create table customers ( c varchar ( 50 ) , p int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: insert into customers values ( 'John Doe' , '12345' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: query: insert into customers values ( 'Jane Doe' , '67890' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 58: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 68: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 68: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 68: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 68: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 68: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: select * from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: correctly got 2 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 76: RESULT: 67890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: query: select * from customers limit 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 84: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 84: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 84: RESULT: 12345 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 89: query: select c from customers limit 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 89: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 89: correctly got 2 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 89: RESULT: John Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 89: RESULT: Jane Doe offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stdout b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stdout
new file mode 100644
index 0000000..23f41ff
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.stdout
@@ -0,0 +1,25 @@
+custs1:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs2:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs3:
+name - John Doe
+phone - 12345
+name - Jane Doe
+phone - 67890
+
+custs4:
+name - John Doe
+phone - 12345
+
+name:
+name - John Doe
+name - Jane Doe
diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.c b/src/interfaces/ecpg/test/expected/preproc-strings.c
new file mode 100644
index 0000000..a268179
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-strings.c
@@ -0,0 +1,82 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "strings.pgc"
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 3 "strings.pgc"
+/* exec sql begin declare section */
+#line 1 "strings.h"
+
+
+
+
+
+
+
+
+
+#line 5 "strings.pgc"
+
+#line 1 "strings.h"
+ char * s1 , * s2 , * s3 , * s4 , * s5 , * s6 , * s7 , * s8 ;
+/* exec sql end declare section */
+#line 5 "strings.pgc"
+
+
+int main(void)
+{
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 11 "strings.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to on", ECPGt_EOIT, ECPGt_EORT);}
+#line 13 "strings.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 'abc''d\\ef' , N'abc''d\\ef' as foo , E'abc''d\\\\ef' as \"foo\"\"bar\" , U&'d\\0061t\\0061' as U&\"foo\"\"bar\" , U&'d!+000061t!+000061' UESCAPE '!' , $foo$abc$def$foo$", ECPGt_EOIT,
+ ECPGt_char,&(s1),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s2),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s3),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s4),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s5),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s6),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 21 "strings.pgc"
+
+
+ printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select b'0010' , x'019ABcd'", ECPGt_EOIT,
+ ECPGt_char,&(s7),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(s8),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 26 "strings.pgc"
+
+
+ printf("%s %s\n", s7, s8);
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 30 "strings.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.stderr b/src/interfaces/ecpg/test/expected/preproc-strings.stderr
new file mode 100644
index 0000000..8364d6b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-strings.stderr
@@ -0,0 +1,56 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 13: query: set standard_conforming_strings to on; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 13: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 13: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 15: query: select 'abc''d\ef' , N'abc''d\ef' as foo , E'abc''d\\ef' as "foo""bar" , U&'d\0061t\0061' as U&"foo""bar" , U&'d!+000061t!+000061' UESCAPE '!' , $foo$abc$def$foo$; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 15: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 15: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: abc'd\ef offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: abc'd\ef offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: abc'd\ef offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: data offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: data offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 15: RESULT: abc$def offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: select b'0010' , x'019ABcd'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 25: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 25: RESULT: 0010 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 25: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 25: RESULT: 0000000110011010101111001101 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.stdout b/src/interfaces/ecpg/test/expected/preproc-strings.stdout
new file mode 100644
index 0000000..5abbe69
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-strings.stdout
@@ -0,0 +1,2 @@
+abc'd\ef abc'd\ef abc'd\ef data data abc$def
+0010 0000000110011010101111001101
diff --git a/src/interfaces/ecpg/test/expected/preproc-type.c b/src/interfaces/ecpg/test/expected/preproc-type.c
new file mode 100644
index 0000000..1968a87
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-type.c
@@ -0,0 +1,170 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "type.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "type.pgc"
+
+
+typedef long mmInteger ;
+
+#line 6 "type.pgc"
+
+#line 6 "type.pgc"
+
+typedef char mmChar ;
+
+#line 7 "type.pgc"
+
+#line 7 "type.pgc"
+
+typedef short mmSmallInt ;
+
+#line 8 "type.pgc"
+
+#line 8 "type.pgc"
+
+
+/* exec sql type string is char [ 11 ] */
+#line 10 "type.pgc"
+
+typedef char string[11];
+
+/* exec sql type c is char reference */
+#line 13 "type.pgc"
+
+typedef char* c;
+
+/* exec sql begin declare section */
+
+
+
+
+
+
+struct TBempl {
+#line 19 "type.pgc"
+ mmInteger idnum ;
+
+#line 20 "type.pgc"
+ mmChar name [ 21 ] ;
+
+#line 21 "type.pgc"
+ mmSmallInt accs ;
+ } ;/* exec sql end declare section */
+#line 23 "type.pgc"
+
+
+int
+main (void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+#line 29 "type.pgc"
+ struct TBempl empl ;
+
+#line 30 "type.pgc"
+ string str ;
+
+#line 31 "type.pgc"
+ c ptr = NULL ;
+
+#line 36 "type.pgc"
+ struct varchar {
+#line 34 "type.pgc"
+ int len ;
+
+#line 35 "type.pgc"
+ char text [ 10 ] ;
+ } vc ;
+/* exec sql end declare section */
+#line 37 "type.pgc"
+
+
+ /* exec sql var vc is [ 10 ] */
+#line 39 "type.pgc"
+
+ ECPGdebug (1, stderr);
+
+ empl.idnum = 1;
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 43 "type.pgc"
+
+ if (sqlca.sqlcode)
+ {
+ printf ("connect error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , string1 char ( 10 ) , string2 char ( 10 ) , string3 char ( 10 ) )", ECPGt_EOIT, ECPGt_EORT);}
+#line 51 "type.pgc"
+
+ if (sqlca.sqlcode)
+ {
+ printf ("create error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into empl values ( 1 , 'user name' , 320 , 'first str' , 'second str' , 'third str' )", ECPGt_EOIT, ECPGt_EORT);}
+#line 58 "type.pgc"
+
+ if (sqlca.sqlcode)
+ {
+ printf ("insert error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select idnum , name , accs , string1 , string2 , string3 from empl where idnum = $1 ",
+ ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof( struct TBempl ),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(empl.name),(long)21,(long)1,sizeof( struct TBempl ),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof( struct TBempl ),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(str),(long)11,(long)1,(11)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(ptr),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_varchar,&(vc),(long)10,(long)1,sizeof(struct varchar),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 68 "type.pgc"
+
+ if (sqlca.sqlcode)
+ {
+ printf ("select error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+ printf ("id=%ld name='%s' accs=%d str='%s' ptr='%s' vc='%10.10s'\n", empl.idnum, empl.name, empl.accs, str, ptr, vc.text);
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 76 "type.pgc"
+
+
+ free(ptr);
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-type.stderr b/src/interfaces/ecpg/test/expected/preproc-type.stderr
new file mode 100644
index 0000000..678ecef
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-type.stderr
@@ -0,0 +1,40 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: create table empl ( idnum integer , name char ( 20 ) , accs smallint , string1 char ( 10 ) , string2 char ( 10 ) , string3 char ( 10 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: query: insert into empl values ( 1 , 'user name' , 320 , 'first str' , 'second str' , 'third str' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 58: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: query: select idnum , name , accs , string1 , string2 , string3 from empl where idnum = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 65: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: user name offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: 320 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: first str offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 65: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: second str offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 65: RESULT: third str offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-type.stdout b/src/interfaces/ecpg/test/expected/preproc-type.stdout
new file mode 100644
index 0000000..ee220d4
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-type.stdout
@@ -0,0 +1 @@
+id=1 name='user name ' accs=320 str='first str ' ptr='second str' vc='third str '
diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c
new file mode 100644
index 0000000..3954f83
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-variable.c
@@ -0,0 +1,276 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "variable.pgc"
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "variable.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 6 "variable.pgc"
+
+
+/* exec sql type c is char reference */
+#line 8 "variable.pgc"
+
+typedef char* c;
+
+/* exec sql type ind is union {
+#line 11 "variable.pgc"
+ int integer ;
+
+#line 11 "variable.pgc"
+ short smallint ;
+ } */
+#line 11 "variable.pgc"
+
+typedef union { int integer; short smallint; } ind;
+
+#define BUFFERSIZ 8
+/* exec sql type str is [ BUFFERSIZ ] */
+#line 15 "variable.pgc"
+
+
+/* declare cur cursor for select name , born , age , married , children from family */
+#line 18 "variable.pgc"
+
+
+int
+main (void)
+{
+ struct birthinfo {
+#line 23 "variable.pgc"
+ long born ;
+
+#line 23 "variable.pgc"
+ short age ;
+ } ;
+#line 23 "variable.pgc"
+
+/* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+#line 27 "variable.pgc"
+ struct personal_struct {
+#line 25 "variable.pgc"
+ struct varchar_1 { int len; char arr[ BUFFERSIZ ]; } name ;
+
+#line 26 "variable.pgc"
+ struct birthinfo birth ;
+ } personal , * p ;
+
+#line 30 "variable.pgc"
+ struct personal_indicator {
+#line 28 "variable.pgc"
+ int ind_name ;
+
+#line 29 "variable.pgc"
+ struct birthinfo ind_birth ;
+ } ind_personal , * i ;
+
+#line 31 "variable.pgc"
+ ind ind_children ;
+ struct t1 {
+#line 32 "variable.pgc"
+ struct varchar_2 { int len; char arr[ BUFFERSIZ ]; } name ;
+ } ; struct t2 {
+#line 32 "variable.pgc"
+ struct varchar_3 { int len; char arr[ BUFFERSIZ ]; } name ;
+ } ;/* exec sql end declare section */
+#line 33 "variable.pgc"
+
+
+
+#line 35 "variable.pgc"
+ char * married = NULL ;
+
+#line 35 "variable.pgc"
+
+
+#line 36 "variable.pgc"
+ long ind_married ;
+
+#line 36 "variable.pgc"
+
+
+#line 37 "variable.pgc"
+ ind children ;
+
+#line 37 "variable.pgc"
+
+ int loopcount;
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 44 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 44 "variable.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 47 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 47 "variable.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer )", ECPGt_EOIT, ECPGt_EORT);
+#line 50 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 50 "variable.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 )", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 53 "variable.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 )", ECPGt_EOIT, ECPGt_EORT);
+#line 54 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 54 "variable.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 1' , 16 )", ECPGt_EOIT, ECPGt_EORT);
+#line 55 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "variable.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 2' , 14 )", ECPGt_EOIT, ECPGt_EORT);
+#line 56 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 56 "variable.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 3' , 9 )", ECPGt_EOIT, ECPGt_EORT);
+#line 57 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 57 "variable.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 60 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 60 "variable.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select name , born , age , married , children from family", ECPGt_EOIT, ECPGt_EORT);
+#line 63 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 63 "variable.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 65 "variable.pgc"
+
+
+ p=&personal;
+ i=&ind_personal;
+ memset(i, 0, sizeof(ind_personal));
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur", ECPGt_EOIT,
+ ECPGt_varchar,&(p->name),(long)BUFFERSIZ,(long)-1,sizeof( struct birthinfo ),
+ ECPGt_int,&(i->ind_name),(long)1,(long)-1,sizeof( struct birthinfo ),
+ ECPGt_long,&(p->birth.born),(long)1,(long)1,sizeof( struct birthinfo ),
+ ECPGt_long,&(i->ind_birth.born),(long)1,(long)1,sizeof( struct birthinfo ),
+ ECPGt_short,&(p->birth.age),(long)1,(long)1,sizeof( struct birthinfo ),
+ ECPGt_short,&(i->ind_birth.age),(long)1,(long)1,sizeof( struct birthinfo ),
+ ECPGt_char,&(married),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_long,&(ind_married),(long)1,(long)1,sizeof(long),
+ ECPGt_int,&(children.integer),(long)1,(long)1,sizeof(int),
+ ECPGt_short,&(ind_children.smallint),(long)1,(long)1,sizeof(short), ECPGt_EORT);
+#line 72 "variable.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 72 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 72 "variable.pgc"
+
+ printf("%8.8s", personal.name.arr);
+ if (i->ind_birth.born >= 0)
+ printf(", born %ld", personal.birth.born);
+ if (i->ind_birth.age >= 0)
+ printf(", age = %d", personal.birth.age);
+ if (ind_married >= 0)
+ printf(", married %s", married);
+ if (ind_children.smallint >= 0)
+ printf(", children = %d", children.integer);
+ putchar('\n');
+
+ free(married);
+ married = NULL;
+ }
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT);
+#line 89 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 89 "variable.pgc"
+
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table family", ECPGt_EOIT, ECPGt_EORT);
+#line 92 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 92 "variable.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 95 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 95 "variable.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 98 "variable.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 98 "variable.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.stderr b/src/interfaces/ecpg/test/expected/preproc-variable.stderr
new file mode 100644
index 0000000..08cdcc6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-variable.stderr
@@ -0,0 +1,168 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 47: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: query: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 50: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 50: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: query: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: insert into family ( name , age ) values ( 'Child 1' , 16 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: insert into family ( name , age ) values ( 'Child 2' , 14 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: insert into family ( name , age ) values ( 'Child 3' , 9 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 60: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: query: declare cur cursor for select name , born , age , married , children from family; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 63: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Mum offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 1987-07-14 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Dad offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 19610721 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 1987-07-14 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Child 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 16 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Child 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 14 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 1 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: Child 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: 9 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: correctly got 0 tuples with 5 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 72: no data found on line 72
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 89: query: close cur; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 89: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 89: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 92: query: drop table family; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 92: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 92: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 95: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.stdout b/src/interfaces/ecpg/test/expected/preproc-variable.stdout
new file mode 100644
index 0000000..f4ee9c3
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-variable.stdout
@@ -0,0 +1,5 @@
+Mum , married 1987-07-14, children = 3
+Dad , born 19610721, married 1987-07-14, children = 3
+Child 1 , age = 16
+Child 2 , age = 14
+Child 3 , age = 9
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.c b/src/interfaces/ecpg/test/expected/preproc-whenever.c
new file mode 100644
index 0000000..861d84f
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever.c
@@ -0,0 +1,246 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "whenever.pgc"
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 3 "whenever.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 5 "whenever.pgc"
+
+
+static void print(const char *msg)
+{
+ fprintf(stderr, "Error in statement '%s':\n", msg);
+ sqlprint();
+}
+
+static void print2(void)
+{
+ fprintf(stderr, "Found another error\n");
+ sqlprint();
+}
+
+static void warn(void)
+{
+ fprintf(stderr, "Warning: At least one column was truncated\n");
+}
+
+int main(void)
+{
+
+#line 26 "whenever.pgc"
+ int i ;
+
+#line 26 "whenever.pgc"
+
+
+#line 27 "whenever.pgc"
+ char c [ 6 ] ;
+
+#line 27 "whenever.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 31 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 31 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( i int , c char ( 10 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 1 , 'abcdefghij' )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 33 "whenever.pgc"
+
+
+ /* exec sql whenever sql_warning do warn ( ) ; */
+#line 35 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from test", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(c),(long)6,(long)1,(6)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 36 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 36 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 37 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 37 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 37 "whenever.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistent", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 39 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 39 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 39 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 40 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 40 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 40 "whenever.pgc"
+
+
+ /* exec sql whenever sqlerror do print ( \"select\" ) ; */
+#line 42 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistent", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 43 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 43 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) print ( "select" );}
+#line 43 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 44 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 44 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) print ( "select" );}
+#line 44 "whenever.pgc"
+
+
+ /* exec sql whenever sqlerror call print2 ( ) ; */
+#line 46 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistent", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 47 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 47 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) print2 ( );}
+#line 47 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 48 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 48 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) print2 ( );}
+#line 48 "whenever.pgc"
+
+
+ /* exec sql whenever sqlerror continue ; */
+#line 50 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistent", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 51 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );}
+#line 51 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 52 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );}
+#line 52 "whenever.pgc"
+
+
+ /* exec sql whenever sqlerror goto error ; */
+#line 54 "whenever.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from nonexistent", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 55 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 55 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) goto error;}
+#line 55 "whenever.pgc"
+
+ printf("Should not be reachable\n");
+
+ error:
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 59 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 59 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) goto error;}
+#line 59 "whenever.pgc"
+
+
+ /* exec sql whenever sqlerror stop ; */
+#line 61 "whenever.pgc"
+
+ /* This cannot fail, thus we don't get an exit value not equal 0. */
+ /* However, it still test the precompiler output. */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 1", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 64 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 64 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 64 "whenever.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 65 "whenever.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') warn ( );
+#line 65 "whenever.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 65 "whenever.pgc"
+
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.stderr b/src/interfaces/ecpg/test/expected/preproc-whenever.stderr
new file mode 100644
index 0000000..03e94a6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever.stderr
@@ -0,0 +1,104 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: create table test ( i int , c char ( 10 ) ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: insert into test values ( 1 , 'abcdefghij' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: select * from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: abcdefghij offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+Warning: At least one column was truncated
+[NO_PID]: ECPGtrans on line 37: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: select * from nonexistent; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 39: bad response - ERROR: relation "nonexistent" does not exist
+LINE 1: select * from nonexistent
+ ^
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 42P01 (sqlcode -400): relation "nonexistent" does not exist on line 39
+[NO_PID]: sqlca: code: -400, state: 42P01
+SQL error: relation "nonexistent" does not exist on line 39
+[NO_PID]: ECPGtrans on line 40: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 43: query: select * from nonexistent; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 43: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 43: bad response - ERROR: relation "nonexistent" does not exist
+LINE 1: select * from nonexistent
+ ^
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 42P01 (sqlcode -400): relation "nonexistent" does not exist on line 43
+[NO_PID]: sqlca: code: -400, state: 42P01
+Error in statement 'select':
+SQL error: relation "nonexistent" does not exist on line 43
+[NO_PID]: ECPGtrans on line 44: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: query: select * from nonexistent; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 47: bad response - ERROR: relation "nonexistent" does not exist
+LINE 1: select * from nonexistent
+ ^
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 42P01 (sqlcode -400): relation "nonexistent" does not exist on line 47
+[NO_PID]: sqlca: code: -400, state: 42P01
+Found another error
+SQL error: relation "nonexistent" does not exist on line 47
+[NO_PID]: ECPGtrans on line 48: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: select * from nonexistent; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 51: bad response - ERROR: relation "nonexistent" does not exist
+LINE 1: select * from nonexistent
+ ^
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 42P01 (sqlcode -400): relation "nonexistent" does not exist on line 51
+[NO_PID]: sqlca: code: -400, state: 42P01
+[NO_PID]: ECPGtrans on line 52: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: select * from nonexistent; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_check_PQresult on line 55: bad response - ERROR: relation "nonexistent" does not exist
+LINE 1: select * from nonexistent
+ ^
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlstate 42P01 (sqlcode -400): relation "nonexistent" does not exist on line 55
+[NO_PID]: sqlca: code: -400, state: 42P01
+[NO_PID]: ECPGtrans on line 59: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: select 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 64: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 65: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.stdout b/src/interfaces/ecpg/test/expected/preproc-whenever.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever.stdout
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.c b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.c
new file mode 100644
index 0000000..56354ba
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.c
@@ -0,0 +1,164 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "whenever_do_continue.pgc"
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 3 "whenever_do_continue.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 5 "whenever_do_continue.pgc"
+
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+#line 15 "whenever_do_continue.pgc"
+ struct {
+#line 12 "whenever_do_continue.pgc"
+ char ename [ 12 ] ;
+
+#line 13 "whenever_do_continue.pgc"
+ float sal ;
+
+#line 14 "whenever_do_continue.pgc"
+ float comm ;
+ } emp ;
+
+#line 16 "whenever_do_continue.pgc"
+ int loopcount ;
+
+#line 17 "whenever_do_continue.pgc"
+ char msg [ 128 ] ;
+/* exec sql end declare section */
+#line 18 "whenever_do_continue.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 23 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 23 "whenever_do_continue.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table emp ( ename varchar , sal double precision , comm double precision )", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 26 "whenever_do_continue.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into emp values ( 'Ram' , 111100 , 21 )", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 29 "whenever_do_continue.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into emp values ( 'aryan' , 11110 , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 30 "whenever_do_continue.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into emp values ( 'josh' , 10000 , 10 )", ECPGt_EOIT, ECPGt_EORT);
+#line 31 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 31 "whenever_do_continue.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into emp values ( 'tom' , 20000 , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 32 "whenever_do_continue.pgc"
+
+
+ /* declare c cursor for select ename , sal , comm from emp order by ename collate \"C\" asc */
+#line 34 "whenever_do_continue.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c cursor for select ename , sal , comm from emp order by ename collate \"C\" asc", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 36 "whenever_do_continue.pgc"
+
+
+ /* The 'BREAK' condition to exit the loop. */
+ /* exec sql whenever not found break ; */
+#line 39 "whenever_do_continue.pgc"
+
+
+ /* The DO CONTINUE makes the loop start at the next iteration when an error occurs.*/
+ /* exec sql whenever sqlerror continue ; */
+#line 42 "whenever_do_continue.pgc"
+
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch c", ECPGt_EOIT,
+ ECPGt_char,&(emp.ename),(long)12,(long)1,(12)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(emp.sal),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_float,&(emp.comm),(long)1,(long)1,sizeof(float),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 46 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 46 "whenever_do_continue.pgc"
+
+if (sqlca.sqlcode < 0) continue;}
+#line 46 "whenever_do_continue.pgc"
+
+ /* The employees with non-NULL commissions will be displayed. */
+ printf("%s %7.2f %9.2f\n", emp.ename, emp.sal, emp.comm);
+ }
+
+ /*
+ * This 'CONTINUE' shuts off the 'DO CONTINUE' and allow the program to
+ * proceed if any further errors do occur.
+ */
+ /* exec sql whenever sqlerror continue ; */
+#line 55 "whenever_do_continue.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close c", ECPGt_EOIT, ECPGt_EORT);}
+#line 57 "whenever_do_continue.pgc"
+
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table emp", ECPGt_EOIT, ECPGt_EORT);}
+#line 60 "whenever_do_continue.pgc"
+
+
+ exit(0);
+}
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stderr b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stderr
new file mode 100644
index 0000000..46bc4a5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stderr
@@ -0,0 +1,112 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: create table emp ( ename varchar , sal double precision , comm double precision ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: insert into emp values ( 'Ram' , 111100 , 21 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: insert into emp values ( 'aryan' , 11110 , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: insert into emp values ( 'josh' , 10000 , 10 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: insert into emp values ( 'tom' , 20000 , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: declare c cursor for select ename , sal , comm from emp order by ename collate "C" asc; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: Ram offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 111100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 21 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: aryan offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 11110 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -213 on line 46: null value without indicator on line 46
+[NO_PID]: sqlca: code: -213, state: 22002
+[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: josh offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 10000 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 10 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: tom offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: 20000 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -213 on line 46: null value without indicator on line 46
+[NO_PID]: sqlca: code: -213, state: 22002
+[NO_PID]: ecpg_execute on line 46: query: fetch c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 46: no data found on line 46
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 57: query: close c; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: query: drop table emp; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stdout b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stdout
new file mode 100644
index 0000000..d6ac5a0
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever_do_continue.stdout
@@ -0,0 +1,2 @@
+Ram 111100.00 21.00
+josh 10000.00 10.00
diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c
new file mode 100644
index 0000000..e48f5fa
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-array.c
@@ -0,0 +1,355 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "array.pgc"
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <pgtypes_date.h>
+#include <pgtypes_interval.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_timestamp.h>
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 10 "array.pgc"
+
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 12 "array.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 13 "array.pgc"
+
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+
+
+#line 19 "array.pgc"
+ int i = 1 , j ;
+
+#line 20 "array.pgc"
+ int * did = & i ;
+
+#line 21 "array.pgc"
+ short a [ 10 ] = { 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 } ;
+
+#line 22 "array.pgc"
+ timestamp ts [ 10 ] ;
+
+#line 23 "array.pgc"
+ date d [ 10 ] ;
+
+#line 24 "array.pgc"
+ interval in [ 10 ] ;
+
+#line 25 "array.pgc"
+ numeric n [ 10 ] ;
+
+#line 26 "array.pgc"
+ char text [ 25 ] = "klmnopqrst" ;
+
+#line 27 "array.pgc"
+ char * t = ( char * ) malloc ( 11 ) ;
+
+#line 28 "array.pgc"
+ double f ;
+/* exec sql end declare section */
+#line 29 "array.pgc"
+
+
+ strcpy(t, "0123456789");
+ setlocale(LC_ALL, "C");
+
+ ECPGdebug(1, stderr);
+
+ for (j = 0; j < 10; j++) {
+ char str[28];
+ numeric *value;
+ interval *inter;
+
+ sprintf(str, "2000-1-1 0%d:00:00", j);
+ ts[j] = PGTYPEStimestamp_from_asc(str, NULL);
+ sprintf(str, "2000-1-1%d\n", j);
+ d[j] = PGTYPESdate_from_asc(str, NULL);
+ sprintf(str, "%d hours", j+10);
+ inter = PGTYPESinterval_from_asc(str, NULL);
+ in[j] = *inter;
+ value = PGTYPESnumeric_new();
+ PGTYPESnumeric_from_int(j, value);
+ n[j] = *value;
+ }
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 53 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "array.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "on", NULL);
+#line 55 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 55 "array.pgc"
+
+
+ { ECPGtrans(__LINE__, NULL, "begin work");
+#line 57 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "array.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) , ts timestamp [ 10 ] , n numeric [ 10 ] , d date [ 10 ] , inter interval [ 10 ] )", ECPGt_EOIT, ECPGt_EORT);
+#line 59 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 59 "array.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( f , i , a , text , ts , n , d , inter ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' , $1 , $2 , $3 , $4 )",
+ ECPGt_timestamp,&(ts),(long)1,(long)10,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(n),(long)1,(long)10,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(d),(long)1,(long)10,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_interval,&(in),(long)1,(long)10,sizeof(interval),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 61 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 61 "array.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( f , i , a , text , ts , n , d , inter ) values ( 140787.0 , 2 , $1 , $2 , $3 , $4 , $5 , $6 )",
+ ECPGt_short,(a),(long)1,(long)10,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(text),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(ts),(long)1,(long)10,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(n),(long)1,(long)10,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(d),(long)1,(long)10,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_interval,&(in),(long)1,(long)10,sizeof(interval),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 63 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 63 "array.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( f , i , a , text , ts , n , d , inter ) values ( 14.07 , $1 , $2 , $3 , $4 , $5 , $6 , $7 )",
+ ECPGt_int,&(did),(long)1,(long)0,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,(a),(long)1,(long)10,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(t),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(ts),(long)1,(long)10,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(n),(long)1,(long)10,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(d),(long)1,(long)10,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_interval,&(in),(long)1,(long)10,sizeof(interval),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 65 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 65 "array.pgc"
+
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 67 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 67 "array.pgc"
+
+
+ for (j = 0; j < 10; j++) {
+ ts[j] = PGTYPEStimestamp_from_asc("1900-01-01 00:00:00", NULL);
+ d[j] = PGTYPESdate_from_asc("1900-01-01", NULL);
+ in[j] = *PGTYPESinterval_new();
+ n[j] = *PGTYPESnumeric_new();
+ }
+ { ECPGtrans(__LINE__, NULL, "begin work");
+#line 75 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 75 "array.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select f , text from test where i = 1", ECPGt_EOIT,
+ ECPGt_double,&(f),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(text),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 80 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 80 "array.pgc"
+
+
+ printf("Found f=%f text=%10.10s\n", f, text);
+
+ f=140787;
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select a , text , ts , n , d , inter from test where f = $1 ",
+ ECPGt_double,&(f),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_short,(a),(long)1,(long)10,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,&(t),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_timestamp,&(ts),(long)1,(long)10,sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_numeric,&(n),(long)1,(long)10,sizeof(numeric),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_date,&(d),(long)1,(long)10,sizeof(date),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_interval,&(in),(long)1,(long)10,sizeof(interval),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 88 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 88 "array.pgc"
+
+
+ for (i = 0; i < 10; i++)
+ printf("Found a[%d] = %d ts[%d] = %s n[%d] = %s d[%d] = %s in[%d] = %s\n", i, a[i], i, PGTYPEStimestamp_to_asc(ts[i]), i, PGTYPESnumeric_to_asc(&(n[i]), -1), i, PGTYPESdate_to_asc(d[i]), i, PGTYPESinterval_to_asc(&(in[i])));
+
+ printf("Found text=%10.10s\n", t);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select a from test where f = $1 ",
+ ECPGt_double,&(f),(long)1,(long)1,sizeof(double),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_char,(text),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 98 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 98 "array.pgc"
+
+
+ printf("Found text=%s\n", text);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 102 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 102 "array.pgc"
+
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 104 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 104 "array.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 106 "array.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 106 "array.pgc"
+
+
+ free(t);
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-array.stderr b/src/interfaces/ecpg/test/expected/sql-array.stderr
new file mode 100644
index 0000000..be67d47
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-array.stderr
@@ -0,0 +1,130 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 55: action "on"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 57: action "begin work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: query: create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) , ts timestamp [ 10 ] , n numeric [ 10 ] , d date [ 10 ] , inter interval [ 10 ] ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 59: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' , $1 , $2 , $3 , $4 ); with 4 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 61: parameter 1 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 61: parameter 2 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 61: parameter 3 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 61: parameter 4 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 61: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 140787.0 , 2 , $1 , $2 , $3 , $4 , $5 , $6 ); with 6 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 63: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 1 = {9,8,7,6,5,4,3,2,1,0}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 2 = klmnopqrst
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 3 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 4 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 5 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 63: parameter 6 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 63: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 14.07 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ); with 7 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 2 = {9,8,7,6,5,4,3,2,1,0}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 3 = 0123456789
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 4 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 5 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 6 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 65: parameter 7 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours}
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 65: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 67: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 75: action "begin work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: query: select f , text from test where i = 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 77: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 77: RESULT: 14.07 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 77: RESULT: 0123456789 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: query: select a , text , ts , n , d , inter from test where f = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 85: parameter 1 = 140787
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 85: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_is_type_an_array on line 85: type (1007); C (3); array (yes)
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: klmnopqrst offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_is_type_an_array on line 85: type (1115); C (19); array (yes)
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: {"Sat Jan 01 00:00:00 2000","Sat Jan 01 01:00:00 2000","Sat Jan 01 02:00:00 2000","Sat Jan 01 03:00:00 2000","Sat Jan 01 04:00:00 2000","Sat Jan 01 05:00:00 2000","Sat Jan 01 06:00:00 2000","Sat Jan 01 07:00:00 2000","Sat Jan 01 08:00:00 2000","Sat Jan 01 09:00:00 2000"} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_is_type_an_array on line 85: type (1231); C (16); array (yes)
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_is_type_an_array on line 85: type (1182); C (18); array (yes)
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: {01-10-2000,01-11-2000,01-12-2000,01-13-2000,01-14-2000,01-15-2000,01-16-2000,01-17-2000,01-18-2000,01-19-2000} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_is_type_an_array on line 85: type (1187); C (20); array (yes)
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 85: RESULT: {"@ 10 hours","@ 11 hours","@ 12 hours","@ 13 hours","@ 14 hours","@ 15 hours","@ 16 hours","@ 17 hours","@ 18 hours","@ 19 hours"} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 95: query: select a from test where f = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 95: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 95: parameter 1 = 140787
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 95: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 95: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 102: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 102: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 102: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 104: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-array.stdout b/src/interfaces/ecpg/test/expected/sql-array.stdout
new file mode 100644
index 0000000..e2a91b9
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-array.stdout
@@ -0,0 +1,13 @@
+Found f=14.070000 text=0123456789
+Found a[0] = 9 ts[0] = 2000-01-01 00:00:00 n[0] = 0.0 d[0] = 2000-01-10 in[0] = @ 10 hours
+Found a[1] = 8 ts[1] = 2000-01-01 01:00:00 n[1] = 1.0 d[1] = 2000-01-11 in[1] = @ 11 hours
+Found a[2] = 7 ts[2] = 2000-01-01 02:00:00 n[2] = 2.0 d[2] = 2000-01-12 in[2] = @ 12 hours
+Found a[3] = 6 ts[3] = 2000-01-01 03:00:00 n[3] = 3.0 d[3] = 2000-01-13 in[3] = @ 13 hours
+Found a[4] = 5 ts[4] = 2000-01-01 04:00:00 n[4] = 4.0 d[4] = 2000-01-14 in[4] = @ 14 hours
+Found a[5] = 4 ts[5] = 2000-01-01 05:00:00 n[5] = 5.0 d[5] = 2000-01-15 in[5] = @ 15 hours
+Found a[6] = 3 ts[6] = 2000-01-01 06:00:00 n[6] = 6.0 d[6] = 2000-01-16 in[6] = @ 16 hours
+Found a[7] = 2 ts[7] = 2000-01-01 07:00:00 n[7] = 7.0 d[7] = 2000-01-17 in[7] = @ 17 hours
+Found a[8] = 1 ts[8] = 2000-01-01 08:00:00 n[8] = 8.0 d[8] = 2000-01-18 in[8] = @ 18 hours
+Found a[9] = 0 ts[9] = 2000-01-01 09:00:00 n[9] = 9.0 d[9] = 2000-01-19 in[9] = @ 19 hours
+Found text=klmnopqrst
+Found text={9,8,7,6,5,4,3,2,1,0}
diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c
new file mode 100644
index 0000000..6d92ce3
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-binary.c
@@ -0,0 +1,230 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "binary.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "binary.pgc"
+
+
+/* exec sql begin declare section */
+
+
+
+
+
+
+
+struct TBempl {
+#line 9 "binary.pgc"
+ long idnum ;
+
+#line 10 "binary.pgc"
+ char name [ 21 ] ;
+
+#line 11 "binary.pgc"
+ short accs ;
+
+#line 12 "binary.pgc"
+ char byte [ 20 ] ;
+ } ;/* exec sql end declare section */
+#line 14 "binary.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 16 "binary.pgc"
+
+
+int
+main (void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+#line 22 "binary.pgc"
+ struct TBempl empl ;
+
+#line 23 "binary.pgc"
+ char * pointer = NULL ;
+
+#line 24 "binary.pgc"
+ char * data = "\\001\\155\\000\\212" ;
+/* exec sql end declare section */
+#line 25 "binary.pgc"
+
+ int i;
+
+ ECPGdebug (1, stderr);
+
+ empl.idnum = 1;
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 31 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 31 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set bytea_output = escape", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 32 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea )", ECPGt_EOIT, ECPGt_EORT);
+#line 34 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 34 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into empl values ( 1 , 'first user' , 320 , $1 )",
+ ECPGt_char,&(data),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 35 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 35 "binary.pgc"
+
+ ECPGset_var( 0, &( empl.idnum ), __LINE__);\
+ /* declare C cursor for select name , accs , byte from empl where idnum = $1 */
+#line 36 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 36 "binary.pgc"
+
+#line 36 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select name , accs , byte from empl where idnum = $1 ",
+ ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 37 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT,
+ ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 38 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "binary.pgc"
+
+ printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
+#line 41 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 41 "binary.pgc"
+
+
+ memset(empl.name, 0, 21L);
+ ECPGset_var( 1, &( empl.idnum ), __LINE__);\
+ /* declare B binary cursor for select name , accs , byte from empl where idnum = $1 */
+#line 44 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 44 "binary.pgc"
+
+#line 44 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ",
+ ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 45 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 45 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch B", ECPGt_EOIT,
+ ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 46 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 46 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close B", ECPGt_EOIT, ECPGt_EORT);
+#line 47 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 47 "binary.pgc"
+
+
+ /* do not print a.accs because big/little endian will have different outputs here */
+ printf ("name=%s, byte=", empl.name);
+ for (i=0; i<4; i++)
+ printf("(%o)", (unsigned char)empl.byte[i]);
+ printf("\n");
+
+ ECPGset_var( 2, &( empl.idnum ), __LINE__);\
+ /* declare A binary cursor for select byte from empl where idnum = $1 */
+#line 55 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 55 "binary.pgc"
+
+#line 55 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ",
+ ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 56 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 56 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch A", ECPGt_EOIT,
+ ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 57 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 57 "binary.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close A", ECPGt_EOIT, ECPGt_EORT);
+#line 58 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 58 "binary.pgc"
+
+
+ if (pointer) {
+ printf ("pointer=");
+ for (i=0; i<4; i++)
+ printf("(%o)", (unsigned char)pointer[i]);
+ printf("\n");
+ free(pointer);
+ }
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 68 "binary.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 68 "binary.pgc"
+
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stderr b/src/interfaces/ecpg/test/expected/sql-binary.stderr
new file mode 100644
index 0000000..28e5474
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-binary.stderr
@@ -0,0 +1,102 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: set bytea_output = escape; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into empl values ( 1 , 'first user' , 320 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 35: parameter 1 = \001\155\000\212
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: declare C cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 37: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 38: RESULT: first user offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 38: RESULT: 320 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 38: RESULT: \001m\000\212 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: close C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: query: declare B binary cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 45: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 45: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: fetch B; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: BINARY offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: BINARY offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: BINARY offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: query: close B; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 47: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 47: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: declare A binary cursor for select byte from empl where idnum = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 56: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: query: fetch A; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 57: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 57: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 57: allocating memory for 1 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 57: RESULT: BINARY offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: query: close A; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 58: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 58: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stdout b/src/interfaces/ecpg/test/expected/sql-binary.stdout
new file mode 100644
index 0000000..b2a94db
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-binary.stdout
@@ -0,0 +1,3 @@
+name=first user , accs=320 byte=\001m\000\212
+name=first user , byte=(1)(155)(0)(212)
+pointer=(1)(155)(0)(212)
diff --git a/src/interfaces/ecpg/test/expected/sql-bytea.c b/src/interfaces/ecpg/test/expected/sql-bytea.c
new file mode 100644
index 0000000..8338c60
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-bytea.c
@@ -0,0 +1,373 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "bytea.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "bytea.pgc"
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 7 "bytea.pgc"
+
+
+static void
+dump_binary(char *buf, int len, int ind)
+{
+ int i;
+
+ printf("len=%d, ind=%d, data=0x", len, ind);
+ for (i = 0; i < len; ++i)
+ printf("%02x", 0xff & buf[i]);
+ printf("\n");
+}
+
+#define DATA_SIZE 0x200
+#define LACK_SIZE 13
+#
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+#line 27 "bytea.pgc"
+ struct bytea_1 { int len; char arr[ 512 ]; } send_buf [ 2 ] ;
+
+#line 28 "bytea.pgc"
+ struct bytea_2 { int len; char arr[ DATA_SIZE ]; } recv_buf [ 2 ] ;
+
+#line 29 "bytea.pgc"
+ struct bytea_3 { int len; char arr[ DATA_SIZE ]; } * recv_vlen_buf ;
+
+#line 30 "bytea.pgc"
+ struct bytea_4 { int len; char arr[ DATA_SIZE - LACK_SIZE ]; } recv_short_buf ;
+
+#line 31 "bytea.pgc"
+ int ind [ 2 ] ;
+/* exec sql end declare section */
+#line 32 "bytea.pgc"
+
+ int i, j, c;
+
+#define init() { \
+ for (i = 0; i < 2; ++i) \
+ { \
+ memset(recv_buf[i].arr, 0x0, sizeof(recv_buf[i].arr)); \
+ recv_buf[i].len = 0; \
+ ind[i] = 0; \
+ } \
+ recv_vlen_buf = NULL, \
+ memset(recv_short_buf.arr, 0x0, sizeof(recv_short_buf.arr)); \
+} \
+while (0)
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; i < 2; ++i)
+ {
+ for (j = 0, c = 0xff; (c == -1 ? c = 0xff : 1), j < DATA_SIZE; ++j, --c)
+ send_buf[i].arr[j] = c;
+
+ send_buf[i].len = DATA_SIZE;
+ }
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 57 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "bytea.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table if not exists test ( data1 bytea , data2 bytea )", ECPGt_EOIT, ECPGt_EORT);
+#line 59 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 59 "bytea.pgc"
+
+
+ { ECPGprepare(__LINE__, NULL, 0, "ins_stmt", "insert into test values(?,?)");
+#line 61 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 61 "bytea.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "sel_stmt", "select data1,data2 from test");
+#line 62 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 62 "bytea.pgc"
+
+ ECPGallocate_desc(__LINE__, "idesc");
+#line 63 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 63 "bytea.pgc"
+
+ ECPGallocate_desc(__LINE__, "odesc");
+#line 64 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 64 "bytea.pgc"
+
+
+ /* Test for static sql statement with normal host variable, indicator */
+ init();
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 68 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 68 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1 , $2 )",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 69 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 69 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select data1 , data2 from test", ECPGt_EOIT,
+ ECPGt_bytea,&(recv_buf[0]),(long)DATA_SIZE,(long)1,sizeof(struct bytea_2),
+ ECPGt_int,&(ind[0]),(long)1,(long)1,sizeof(int),
+ ECPGt_bytea,&(recv_short_buf),(long)DATA_SIZE - LACK_SIZE,(long)1,sizeof(struct bytea_4),
+ ECPGt_int,&(ind[1]),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 70 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 70 "bytea.pgc"
+
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ /* Test for cursor */
+ init();
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 76 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 76 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1 , $2 )",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 77 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 77 "bytea.pgc"
+
+ ECPGset_var( 0, &( send_buf[0] ), __LINE__);\
+ /* declare cursor1 cursor for select data1 from test where data1 = $1 */
+#line 78 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 78 "bytea.pgc"
+
+#line 78 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cursor1 cursor for select data1 from test where data1 = $1 ",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 79 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 79 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from cursor1", ECPGt_EOIT,
+ ECPGt_bytea,&(recv_buf[0]),(long)DATA_SIZE,(long)1,sizeof(struct bytea_2),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 80 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 80 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cursor1", ECPGt_EOIT, ECPGt_EORT);
+#line 81 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 81 "bytea.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "cursor1");
+#line 82 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 82 "bytea.pgc"
+
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, 0);
+
+ /* Test for variable length array */
+ init();
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 87 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 87 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1 , $2 )",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 88 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 88 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1 , $2 )",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 89 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 89 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select data1 from test", ECPGt_EOIT,
+ ECPGt_bytea,&(recv_vlen_buf),(long)DATA_SIZE,(long)0,sizeof(struct bytea_3),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 90 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 90 "bytea.pgc"
+
+ dump_binary(recv_vlen_buf[0].arr, recv_vlen_buf[0].len, 0);
+ dump_binary(recv_vlen_buf[1].arr, recv_vlen_buf[1].len, 0);
+ free(recv_vlen_buf);
+
+ /* Test for dynamic sql statement with normal host variable, indicator */
+ init();
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 97 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 97 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "ins_stmt",
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 98 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 98 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "sel_stmt", ECPGt_EOIT,
+ ECPGt_bytea,&(recv_buf[0]),(long)DATA_SIZE,(long)1,sizeof(struct bytea_2),
+ ECPGt_int,&(ind[0]),(long)1,(long)1,sizeof(int),
+ ECPGt_bytea,&(recv_short_buf),(long)DATA_SIZE - LACK_SIZE,(long)1,sizeof(struct bytea_4),
+ ECPGt_int,&(ind[1]),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 99 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 99 "bytea.pgc"
+
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ /* Test for dynamic sql statement with sql descriptor */
+ init();
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 105 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 105 "bytea.pgc"
+
+ { ECPGset_desc(__LINE__, "idesc", 1,ECPGd_data,
+ ECPGt_bytea,&(send_buf[0]),(long)512,(long)1,sizeof(struct bytea_1), ECPGd_EODT);
+
+#line 106 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 106 "bytea.pgc"
+
+ { ECPGset_desc(__LINE__, "idesc", 2,ECPGd_data,
+ ECPGt_bytea,&(send_buf[1]),(long)512,(long)1,sizeof(struct bytea_1), ECPGd_EODT);
+
+#line 107 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 107 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "ins_stmt",
+ ECPGt_descriptor, "idesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 108 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 108 "bytea.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "sel_stmt", ECPGt_EOIT,
+ ECPGt_descriptor, "odesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 109 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 109 "bytea.pgc"
+
+ { ECPGget_desc(__LINE__, "odesc", 1,ECPGd_indicator,
+ ECPGt_int,&(ind[0]),(long)1,(long)1,sizeof(int), ECPGd_data,
+ ECPGt_bytea,&(recv_buf[0]),(long)DATA_SIZE,(long)1,sizeof(struct bytea_2), ECPGd_EODT);
+
+#line 110 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 110 "bytea.pgc"
+
+ { ECPGget_desc(__LINE__, "odesc", 2,ECPGd_indicator,
+ ECPGt_int,&(ind[1]),(long)1,(long)1,sizeof(int), ECPGd_data,
+ ECPGt_bytea,&(recv_short_buf),(long)DATA_SIZE - LACK_SIZE,(long)1,sizeof(struct bytea_4), ECPGd_EODT);
+
+#line 111 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 111 "bytea.pgc"
+
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 115 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 115 "bytea.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 116 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 116 "bytea.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 117 "bytea.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 117 "bytea.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-bytea.stderr b/src/interfaces/ecpg/test/expected/sql-bytea.stderr
new file mode 100644
index 0000000..cb828a7
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-bytea.stderr
@@ -0,0 +1,191 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: query: create table if not exists test ( data1 bytea , data2 bytea ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 59: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 61: name ins_stmt; query: "insert into test values($1,$2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 62: name sel_stmt; query: "select data1,data2 from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: query: truncate test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 68: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 68: OK: TRUNCATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: query: insert into test values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 69: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 69: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 69: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 69: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 70: query: select data1 , data2 from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 70: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 70: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 70: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 70: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: truncate test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: OK: TRUNCATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: query: insert into test values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 77: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 77: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 77: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 77: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 79: query: declare cursor1 cursor for select data1 from test where data1 = $1 ; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 79: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 79: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 79: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: query: fetch from cursor1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 80: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 80: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 80: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 81: query: close cursor1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 81: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 81: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode -230 on line 82: invalid statement name "cursor1" on line 82
+[NO_PID]: sqlca: code: -230, state: 26000
+SQL error: invalid statement name "cursor1" on line 82
+[NO_PID]: ecpg_execute on line 87: query: truncate test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 87: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 87: OK: TRUNCATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: query: insert into test values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 88: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 88: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 88: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 89: query: insert into test values ( $1 , $2 ); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 89: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 89: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 89: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 89: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 90: query: select data1 from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 90: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 90: correctly got 2 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 90: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 90: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 90: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 97: query: truncate test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 97: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 97: OK: TRUNCATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 98: query: insert into test values($1,$2); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 98: using PQexecPrepared for "insert into test values($1,$2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 98: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 98: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 98: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 99: query: select data1,data2 from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 99: using PQexecPrepared for "select data1,data2 from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 99: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 99: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 99: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 105: query: truncate test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 105: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 105: OK: TRUNCATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: query: insert into test values($1,$2); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: using PQexecPrepared for "insert into test values($1,$2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 108: parameter 1 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 108: parameter 2 = fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 108: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: query: select data1,data2 from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 109: using PQexecPrepared for "select data1,data2 from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 109: putting result (1 tuples) into descriptor odesc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 110: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 111: RESULT: \xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 115: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 115: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 115: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 116: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name sel_stmt
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name ins_stmt
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-bytea.stdout b/src/interfaces/ecpg/test/expected/sql-bytea.stdout
new file mode 100644
index 0000000..33e6100
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-bytea.stdout
@@ -0,0 +1,9 @@
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=499, ind=512, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=499, ind=512, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d
+len=512, ind=0, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
+len=499, ind=512, data=0xfffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1b0afaeadacabaaa9a8a7a6a5a4a3a2a1a09f9e9d9c9b9a999897969594939291908f8e8d8c8b8a898887868584838281807f7e7d7c7b7a797877767574737271706f6e6d6c6b6a696867666564636261605f5e5d5c5b5a595857565554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a191817161514131211100f0e0d
diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c
new file mode 100644
index 0000000..4c85530
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-code100.c
@@ -0,0 +1,164 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "code100.pgc"
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 1 "code100.pgc"
+
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "code100.pgc"
+
+
+
+int main()
+{ /* exec sql begin declare section */
+
+
+#line 9 "code100.pgc"
+ int index ;
+/* exec sql end declare section */
+#line 10 "code100.pgc"
+
+
+
+ ECPGdebug(1,stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 15 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( \"index\" numeric ( 3 ) primary key , \"payload\" int4 not null )", ECPGt_EOIT, ECPGt_EORT);}
+#line 20 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 22 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ for (index=0;index<10;++index)
+ { { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( payload , index ) values ( 0 , $1 )",
+ ECPGt_int,&(index),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
+#line 28 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ }
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 31 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "update test set payload = payload + 1 where index = - 1", ECPGt_EOIT, ECPGt_EORT);}
+#line 35 "code100.pgc"
+
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "delete from test where index = - 1", ECPGt_EOIT, ECPGt_EORT);}
+#line 38 "code100.pgc"
+
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( select * from test where index = - 1 )", ECPGt_EOIT, ECPGt_EORT);}
+#line 41 "code100.pgc"
+
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);}
+#line 44 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 46 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 49 "code100.pgc"
+
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-code100.stderr b/src/interfaces/ecpg/test/expected/sql-code100.stderr
new file mode 100644
index 0000000..a84332e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-code100.stderr
@@ -0,0 +1,128 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: query: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 18: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 22: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test ( payload , index ) values ( 0 , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 26: parameter 1 = 9
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 31: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: update test set payload = payload + 1 where index = - 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: OK: UPDATE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 34: no data found on line 34
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 38: query: delete from test where index = - 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: DELETE 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 38: no data found on line 38
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 41: query: insert into test ( select * from test where index = - 1 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 41: no data found on line 41
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 44: query: drop table test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 44: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 44: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 46: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-code100.stdout b/src/interfaces/ecpg/test/expected/sql-code100.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-code100.stdout
diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c
new file mode 100644
index 0000000..d2599fb
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c
@@ -0,0 +1,150 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "copystdout.pgc"
+#include <stdio.h>
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 3 "copystdout.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "copystdout.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 6 "copystdout.pgc"
+
+
+int
+main ()
+{
+ ECPGdebug (1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 13 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 13 "copystdout.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table foo ( a int , b varchar )", ECPGt_EOIT, ECPGt_EORT);
+#line 14 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 14 "copystdout.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 5 , 'abc' )", ECPGt_EOIT, ECPGt_EORT);
+#line 15 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 15 "copystdout.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 6 , 'def' )", ECPGt_EOIT, ECPGt_EORT);
+#line 16 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 16 "copystdout.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into foo values ( 7 , 'ghi' )", ECPGt_EOIT, ECPGt_EORT);
+#line 17 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 17 "copystdout.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "copy foo to stdout with delimiter ','", ECPGt_EOIT, ECPGt_EORT);
+#line 19 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 19 "copystdout.pgc"
+
+ printf ("copy to STDOUT : sqlca.sqlcode = %ld\n", sqlca.sqlcode);
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 22 "copystdout.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 22 "copystdout.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.stderr b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr
new file mode 100644
index 0000000..df53ce1
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr
@@ -0,0 +1,38 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 14: query: create table foo ( a int , b varchar ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 14: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 14: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 15: query: insert into foo values ( 5 , 'abc' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 15: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 15: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 16: query: insert into foo values ( 6 , 'def' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 16: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 16: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 17: query: insert into foo values ( 7 , 'ghi' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 17: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 17: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: query: copy foo to stdout with delimiter ','; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 19: COPY OUT data transfer in progress
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 19: got PGRES_COMMAND_OK after PGRES_COPY_OUT
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.stdout b/src/interfaces/ecpg/test/expected/sql-copystdout.stdout
new file mode 100644
index 0000000..4fbc432
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-copystdout.stdout
@@ -0,0 +1,4 @@
+5,abc
+6,def
+7,ghi
+copy to STDOUT : sqlca.sqlcode = 0
diff --git a/src/interfaces/ecpg/test/expected/sql-createtableas.c b/src/interfaces/ecpg/test/expected/sql-createtableas.c
new file mode 100644
index 0000000..973b463
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-createtableas.c
@@ -0,0 +1,164 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "createtableas.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "createtableas.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 8 "createtableas.pgc"
+
+
+int
+main(void)
+{
+ /* exec sql begin declare section */
+
+
+#line 14 "createtableas.pgc"
+ int id ;
+/* exec sql end declare section */
+#line 15 "createtableas.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 18 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 18 "createtableas.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "on", NULL);
+#line 20 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 20 "createtableas.pgc"
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 21 "createtableas.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 22 "createtableas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table cta_test ( id int )", ECPGt_EOIT, ECPGt_EORT);
+#line 24 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "createtableas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into cta_test values ( 100 )", ECPGt_EOIT, ECPGt_EORT);
+#line 25 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 25 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 25 "createtableas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table if not exists cta_test1 as select * from cta_test", ECPGt_EOIT, ECPGt_EORT);
+#line 27 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 27 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 27 "createtableas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select id from cta_test1", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 28 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 28 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 28 "createtableas.pgc"
+
+ printf("ID = %d\n", id);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table cta_test2 as select * from cta_test with no data", ECPGt_EOIT, ECPGt_EORT);
+#line 31 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 31 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 31 "createtableas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select count ( id ) from cta_test2", ECPGt_EOIT,
+ ECPGt_int,&(id),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 32 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 32 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "createtableas.pgc"
+
+ printf("ID = %d\n", id);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table cta_test", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 35 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "createtableas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table cta_test1", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 36 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "createtableas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table cta_test2", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 37 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 37 "createtableas.pgc"
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 38 "createtableas.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 38 "createtableas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "createtableas.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-createtableas.stderr b/src/interfaces/ecpg/test/expected/sql-createtableas.stderr
new file mode 100644
index 0000000..adb6711
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-createtableas.stderr
@@ -0,0 +1,66 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 20: action "on"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: create table cta_test ( id int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: insert into cta_test values ( 100 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: query: create table if not exists cta_test1 as select * from cta_test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 27: OK: SELECT 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: select id from cta_test1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 100 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: create table cta_test2 as select * from cta_test with no data; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: CREATE TABLE AS
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: select count ( id ) from cta_test2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: drop table cta_test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: drop table cta_test1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: drop table cta_test2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-createtableas.stdout b/src/interfaces/ecpg/test/expected/sql-createtableas.stdout
new file mode 100644
index 0000000..e27a3e9
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-createtableas.stdout
@@ -0,0 +1,2 @@
+ID = 100
+ID = 0
diff --git a/src/interfaces/ecpg/test/expected/sql-declare.c b/src/interfaces/ecpg/test/expected/sql-declare.c
new file mode 100644
index 0000000..6248d99
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-declare.c
@@ -0,0 +1,618 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "declare.pgc"
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 5 "declare.pgc"
+
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 7 "declare.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 8 "declare.pgc"
+
+
+#define ARRAY_SIZE 2
+
+void execute_test(void);
+void commitTable(void);
+void reset(void);
+void printResult(char *tc_name, int loop);
+
+/* exec sql begin declare section */
+
+
+
+
+#line 18 "declare.pgc"
+ int f1 [ ARRAY_SIZE ] ;
+
+#line 19 "declare.pgc"
+ int f2 [ ARRAY_SIZE ] ;
+
+#line 20 "declare.pgc"
+ char f3 [ ARRAY_SIZE ] [ 20 ] ;
+/* exec sql end declare section */
+#line 21 "declare.pgc"
+
+
+int main(void)
+{
+ setlocale(LC_ALL, "C");
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "con1", 0);
+#line 29 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 29 "declare.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg2_regression" , NULL, NULL , "con2", 0);
+#line 30 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 30 "declare.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 33 "declare.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "insert into source values ( 1 , 10 , 'db on con1' )", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "insert into source values ( 2 , 20 , 'db on con1' )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "declare.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "insert into source values ( 1 , 10 , 'db on con2' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "insert into source values ( 2 , 20 , 'db on con2' )", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 39 "declare.pgc"
+
+
+ commitTable();
+
+ execute_test();
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "drop table if exists source", ECPGt_EOIT, ECPGt_EORT);
+#line 45 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 45 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "drop table if exists source", ECPGt_EOIT, ECPGt_EORT);
+#line 46 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 46 "declare.pgc"
+
+
+ commitTable();
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 50 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "declare.pgc"
+
+
+ return 0;
+}
+
+/*
+ * default connection: con2
+ * Non-default connection: con1
+ *
+ */
+void execute_test(void)
+{
+ /* exec sql begin declare section */
+
+
+
+#line 63 "declare.pgc"
+ int i , count , length ;
+
+#line 64 "declare.pgc"
+ char * selectString = "SELECT f1,f2,f3 FROM source" ;
+/* exec sql end declare section */
+#line 65 "declare.pgc"
+
+
+ /*
+ * testcase1. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and CURSOR statement without using AT clause
+ */
+ reset();
+
+ /* declare \"stmt_1\" as an SQL identifier */
+#line 73 "declare.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "stmt_1", selectString);
+#line 74 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "declare.pgc"
+
+ /* declare cur_1 cursor for $1 */
+#line 75 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur_1 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "stmt_1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 76 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 76 "declare.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 78 "declare.pgc"
+
+ i = 0;
+ while (1)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur_1", ECPGt_EOIT,
+ ECPGt_int,&(f1[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(f2[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(f3[i]),(long)20,(long)1,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 82 "declare.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 82 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 82 "declare.pgc"
+
+ i++;
+ }
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur_1", ECPGt_EOIT, ECPGt_EORT);
+#line 85 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 85 "declare.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "stmt_1");
+#line 86 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 86 "declare.pgc"
+
+ /* exec sql whenever not found continue ; */
+#line 87 "declare.pgc"
+
+
+ printResult("testcase1", 2);
+
+
+ /*
+ * testcase2. using DECLARE STATEMENT at con1,
+ * using PREPARE and CURSOR statement without using AT clause
+ */
+ reset();
+
+ /* declare \"stmt_2\" as an SQL identifier */
+#line 98 "declare.pgc"
+
+ { ECPGprepare(__LINE__, "con1", 0, "stmt_2", selectString);
+#line 99 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 99 "declare.pgc"
+
+ /* declare cur_2 cursor for $1 */
+#line 100 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "declare cur_2 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement("con1", "stmt_2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 101 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 101 "declare.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 103 "declare.pgc"
+
+ i = 0;
+ while (1)
+ {
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "fetch cur_2", ECPGt_EOIT,
+ ECPGt_int,&(f1[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(f2[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(f3[i]),(long)20,(long)1,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 107 "declare.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 107 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 107 "declare.pgc"
+
+ i++;
+ }
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "close cur_2", ECPGt_EOIT, ECPGt_EORT);
+#line 110 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 110 "declare.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, "con1", "stmt_2");
+#line 111 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 111 "declare.pgc"
+
+ /* exec sql whenever not found continue ; */
+#line 112 "declare.pgc"
+
+
+ printResult("testcase2", 2);
+
+ /*
+ * testcase3. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and EXECUTE statement without using AT clause
+ */
+ reset();
+
+ /* declare \"stmt_3\" as an SQL identifier */
+#line 122 "declare.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "stmt_3", selectString);
+#line 123 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 123 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "stmt_3", ECPGt_EOIT,
+ ECPGt_int,(f1),(long)1,(long)ARRAY_SIZE,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(f2),(long)1,(long)ARRAY_SIZE,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(f3),(long)20,(long)ARRAY_SIZE,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 124 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 124 "declare.pgc"
+
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "stmt_3");
+#line 126 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 126 "declare.pgc"
+
+
+ printResult("testcase3", 2);
+
+ /*
+ * testcase4. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and CURSOR statement at con2
+ */
+ reset();
+
+ /* declare \"stmt_4\" as an SQL identifier */
+#line 136 "declare.pgc"
+
+ { ECPGprepare(__LINE__, "con2", 0, "stmt_4", selectString);
+#line 137 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 137 "declare.pgc"
+
+ /* declare cur_4 cursor for $1 */
+#line 138 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "declare cur_4 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement("con2", "stmt_4", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 139 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 139 "declare.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 141 "declare.pgc"
+
+ i = 0;
+ while (1)
+ {
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "fetch cur_4", ECPGt_EOIT,
+ ECPGt_int,&(f1[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(f2[i]),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(f3[i]),(long)20,(long)1,(20)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 145 "declare.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 145 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 145 "declare.pgc"
+
+ i++;
+ }
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_normal, "close cur_4", ECPGt_EOIT, ECPGt_EORT);
+#line 148 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 148 "declare.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, "con2", "stmt_4");
+#line 149 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 149 "declare.pgc"
+
+ /* exec sql whenever not found continue ; */
+#line 150 "declare.pgc"
+
+
+ printResult("testcase4", 2);
+
+ /*
+ * DESCRIBE statement is also supported.
+ */
+ /* declare \"stmt_desc\" as an SQL identifier */
+#line 157 "declare.pgc"
+
+ { ECPGprepare(__LINE__, "con1", 0, "stmt_desc", selectString);
+#line 158 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 158 "declare.pgc"
+
+ /* declare cur_desc cursor for $1 */
+#line 159 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "declare cur_desc cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement("con1", "stmt_desc", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 160 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 160 "declare.pgc"
+
+
+ /* descriptor can be used for describe statement */
+ ECPGallocate_desc(__LINE__, "desc_for_describe");
+#line 163 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 163 "declare.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, "con1", "stmt_desc",
+ ECPGt_descriptor, "desc_for_describe", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 164 "declare.pgc"
+
+
+ { ECPGget_desc_header(__LINE__, "desc_for_describe", &(count));
+
+#line 166 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 166 "declare.pgc"
+
+ { ECPGget_desc(__LINE__, "desc_for_describe", 3,ECPGd_length,
+ ECPGt_int,&(length),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 167 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 167 "declare.pgc"
+
+
+ ECPGdeallocate_desc(__LINE__, "desc_for_describe");
+#line 169 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 169 "declare.pgc"
+
+
+ /* for fetch statement */
+ ECPGallocate_desc(__LINE__, "desc_for_fetch");
+#line 172 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 172 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "fetch cur_desc", ECPGt_EOIT,
+ ECPGt_descriptor, "desc_for_fetch", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 173 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 173 "declare.pgc"
+
+
+ { ECPGget_desc(__LINE__, "desc_for_fetch", 3,ECPGd_data,
+ ECPGt_char,(f3[0]),(long)20,(long)1,(20)*sizeof(char), ECPGd_EODT);
+
+#line 175 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 175 "declare.pgc"
+
+
+ ECPGdeallocate_desc(__LINE__, "desc_for_fetch");
+#line 177 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 177 "declare.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, "con1", 0, ECPGst_normal, "close cur_desc", ECPGt_EOIT, ECPGt_EORT);
+#line 178 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 178 "declare.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, "con1", "stmt_desc");
+#line 179 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 179 "declare.pgc"
+
+
+ printf("****descriptor results****\n");
+ printf("count: %d, length: %d, data: %s\n", count, length, f3[0]);
+}
+
+void commitTable()
+{
+ { ECPGtrans(__LINE__, "con1", "commit");
+#line 187 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 187 "declare.pgc"
+
+ { ECPGtrans(__LINE__, "con2", "commit");
+#line 188 "declare.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 188 "declare.pgc"
+
+}
+
+/*
+ * reset all the output variables
+ */
+void reset()
+{
+ memset(f1, 0, sizeof(f1));
+ memset(f2, 0, sizeof(f2));
+ memset(f3, 0, sizeof(f3));
+}
+
+void printResult(char *tc_name, int loop)
+{
+ int i;
+
+ if (tc_name)
+ printf("****%s test results:****\n", tc_name);
+
+ for (i = 0; i < loop; i++)
+ printf("f1=%d, f2=%d, f3=%s\n", f1[i], f2[i], f3[i]);
+
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-declare.stderr b/src/interfaces/ecpg/test/expected/sql-declare.stderr
new file mode 100644
index 0000000..f5dc7c5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-declare.stderr
@@ -0,0 +1,266 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) ); with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: create table source ( f1 integer , f2 integer , f3 varchar ( 20 ) ); with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into source values ( 1 , 10 , 'db on con1' ); with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into source values ( 2 , 20 , 'db on con1' ); with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into source values ( 1 , 10 , 'db on con2' ); with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: insert into source values ( 2 , 20 , 'db on con2' ); with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 187: action "commit"; connection "con1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 188: action "commit"; connection "con2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 74: name stmt_1; query: "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: declare cur_1 cursor for SELECT f1,f2,f3 FROM source; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: query: fetch cur_1; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 82: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: 10 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: query: fetch cur_1; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 82: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: 20 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 82: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: query: fetch cur_1; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 82: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 82: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 82: no data found on line 82
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 85: query: close cur_1; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 85: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 86: name stmt_1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 99: name stmt_2; query: "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 101: query: declare cur_2 cursor for SELECT f1,f2,f3 FROM source; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 101: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 101: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: query: fetch cur_2; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 107: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: 10 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: db on con1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: query: fetch cur_2; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 107: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: 20 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 107: RESULT: db on con1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: query: fetch cur_2; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 107: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 107: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 107: no data found on line 107
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 110: query: close cur_2; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 110: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 110: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 111: name stmt_2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 123: name stmt_3; query: "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 124: query: SELECT f1,f2,f3 FROM source; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 124: using PQexecPrepared for "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 124: correctly got 2 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: 10 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: 20 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 124: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 126: name stmt_3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 137: name stmt_4; query: "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 139: query: declare cur_4 cursor for SELECT f1,f2,f3 FROM source; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 139: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 139: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: query: fetch cur_4; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 145: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: 10 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: query: fetch cur_4; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 145: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: 20 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 145: RESULT: db on con2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: query: fetch cur_4; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 145: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 145: correctly got 0 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 145: no data found on line 145
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 148: query: close cur_4; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 148: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 148: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 149: name stmt_4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 158: name stmt_desc; query: "SELECT f1,f2,f3 FROM source"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 160: query: declare cur_desc cursor for SELECT f1,f2,f3 FROM source; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 160: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 160: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 3 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = 20
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 173: query: fetch cur_desc; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 173: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 173: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 173: putting result (1 tuples) into descriptor desc_for_fetch
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 175: RESULT: db on con1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 178: query: close cur_desc; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 178: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 178: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 179: name stmt_desc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: query: drop table if exists source; with 0 parameter(s) on connection con1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 45: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: drop table if exists source; with 0 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 187: action "commit"; connection "con1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 188: action "commit"; connection "con2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection con2 closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection con1 closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-declare.stdout b/src/interfaces/ecpg/test/expected/sql-declare.stdout
new file mode 100644
index 0000000..c231f62
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-declare.stdout
@@ -0,0 +1,18 @@
+****testcase1 test results:****
+f1=1, f2=10, f3=db on con2
+f1=2, f2=20, f3=db on con2
+
+****testcase2 test results:****
+f1=1, f2=10, f3=db on con1
+f1=2, f2=20, f3=db on con1
+
+****testcase3 test results:****
+f1=1, f2=10, f3=db on con2
+f1=2, f2=20, f3=db on con2
+
+****testcase4 test results:****
+f1=1, f2=10, f3=db on con2
+f1=2, f2=20, f3=db on con2
+
+****descriptor results****
+count: 3, length: 20, data: db on con1
diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c
new file mode 100644
index 0000000..29583ec
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-define.c
@@ -0,0 +1,205 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "define.pgc"
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 1 "define.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 2 "define.pgc"
+
+
+
+
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+#line 10 "define.pgc"
+ int i ;
+
+#line 11 "define.pgc"
+ char s [ 200 ] ;
+/* exec sql end declare section */
+#line 12 "define.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 16 "define.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 17 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 17 "define.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( a int , b text )", ECPGt_EOIT, ECPGt_EORT);
+#line 19 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 19 "define.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 29 , 'abcdef' )", ECPGt_EOIT, ECPGt_EORT);
+#line 20 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 20 "define.pgc"
+
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( null , 'defined' )", ECPGt_EOIT, ECPGt_EORT);
+#line 23 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 23 "define.pgc"
+
+
+
+
+
+
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( null , 'someothervar not defined' )", ECPGt_EOIT, ECPGt_EORT);
+#line 31 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 31 "define.pgc"
+
+
+
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 1 , 29 :: text || '-' || 'abcdef'", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(s),(long)200,(long)1,(200)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 36 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 36 "define.pgc"
+
+
+ printf("i: %d, s: %s\n", i, s);
+
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 29 , 'no string' )", ECPGt_EOIT, ECPGt_EORT);
+#line 42 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 42 "define.pgc"
+
+
+
+ /* no value */
+
+
+
+
+
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set TIMEZONE to 'UTC'", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 53 "define.pgc"
+
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 56 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 56 "define.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-define.stderr b/src/interfaces/ecpg/test/expected/sql-define.stderr
new file mode 100644
index 0000000..20601b6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-define.stderr
@@ -0,0 +1,52 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: query: create table test ( a int , b text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 19: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: insert into test values ( 29 , 'abcdef' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: insert into test values ( null , 'defined' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: insert into test values ( null , 'someothervar not defined' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: select 1 , 29 :: text || '-' || 'abcdef'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: 29-abcdef offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: insert into test values ( 29 , 'no string' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: set TIMEZONE to 'UTC'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-define.stdout b/src/interfaces/ecpg/test/expected/sql-define.stdout
new file mode 100644
index 0000000..864cd85
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-define.stdout
@@ -0,0 +1 @@
+i: 1, s: 29-abcdef
diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c
new file mode 100644
index 0000000..bdd12a5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-desc.c
@@ -0,0 +1,377 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "desc.pgc"
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 1 "desc.pgc"
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 2 "desc.pgc"
+
+
+int
+main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+
+
+#line 8 "desc.pgc"
+ char * stmt1 = "INSERT INTO test1 VALUES ($1, $2)" ;
+
+#line 9 "desc.pgc"
+ char * stmt2 = "SELECT * from test1 where a = $1 and b = $2" ;
+
+#line 10 "desc.pgc"
+ char * stmt3 = "SELECT * from test1 where :var = a" ;
+
+#line 12 "desc.pgc"
+ int val1 = 1 ;
+
+#line 13 "desc.pgc"
+ char val2 [ 4 ] = "one" , val2output [] = "AAA" ;
+
+#line 14 "desc.pgc"
+ int val1output = 2 , val2i = 0 ;
+
+#line 15 "desc.pgc"
+ int val2null = - 1 ;
+
+#line 16 "desc.pgc"
+ int ind1 , ind2 ;
+
+#line 17 "desc.pgc"
+ char desc1 [ 8 ] = "outdesc" ;
+/* exec sql end declare section */
+#line 18 "desc.pgc"
+
+
+ ECPGdebug(1, stderr);
+
+ ECPGallocate_desc(__LINE__, "indesc");
+#line 22 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 22 "desc.pgc"
+
+ ECPGallocate_desc(__LINE__, (desc1));
+#line 23 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 23 "desc.pgc"
+
+
+ { ECPGset_desc(__LINE__, "indesc", 1,ECPGd_data,
+ ECPGt_int,&(val1),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 25 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 25 "desc.pgc"
+
+ { ECPGset_desc(__LINE__, "indesc", 2,ECPGd_data,
+ ECPGt_char,(val2),(long)4,(long)1,(4)*sizeof(char), ECPGd_indicator,
+ ECPGt_int,&(val2i),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 26 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "desc.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 28 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 28 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test1 ( a int , b text )", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 30 "desc.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "foo1", stmt1);
+#line 31 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 31 "desc.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "Foo-1", stmt1);
+#line 32 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "desc.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "foo2", stmt2);
+#line 33 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 33 "desc.pgc"
+
+ { ECPGprepare(__LINE__, NULL, 0, "foo3", stmt3);
+#line 34 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 34 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "foo1",
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 36 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "desc.pgc"
+
+
+ { ECPGset_desc(__LINE__, "indesc", 1,ECPGd_data,
+ ECPGt_const,"2",(long)1,(long)1,strlen("2"), ECPGd_EODT);
+
+#line 38 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "desc.pgc"
+
+ { ECPGset_desc(__LINE__, "indesc", 2,ECPGd_data,
+ ECPGt_char,(val2),(long)4,(long)1,(4)*sizeof(char), ECPGd_indicator,
+ ECPGt_int,&(val2null),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 39 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 39 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "foo1",
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 41 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 41 "desc.pgc"
+
+
+ { ECPGset_desc(__LINE__, "indesc", 1,ECPGd_data,
+ ECPGt_const,"3",(long)1,(long)1,strlen("3"), ECPGd_EODT);
+
+#line 43 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 43 "desc.pgc"
+
+ { ECPGset_desc(__LINE__, "indesc", 2,ECPGd_data,
+ ECPGt_const,"this is a long test",(long)19,(long)1,strlen("this is a long test"), ECPGd_indicator,
+ ECPGt_int,&(val1),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 44 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 44 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "Foo-1",
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 46 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 46 "desc.pgc"
+
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "Foo-1");
+#line 48 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 48 "desc.pgc"
+
+
+ { ECPGset_desc(__LINE__, "indesc", 1,ECPGd_data,
+ ECPGt_int,&(val1),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 50 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "desc.pgc"
+
+ { ECPGset_desc(__LINE__, "indesc", 2,ECPGd_data,
+ ECPGt_char,(val2),(long)4,(long)1,(4)*sizeof(char), ECPGd_indicator,
+ ECPGt_int,&(val2i),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 51 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 51 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "foo2",
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_descriptor, (desc1), 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 53 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "desc.pgc"
+
+
+ { ECPGget_desc(__LINE__, (desc1), 1,ECPGd_data,
+ ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), ECPGd_EODT);
+
+#line 55 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 55 "desc.pgc"
+
+ printf("output = %s\n", val2output);
+
+ /* declare c1 cursor for $1 */
+#line 58 "desc.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c1 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 59 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 59 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch next from c1", ECPGt_EOIT,
+ ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(ind1),(long)1,(long)1,sizeof(int),
+ ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char),
+ ECPGt_int,&(ind2),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 61 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 61 "desc.pgc"
+
+ printf("val1=%d (ind1: %d) val2=%s (ind2: %d)\n",
+ val1output, ind1, val2output, ind2);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close c1", ECPGt_EOIT, ECPGt_EORT);
+#line 65 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 65 "desc.pgc"
+
+
+ { ECPGset_desc_header(__LINE__, "indesc", (int)(1));
+
+#line 67 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 67 "desc.pgc"
+
+ { ECPGset_desc(__LINE__, "indesc", 1,ECPGd_data,
+ ECPGt_const,"2",(long)1,(long)1,strlen("2"), ECPGd_EODT);
+
+#line 68 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 68 "desc.pgc"
+
+
+ /* declare c2 cursor for $1 */
+#line 70 "desc.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare c2 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "foo3", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_descriptor, "indesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 71 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 71 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch next from c2", ECPGt_EOIT,
+ ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char),
+ ECPGt_int,&(val2i),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 73 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 73 "desc.pgc"
+
+ printf("val1=%d val2=%s\n", val1output, val2i ? "null" : val2output);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close c2", ECPGt_EOIT, ECPGt_EORT);
+#line 76 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 76 "desc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from test1 where a = 3", ECPGt_EOIT,
+ ECPGt_int,&(val1output),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char),
+ ECPGt_int,&(val2i),(long)1,(long)1,sizeof(int), ECPGt_EORT);
+#line 78 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 78 "desc.pgc"
+
+ printf("val1=%d val2=%c%c%c%c warn=%c truncate=%d\n", val1output, val2output[0], val2output[1], val2output[2], val2output[3], sqlca.sqlwarn[0], val2i);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test1", ECPGt_EOIT, ECPGt_EORT);
+#line 81 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 81 "desc.pgc"
+
+ { ECPGdeallocate_all(__LINE__, 0, NULL);
+#line 82 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 82 "desc.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 83 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 83 "desc.pgc"
+
+
+ ECPGdeallocate_desc(__LINE__, "indesc");
+#line 85 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 85 "desc.pgc"
+
+ ECPGdeallocate_desc(__LINE__, (desc1));
+#line 86 "desc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 86 "desc.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-desc.stderr b/src/interfaces/ecpg/test/expected/sql-desc.stderr
new file mode 100644
index 0000000..65e7cea
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-desc.stderr
@@ -0,0 +1,140 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: create table test1 ( a int , b text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 31: name foo1; query: "INSERT INTO test1 VALUES ($1, $2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 32: name Foo-1; query: "INSERT INTO test1 VALUES ($1, $2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 33: name foo2; query: "SELECT * from test1 where a = $1 and b = $2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 34: name foo3; query: "SELECT * from test1 where $1 = a"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: INSERT INTO test1 VALUES ($1, $2); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 36: parameter 2 = one
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: INSERT INTO test1 VALUES ($1, $2); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 2 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: INSERT INTO test1 VALUES ($1, $2); with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 46: parameter 1 = 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 46: parameter 2 = this is a long test
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 48: name Foo-1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: SELECT * from test1 where a = $1 and b = $2; with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexecPrepared for "SELECT * from test1 where a = $1 and b = $2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 53: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 53: parameter 2 = one
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: putting result (1 tuples) into descriptor outdesc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: query: declare c1 cursor for SELECT * from test1 where a = $1 and b = $2; with 2 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 59: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 59: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 59: parameter 2 = one
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 59: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: query: fetch next from c1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 61: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 61: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 61: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 61: RESULT: one offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: query: close c1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 65: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: query: declare c2 cursor for SELECT * from test1 where $1 = a; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 71: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 71: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 71: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: query: fetch next from c2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 73: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 73: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 73: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: query: close c2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 76: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 78: query: select * from test1 where a = 3; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 78: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 78: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 78: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 78: RESULT: this is a long test offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 81: query: drop table test1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 81: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 81: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 82: name foo3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 82: name foo2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 82: name foo1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-desc.stdout b/src/interfaces/ecpg/test/expected/sql-desc.stdout
new file mode 100644
index 0000000..7d91043
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-desc.stdout
@@ -0,0 +1,4 @@
+output = 1
+val1=1 (ind1: 0) val2=one (ind2: 0)
+val1=2 val2=null
+val1=3 val2=this warn=W truncate=19
diff --git a/src/interfaces/ecpg/test/expected/sql-describe.c b/src/interfaces/ecpg/test/expected/sql-describe.c
new file mode 100644
index 0000000..b79a6f4
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-describe.c
@@ -0,0 +1,465 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "describe.pgc"
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "describe.pgc"
+
+
+#line 1 "sqlda.h"
+#ifndef ECPG_SQLDA_H
+#define ECPG_SQLDA_H
+
+#ifdef _ECPG_INFORMIX_H
+
+#include "sqlda-compat.h"
+typedef struct sqlvar_compat sqlvar_t;
+typedef struct sqlda_compat sqlda_t;
+
+#else
+
+#include "sqlda-native.h"
+typedef struct sqlvar_struct sqlvar_t;
+typedef struct sqlda_struct sqlda_t;
+
+#endif
+
+#endif /* ECPG_SQLDA_H */
+
+#line 5 "describe.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 7 "describe.pgc"
+
+
+sqlda_t *sqlda1, *sqlda2, *sqlda3;
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+#line 15 "describe.pgc"
+ char * stmt1 = "SELECT id, t FROM descr_t2" ;
+
+#line 16 "describe.pgc"
+ char * stmt2 = "SELECT id, t FROM descr_t2 WHERE id = -1" ;
+
+#line 17 "describe.pgc"
+ int i , count1 , count2 ;
+
+#line 18 "describe.pgc"
+ char field_name1 [ 30 ] = "not set" ;
+
+#line 19 "describe.pgc"
+ char field_name2 [ 30 ] = "not set" ;
+/* exec sql end declare section */
+#line 20 "describe.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 27 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 27 "describe.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 30 "describe.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table descr_t2 ( id serial primary key , t text )", ECPGt_EOIT, ECPGt_EORT);
+#line 33 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 33 "describe.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into descr_t2 ( id , t ) values ( default , 'a' )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 36 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into descr_t2 ( id , t ) values ( default , 'b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into descr_t2 ( id , t ) values ( default , 'c' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "describe.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into descr_t2 ( id , t ) values ( default , 'd' )", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 39 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 42 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 42 "describe.pgc"
+
+
+ /*
+ * Test DESCRIBE with a query producing tuples.
+ * DESCRIPTOR and SQL DESCRIPTOR are NOT the same in
+ * Informix-compat mode.
+ */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 51 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 51 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 52 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 52 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
+#line 55 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "describe.pgc"
+
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc1", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 60 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id1",
+ ECPGt_descriptor, "desc2", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 61 "describe.pgc"
+
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda1, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 63 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda2, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 64 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id1",
+ ECPGt_sqlda, &sqlda3, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 65 "describe.pgc"
+
+
+ if (sqlda1 == NULL)
+ {
+ printf("sqlda1 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda2 == NULL)
+ {
+ printf("sqlda2 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda3 == NULL)
+ {
+ printf("sqlda3 NULL\n");
+ exit(1);
+ }
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 86 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 86 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc1", &(count2));
+
+#line 87 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 87 "describe.pgc"
+
+
+ if (count1 != count2)
+ {
+ printf("count1 (%d) != count2 (%d)\n", count1, count2);
+ exit(1);
+ }
+
+ if (count1 != sqlda1->sqld)
+ {
+ printf("count1 (%d) != sqlda1->sqld (%d)\n", count1, sqlda1->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda2->sqld)
+ {
+ printf("count1 (%d) != sqlda2->sqld (%d)\n", count1, sqlda2->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda3->sqld)
+ {
+ printf("count1 (%d) != sqlda3->sqld (%d)\n", count1, sqlda3->sqld);
+ exit(1);
+ }
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 115 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 115 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 116 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 116 "describe.pgc"
+
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname.data,
+ sqlda2->sqlvar[i-1].sqlname.data,
+ sqlda3->sqlvar[i-1].sqlname.data);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 126 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 126 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 127 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 127 "describe.pgc"
+
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id1");
+#line 132 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 132 "describe.pgc"
+
+
+ /* Test DESCRIBE with a query not producing tuples */
+
+ strcpy(msg, "allocate");
+ ECPGallocate_desc(__LINE__, "desc1");
+#line 137 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 137 "describe.pgc"
+
+ ECPGallocate_desc(__LINE__, "desc2");
+#line 138 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 138 "describe.pgc"
+
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt2);
+#line 141 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 141 "describe.pgc"
+
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc1", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 146 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id2",
+ ECPGt_descriptor, "desc2", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 147 "describe.pgc"
+
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda1, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 149 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda2, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 150 "describe.pgc"
+
+ { ECPGdescribe(__LINE__, 0, 0, NULL, "st_id2",
+ ECPGt_sqlda, &sqlda3, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 151 "describe.pgc"
+
+
+ if (sqlda1 == NULL || sqlda2 == NULL || sqlda3 == NULL)
+ exit(1);
+
+ strcpy(msg, "get descriptor");
+ { ECPGget_desc_header(__LINE__, "desc1", &(count1));
+
+#line 157 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 157 "describe.pgc"
+
+ { ECPGget_desc_header(__LINE__, "desc1", &(count2));
+
+#line 158 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 158 "describe.pgc"
+
+
+ if (!( count1 == count2 &&
+ count1 == sqlda1->sqld &&
+ count1 == sqlda2->sqld &&
+ count1 == sqlda3->sqld))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ { ECPGget_desc(__LINE__, "desc1", i,ECPGd_name,
+ ECPGt_char,(field_name1),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 168 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 168 "describe.pgc"
+
+ { ECPGget_desc(__LINE__, "desc2", i,ECPGd_name,
+ ECPGt_char,(field_name2),(long)30,(long)1,(30)*sizeof(char), ECPGd_EODT);
+
+#line 169 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 169 "describe.pgc"
+
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname.data,
+ sqlda2->sqlvar[i-1].sqlname.data,
+ sqlda3->sqlvar[i-1].sqlname.data);
+ }
+
+ strcpy(msg, "deallocate");
+ ECPGdeallocate_desc(__LINE__, "desc1");
+#line 179 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 179 "describe.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "desc2");
+#line 180 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);
+#line 180 "describe.pgc"
+
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id2");
+#line 185 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 185 "describe.pgc"
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table descr_t2", ECPGt_EOIT, ECPGt_EORT);
+#line 190 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 190 "describe.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 193 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 193 "describe.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 196 "describe.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 196 "describe.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-describe.stderr b/src/interfaces/ecpg/test/expected/sql-describe.stderr
new file mode 100644
index 0000000..4b9c5a9
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-describe.stderr
@@ -0,0 +1,112 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: set datestyle to iso; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: create table descr_t2 ( id serial primary key , t text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into descr_t2 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: insert into descr_t2 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into descr_t2 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: insert into descr_t2 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 42: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 55: name st_id1; query: "SELECT id, t FROM descr_t2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 63 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 64 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 65 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 132: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 141: name st_id2; query: "SELECT id, t FROM descr_t2 WHERE id = -1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 149 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 150 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 151 sqld = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = id
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = t
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 185: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 190: query: drop table descr_t2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 190: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 190: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 193: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-describe.stdout b/src/interfaces/ecpg/test/expected/sql-describe.stdout
new file mode 100644
index 0000000..1e3fe10
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-describe.stdout
@@ -0,0 +1,24 @@
+1
+ field_name1 'id'
+ field_name2 'id'
+ sqlda1 'id'
+ sqlda2 'id'
+ sqlda3 'id'
+2
+ field_name1 't'
+ field_name2 't'
+ sqlda1 't'
+ sqlda2 't'
+ sqlda3 't'
+1
+ field_name1 'id'
+ field_name2 'id'
+ sqlda1 'id'
+ sqlda2 'id'
+ sqlda3 'id'
+2
+ field_name1 't'
+ field_name2 't'
+ sqlda1 't'
+ sqlda2 't'
+ sqlda3 't'
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c
new file mode 100644
index 0000000..a95dddf
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c
@@ -0,0 +1,340 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dynalloc.pgc"
+#include <stdio.h>
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 2 "dynalloc.pgc"
+
+#include <stdlib.h>
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "dynalloc.pgc"
+
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+/* char **d8=0; */
+
+
+
+
+
+
+
+
+/* int *i8=0; */
+
+
+#line 9 "dynalloc.pgc"
+ int * d1 = 0 ;
+
+#line 10 "dynalloc.pgc"
+ double * d2 = 0 ;
+
+#line 11 "dynalloc.pgc"
+ char ** d3 = 0 ;
+
+#line 12 "dynalloc.pgc"
+ char ** d4 = 0 ;
+
+#line 13 "dynalloc.pgc"
+ char ** d5 = 0 ;
+
+#line 14 "dynalloc.pgc"
+ char ** d6 = 0 ;
+
+#line 15 "dynalloc.pgc"
+ char ** d7 = 0 ;
+
+#line 17 "dynalloc.pgc"
+ char ** d9 = 0 ;
+
+#line 18 "dynalloc.pgc"
+ int * i1 = 0 ;
+
+#line 19 "dynalloc.pgc"
+ int * i2 = 0 ;
+
+#line 20 "dynalloc.pgc"
+ int * i3 = 0 ;
+
+#line 21 "dynalloc.pgc"
+ int * i4 = 0 ;
+
+#line 22 "dynalloc.pgc"
+ int * i5 = 0 ;
+
+#line 23 "dynalloc.pgc"
+ int * i6 = 0 ;
+
+#line 24 "dynalloc.pgc"
+ int * i7 = 0 ;
+
+#line 26 "dynalloc.pgc"
+ int * i9 = 0 ;
+/* exec sql end declare section */
+#line 27 "dynalloc.pgc"
+
+ int i;
+
+ ECPGdebug(1, stderr);
+
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 32 "dynalloc.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 33 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 33 "dynalloc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to mdy", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 35 "dynalloc.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet )", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 37 "dynalloc.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( b , c , d , e , f , g , h , i ) values ( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 38 "dynalloc.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( b , c , d , e , f , g , h , i ) values ( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 39 "dynalloc.pgc"
+
+
+ ECPGallocate_desc(__LINE__, "mydesc");
+#line 41 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );
+#line 41 "dynalloc.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select a , b , c , d , e , f , g , h , i from test order by a", ECPGt_EOIT,
+ ECPGt_descriptor, "mydesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 42 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 42 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 1,ECPGd_indicator,
+ ECPGt_int,&(i1),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_int,&(d1),(long)1,(long)0,sizeof(int), ECPGd_EODT);
+
+#line 43 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 43 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 2,ECPGd_indicator,
+ ECPGt_int,&(i2),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_double,&(d2),(long)1,(long)0,sizeof(double), ECPGd_EODT);
+
+#line 44 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 44 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 3,ECPGd_indicator,
+ ECPGt_int,&(i3),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d3),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 45 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 45 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 4,ECPGd_indicator,
+ ECPGt_int,&(i4),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d4),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 46 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 46 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 5,ECPGd_indicator,
+ ECPGt_int,&(i5),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d5),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 47 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 47 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 6,ECPGd_indicator,
+ ECPGt_int,&(i6),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d6),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 48 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 48 "dynalloc.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 7,ECPGd_indicator,
+ ECPGt_int,&(i7),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d7),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 49 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 49 "dynalloc.pgc"
+
+ /* skip box for now */
+ /* exec sql get descriptor mydesc value 8 :d8=DATA, :i8=INDICATOR; */
+ { ECPGget_desc(__LINE__, "mydesc", 9,ECPGd_indicator,
+ ECPGt_int,&(i9),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(d9),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 52 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 52 "dynalloc.pgc"
+
+
+ printf("Result:\n");
+ for (i=0;i<sqlca.sqlerrd[2];++i)
+ {
+ if (i1[i]) printf("NULL, ");
+ else printf("%d, ",d1[i]);
+
+ if (i2[i]) printf("NULL, ");
+ else printf("%f, ",d2[i]);
+
+ if (i3[i]) printf("NULL, ");
+ else printf("'%s', ",d3[i]);
+
+ if (i4[i]) printf("NULL, ");
+ else printf("'%s', ",d4[i]);
+
+ if (i5[i]) printf("NULL, ");
+ else printf("'%s', ",d5[i]);
+
+ if (i6[i]) printf("NULL, ");
+ else printf("'%s', ",d6[i]);
+
+ if (i7[i]) printf("NULL, ");
+ else printf("'%s', ",d7[i]);
+
+ if (i9[i]) printf("NULL, ");
+ else printf("'%s', ",d9[i]);
+
+ printf("\n");
+ }
+ ECPGfree_auto_mem();
+ printf("\n");
+
+ ECPGdeallocate_desc(__LINE__, "mydesc");
+#line 86 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );
+#line 86 "dynalloc.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 87 "dynalloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 87 "dynalloc.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
new file mode 100644
index 0000000..58a0b9e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
@@ -0,0 +1,102 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: set datestyle to mdy; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: query: create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into test ( b , c , d , e , f , g , h , i ) values ( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: insert into test ( b , c , d , e , f , g , h , i ) values ( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: select a , b , c , d , e , f , g , h , i from test order by a; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: correctly got 2 tuples with 9 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: putting result (2 tuples) into descriptor mydesc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 43: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 43: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 43: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 44: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 44: RESULT: 23.456 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 44: RESULT: 2.446 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 45: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 45: RESULT: varchar offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 45: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 46: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: v offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 46: RESULT: v offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 47: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 47: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 47: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 48: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 49: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 49: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 49: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 9
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 52: allocating memory for 2 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 52: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 52: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.stdout b/src/interfaces/ecpg/test/expected/sql-dynalloc.stdout
new file mode 100644
index 0000000..5c212c8
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.stdout
@@ -0,0 +1,4 @@
+Result:
+1, 23.456000, 'varchar', 'v', 'c ', 'Mon Mar 03 11:33:07 2003 PST', 't', '2001:4f8:3:ba:2e0:81ff:fe22:d1f1',
+2, 2.446000, NULL, 'v', 'c ', 'Mon Mar 03 11:33:07 2003 PST', 'f', NULL,
+
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c
new file mode 100644
index 0000000..7118577
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c
@@ -0,0 +1,256 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dynalloc2.pgc"
+#include <stdio.h>
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 2 "dynalloc2.pgc"
+
+#include <stdlib.h>
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "dynalloc2.pgc"
+
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+#line 9 "dynalloc2.pgc"
+ int * ip1 = 0 ;
+
+#line 10 "dynalloc2.pgc"
+ char ** cp2 = 0 ;
+
+#line 11 "dynalloc2.pgc"
+ int * ipointer1 = 0 ;
+
+#line 12 "dynalloc2.pgc"
+ int * ipointer2 = 0 ;
+
+#line 13 "dynalloc2.pgc"
+ int colnum ;
+/* exec sql end declare section */
+#line 14 "dynalloc2.pgc"
+
+ int i;
+
+ ECPGdebug(1, stderr);
+
+ /* exec sql whenever sqlerror do sqlprint ( ) ; */
+#line 19 "dynalloc2.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 20 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 20 "dynalloc2.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to postgres", ECPGt_EOIT, ECPGt_EORT);
+#line 22 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 22 "dynalloc2.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( a int , b text )", ECPGt_EOIT, ECPGt_EORT);
+#line 24 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 24 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 1 , 'one' )", ECPGt_EOIT, ECPGt_EORT);
+#line 25 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 25 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 2 , 'two' )", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 26 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( null , 'three' )", ECPGt_EOIT, ECPGt_EORT);
+#line 27 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 27 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 4 , 'four' )", ECPGt_EOIT, ECPGt_EORT);
+#line 28 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 28 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( 5 , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 29 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( null , null )", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 30 "dynalloc2.pgc"
+
+
+ ECPGallocate_desc(__LINE__, "mydesc");
+#line 32 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );
+#line 32 "dynalloc2.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from test", ECPGt_EOIT,
+ ECPGt_descriptor, "mydesc", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 33 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 33 "dynalloc2.pgc"
+
+ { ECPGget_desc_header(__LINE__, "mydesc", &(colnum));
+
+#line 34 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 34 "dynalloc2.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 1,ECPGd_indicator,
+ ECPGt_int,&(ipointer1),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_int,&(ip1),(long)1,(long)0,sizeof(int), ECPGd_EODT);
+
+#line 35 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 35 "dynalloc2.pgc"
+
+ { ECPGget_desc(__LINE__, "mydesc", 2,ECPGd_indicator,
+ ECPGt_int,&(ipointer2),(long)1,(long)0,sizeof(int), ECPGd_data,
+ ECPGt_char,&(cp2),(long)0,(long)0,(1)*sizeof(char), ECPGd_EODT);
+
+#line 36 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 36 "dynalloc2.pgc"
+
+
+ printf("Result (%d columns):\n", colnum);
+ for (i=0;i < sqlca.sqlerrd[2];++i)
+ {
+ if (ipointer1[i]) printf("NULL, ");
+ else printf("%d, ",ip1[i]);
+
+ if (ipointer2[i]) printf("NULL, ");
+ else printf("'%s', ",cp2[i]);
+ printf("\n");
+ }
+ ECPGfree_auto_mem();
+ printf("\n");
+
+ ECPGdeallocate_desc(__LINE__, "mydesc");
+#line 51 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );
+#line 51 "dynalloc2.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 52 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 52 "dynalloc2.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 53 "dynalloc2.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint ( );}
+#line 53 "dynalloc2.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
new file mode 100644
index 0000000..1c64948
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
@@ -0,0 +1,98 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: set datestyle to postgres; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: create table test ( a int , b text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: insert into test values ( 1 , 'one' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: insert into test values ( 2 , 'two' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: query: insert into test values ( null , 'three' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 27: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: insert into test values ( 4 , 'four' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: insert into test values ( 5 , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: insert into test values ( null , null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: select * from test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: correctly got 6 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: putting result (6 tuples) into descriptor mydesc
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 2 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 35: allocating memory for 6 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_store_result on line 36: allocating memory for 6 tuples
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: one offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: two offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: three offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: four offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 52: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stdout b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stdout
new file mode 100644
index 0000000..87be3ac
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stdout
@@ -0,0 +1,8 @@
+Result (2 columns):
+1, 'one',
+2, 'two',
+NULL, 'three',
+4, 'four',
+5, NULL,
+NULL, NULL,
+
diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c
new file mode 100644
index 0000000..513d44c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c
@@ -0,0 +1,486 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "dyntest.pgc"
+/* dynamic SQL test program
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#line 1 "sql3types.h"
+#ifndef _ECPG_SQL3TYPES_H
+#define _ECPG_SQL3TYPES_H
+
+/* SQL3 dynamic type codes */
+
+/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
+
+enum
+{
+ SQL3_CHARACTER = 1,
+ SQL3_NUMERIC,
+ SQL3_DECIMAL,
+ SQL3_INTEGER,
+ SQL3_SMALLINT,
+ SQL3_FLOAT,
+ SQL3_REAL,
+ SQL3_DOUBLE_PRECISION,
+ SQL3_DATE_TIME_TIMESTAMP,
+ SQL3_INTERVAL, /* 10 */
+ SQL3_CHARACTER_VARYING = 12,
+ SQL3_ENUMERATED,
+ SQL3_BIT,
+ SQL3_BIT_VARYING,
+ SQL3_BOOLEAN,
+ SQL3_abstract
+ /* the rest is xLOB stuff */
+};
+
+/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */
+
+enum
+{
+ SQL3_DDT_DATE = 1,
+ SQL3_DDT_TIME,
+ SQL3_DDT_TIMESTAMP,
+ SQL3_DDT_TIME_WITH_TIME_ZONE,
+ SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE,
+
+ SQL3_DDT_ILLEGAL /* not a datetime data type (not part of
+ * standard) */
+};
+
+#endif /* !_ECPG_SQL3TYPES_H */
+
+#line 7 "dyntest.pgc"
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 8 "dyntest.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 9 "dyntest.pgc"
+
+
+static void
+error (void)
+{
+ printf ("\n#%ld:%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ exit (1);
+}
+
+int
+main ()
+{
+ /* exec sql begin declare section */
+
+
+
+
+
+
+
+
+
+
+
+#line 22 "dyntest.pgc"
+ int COUNT ;
+
+#line 23 "dyntest.pgc"
+ int INTVAR ;
+
+#line 24 "dyntest.pgc"
+ int INDEX ;
+
+#line 25 "dyntest.pgc"
+ int INDICATOR ;
+
+#line 26 "dyntest.pgc"
+ int TYPE , LENGTH , OCTET_LENGTH , PRECISION , SCALE , RETURNED_OCTET_LENGTH ;
+
+#line 27 "dyntest.pgc"
+ int DATETIME_INTERVAL_CODE ;
+
+#line 28 "dyntest.pgc"
+ char NAME [ 120 ] , BOOLVAR ;
+
+#line 29 "dyntest.pgc"
+ char STRINGVAR [ 1024 ] ;
+
+#line 30 "dyntest.pgc"
+ double DOUBLEVAR ;
+
+#line 31 "dyntest.pgc"
+ char * QUERY ;
+/* exec sql end declare section */
+#line 32 "dyntest.pgc"
+
+ int done = 0;
+
+ /* exec sql var BOOLVAR is bool */
+#line 35 "dyntest.pgc"
+
+
+ ECPGdebug (1, stderr);
+
+ QUERY = "select * from dyntest";
+
+ /* exec sql whenever sqlerror do error ( ) ; */
+#line 43 "dyntest.pgc"
+
+
+ ECPGallocate_desc(__LINE__, "MYDESC");
+#line 45 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );
+#line 45 "dyntest.pgc"
+
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 47 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 47 "dyntest.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to german", ECPGt_EOIT, ECPGt_EORT);
+#line 49 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 49 "dyntest.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date )", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 53 "dyntest.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' )", ECPGt_EOIT, ECPGt_EORT);
+#line 54 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 54 "dyntest.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' )", ECPGt_EOIT, ECPGt_EORT);
+#line 55 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 55 "dyntest.pgc"
+
+
+ { ECPGprepare(__LINE__, NULL, 0, "myquery", QUERY);
+#line 57 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 57 "dyntest.pgc"
+
+ /* declare MYCURS cursor for $1 */
+#line 58 "dyntest.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare MYCURS cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "myquery", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 60 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 60 "dyntest.pgc"
+
+
+ while (1)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in MYCURS", ECPGt_EOIT,
+ ECPGt_descriptor, "MYDESC", 1L, 1L, 1L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 64 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 64 "dyntest.pgc"
+
+
+ if (sqlca.sqlcode)
+ break;
+
+ { ECPGget_desc_header(__LINE__, "MYDESC", &(COUNT));
+
+#line 69 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 69 "dyntest.pgc"
+
+ if (!done)
+ {
+ printf ("Found %d columns\n", COUNT);
+ done = 1;
+ }
+
+ for (INDEX = 1; INDEX <= COUNT; ++INDEX)
+ {
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_indicator,
+ ECPGt_int,&(INDICATOR),(long)1,(long)1,sizeof(int), ECPGd_name,
+ ECPGt_char,(NAME),(long)120,(long)1,(120)*sizeof(char), ECPGd_scale,
+ ECPGt_int,&(SCALE),(long)1,(long)1,sizeof(int), ECPGd_precision,
+ ECPGt_int,&(PRECISION),(long)1,(long)1,sizeof(int), ECPGd_ret_octet,
+ ECPGt_int,&(RETURNED_OCTET_LENGTH),(long)1,(long)1,sizeof(int), ECPGd_octet,
+ ECPGt_int,&(OCTET_LENGTH),(long)1,(long)1,sizeof(int), ECPGd_length,
+ ECPGt_int,&(LENGTH),(long)1,(long)1,sizeof(int), ECPGd_type,
+ ECPGt_int,&(TYPE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 86 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 86 "dyntest.pgc"
+
+ printf ("%2d\t%s (type: %d length: %d precision: %d scale: %d = " , INDEX, NAME, TYPE, LENGTH, PRECISION, SCALE);
+ switch (TYPE)
+ {
+ case SQL3_BOOLEAN:
+ printf ("bool");
+ break;
+ case SQL3_NUMERIC:
+ printf ("numeric(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_DECIMAL:
+ printf ("decimal(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_INTEGER:
+ printf ("integer");
+ break;
+ case SQL3_SMALLINT:
+ printf ("smallint");
+ break;
+ case SQL3_FLOAT:
+ printf ("float(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_REAL:
+ printf ("real");
+ break;
+ case SQL3_DOUBLE_PRECISION:
+ printf ("double precision");
+ break;
+ case SQL3_DATE_TIME_TIMESTAMP:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_di_code,
+ ECPGt_int,&(DATETIME_INTERVAL_CODE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 116 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 116 "dyntest.pgc"
+
+ switch (DATETIME_INTERVAL_CODE)
+ {
+ case SQL3_DDT_DATE:
+ printf ("date");
+ break;
+ case SQL3_DDT_TIME:
+ printf ("time");
+ break;
+ case SQL3_DDT_TIMESTAMP:
+ printf ("timestamp");
+ break;
+ case SQL3_DDT_TIME_WITH_TIME_ZONE:
+ printf ("time with time zone");
+ break;
+ case SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE:
+ printf ("timestamp with time zone");
+ break;
+ }
+ break;
+ case SQL3_INTERVAL:
+ printf ("interval");
+ break;
+ case SQL3_CHARACTER:
+ if (LENGTH > 0)
+ printf ("char(%d)", LENGTH);
+ else
+ printf ("text");
+ break;
+ case SQL3_CHARACTER_VARYING:
+ if (LENGTH > 0)
+ printf ("varchar(%d)", LENGTH);
+ else
+ printf ("varchar()");
+ break;
+ default:
+ printf ("<SQL3 %d>", TYPE);
+ break;
+ }
+ printf (")\n\toctet_length: %d returned_octet_length: %d)\n\t= ",
+ OCTET_LENGTH, RETURNED_OCTET_LENGTH);
+ if (INDICATOR == -1)
+ printf ("NULL\n");
+ else
+ switch (TYPE)
+ {
+ case SQL3_BOOLEAN:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_bool,&(BOOLVAR),(long)1,(long)1,sizeof(bool), ECPGd_EODT);
+
+#line 163 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 163 "dyntest.pgc"
+
+ printf ("%s\n", BOOLVAR ? "true" : "false");
+ break;
+ case SQL3_INTEGER:
+ case SQL3_SMALLINT:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_int,&(INTVAR),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 168 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 168 "dyntest.pgc"
+
+ printf ("%d\n", INTVAR);
+ break;
+ case SQL3_DOUBLE_PRECISION:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_double,&(DOUBLEVAR),(long)1,(long)1,sizeof(double), ECPGd_EODT);
+
+#line 172 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 172 "dyntest.pgc"
+
+ printf ("%.*f\n", PRECISION, DOUBLEVAR);
+ break;
+ case SQL3_DATE_TIME_TIMESTAMP:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_di_code,
+ ECPGt_int,&(DATETIME_INTERVAL_CODE),(long)1,(long)1,sizeof(int), ECPGd_EODT);
+
+#line 178 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 178 "dyntest.pgc"
+
+ printf ("%d \"%s\"\n", DATETIME_INTERVAL_CODE, STRINGVAR);
+ break;
+ case SQL3_CHARACTER:
+ case SQL3_CHARACTER_VARYING:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_EODT);
+
+#line 183 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 183 "dyntest.pgc"
+
+ printf ("\"%s\"\n", STRINGVAR);
+ break;
+ default:
+ { ECPGget_desc(__LINE__, "MYDESC", INDEX,ECPGd_data,
+ ECPGt_char,(STRINGVAR),(long)1024,(long)1,(1024)*sizeof(char), ECPGd_EODT);
+
+#line 187 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 187 "dyntest.pgc"
+
+ printf ("<\"%s\">\n", STRINGVAR);
+ break;
+ }
+ }
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close MYCURS", ECPGt_EOIT, ECPGt_EORT);
+#line 194 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );}
+#line 194 "dyntest.pgc"
+
+
+ ECPGdeallocate_desc(__LINE__, "MYDESC");
+#line 196 "dyntest.pgc"
+
+if (sqlca.sqlcode < 0) error ( );
+#line 196 "dyntest.pgc"
+
+
+ return 0;
+ }
diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.stderr b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr
new file mode 100644
index 0000000..f0b21b0
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr
@@ -0,0 +1,390 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 49: query: set datestyle to german; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 49: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 49: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: query: insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: query: insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 55: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 55: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 57: name myquery; query: "select * from dyntest"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: query: declare MYCURS cursor for select * from dyntest; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: correctly got 1 tuples with 7 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: putting result (1 tuples) into descriptor MYDESC
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 7 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = name
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 183: RESULT: first entry offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = d
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 172: RESULT: 14.7 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 168: RESULT: 14 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = bignumber
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 12
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 187: RESULT: 123045607890 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = b
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 16
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 163: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = comment
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 47
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 183: RESULT: The world's most advanced open source database. offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = day
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 10
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 9
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 176: RESULT: 14.07.1987 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: correctly got 1 tuples with 7 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: putting result (1 tuples) into descriptor MYDESC
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc_header: found 7 attributes
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = name
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = 14
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 183: RESULT: second entry offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = d
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 172: RESULT: 1407.87 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 168: RESULT: 1407 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = bignumber
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 12
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 8
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 187: RESULT: 987065403210 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = b
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 16
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 163: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = comment
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 27
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 183: RESULT: The elephant never forgets. offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: NAME = day
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: SCALE = 65531
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: PRECISION = -1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: RETURNED[0] = 10
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: OCTET_LENGTH = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: LENGTH = -5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 9
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: INDICATOR[0] = 0
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: reading items for tuple 7
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGget_desc: TYPE = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 176: RESULT: 05.11.1999 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: query: fetch in MYCURS; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 64: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 64: correctly got 0 tuples with 7 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 64: no data found on line 64
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 194: query: close MYCURS; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 194: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 194: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.stdout b/src/interfaces/ecpg/test/expected/sql-dyntest.stdout
new file mode 100644
index 0000000..f8c4c8e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-dyntest.stdout
@@ -0,0 +1,43 @@
+Found 7 columns
+ 1 name (type: 1 length: 14 precision: 0 scale: 14 = char(14))
+ octet_length: -1 returned_octet_length: 14)
+ = "first entry "
+ 2 d (type: 8 length: -5 precision: -1 scale: 65531 = double precision)
+ octet_length: 8 returned_octet_length: 4)
+ = 14.700000
+ 3 i (type: 4 length: -5 precision: -1 scale: 65531 = integer)
+ octet_length: 4 returned_octet_length: 2)
+ = 14
+ 4 bignumber (type: 0 length: -5 precision: -1 scale: 65531 = <SQL3 0>)
+ octet_length: 8 returned_octet_length: 12)
+ = <"123045607890">
+ 5 b (type: 16 length: -5 precision: -1 scale: 65531 = bool)
+ octet_length: 1 returned_octet_length: 1)
+ = true
+ 6 comment (type: 1 length: -5 precision: -1 scale: 65531 = text)
+ octet_length: -1 returned_octet_length: 47)
+ = "The world's most advanced open source database."
+ 7 day (type: 9 length: -5 precision: -1 scale: 65531 = date)
+ octet_length: 4 returned_octet_length: 10)
+ = 1 "14.07.1987"
+ 1 name (type: 1 length: 14 precision: 0 scale: 14 = char(14))
+ octet_length: -1 returned_octet_length: 14)
+ = "second entry "
+ 2 d (type: 8 length: -5 precision: -1 scale: 65531 = double precision)
+ octet_length: 8 returned_octet_length: 7)
+ = 1407.870000
+ 3 i (type: 4 length: -5 precision: -1 scale: 65531 = integer)
+ octet_length: 4 returned_octet_length: 4)
+ = 1407
+ 4 bignumber (type: 0 length: -5 precision: -1 scale: 65531 = <SQL3 0>)
+ octet_length: 8 returned_octet_length: 12)
+ = <"987065403210">
+ 5 b (type: 16 length: -5 precision: -1 scale: 65531 = bool)
+ octet_length: 1 returned_octet_length: 1)
+ = false
+ 6 comment (type: 1 length: -5 precision: -1 scale: 65531 = text)
+ octet_length: -1 returned_octet_length: 27)
+ = "The elephant never forgets."
+ 7 day (type: 9 length: -5 precision: -1 scale: 65531 = date)
+ octet_length: 4 returned_octet_length: 10)
+ = 1 "05.11.1999"
diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c
new file mode 100644
index 0000000..10e9ad5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-execute.c
@@ -0,0 +1,331 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "execute.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "execute.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 8 "execute.pgc"
+
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+#line 14 "execute.pgc"
+ int amount [ 8 ] ;
+
+#line 15 "execute.pgc"
+ int increment = 100 ;
+
+#line 16 "execute.pgc"
+ char name [ 8 ] [ 8 ] ;
+
+#line 17 "execute.pgc"
+ char letter [ 8 ] [ 1 ] ;
+
+#line 18 "execute.pgc"
+ char command [ 128 ] ;
+/* exec sql end declare section */
+#line 19 "execute.pgc"
+
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "main", 0);
+#line 24 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 25 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 25 "execute.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 26 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "execute.pgc"
+
+
+ /* test handling of embedded quotes in EXECUTE IMMEDIATE "literal" */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, "insert into test (name, \042amount\042, letter) values ('db: ''r1''', 1, 'f')", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 29 "execute.pgc"
+
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, command, ECPGt_EOIT, ECPGt_EORT);
+#line 32 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "execute.pgc"
+
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, command, ECPGt_EOIT, ECPGt_EORT);
+#line 35 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "execute.pgc"
+
+
+ printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
+ { ECPGprepare(__LINE__, NULL, 0, "i", command);
+#line 40 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 40 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "i",
+ ECPGt_int,&(increment),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 41 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 41 "execute.pgc"
+
+
+ printf("Inserted %ld tuples via prepared execute\n", sqlca.sqlerrd[2]);
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 45 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 45 "execute.pgc"
+
+
+ sprintf (command, "select * from test");
+
+ { ECPGprepare(__LINE__, NULL, 0, "f", command);
+#line 49 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 49 "execute.pgc"
+
+ /* declare CUR cursor for $1 */
+#line 50 "execute.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 52 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 52 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)8,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 53 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "execute.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ /* exec sql begin declare section */
+
+
+
+#line 58 "execute.pgc"
+ char n [ 8 ] , l = letter [ i ] [ 0 ] ;
+
+#line 59 "execute.pgc"
+ int a = amount [ i ] ;
+/* exec sql end declare section */
+#line 60 "execute.pgc"
+
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
+#line 66 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 66 "execute.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "f");
+#line 67 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 67 "execute.pgc"
+
+
+ sprintf (command, "select * from test where amount = $1");
+
+ { ECPGprepare(__LINE__, NULL, 0, "f", command);
+#line 71 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 71 "execute.pgc"
+
+ /* declare CUR2 cursor for $1 */
+#line 72 "execute.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR2 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_const,"1",(long)1,(long)1,strlen("1"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 74 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in CUR2", ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)8,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 75 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 75 "execute.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ /* exec sql begin declare section */
+
+
+
+#line 80 "execute.pgc"
+ char n [ 8 ] , l = letter [ i ] [ 0 ] ;
+
+#line 81 "execute.pgc"
+ int a = amount [ i ] ;
+/* exec sql end declare section */
+#line 82 "execute.pgc"
+
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR2", ECPGt_EOIT, ECPGt_EORT);
+#line 88 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 88 "execute.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "f");
+#line 89 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 89 "execute.pgc"
+
+
+ sprintf (command, "select * from test where amount = $1");
+
+ { ECPGprepare(__LINE__, NULL, 0, "f", command);
+#line 93 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 93 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "f",
+ ECPGt_const,"2",(long)1,(long)1,strlen("2"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)8,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 94 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 94 "execute.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ /* exec sql begin declare section */
+
+
+
+#line 99 "execute.pgc"
+ char n [ 8 ] , l = letter [ i ] [ 0 ] ;
+
+#line 100 "execute.pgc"
+ int a = amount [ i ] ;
+/* exec sql end declare section */
+#line 101 "execute.pgc"
+
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "f");
+#line 107 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 107 "execute.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 108 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 108 "execute.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 109 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 109 "execute.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 110 "execute.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 110 "execute.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-execute.stderr b/src/interfaces/ecpg/test/expected/sql-execute.stderr
new file mode 100644
index 0000000..d8bc3c6
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-execute.stderr
@@ -0,0 +1,172 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 26: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: insert into test (name, "amount", letter) values ('db: ''r1''', 1, 'f'); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't'); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into test (name, amount, letter) select name, amount+10, letter from test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 40: name i; query: "insert into test (name, amount, letter) select name, amount+$1, letter from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: insert into test (name, amount, letter) select name, amount+$1, letter from test; with 1 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecPrepared for "insert into test (name, amount, letter) select name, amount+$1, letter from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = 100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 45: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 49: name f; query: "select * from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: query: declare CUR cursor for select * from test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 52: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 52: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: fetch 8 in CUR; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: correctly got 8 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 11 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 12 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 101 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 102 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 111 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: 112 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 53: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 66: query: close CUR; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 66: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 66: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 67: name f
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 71: name f; query: "select * from test where amount = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: query: declare CUR2 cursor for select * from test where amount = $1; with 1 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 74: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 75: query: fetch in CUR2; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 75: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 75: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 75: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 75: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 75: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: query: close CUR2; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 88: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 89: name f
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 93: name f; query: "select * from test where amount = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 94: query: select * from test where amount = $1; with 1 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 94: using PQexecPrepared for "select * from test where amount = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 94: parameter 1 = 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 94: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 94: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 94: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 94: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 107: name f
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: query: drop table test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 108: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 108: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 109: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-execute.stdout b/src/interfaces/ecpg/test/expected/sql-execute.stdout
new file mode 100644
index 0000000..5f9295a
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-execute.stdout
@@ -0,0 +1,12 @@
+Inserted 2 tuples via execute immediate
+Inserted 4 tuples via prepared execute
+name[0]=db: 'r1' amount[0]=1 letter[0]=f
+name[1]=db: 'r1' amount[1]=2 letter[1]=t
+name[2]=db: 'r1' amount[2]=11 letter[2]=f
+name[3]=db: 'r1' amount[3]=12 letter[3]=t
+name[4]=db: 'r1' amount[4]=101 letter[4]=f
+name[5]=db: 'r1' amount[5]=102 letter[5]=t
+name[6]=db: 'r1' amount[6]=111 letter[6]=f
+name[7]=db: 'r1' amount[7]=112 letter[7]=t
+name[0]=db: 'r1' amount[0]=1 letter[0]=f
+name[0]=db: 'r1' amount[0]=2 letter[0]=t
diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c
new file mode 100644
index 0000000..ca7d14e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-fetch.c
@@ -0,0 +1,237 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "fetch.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "fetch.pgc"
+
+
+int main() {
+ /* exec sql begin declare section */
+
+
+
+#line 9 "fetch.pgc"
+ char str [ 25 ] ;
+
+#line 10 "fetch.pgc"
+ int i , count = 1 , loopcount ;
+/* exec sql end declare section */
+#line 11 "fetch.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 14 "fetch.pgc"
+
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 16 "fetch.pgc"
+
+ /* exec sql whenever sqlerror stop ; */
+#line 17 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table My_Table ( Item1 int , Item2 text )", ECPGt_EOIT, ECPGt_EORT);
+#line 19 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 19 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 19 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 1 , 'text1' )", ECPGt_EOIT, ECPGt_EORT);
+#line 21 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 21 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 21 "fetch.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 2 , 'text2' )", ECPGt_EOIT, ECPGt_EORT);
+#line 22 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 22 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 22 "fetch.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 3 , 'text3' )", ECPGt_EOIT, ECPGt_EORT);
+#line 23 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 23 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 23 "fetch.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 4 , 'text4' )", ECPGt_EOIT, ECPGt_EORT);
+#line 24 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 24 "fetch.pgc"
+
+
+ /* declare C cursor for select * from My_Table */
+#line 26 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select * from My_Table", ECPGt_EOIT, ECPGt_EORT);
+#line 28 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 28 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 28 "fetch.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 30 "fetch.pgc"
+
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 32 "fetch.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 32 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 32 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 32 "fetch.pgc"
+
+ printf("%d: %s\n", i, str);
+ }
+
+ /* exec sql whenever not found continue ; */
+#line 36 "fetch.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "move backward 2 in C", ECPGt_EOIT, ECPGt_EORT);
+#line 37 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 37 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 37 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0 in C",
+ ECPGt_int,&(count),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 39 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 39 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 39 "fetch.pgc"
+
+ printf("%d: %s\n", i, str);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
+#line 42 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 42 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 42 "fetch.pgc"
+
+
+ /* declare D cursor for select * from My_Table where Item1 = $1 */
+#line 44 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare D cursor for select * from My_Table where Item1 = $1",
+ ECPGt_const,"1",(long)1,(long)1,strlen("1"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 46 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 46 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 46 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in D", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 48 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 48 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 48 "fetch.pgc"
+
+ printf("%d: %s\n", i, str);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close D", ECPGt_EOIT, ECPGt_EORT);
+#line 51 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 51 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 51 "fetch.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table My_Table", ECPGt_EOIT, ECPGt_EORT);
+#line 53 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 53 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 53 "fetch.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 55 "fetch.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 55 "fetch.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "fetch.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.stderr b/src/interfaces/ecpg/test/expected/sql-fetch.stderr
new file mode 100644
index 0000000..319d3b8
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-fetch.stderr
@@ -0,0 +1,142 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: query: create table My_Table ( Item1 int , Item2 text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 19: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: query: insert into My_Table values ( 1 , 'text1' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 21: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: insert into My_Table values ( 2 , 'text2' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: insert into My_Table values ( 3 , 'text3' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: insert into My_Table values ( 4 , 'text4' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: declare C cursor for select * from My_Table; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: text1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: text2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: text3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 32: RESULT: text4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: correctly got 0 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 32: no data found on line 32
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 37: query: move backward 2 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 37: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 37: OK: MOVE 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: fetch 1 in C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 39: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 39: RESULT: text4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: close C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: query: declare D cursor for select * from My_Table where Item1 = $1; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 46: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 46: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 46: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: query: fetch 1 in D; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 48: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 48: RESULT: text1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: close D; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: drop table My_Table; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.stdout b/src/interfaces/ecpg/test/expected/sql-fetch.stdout
new file mode 100644
index 0000000..84dca88
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-fetch.stdout
@@ -0,0 +1,6 @@
+1: text1
+2: text2
+3: text3
+4: text4
+4: text4
+1: text1
diff --git a/src/interfaces/ecpg/test/expected/sql-func.c b/src/interfaces/ecpg/test/expected/sql-func.c
new file mode 100644
index 0000000..17c5d26
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-func.c
@@ -0,0 +1,170 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "func.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "func.pgc"
+
+
+int main() {
+
+#line 8 "func.pgc"
+ char text [ 25 ] ;
+
+#line 8 "func.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 11 "func.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "on", NULL);}
+#line 13 "func.pgc"
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 14 "func.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 15 "func.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table My_Table ( Item1 int , Item2 text )", ECPGt_EOIT, ECPGt_EORT);
+#line 17 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 17 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 17 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table Log ( name text , w text )", ECPGt_EOIT, ECPGt_EORT);
+#line 18 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 18 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 18 "func.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create function My_Table_Check ( ) returns trigger as $test$\
+ BEGIN\
+ INSERT INTO Log VALUES(TG_NAME, TG_WHEN);\
+ RETURN NEW;\
+ END; $test$ language plpgsql", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 26 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "func.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create trigger My_Table_Check_Trigger before insert on My_Table for each row execute procedure My_Table_Check ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 32 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "func.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 1234 , 'Some random text' )", ECPGt_EOIT, ECPGt_EORT);
+#line 34 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 34 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 34 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into My_Table values ( 5678 , 'The Quick Brown' )", ECPGt_EOIT, ECPGt_EORT);
+#line 35 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 35 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select name from Log limit 1", ECPGt_EOIT,
+ ECPGt_char,(text),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 36 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 36 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "func.pgc"
+
+ printf("Trigger %s fired.\n", text);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop trigger My_Table_Check_Trigger on My_Table", ECPGt_EOIT, ECPGt_EORT);
+#line 39 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 39 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 39 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop function My_Table_Check ( )", ECPGt_EOIT, ECPGt_EORT);
+#line 40 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 40 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 40 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table Log", ECPGt_EOIT, ECPGt_EORT);
+#line 41 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 41 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 41 "func.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table My_Table", ECPGt_EOIT, ECPGt_EORT);
+#line 42 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 42 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 42 "func.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 44 "func.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 44 "func.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 44 "func.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-func.stderr b/src/interfaces/ecpg/test/expected/sql-func.stderr
new file mode 100644
index 0000000..9b2501a
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-func.stderr
@@ -0,0 +1,76 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 13: action "on"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 17: query: create table My_Table ( Item1 int , Item2 text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 17: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 17: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: query: create table Log ( name text , w text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 18: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: create function My_Table_Check ( ) returns trigger as $test$ BEGIN INSERT INTO Log VALUES(TG_NAME, TG_WHEN); RETURN NEW; END; $test$ language plpgsql; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: CREATE FUNCTION
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: create trigger My_Table_Check_Trigger before insert on My_Table for each row execute procedure My_Table_Check ( ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: OK: CREATE TRIGGER
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: insert into My_Table values ( 1234 , 'Some random text' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: insert into My_Table values ( 5678 , 'The Quick Brown' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: select name from Log limit 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: my_table_check_trigger offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: query: drop trigger My_Table_Check_Trigger on My_Table; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 39: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 39: OK: DROP TRIGGER
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: drop function My_Table_Check ( ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: DROP FUNCTION
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: drop table Log; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: drop table My_Table; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-func.stdout b/src/interfaces/ecpg/test/expected/sql-func.stdout
new file mode 100644
index 0000000..9a3ec25
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-func.stdout
@@ -0,0 +1 @@
+Trigger my_table_check_trigger fired.
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c
new file mode 100644
index 0000000..7cf43ad
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-indicators.c
@@ -0,0 +1,189 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "indicators.pgc"
+#include <stdio.h>
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 3 "indicators.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 4 "indicators.pgc"
+
+
+int main()
+{
+ /* exec sql begin declare section */
+
+
+
+#line 9 "indicators.pgc"
+ int intvar = 5 ;
+
+#line 10 "indicators.pgc"
+ int nullind = - 1 ;
+/* exec sql end declare section */
+#line 11 "indicators.pgc"
+
+
+ ECPGdebug(1,stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 15 "indicators.pgc"
+
+ { ECPGsetcommit(__LINE__, "off", NULL);}
+#line 16 "indicators.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table indicator_test ( \"id\" int primary key , \"str\" text not null , val int null )", ECPGt_EOIT, ECPGt_EORT);}
+#line 21 "indicators.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 22 "indicators.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into indicator_test ( id , str , val ) values ( 1 , 'Hello' , 0 )", ECPGt_EOIT, ECPGt_EORT);}
+#line 24 "indicators.pgc"
+
+
+ /* use indicator in insert */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into indicator_test ( id , str , val ) values ( 2 , 'Hi there' , $1 )",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
+#line 27 "indicators.pgc"
+
+ nullind = 0;
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into indicator_test ( id , str , val ) values ( 3 , 'Good evening' , $1 )",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
+#line 29 "indicators.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 30 "indicators.pgc"
+
+
+ /* use indicators to get information about selects */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select val from indicator_test where id = 1", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 33 "indicators.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select val from indicator_test where id = 2", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
+#line 34 "indicators.pgc"
+
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select val from indicator_test where id = 3", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
+#line 36 "indicators.pgc"
+
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+
+ /* use indicators for update */
+ intvar = 5; nullind = -1;
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "update indicator_test set val = $1 where id = 1",
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);}
+#line 41 "indicators.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select val from indicator_test where id = 1", ECPGt_EOIT,
+ ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int),
+ ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);}
+#line 42 "indicators.pgc"
+
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table indicator_test", ECPGt_EOIT, ECPGt_EORT);}
+#line 45 "indicators.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit work");}
+#line 46 "indicators.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 48 "indicators.pgc"
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.stderr b/src/interfaces/ecpg/test/expected/sql-indicators.stderr
new file mode 100644
index 0000000..5813ce2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-indicators.stderr
@@ -0,0 +1,88 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 16: action "off"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: query: create table indicator_test ( "id" int primary key , "str" text not null , val int null ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 18: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 22: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: insert into indicator_test ( id , str , val ) values ( 1 , 'Hello' , 0 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: query: insert into indicator_test ( id , str , val ) values ( 2 , 'Hi there' , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 27: parameter 1 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 27: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: insert into indicator_test ( id , str , val ) values ( 3 , 'Good evening' , $1 ); with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 29: parameter 1 = 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 30: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: select val from indicator_test where id = 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 33: RESULT: 0 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: select val from indicator_test where id = 2; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 34: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: select val from indicator_test where id = 3; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 36: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: query: update indicator_test set val = $1 where id = 1; with 1 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 41: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 41: parameter 1 = null
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 41: OK: UPDATE 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: select val from indicator_test where id = 1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 42: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: query: drop table indicator_test; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 45: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 46: action "commit work"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.stdout b/src/interfaces/ecpg/test/expected/sql-indicators.stdout
new file mode 100644
index 0000000..e9d6fd1
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-indicators.stdout
@@ -0,0 +1,3 @@
+intvar: 0, nullind: -1
+intvar: 5, nullind: 0
+intvar: 5, nullind: -1
diff --git a/src/interfaces/ecpg/test/expected/sql-insupd.c b/src/interfaces/ecpg/test/expected/sql-insupd.c
new file mode 100644
index 0000000..5f73bf5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-insupd.c
@@ -0,0 +1,145 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "insupd.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "insupd.pgc"
+
+
+int main() {
+ /* exec sql begin declare section */
+
+
+#line 9 "insupd.pgc"
+ int i1 [ 3 ] , i2 [ 3 ] , i3 [ 3 ] , i4 ;
+/* exec sql end declare section */
+#line 10 "insupd.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 13 "insupd.pgc"
+
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 15 "insupd.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 16 "insupd.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table insupd_test ( a int , b int )", ECPGt_EOIT, ECPGt_EORT);
+#line 18 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 18 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 18 "insupd.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into insupd_test ( a , b ) values ( 1 , 1 )", ECPGt_EOIT, ECPGt_EORT);
+#line 20 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 20 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 20 "insupd.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into insupd_test ( a , b ) values ( 2 , 2 )", ECPGt_EOIT, ECPGt_EORT);
+#line 21 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 21 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 21 "insupd.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into insupd_test ( a , b ) values ( 3 , 3 ) returning a", ECPGt_EOIT,
+ ECPGt_int,&(i4),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 22 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 22 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 22 "insupd.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "update insupd_test set a = a + 1 returning a", ECPGt_EOIT,
+ ECPGt_int,(i3),(long)1,(long)3,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 24 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "insupd.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "update insupd_test set ( a , b ) = ( 5 , 5 ) where a = 4", ECPGt_EOIT, ECPGt_EORT);
+#line 25 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 25 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 25 "insupd.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "update insupd_test set a = 4 where a = 3", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 26 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "insupd.pgc"
+;
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select a , b from insupd_test order by a", ECPGt_EOIT,
+ ECPGt_int,(i1),(long)1,(long)3,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(i2),(long)1,(long)3,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 28 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 28 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 28 "insupd.pgc"
+
+
+ printf("changes\n%d %d %d %d\n", i3[0], i3[1], i3[2], i4);
+ printf("test\na b\n%d %d\n%d %d\n%d %d\n", i1[0], i2[0], i1[1], i2[1], i1[2], i2[2]);
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 33 "insupd.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 33 "insupd.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 33 "insupd.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-insupd.stderr b/src/interfaces/ecpg/test/expected/sql-insupd.stderr
new file mode 100644
index 0000000..16f7c0a
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-insupd.stderr
@@ -0,0 +1,74 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: query: create table insupd_test ( a int , b int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 18: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: insert into insupd_test ( a , b ) values ( 1 , 1 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: query: insert into insupd_test ( a , b ) values ( 2 , 2 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 21: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 21: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: insert into insupd_test ( a , b ) values ( 3 , 3 ) returning a; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 22: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: update insupd_test set a = a + 1 returning a; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: correctly got 3 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 24: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 24: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 24: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: query: update insupd_test set ( a , b ) = ( 5 , 5 ) where a = 4; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 25: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 25: OK: UPDATE 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: update insupd_test set a = 4 where a = 3; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: UPDATE 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: select a , b from insupd_test order by a; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 28: correctly got 3 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 28: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-insupd.stdout b/src/interfaces/ecpg/test/expected/sql-insupd.stdout
new file mode 100644
index 0000000..5cefd43
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-insupd.stdout
@@ -0,0 +1,7 @@
+changes
+2 3 4 3
+test
+a b
+2 1
+4 2
+5 5
diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.c b/src/interfaces/ecpg/test/expected/sql-oldexec.c
new file mode 100644
index 0000000..d6a661e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-oldexec.c
@@ -0,0 +1,251 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "oldexec.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "oldexec.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 8 "oldexec.pgc"
+
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+
+#line 14 "oldexec.pgc"
+ int amount [ 8 ] ;
+
+#line 15 "oldexec.pgc"
+ int increment = 100 ;
+
+#line 16 "oldexec.pgc"
+ char name [ 8 ] [ 8 ] ;
+
+#line 17 "oldexec.pgc"
+ char letter [ 8 ] [ 1 ] ;
+
+#line 18 "oldexec.pgc"
+ char command [ 128 ] ;
+/* exec sql end declare section */
+#line 19 "oldexec.pgc"
+
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "main", 0);
+#line 24 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "oldexec.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "oldexec.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 27 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 27 "oldexec.pgc"
+
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f')");
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_exec_immediate, command, ECPGt_EOIT, ECPGt_EORT);
+#line 30 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 30 "oldexec.pgc"
+
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_exec_immediate, command, ECPGt_EOIT, ECPGt_EORT);
+#line 33 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 33 "oldexec.pgc"
+
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_exec_immediate, command, ECPGt_EOIT, ECPGt_EORT);
+#line 36 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "oldexec.pgc"
+
+
+ printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
+ { ECPGprepare(__LINE__, NULL, 1, "i", command);
+#line 41 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 41 "oldexec.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_execute, "i",
+ ECPGt_int,&(increment),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 42 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 42 "oldexec.pgc"
+
+
+ printf("Inserted %ld tuples via prepared execute\n", sqlca.sqlerrd[2]);
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 46 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 46 "oldexec.pgc"
+
+
+ sprintf (command, "select * from test");
+
+ { ECPGprepare(__LINE__, NULL, 1, "f", command);
+#line 50 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "oldexec.pgc"
+
+ /* declare CUR cursor for $1 */
+#line 51 "oldexec.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 53 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "oldexec.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)8,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 54 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 54 "oldexec.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
+#line 65 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 65 "oldexec.pgc"
+
+
+ sprintf (command, "select * from test where ? = amount");
+
+ { ECPGprepare(__LINE__, NULL, 1, "f", command);
+#line 69 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 69 "oldexec.pgc"
+
+ /* declare CUR3 cursor for $1 */
+#line 70 "oldexec.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR3 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_const,"1",(long)1,(long)1,strlen("1"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 72 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 72 "oldexec.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch in CUR3", ECPGt_EOIT,
+ ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,(amount),(long)1,(long)8,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(letter),(long)1,(long)8,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 73 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 73 "oldexec.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR3", ECPGt_EOIT, ECPGt_EORT);
+#line 84 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 84 "oldexec.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 85 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 85 "oldexec.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 86 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 86 "oldexec.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 87 "oldexec.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 87 "oldexec.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.stderr b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr
new file mode 100644
index 0000000..7543757
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr
@@ -0,0 +1,154 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 27: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f'); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: query: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't'); with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 33: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 33: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: query: insert into test (name, amount, letter) select name, amount+10, letter from test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 36: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 36: OK: INSERT 0 2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 41: name i; query: "insert into test (name, amount, letter) select name, amount+$1, letter from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: query: insert into test (name, amount, letter) select name, amount+$1, letter from test; with 1 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 42: using PQexecPrepared for "insert into test (name, amount, letter) select name, amount+$1, letter from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 42: parameter 1 = 100
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 42: OK: INSERT 0 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 46: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 50: name f; query: "select * from test"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: query: declare CUR cursor for select * from test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: query: fetch 8 in CUR; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 54: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 54: correctly got 8 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 11 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 12 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 101 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 102 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 111 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: 112 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 54: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: query: close CUR; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 65: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 65: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 69: name f
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 69: name f; query: "select * from test where $1 = amount"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: query: declare CUR3 cursor for select * from test where $1 = amount; with 1 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 72: using PQexecParams
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 72: parameter 1 = 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 72: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: query: fetch in CUR3; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 73: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 73: correctly got 1 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 73: RESULT: db: 'r1' offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 73: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 73: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: query: close CUR3; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 84: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 84: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: query: drop table test; with 0 parameter(s) on connection main
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 85: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 86: action "commit"; connection "main"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name f
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 0: name i
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection main closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.stdout b/src/interfaces/ecpg/test/expected/sql-oldexec.stdout
new file mode 100644
index 0000000..1f4d4f2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-oldexec.stdout
@@ -0,0 +1,11 @@
+Inserted 2 tuples via execute immediate
+Inserted 4 tuples via prepared execute
+name[0]=db: 'r1' amount[0]=1 letter[0]=f
+name[1]=db: 'r1' amount[1]=2 letter[1]=t
+name[2]=db: 'r1' amount[2]=11 letter[2]=f
+name[3]=db: 'r1' amount[3]=12 letter[3]=t
+name[4]=db: 'r1' amount[4]=101 letter[4]=f
+name[5]=db: 'r1' amount[5]=102 letter[5]=t
+name[6]=db: 'r1' amount[6]=111 letter[6]=f
+name[7]=db: 'r1' amount[7]=112 letter[7]=t
+name[0]=db: 'r1' amount[0]=1 letter[0]=f
diff --git a/src/interfaces/ecpg/test/expected/sql-parser.c b/src/interfaces/ecpg/test/expected/sql-parser.c
new file mode 100644
index 0000000..32bb2c2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-parser.c
@@ -0,0 +1,126 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "parser.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* test parser addition that merges two tokens into one */
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "parser.pgc"
+
+
+int main() {
+ /* exec sql begin declare section */
+
+
+#line 10 "parser.pgc"
+ int item [ 3 ] , ind [ 3 ] , i ;
+/* exec sql end declare section */
+#line 11 "parser.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 14 "parser.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "on", NULL);}
+#line 16 "parser.pgc"
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 17 "parser.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 18 "parser.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table T ( Item1 int , Item2 int )", ECPGt_EOIT, ECPGt_EORT);
+#line 20 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 20 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 20 "parser.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t select 1 , nullif ( y - 1 , 0 ) from generate_series ( 1 , 3 ) with ordinality as series ( x , y )", ECPGt_EOIT, ECPGt_EORT);
+#line 24 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 24 "parser.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select Item2 from T order by Item2 nulls last", ECPGt_EOIT,
+ ECPGt_int,(item),(long)1,(long)3,sizeof(int),
+ ECPGt_int,(ind),(long)1,(long)3,sizeof(int), ECPGt_EORT);
+#line 26 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 26 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "parser.pgc"
+
+
+ for (i=0; i<3; i++)
+ printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter table T alter Item1 type bigint", ECPGt_EOIT, ECPGt_EORT);
+#line 31 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 31 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 31 "parser.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter table T alter column Item2 set data type smallint", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 32 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "parser.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table T", ECPGt_EOIT, ECPGt_EORT);
+#line 34 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 34 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 34 "parser.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 36 "parser.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 36 "parser.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "parser.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-parser.stderr b/src/interfaces/ecpg/test/expected/sql-parser.stderr
new file mode 100644
index 0000000..fba8fd1
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-parser.stderr
@@ -0,0 +1,50 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 16: action "on"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: create table T ( Item1 int , Item2 int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: insert into t select 1 , nullif ( y - 1 , 0 ) from generate_series ( 1 , 3 ) with ordinality as series ( x , y ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: OK: INSERT 0 3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: select Item2 from T order by Item2 nulls last; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: correctly got 3 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 26: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 26: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 26: RESULT: offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: alter table T alter Item1 type bigint; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: OK: ALTER TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: alter table T alter column Item2 set data type smallint; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: ALTER TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: drop table T; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-parser.stdout b/src/interfaces/ecpg/test/expected/sql-parser.stdout
new file mode 100644
index 0000000..e646ca2
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-parser.stdout
@@ -0,0 +1,3 @@
+item[0] = 1
+item[1] = 2
+item[2] = -1
diff --git a/src/interfaces/ecpg/test/expected/sql-prepareas.c b/src/interfaces/ecpg/test/expected/sql-prepareas.c
new file mode 100644
index 0000000..b925c4b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-prepareas.c
@@ -0,0 +1,664 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "prepareas.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "prepareas.pgc"
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 6 "prepareas.pgc"
+
+
+static void
+check_result_of_insert(void)
+{
+ /* exec sql begin declare section */
+
+
+#line 12 "prepareas.pgc"
+ int ivar1 = 0 , ivar2 = 0 ;
+/* exec sql end declare section */
+#line 13 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c1 , c2 from test", ECPGt_EOIT,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 15 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 15 "prepareas.pgc"
+
+ printf("%d %d\n", ivar1, ivar2);
+}
+
+int main(void)
+{
+ /* exec sql begin declare section */
+
+
+
+#line 22 "prepareas.pgc"
+ int ivar1 = 1 , ivar2 = 2 ;
+
+#line 23 "prepareas.pgc"
+ char v_include_dq_name [ 16 ] , v_include_ws_name [ 16 ] , v_normal_name [ 16 ] , v_query [ 64 ] ;
+/* exec sql end declare section */
+#line 24 "prepareas.pgc"
+
+
+ strcpy(v_normal_name, "normal_name");
+ strcpy(v_include_dq_name, "include_\"_name");
+ strcpy(v_include_ws_name, "include_ _name");
+ strcpy(v_query, "insert into test values(?,?)");
+
+ /*
+ * preparing for test
+ */
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 34 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 34 "prepareas.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "begin");
+#line 35 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "prepareas.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( c1 int , c2 int )", ECPGt_EOIT, ECPGt_EORT);
+#line 36 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 36 "prepareas.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit work");
+#line 37 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 37 "prepareas.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "begin");
+#line 38 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "prepareas.pgc"
+
+
+ /*
+ * Non dynamic statement
+ */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 43 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 43 "prepareas.pgc"
+
+ printf("+++++ Test for prepnormal +++++\n");
+ printf("insert into test values(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1 , $2 )",
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 46 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 46 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 49 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 49 "prepareas.pgc"
+
+ printf("+++++ Test for execute immediate +++++\n");
+ printf("execute immediate \"insert into test values(1,2)\"\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, "insert into test values(1,2)", ECPGt_EOIT, ECPGt_EORT);
+#line 52 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 52 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ /*
+ * PREPARE FROM
+ */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 58 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 58 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE ident FROM CString +++++\n");
+ printf("prepare ident_name from \"insert into test values(?,?)\"\n");
+ { ECPGprepare(__LINE__, NULL, 0, "ident_name", "insert into test values(?,?)");
+#line 61 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 61 "prepareas.pgc"
+
+ printf("execute ident_name using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "ident_name",
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 63 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 63 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 66 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 66 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE char_variable_normal_name FROM char_variable +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
+#line 69 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 69 "prepareas.pgc"
+
+ printf("execute :v_normal_name using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_normal_name,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 71 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 71 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 74 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE char_variable_inc_dq_name FROM char_variable +++++\n");
+ printf("prepare :v_include_dq_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, v_include_dq_name, v_query);
+#line 77 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 77 "prepareas.pgc"
+
+ printf("execute :v_include_dq_name using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_include_dq_name,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 79 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 79 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 82 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 82 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE char_variable_inc_ws_name FROM char_variable +++++\n");
+ printf("prepare :v_include_ws_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, v_include_ws_name, v_query);
+#line 85 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 85 "prepareas.pgc"
+
+ printf("execute :v_include_ws_name using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_include_ws_name,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 87 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 87 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 90 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 90 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE CString_inc_ws_name FROM char_variable +++++\n");
+ printf("prepare \"include_ _name\" from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, "include_ _name", v_query);
+#line 93 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 93 "prepareas.pgc"
+
+ printf("exec sql execute \"include_ _name\" using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "include_ _name",
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 95 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 95 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 98 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 98 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE CString_normal_name FROM char_variable +++++\n");
+ printf("prepare \"norma_name\" from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, "normal_name", v_query);
+#line 101 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 101 "prepareas.pgc"
+
+ printf("exec sql execute \"normal_name\" using :ivar1,:ivar2\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "normal_name",
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 103 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 103 "prepareas.pgc"
+
+ check_result_of_insert();
+
+ /*
+ * PREPARE AS
+ */
+ { ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
+#line 109 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 109 "prepareas.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
+#line 110 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 110 "prepareas.pgc"
+
+ { ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
+#line 111 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 111 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 113 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 113 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE ident(typelist) AS +++++\n");
+ printf("prepare ident_name(int,int) as insert into test values($1,$2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )",
+ ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 116 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 116 "prepareas.pgc"
+
+ printf("execute ident_name(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 118 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 118 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
+#line 120 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 120 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 122 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 122 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE CString_normal_name(typelist) AS +++++\n");
+ printf("prepare \"normal_name\"(int,int) as insert into test values($1,$2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )",
+ ECPGt_const,"normal_name",(long)11,(long)1,strlen("normal_name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 125 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 125 "prepareas.pgc"
+
+ printf("execute \"normal_name\"(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_const,"normal_name",(long)11,(long)1,strlen("normal_name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 127 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 127 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
+#line 129 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 129 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 131 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 131 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE CString_include_ws_name(typelist) AS +++++\n");
+ printf("prepare \"include_ _name\"(int,int) as insert into test values($1,$2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )",
+ ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 134 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 134 "prepareas.pgc"
+
+ printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 136 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 136 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
+#line 138 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 138 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 140 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 140 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE char_variable_normal_name(typelist) AS +++++\n");
+ printf("prepare :v_normal_name(int,int) as insert into test values($1,$2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )",
+ ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 143 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 143 "prepareas.pgc"
+
+ printf("execute :v_normal_name(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 145 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 145 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
+#line 147 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 147 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 149 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 149 "prepareas.pgc"
+
+ printf("+++++ Test for PREPARE char_variable_include_ws_name(typelist) AS +++++\n");
+ printf("prepare :v_include_ws_name(int,int) as insert into test values($1,$2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )",
+ ECPGt_char,(v_include_ws_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 152 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 152 "prepareas.pgc"
+
+ printf("execute :v_include_ws_name(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_char,(v_include_ws_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 154 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 154 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
+#line 156 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 156 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 158 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 158 "prepareas.pgc"
+
+ printf("+++++ Test for EXECUTE :v_normal_name(const,const) +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
+#line 161 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 161 "prepareas.pgc"
+
+ printf("execute :v_normal_name(1,2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( 1 , 2 )",
+ ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 163 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 163 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
+#line 165 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 165 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 167 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 167 "prepareas.pgc"
+
+ printf("+++++ Test for EXECUTE :v_normal_name(expr,expr) +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
+#line 170 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 170 "prepareas.pgc"
+
+ printf("execute :v_normal_name(0+1,1+1)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( 0 + 1 , 1 + 1 )",
+ ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 172 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 172 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
+#line 174 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 174 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 176 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 176 "prepareas.pgc"
+
+ printf("+++++ Test for combination PREPARE FROM and EXECUTE ident(typelist) +++++\n");
+ printf("prepare ident_name from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, "ident_name", v_query);
+#line 179 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 179 "prepareas.pgc"
+
+ printf("execute ident_name(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 181 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 181 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
+#line 183 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 183 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
+#line 185 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 185 "prepareas.pgc"
+
+ printf("+++++ Test for combination PREPARE FROM and EXECUTE CString_include_ws_name(typelist) +++++\n");
+ printf("prepare \"include_ _name\" from :v_query\n");
+ { ECPGprepare(__LINE__, NULL, 0, "include_ _name", v_query);
+#line 188 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 188 "prepareas.pgc"
+
+ printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1 , $2 )",
+ ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 190 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 190 "prepareas.pgc"
+
+ check_result_of_insert();
+ { ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
+#line 192 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 192 "prepareas.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
+#line 194 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 194 "prepareas.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit work");
+#line 195 "prepareas.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 195 "prepareas.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-prepareas.stderr b/src/interfaces/ecpg/test/expected/sql-prepareas.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-prepareas.stderr
diff --git a/src/interfaces/ecpg/test/expected/sql-prepareas.stdout b/src/interfaces/ecpg/test/expected/sql-prepareas.stdout
new file mode 100644
index 0000000..d875442
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-prepareas.stdout
@@ -0,0 +1,66 @@
++++++ Test for prepnormal +++++
+insert into test values(:ivar1,:ivar2)
+1 2
++++++ Test for execute immediate +++++
+execute immediate "insert into test values(1,2)"
+1 2
++++++ Test for PREPARE ident FROM CString +++++
+prepare ident_name from "insert into test values(?,?)"
+execute ident_name using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE char_variable_normal_name FROM char_variable +++++
+prepare :v_normal_name from :v_query
+execute :v_normal_name using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE char_variable_inc_dq_name FROM char_variable +++++
+prepare :v_include_dq_name from :v_query
+execute :v_include_dq_name using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE char_variable_inc_ws_name FROM char_variable +++++
+prepare :v_include_ws_name from :v_query
+execute :v_include_ws_name using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE CString_inc_ws_name FROM char_variable +++++
+prepare "include_ _name" from :v_query
+exec sql execute "include_ _name" using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE CString_normal_name FROM char_variable +++++
+prepare "norma_name" from :v_query
+exec sql execute "normal_name" using :ivar1,:ivar2
+1 2
++++++ Test for PREPARE ident(typelist) AS +++++
+prepare ident_name(int,int) as insert into test values($1,$2)
+execute ident_name(:ivar1,:ivar2)
+1 2
++++++ Test for PREPARE CString_normal_name(typelist) AS +++++
+prepare "normal_name"(int,int) as insert into test values($1,$2)
+execute "normal_name"(:ivar1,:ivar2)
+1 2
++++++ Test for PREPARE CString_include_ws_name(typelist) AS +++++
+prepare "include_ _name"(int,int) as insert into test values($1,$2)
+execute "include_ _name"(:ivar1,:ivar2)
+1 2
++++++ Test for PREPARE char_variable_normal_name(typelist) AS +++++
+prepare :v_normal_name(int,int) as insert into test values($1,$2)
+execute :v_normal_name(:ivar1,:ivar2)
+1 2
++++++ Test for PREPARE char_variable_include_ws_name(typelist) AS +++++
+prepare :v_include_ws_name(int,int) as insert into test values($1,$2)
+execute :v_include_ws_name(:ivar1,:ivar2)
+1 2
++++++ Test for EXECUTE :v_normal_name(const,const) +++++
+prepare :v_normal_name from :v_query
+execute :v_normal_name(1,2)
+1 2
++++++ Test for EXECUTE :v_normal_name(expr,expr) +++++
+prepare :v_normal_name from :v_query
+execute :v_normal_name(0+1,1+1)
+1 2
++++++ Test for combination PREPARE FROM and EXECUTE ident(typelist) +++++
+prepare ident_name from :v_query
+execute ident_name(:ivar1,:ivar2)
+1 2
++++++ Test for combination PREPARE FROM and EXECUTE CString_include_ws_name(typelist) +++++
+prepare "include_ _name" from :v_query
+execute "include_ _name"(:ivar1,:ivar2)
+1 2
diff --git a/src/interfaces/ecpg/test/expected/sql-quote.c b/src/interfaces/ecpg/test/expected/sql-quote.c
new file mode 100644
index 0000000..05841bd
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-quote.c
@@ -0,0 +1,230 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "quote.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "quote.pgc"
+
+
+int main() {
+ /* exec sql begin declare section */
+
+
+
+#line 9 "quote.pgc"
+ char var [ 25 ] ;
+
+#line 10 "quote.pgc"
+ int i , loopcount ;
+/* exec sql end declare section */
+#line 11 "quote.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 14 "quote.pgc"
+
+
+ { ECPGsetcommit(__LINE__, "on", NULL);}
+#line 16 "quote.pgc"
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 17 "quote.pgc"
+
+ /* exec sql whenever sqlerror stop ; */
+#line 18 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table \"My_Table\" ( Item1 int , Item2 text )", ECPGt_EOIT, ECPGt_EORT);
+#line 20 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 20 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 20 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to off", ECPGt_EOIT, ECPGt_EORT);
+#line 22 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 22 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 22 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show standard_conforming_strings", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 24 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 24 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 24 "quote.pgc"
+
+ printf("Standard conforming strings: %s\n", var);
+
+ /* this is a\\b actually */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into \"My_Table\" values ( 1 , 'a\\\\\\\\b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 28 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 28 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 28 "quote.pgc"
+
+ /* this is a\\b */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into \"My_Table\" values ( 1 , E'a\\\\\\\\b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 30 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 30 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to on", ECPGt_EOIT, ECPGt_EORT);
+#line 32 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 32 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 32 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show standard_conforming_strings", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 34 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 34 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 34 "quote.pgc"
+
+ printf("Standard conforming strings: %s\n", var);
+
+ /* this is a\\\\b actually */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into \"My_Table\" values ( 2 , 'a\\\\\\\\b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 38 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 38 "quote.pgc"
+
+ /* this is a\\b */
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into \"My_Table\" values ( 2 , E'a\\\\\\\\b' )", ECPGt_EOIT, ECPGt_EORT);
+#line 40 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 40 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 40 "quote.pgc"
+
+
+ { ECPGtrans(__LINE__, NULL, "begin");
+#line 42 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 42 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 42 "quote.pgc"
+
+ /* declare C cursor for select * from \"My_Table\" */
+#line 43 "quote.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select * from \"My_Table\"", ECPGt_EOIT, ECPGt_EORT);
+#line 45 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 45 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 45 "quote.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 47 "quote.pgc"
+
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT,
+ ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 51 "quote.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 51 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 51 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 51 "quote.pgc"
+
+ printf("value: %d %s\n", i, var);
+ }
+
+ { ECPGtrans(__LINE__, NULL, "rollback");
+#line 55 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 55 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 55 "quote.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table \"My_Table\"", ECPGt_EOIT, ECPGt_EORT);
+#line 56 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 56 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 56 "quote.pgc"
+
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 58 "quote.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 58 "quote.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 58 "quote.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-quote.stderr b/src/interfaces/ecpg/test/expected/sql-quote.stderr
new file mode 100644
index 0000000..3df8702
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-quote.stderr
@@ -0,0 +1,135 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 16: action "on"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: create table "My_Table" ( Item1 int , Item2 text ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: set standard_conforming_strings to off; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: query: show standard_conforming_strings; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 24: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 24: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 24: RESULT: off offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 28: query: insert into "My_Table" values ( 1 , 'a\\\\b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGnoticeReceiver: nonstandard use of \\ in a string literal
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 0
+[NO_PID]: sqlca: code: 0, state: 22P06
+[NO_PID]: ecpg_execute on line 28: using PQexec
+[NO_PID]: sqlca: code: 0, state: 22P06
+[NO_PID]: ecpg_process_output on line 28: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 22P06
+SQL error: nonstandard use of \\ in a string literal
+[NO_PID]: ecpg_execute on line 30: query: insert into "My_Table" values ( 1 , E'a\\\\b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: query: set standard_conforming_strings to on; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 32: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 32: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: show standard_conforming_strings; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 34: RESULT: on offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: insert into "My_Table" values ( 2 , 'a\\\\b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: query: insert into "My_Table" values ( 2 , E'a\\\\b' ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 40: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 42: action "begin"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: query: declare C cursor for select * from "My_Table"; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 45: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 45: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: a\\\\b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: correctly got 1 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 51: RESULT: a\\b offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: query: fetch C; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 51: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 51: correctly got 0 tuples with 2 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 51: no data found on line 51
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ECPGtrans on line 55: action "rollback"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: query: drop table "My_Table"; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 56: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-quote.stdout b/src/interfaces/ecpg/test/expected/sql-quote.stdout
new file mode 100644
index 0000000..2f92f99
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-quote.stdout
@@ -0,0 +1,6 @@
+Standard conforming strings: off
+Standard conforming strings: on
+value: 1 a\\b
+value: 1 a\\b
+value: 2 a\\\\b
+value: 2 a\\b
diff --git a/src/interfaces/ecpg/test/expected/sql-show.c b/src/interfaces/ecpg/test/expected/sql-show.c
new file mode 100644
index 0000000..1b52d5e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-show.c
@@ -0,0 +1,170 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "show.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "show.pgc"
+
+
+int main() {
+ /* exec sql begin declare section */
+
+
+#line 9 "show.pgc"
+ char var [ 25 ] = "public" ;
+/* exec sql end declare section */
+#line 10 "show.pgc"
+
+
+ ECPGdebug(1, stderr);
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 13 "show.pgc"
+
+
+ /* exec sql whenever sql_warning sqlprint ; */
+#line 15 "show.pgc"
+
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 16 "show.pgc"
+
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set search_path to $0",
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 18 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 18 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 18 "show.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show search_path", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 19 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 19 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 19 "show.pgc"
+
+ printf("Var: Search path: %s\n", var);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set search_path to 'public'", ECPGt_EOIT, ECPGt_EORT);
+#line 22 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 22 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 22 "show.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show search_path", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 23 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 23 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 23 "show.pgc"
+
+ printf("Var: Search path: %s\n", var);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to off", ECPGt_EOIT, ECPGt_EORT);
+#line 26 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 26 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "show.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show standard_conforming_strings", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 27 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 27 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 27 "show.pgc"
+
+ printf("Var: Standard conforming strings: %s\n", var);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set time zone PST8PDT", ECPGt_EOIT, ECPGt_EORT);
+#line 30 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 30 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 30 "show.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show time zone", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 31 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 31 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 31 "show.pgc"
+
+ printf("Time Zone: %s\n", var);
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set transaction isolation level read committed", ECPGt_EOIT, ECPGt_EORT);
+#line 34 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 34 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 34 "show.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show transaction isolation level", ECPGt_EOIT,
+ ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 35 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 35 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "show.pgc"
+
+ printf("Transaction isolation level: %s\n", var);
+
+ { ECPGdisconnect(__LINE__, "ALL");
+#line 38 "show.pgc"
+
+if (sqlca.sqlwarn[0] == 'W') sqlprint();
+#line 38 "show.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "show.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-show.stderr b/src/interfaces/ecpg/test/expected/sql-show.stderr
new file mode 100644
index 0000000..c303a84
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-show.stderr
@@ -0,0 +1,76 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: query: set search_path to public; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 18: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 18: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: query: show search_path; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 19: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 19: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 19: RESULT: public offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: query: set search_path to 'public'; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 22: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 22: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: query: show search_path; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 23: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 23: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 23: RESULT: public offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: query: set standard_conforming_strings to off; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 26: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 26: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: query: show standard_conforming_strings; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 27: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 27: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 27: RESULT: off offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: query: set time zone PST8PDT; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 30: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 30: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: query: show time zone; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 31: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 31: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 31: RESULT: PST8PDT offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: query: set transaction isolation level read committed; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 34: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 34: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: query: show transaction isolation level; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 35: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 35: correctly got 1 tuples with 1 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 35: RESULT: read committed offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-show.stdout b/src/interfaces/ecpg/test/expected/sql-show.stdout
new file mode 100644
index 0000000..9319c5d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-show.stdout
@@ -0,0 +1,5 @@
+Var: Search path: public
+Var: Search path: public
+Var: Standard conforming strings: off
+Time Zone: PST8PDT
+Transaction isolation level: read committed
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c
new file mode 100644
index 0000000..d474bd3
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c
@@ -0,0 +1,545 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "sqlda.pgc"
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include "ecpg_config.h"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "sqlda.pgc"
+
+
+#line 1 "sqlda.h"
+#ifndef ECPG_SQLDA_H
+#define ECPG_SQLDA_H
+
+#ifdef _ECPG_INFORMIX_H
+
+#include "sqlda-compat.h"
+typedef struct sqlvar_compat sqlvar_t;
+typedef struct sqlda_compat sqlda_t;
+
+#else
+
+#include "sqlda-native.h"
+typedef struct sqlvar_struct sqlvar_t;
+typedef struct sqlda_struct sqlda_t;
+
+#endif
+
+#endif /* ECPG_SQLDA_H */
+
+#line 7 "sqlda.pgc"
+
+
+#line 1 "pgtypes_numeric.h"
+#ifndef PGTYPES_NUMERIC
+#define PGTYPES_NUMERIC
+
+#include <pgtypes.h>
+
+#define NUMERIC_POS 0x0000
+#define NUMERIC_NEG 0x4000
+#define NUMERIC_NAN 0xC000
+#define NUMERIC_NULL 0xF000
+#define NUMERIC_MAX_PRECISION 1000
+#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
+#define NUMERIC_MIN_DISPLAY_SCALE 0
+#define NUMERIC_MIN_SIG_DIGITS 16
+
+#define DECSIZE 30
+
+typedef unsigned char NumericDigit;
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit *buf; /* start of alloc'd space for digits[] */
+ NumericDigit *digits; /* decimal digits */
+} numeric;
+
+typedef struct
+{
+ int ndigits; /* number of digits in digits[] - can be 0! */
+ int weight; /* weight of first digit */
+ int rscale; /* result scale */
+ int dscale; /* display scale */
+ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
+ NumericDigit digits[DECSIZE]; /* decimal digits */
+} decimal;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+numeric *PGTYPESnumeric_new(void);
+decimal *PGTYPESdecimal_new(void);
+void PGTYPESnumeric_free(numeric *);
+void PGTYPESdecimal_free(decimal *);
+numeric *PGTYPESnumeric_from_asc(char *, char **);
+char *PGTYPESnumeric_to_asc(numeric *, int);
+int PGTYPESnumeric_add(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_sub(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_mul(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_div(numeric *, numeric *, numeric *);
+int PGTYPESnumeric_cmp(numeric *, numeric *);
+int PGTYPESnumeric_from_int(signed int, numeric *);
+int PGTYPESnumeric_from_long(signed long int, numeric *);
+int PGTYPESnumeric_copy(numeric *, numeric *);
+int PGTYPESnumeric_from_double(double, numeric *);
+int PGTYPESnumeric_to_double(numeric *, double *);
+int PGTYPESnumeric_to_int(numeric *, int *);
+int PGTYPESnumeric_to_long(numeric *, long *);
+int PGTYPESnumeric_to_decimal(numeric *, decimal *);
+int PGTYPESnumeric_from_decimal(decimal *, numeric *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGTYPES_NUMERIC */
+
+#line 8 "sqlda.pgc"
+
+
+/* exec sql whenever sqlerror stop ; */
+#line 10 "sqlda.pgc"
+
+
+/* These shouldn't be under DECLARE SECTION */
+sqlda_t *inp_sqlda, *outp_sqlda, *outp_sqlda1;
+
+static void
+dump_sqlda(sqlda_t *sqlda)
+{
+ int i;
+
+ if (sqlda == NULL)
+ {
+ printf("dump_sqlda called with NULL sqlda\n");
+ return;
+ }
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ if (sqlda->sqlvar[i].sqlind && *(sqlda->sqlvar[i].sqlind) == -1)
+ printf("name sqlda descriptor: '%s' value NULL'\n", sqlda->sqlvar[i].sqlname.data);
+ else
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case ECPGt_char:
+ printf("name sqlda descriptor: '%s' value '%s'\n", sqlda->sqlvar[i].sqlname.data, sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_int:
+ printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname.data, *(int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_long:
+ printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_long_long:
+ printf(
+#ifdef _WIN32
+ "name sqlda descriptor: '%s' value %I64d\n",
+#else
+ "name sqlda descriptor: '%s' value %lld\n",
+#endif
+ sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_double:
+ printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_numeric:
+ {
+ char *val;
+
+ val = PGTYPESnumeric_to_asc((numeric*)sqlda->sqlvar[i].sqldata, -1);
+ printf("name sqlda descriptor: '%s' value NUMERIC '%s'\n", sqlda->sqlvar[i].sqlname.data, val);
+ PGTYPESchar_free(val);
+ break;
+ }
+ }
+ }
+}
+
+int
+main (void)
+{
+/* exec sql begin declare section */
+
+
+
+
+
+#line 71 "sqlda.pgc"
+ char * stmt1 = "SELECT * FROM t1" ;
+
+#line 72 "sqlda.pgc"
+ char * stmt2 = "SELECT * FROM t1 WHERE id = ?" ;
+
+#line 73 "sqlda.pgc"
+ int rec ;
+
+#line 74 "sqlda.pgc"
+ int id ;
+/* exec sql end declare section */
+#line 75 "sqlda.pgc"
+
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "regress1", 0);
+#line 82 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 82 "sqlda.pgc"
+
+
+ strcpy(msg, "set");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT);
+#line 85 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 85 "sqlda.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) , big bigint )", ECPGt_EOIT, ECPGt_EORT);
+#line 95 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 95 "sqlda.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 3 , 'c' , 0.0 , 3 , 'c' , 3333333333333333333 ) , ( 4 , 'd' , 'NaN' , 4 , 'd' , 4444444444444444444 ) , ( 5 , 'e' , 0.001234 , 5 , 'e' , 5555555555555555555 )", ECPGt_EOIT, ECPGt_EORT);
+#line 103 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 103 "sqlda.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 106 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 106 "sqlda.pgc"
+
+
+ /* SQLDA test for getting all records from a table */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id1", stmt1);
+#line 113 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 113 "sqlda.pgc"
+
+
+ strcpy(msg, "declare");
+ /* declare mycur1 cursor for $1 */
+#line 116 "sqlda.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur1 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id1", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 119 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 119 "sqlda.pgc"
+
+
+ /* exec sql whenever not found break ; */
+#line 121 "sqlda.pgc"
+
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 from mycur1", ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 127 "sqlda.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) break;
+#line 127 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 127 "sqlda.pgc"
+
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ /* exec sql whenever not found continue ; */
+#line 133 "sqlda.pgc"
+
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur1", ECPGt_EOIT, ECPGt_EORT);
+#line 136 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 136 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id1");
+#line 139 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 139 "sqlda.pgc"
+
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting ALL records into the sqlda list */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id2", stmt1);
+#line 148 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 148 "sqlda.pgc"
+
+
+ strcpy(msg, "declare");
+ /* declare mycur2 cursor for $1 */
+#line 151 "sqlda.pgc"
+
+
+ strcpy(msg, "open");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare mycur2 cursor for $1",
+ ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 154 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 154 "sqlda.pgc"
+
+
+ strcpy(msg, "fetch");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch all from mycur2", ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 157 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 157 "sqlda.pgc"
+
+
+ outp_sqlda1 = outp_sqlda;
+ rec = 0;
+ while (outp_sqlda1)
+ {
+ sqlda_t *ptr;
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda1);
+
+ ptr = outp_sqlda1;
+ outp_sqlda1 = outp_sqlda1->desc_next;
+ free(ptr);
+ }
+
+ strcpy(msg, "close");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close mycur2", ECPGt_EOIT, ECPGt_EORT);
+#line 173 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 173 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id2");
+#line 176 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 176 "sqlda.pgc"
+
+
+ /* SQLDA test for getting one record using an input descriptor */
+
+ /*
+ * Input sqlda has to be built manually
+ * sqlda_t contains 1 sqlvar_t structure already.
+ */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqln = 1;
+
+ inp_sqlda->sqlvar[0].sqltype = ECPGt_int;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, NULL, 0, "st_id3", stmt2);
+#line 198 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 198 "sqlda.pgc"
+
+
+ strcpy(msg, "execute");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "st_id3",
+ ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 201 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 201 "sqlda.pgc"
+
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id3");
+#line 206 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 206 "sqlda.pgc"
+
+
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor
+ * on a named connection
+ */
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , "con2", 0);
+#line 215 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 215 "sqlda.pgc"
+
+
+ /*
+ * Input sqlda has to be built manually
+ * sqlda_t contains 1 sqlvar_t structure already.
+ */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqln = 1;
+
+ inp_sqlda->sqlvar[0].sqltype = ECPGt_int;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ { ECPGprepare(__LINE__, "con2", 0, "st_id4", stmt2);
+#line 235 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 235 "sqlda.pgc"
+
+
+ strcpy(msg, "execute");
+ { ECPGdo(__LINE__, 0, 1, "con2", 0, ECPGst_execute, "st_id4",
+ ECPGt_sqlda, &inp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
+ ECPGt_sqlda, &outp_sqlda, 0L, 0L, 0L,
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 238 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 238 "sqlda.pgc"
+
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, "con2", "commit");
+#line 243 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 243 "sqlda.pgc"
+
+
+ strcpy(msg, "deallocate");
+ { ECPGdeallocate(__LINE__, 0, NULL, "st_id4");
+#line 246 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 246 "sqlda.pgc"
+
+
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "con2");
+#line 252 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 252 "sqlda.pgc"
+
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 257 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 257 "sqlda.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 260 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 260 "sqlda.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 263 "sqlda.pgc"
+
+if (sqlca.sqlcode < 0) exit (1);}
+#line 263 "sqlda.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
new file mode 100644
index 0000000..dfe6b13
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
@@ -0,0 +1,460 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: query: set datestyle to iso; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 85: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 85: OK: SET
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) , big bigint ); with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 88: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 88: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 98: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 3 , 'c' , 0.0 , 3 , 'c' , 3333333333333333333 ) , ( 4 , 'd' , 'NaN' , 4 , 'd' , 4444444444444444444 ) , ( 5 , 'e' , 0.001234 , 5 , 'e' , 5555555555555555555 ); with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 98: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 98: OK: INSERT 0 5
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 106: action "commit"; connection "regress1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 113: name st_id1; query: "SELECT * FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 119: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 119: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 119: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 127 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: e offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: e offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 127 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 127: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 127: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 127: correctly got 0 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 127: no data found on line 127
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 136: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 136: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 136: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 139: name st_id1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 148: name st_id2; query: "SELECT * FROM t1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 154: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 154: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 154: OK: DECLARE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 157: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 157: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: correctly got 5 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 5 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 4 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 5555555555555555555 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 3 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 3 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: c offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 2 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 3333333333333333333 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 1 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 2 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 3 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 4 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 1 col 5 IS NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 157 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: a offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 157 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 157: RESULT: 1111111111111111111 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 157: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 173: query: close mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 173: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 173: OK: CLOSE CURSOR
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 176: name st_id2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 198: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 201: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 201: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 201: parameter 1 = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 201: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 201 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 201: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 201: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 201: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 201: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 201: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 201 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 201: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 201: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 206: name st_id3
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: prepare_common on line 235: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 238: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 238: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_free_params on line 238: parameter 1 = 4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 238: correctly got 1 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_build_native_sqlda on line 238 sqld = 6
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 238: new sqlda was built
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 0 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 238: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 1 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 238: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 238: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 238: RESULT: d offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 238 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 238: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 238: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 243: action "commit"; connection "con2"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 246: name st_id4
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection con2 closed
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 257: query: drop table t1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 257: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 257: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 260: action "commit"; connection "regress1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection regress1 closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stdout b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout
new file mode 100644
index 0000000..e3b1a64
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout
@@ -0,0 +1,84 @@
+FETCH RECORD 1
+name sqlda descriptor: 'id' value 1
+name sqlda descriptor: 't' value 'a'
+name sqlda descriptor: 'd1' value NUMERIC '1.0'
+name sqlda descriptor: 'd2' value 1.000000
+name sqlda descriptor: 'c' value 'a '
+name sqlda descriptor: 'big' value 1111111111111111111
+FETCH RECORD 2
+name sqlda descriptor: 'id' value 2
+name sqlda descriptor: 't' value NULL'
+name sqlda descriptor: 'd1' value NULL'
+name sqlda descriptor: 'd2' value NULL'
+name sqlda descriptor: 'c' value NULL'
+name sqlda descriptor: 'big' value NULL'
+FETCH RECORD 3
+name sqlda descriptor: 'id' value 3
+name sqlda descriptor: 't' value 'c'
+name sqlda descriptor: 'd1' value NUMERIC '0.0'
+name sqlda descriptor: 'd2' value 3.000000
+name sqlda descriptor: 'c' value 'c '
+name sqlda descriptor: 'big' value 3333333333333333333
+FETCH RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value NUMERIC 'NaN'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+name sqlda descriptor: 'big' value 4444444444444444444
+FETCH RECORD 5
+name sqlda descriptor: 'id' value 5
+name sqlda descriptor: 't' value 'e'
+name sqlda descriptor: 'd1' value NUMERIC '0.001234'
+name sqlda descriptor: 'd2' value 5.000000
+name sqlda descriptor: 'c' value 'e '
+name sqlda descriptor: 'big' value 5555555555555555555
+FETCH RECORD 1
+name sqlda descriptor: 'id' value 1
+name sqlda descriptor: 't' value 'a'
+name sqlda descriptor: 'd1' value NUMERIC '1.0'
+name sqlda descriptor: 'd2' value 1.000000
+name sqlda descriptor: 'c' value 'a '
+name sqlda descriptor: 'big' value 1111111111111111111
+FETCH RECORD 2
+name sqlda descriptor: 'id' value 2
+name sqlda descriptor: 't' value NULL'
+name sqlda descriptor: 'd1' value NULL'
+name sqlda descriptor: 'd2' value NULL'
+name sqlda descriptor: 'c' value NULL'
+name sqlda descriptor: 'big' value NULL'
+FETCH RECORD 3
+name sqlda descriptor: 'id' value 3
+name sqlda descriptor: 't' value 'c'
+name sqlda descriptor: 'd1' value NUMERIC '0.0'
+name sqlda descriptor: 'd2' value 3.000000
+name sqlda descriptor: 'c' value 'c '
+name sqlda descriptor: 'big' value 3333333333333333333
+FETCH RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value NUMERIC 'NaN'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+name sqlda descriptor: 'big' value 4444444444444444444
+FETCH RECORD 5
+name sqlda descriptor: 'id' value 5
+name sqlda descriptor: 't' value 'e'
+name sqlda descriptor: 'd1' value NUMERIC '0.001234'
+name sqlda descriptor: 'd2' value 5.000000
+name sqlda descriptor: 'c' value 'e '
+name sqlda descriptor: 'big' value 5555555555555555555
+EXECUTE RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value NUMERIC 'NaN'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+name sqlda descriptor: 'big' value 4444444444444444444
+EXECUTE RECORD 4
+name sqlda descriptor: 'id' value 4
+name sqlda descriptor: 't' value 'd'
+name sqlda descriptor: 'd1' value NUMERIC 'NaN'
+name sqlda descriptor: 'd2' value 4.000000
+name sqlda descriptor: 'c' value 'd '
+name sqlda descriptor: 'big' value 4444444444444444444
diff --git a/src/interfaces/ecpg/test/expected/sql-twophase.c b/src/interfaces/ecpg/test/expected/sql-twophase.c
new file mode 100644
index 0000000..20b54d3
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-twophase.c
@@ -0,0 +1,114 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "twophase.pgc"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 5 "twophase.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 7 "twophase.pgc"
+
+
+int main(void)
+{
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 16 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 16 "twophase.pgc"
+
+ { ECPGsetcommit(__LINE__, "off", NULL);
+#line 17 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 17 "twophase.pgc"
+
+
+ strcpy(msg, "create");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table t1 ( c int )", ECPGt_EOIT, ECPGt_EORT);
+#line 20 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 20 "twophase.pgc"
+
+
+ strcpy(msg, "commit");
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 23 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 23 "twophase.pgc"
+
+
+ strcpy(msg, "begin");
+ { ECPGtrans(__LINE__, NULL, "begin");
+#line 26 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 26 "twophase.pgc"
+
+
+ strcpy(msg, "insert");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into t1 values ( 1 )", ECPGt_EOIT, ECPGt_EORT);
+#line 29 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 29 "twophase.pgc"
+
+
+ strcpy(msg, "prepare transaction");
+ { ECPGtrans(__LINE__, NULL, "prepare transaction 'gxid'");
+#line 32 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 32 "twophase.pgc"
+
+
+ strcpy(msg, "commit prepared");
+ { ECPGtrans(__LINE__, NULL, "commit prepared 'gxid'");
+#line 35 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 35 "twophase.pgc"
+
+
+ strcpy(msg, "drop");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table t1", ECPGt_EOIT, ECPGt_EORT);
+#line 38 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 38 "twophase.pgc"
+
+
+ strcpy(msg, "disconnect");
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 41 "twophase.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 41 "twophase.pgc"
+
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/sql-twophase.stderr b/src/interfaces/ecpg/test/expected/sql-twophase.stderr
new file mode 100644
index 0000000..18415ff
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-twophase.stderr
@@ -0,0 +1,34 @@
+[NO_PID]: ECPGdebug: set to 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGsetcommit on line 17: action "off"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: query: create table t1 ( c int ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 20: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 20: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 23: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 26: action "begin"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: query: insert into t1 values ( 1 ); with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 29: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 29: OK: INSERT 0 1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 32: action "prepare transaction 'gxid'"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 35: action "commit prepared 'gxid'"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: query: drop table t1; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 38: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 38: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_finish: connection ecpg1_regression closed
+[NO_PID]: sqlca: code: 0, state: 00000
diff --git a/src/interfaces/ecpg/test/expected/sql-twophase.stdout b/src/interfaces/ecpg/test/expected/sql-twophase.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/sql-twophase.stdout
diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.c b/src/interfaces/ecpg/test/expected/thread-alloc.c
new file mode 100644
index 0000000..37ef44e
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-alloc.c
@@ -0,0 +1,218 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "alloc.pgc"
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 26 "alloc.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 27 "alloc.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 29 "alloc.pgc"
+
+/* exec sql whenever not found sqlprint ; */
+#line 30 "alloc.pgc"
+
+
+#ifdef WIN32
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ /* exec sql begin declare section */
+
+
+
+
+#line 41 "alloc.pgc"
+ int value ;
+
+#line 42 "alloc.pgc"
+ char name [ 100 ] ;
+
+#line 43 "alloc.pgc"
+ char ** r = NULL ;
+/* exec sql end declare section */
+#line 44 "alloc.pgc"
+
+
+ value = (intptr_t) arg;
+ sprintf(name, "Connection: %d", value);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , name, 0);
+#line 49 "alloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 49 "alloc.pgc"
+
+ { ECPGsetcommit(__LINE__, "on", NULL);
+#line 50 "alloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "alloc.pgc"
+
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select relname from pg_class where relname = 'pg_class'", ECPGt_EOIT,
+ ECPGt_char,&(r),(long)0,(long)0,(1)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+#line 53 "alloc.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 53 "alloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "alloc.pgc"
+
+ free(r);
+ r = NULL;
+ }
+ { ECPGdisconnect(__LINE__, name);
+#line 57 "alloc.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "alloc.pgc"
+
+
+ return 0;
+}
+
+int main ()
+{
+ intptr_t i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, (void*)i, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, (void *) i);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+
+ return 0;
+}
+#endif
diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.stderr b/src/interfaces/ecpg/test/expected/thread-alloc.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-alloc.stderr
diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.stdout b/src/interfaces/ecpg/test/expected/thread-alloc.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-alloc.stdout
diff --git a/src/interfaces/ecpg/test/expected/thread-alloc_2.stdout b/src/interfaces/ecpg/test/expected/thread-alloc_2.stdout
new file mode 100644
index 0000000..75fe16b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-alloc_2.stdout
@@ -0,0 +1 @@
+No threading enabled.
diff --git a/src/interfaces/ecpg/test/expected/thread-descriptor.c b/src/interfaces/ecpg/test/expected/thread-descriptor.c
new file mode 100644
index 0000000..f56cc25
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-descriptor.c
@@ -0,0 +1,161 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "descriptor.pgc"
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50000
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 16 "descriptor.pgc"
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 17 "descriptor.pgc"
+
+/* exec sql whenever not found sqlprint ; */
+#line 18 "descriptor.pgc"
+
+
+#if defined(ENABLE_THREAD_SAFETY) && defined(WIN32)
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ ECPGallocate_desc(__LINE__, "mydesc");
+#line 30 "descriptor.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 30 "descriptor.pgc"
+
+ ECPGdeallocate_desc(__LINE__, "mydesc");
+#line 31 "descriptor.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();
+#line 31 "descriptor.pgc"
+
+ }
+
+ return 0;
+}
+
+int main ()
+{
+#ifdef ENABLE_THREAD_SAFETY
+ int i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, NULL, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, NULL);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+#else
+ fn(NULL);
+#endif
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/expected/thread-descriptor.stderr b/src/interfaces/ecpg/test/expected/thread-descriptor.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-descriptor.stderr
diff --git a/src/interfaces/ecpg/test/expected/thread-descriptor.stdout b/src/interfaces/ecpg/test/expected/thread-descriptor.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-descriptor.stdout
diff --git a/src/interfaces/ecpg/test/expected/thread-prep.c b/src/interfaces/ecpg/test/expected/thread-prep.c
new file mode 100644
index 0000000..7cdf250
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-prep.c
@@ -0,0 +1,259 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "prep.pgc"
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50
+
+
+#line 1 "sqlca.h"
+#ifndef POSTGRES_SQLCA_H
+#define POSTGRES_SQLCA_H
+
+#ifndef PGDLLIMPORT
+#if defined(WIN32) || defined(__CYGWIN__)
+#define PGDLLIMPORT __declspec (dllimport)
+#else
+#define PGDLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
+
+#define SQLERRMC_LEN 150
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct sqlca_t
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occurred
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlstate[5];
+};
+
+struct sqlca_t *ECPGget_sqlca(void);
+
+#ifndef POSTGRES_ECPG_INTERNAL
+#define sqlca (*ECPGget_sqlca())
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#line 26 "prep.pgc"
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 27 "prep.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 29 "prep.pgc"
+
+/* exec sql whenever not found sqlprint ; */
+#line 30 "prep.pgc"
+
+
+#ifdef WIN32
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ /* exec sql begin declare section */
+
+
+
+
+#line 41 "prep.pgc"
+ int value ;
+
+#line 42 "prep.pgc"
+ char name [ 100 ] ;
+
+#line 43 "prep.pgc"
+ char query [ 256 ] = "INSERT INTO T VALUES ( ? )" ;
+/* exec sql end declare section */
+#line 44 "prep.pgc"
+
+
+ value = (intptr_t) arg;
+ sprintf(name, "Connection: %d", value);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , name, 0);
+#line 49 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 49 "prep.pgc"
+
+ { ECPGsetcommit(__LINE__, "on", NULL);
+#line 50 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 50 "prep.pgc"
+
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ { ECPGprepare(__LINE__, NULL, 0, "i", query);
+#line 53 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "prep.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "i",
+ ECPGt_int,&(value),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 54 "prep.pgc"
+
+if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
+#line 54 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 54 "prep.pgc"
+
+ }
+ { ECPGdeallocate(__LINE__, 0, NULL, "i");
+#line 56 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 56 "prep.pgc"
+
+ { ECPGdisconnect(__LINE__, name);
+#line 57 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "prep.pgc"
+
+
+ return 0;
+}
+
+int main ()
+{
+ intptr_t i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 71 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 71 "prep.pgc"
+
+ { ECPGsetcommit(__LINE__, "on", NULL);
+#line 72 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 72 "prep.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table if exists T", ECPGt_EOIT, ECPGt_EORT);
+#line 73 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 73 "prep.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table T ( i int )", ECPGt_EOIT, ECPGt_EORT);
+#line 74 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "prep.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 75 "prep.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 75 "prep.pgc"
+
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, (void*)i, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, (void *) i);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+
+ return 0;
+}
+#endif
diff --git a/src/interfaces/ecpg/test/expected/thread-prep.stderr b/src/interfaces/ecpg/test/expected/thread-prep.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-prep.stderr
diff --git a/src/interfaces/ecpg/test/expected/thread-prep.stdout b/src/interfaces/ecpg/test/expected/thread-prep.stdout
new file mode 100644
index 0000000..75fe16b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-prep.stdout
@@ -0,0 +1 @@
+No threading enabled.
diff --git a/src/interfaces/ecpg/test/expected/thread-prep_2.stdout b/src/interfaces/ecpg/test/expected/thread-prep_2.stdout
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-prep_2.stdout
diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c
new file mode 100644
index 0000000..0e75c47
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread.c
@@ -0,0 +1,216 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "thread.pgc"
+/*
+ * Thread test program
+ * by Philip Yarra & Lee Kindness.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifndef WIN32
+#include <pthread.h>
+#else
+#include <windows.h>
+#include <locale.h>
+#endif
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 24 "thread.pgc"
+
+
+void *test_thread(void *arg);
+
+int nthreads = 10;
+int iterations = 20;
+
+int main()
+{
+#ifndef WIN32
+ pthread_t *threads;
+#else
+ HANDLE *threads;
+#endif
+ intptr_t n;
+ /* exec sql begin declare section */
+
+
+#line 40 "thread.pgc"
+ int l_rows ;
+/* exec sql end declare section */
+#line 41 "thread.pgc"
+
+
+ /* Do not switch on debug output for regression tests. The threads get executed in
+ * more or less random order */
+ /* ECPGdebug(1, stderr); */
+
+ /* setup test_thread table */
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 48 "thread.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test_thread", ECPGt_EOIT, ECPGt_EORT);}
+#line 49 "thread.pgc"
+ /* DROP might fail */
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 50 "thread.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test_thread ( tstamp timestamp not null default cast ( timeofday ( ) as timestamp ) , thread text not null , iteration integer not null , primary key ( thread , iteration ) )", ECPGt_EOIT, ECPGt_EORT);}
+#line 55 "thread.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 56 "thread.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 57 "thread.pgc"
+
+
+ /* create, and start, threads */
+ threads = calloc(nthreads, sizeof(threads[0]));
+ if( threads == NULL )
+ {
+ fprintf(stderr, "Cannot alloc memory\n");
+ return 1;
+ }
+ for( n = 0; n < nthreads; n++ )
+ {
+#ifndef WIN32
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+#else
+ threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n + 1), 0, NULL);
+#endif
+ }
+
+ /* wait for thread completion */
+#ifndef WIN32
+ for( n = 0; n < nthreads; n++ )
+ {
+ pthread_join(threads[n], NULL);
+ }
+#else
+ WaitForMultipleObjects(nthreads, threads, TRUE, INFINITE);
+#endif
+ free(threads);
+
+ /* and check results */
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 87 "thread.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select count ( * ) from test_thread", ECPGt_EOIT,
+ ECPGt_int,&(l_rows),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 88 "thread.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 89 "thread.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 90 "thread.pgc"
+
+ if( l_rows == (nthreads * iterations) )
+ printf("Success.\n");
+ else
+ printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
+
+ return 0;
+}
+
+void *test_thread(void *arg)
+{
+ long threadnum = (intptr_t) arg;
+
+ /* exec sql begin declare section */
+
+
+
+#line 104 "thread.pgc"
+ int l_i ;
+
+#line 105 "thread.pgc"
+ char l_connection [ 128 ] ;
+/* exec sql end declare section */
+#line 106 "thread.pgc"
+
+
+ /* build up connection name, and connect to database */
+#ifndef _MSC_VER
+ snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 114 "thread.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , l_connection, 0);
+#line 115 "thread.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 115 "thread.pgc"
+
+ if( sqlca.sqlcode != 0 )
+ {
+ printf("%s: ERROR: cannot connect to database!\n", l_connection);
+ return NULL;
+ }
+ { ECPGtrans(__LINE__, l_connection, "begin");
+#line 121 "thread.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 121 "thread.pgc"
+
+
+ /* insert into test_thread table */
+ for( l_i = 1; l_i <= iterations; l_i++ )
+ {
+ { ECPGdo(__LINE__, 0, 1, l_connection, 0, ECPGst_normal, "insert into test_thread ( thread , iteration ) values ( $1 , $2 )",
+ ECPGt_char,(l_connection),(long)128,(long)1,(128)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(l_i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 126 "thread.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 126 "thread.pgc"
+
+ if( sqlca.sqlcode != 0 )
+ printf("%s: ERROR: insert failed!\n", l_connection);
+ }
+
+ /* all done */
+ { ECPGtrans(__LINE__, l_connection, "commit");
+#line 132 "thread.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 132 "thread.pgc"
+
+ { ECPGdisconnect(__LINE__, l_connection);
+#line 133 "thread.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 133 "thread.pgc"
+
+ return NULL;
+}
+#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/expected/thread-thread.stderr b/src/interfaces/ecpg/test/expected/thread-thread.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread.stderr
diff --git a/src/interfaces/ecpg/test/expected/thread-thread.stdout b/src/interfaces/ecpg/test/expected/thread-thread.stdout
new file mode 100644
index 0000000..75fe16b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread.stdout
@@ -0,0 +1 @@
+No threading enabled.
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_2.stdout b/src/interfaces/ecpg/test/expected/thread-thread_2.stdout
new file mode 100644
index 0000000..a9d787c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread_2.stdout
@@ -0,0 +1 @@
+Success.
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
new file mode 100644
index 0000000..0df2794
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
@@ -0,0 +1,216 @@
+/* Processed by ecpg (regression mode) */
+/* These include files are added by the preprocessor */
+#include <ecpglib.h>
+#include <ecpgerrno.h>
+#include <sqlca.h>
+/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
+
+#line 1 "thread_implicit.pgc"
+/*
+ * Thread test program
+ * by Lee Kindness.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifndef WIN32
+#include <pthread.h>
+#else
+#include <windows.h>
+#include <locale.h>
+#endif
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 24 "thread_implicit.pgc"
+
+
+void *test_thread(void *arg);
+
+int nthreads = 10;
+int iterations = 20;
+
+int main()
+{
+#ifndef WIN32
+ pthread_t *threads;
+#else
+ HANDLE *threads;
+#endif
+ intptr_t n;
+ /* exec sql begin declare section */
+
+
+#line 40 "thread_implicit.pgc"
+ int l_rows ;
+/* exec sql end declare section */
+#line 41 "thread_implicit.pgc"
+
+
+ /* Do not switch on debug output for regression tests. The threads get executed in
+ * more or less random order */
+ /* ECPGdebug(1, stderr); */
+
+ /* setup test_thread table */
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 48 "thread_implicit.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test_thread", ECPGt_EOIT, ECPGt_EORT);}
+#line 49 "thread_implicit.pgc"
+ /* DROP might fail */
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 50 "thread_implicit.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test_thread ( tstamp timestamp not null default cast ( timeofday ( ) as timestamp ) , thread text not null , iteration integer not null , primary key ( thread , iteration ) )", ECPGt_EOIT, ECPGt_EORT);}
+#line 55 "thread_implicit.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 56 "thread_implicit.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 57 "thread_implicit.pgc"
+
+
+ /* create, and start, threads */
+ threads = calloc(nthreads, sizeof(threads[0]));
+ if( threads == NULL )
+ {
+ fprintf(stderr, "Cannot alloc memory\n");
+ return 1;
+ }
+ for( n = 0; n < nthreads; n++ )
+ {
+#ifndef WIN32
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+#else
+ threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n+1), 0, NULL);
+#endif
+ }
+
+ /* wait for thread completion */
+#ifndef WIN32
+ for( n = 0; n < nthreads; n++ )
+ {
+ pthread_join(threads[n], NULL);
+ }
+#else
+ WaitForMultipleObjects(nthreads, threads, TRUE, INFINITE);
+#endif
+ free(threads);
+
+ /* and check results */
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
+#line 87 "thread_implicit.pgc"
+
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select count ( * ) from test_thread", ECPGt_EOIT,
+ ECPGt_int,&(l_rows),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
+#line 88 "thread_implicit.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");}
+#line 89 "thread_implicit.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");}
+#line 90 "thread_implicit.pgc"
+
+ if( l_rows == (nthreads * iterations) )
+ printf("Success.\n");
+ else
+ printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
+
+ return 0;
+}
+
+void *test_thread(void *arg)
+{
+ long threadnum = (intptr_t) arg;
+
+ /* exec sql begin declare section */
+
+
+
+#line 104 "thread_implicit.pgc"
+ int l_i ;
+
+#line 105 "thread_implicit.pgc"
+ char l_connection [ 128 ] ;
+/* exec sql end declare section */
+#line 106 "thread_implicit.pgc"
+
+
+ /* build up connection name, and connect to database */
+#ifndef _MSC_VER
+ snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
+ /* exec sql whenever sqlerror sqlprint ; */
+#line 114 "thread_implicit.pgc"
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , l_connection, 0);
+#line 115 "thread_implicit.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 115 "thread_implicit.pgc"
+
+ if( sqlca.sqlcode != 0 )
+ {
+ printf("%s: ERROR: cannot connect to database!\n", l_connection);
+ return NULL;
+ }
+ { ECPGtrans(__LINE__, NULL, "begin");
+#line 121 "thread_implicit.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 121 "thread_implicit.pgc"
+
+
+ /* insert into test_thread table */
+ for( l_i = 1; l_i <= iterations; l_i++ )
+ {
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test_thread ( thread , iteration ) values ( $1 , $2 )",
+ ECPGt_char,(l_connection),(long)128,(long)1,(128)*sizeof(char),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
+ ECPGt_int,&(l_i),(long)1,(long)1,sizeof(int),
+ ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+#line 126 "thread_implicit.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 126 "thread_implicit.pgc"
+
+ if( sqlca.sqlcode != 0 )
+ printf("%s: ERROR: insert failed!\n", l_connection);
+ }
+
+ /* all done */
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 132 "thread_implicit.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 132 "thread_implicit.pgc"
+
+ { ECPGdisconnect(__LINE__, l_connection);
+#line 133 "thread_implicit.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 133 "thread_implicit.pgc"
+
+ return NULL;
+}
+#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.stderr b/src/interfaces/ecpg/test/expected/thread-thread_implicit.stderr
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.stderr
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.stdout b/src/interfaces/ecpg/test/expected/thread-thread_implicit.stdout
new file mode 100644
index 0000000..75fe16b
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.stdout
@@ -0,0 +1 @@
+No threading enabled.
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit_2.stdout b/src/interfaces/ecpg/test/expected/thread-thread_implicit_2.stdout
new file mode 100644
index 0000000..a9d787c
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit_2.stdout
@@ -0,0 +1 @@
+Success.
diff --git a/src/interfaces/ecpg/test/performance/perftest.pgc b/src/interfaces/ecpg/test/performance/perftest.pgc
new file mode 100644
index 0000000..c8a9934
--- /dev/null
+++ b/src/interfaces/ecpg/test/performance/perftest.pgc
@@ -0,0 +1,144 @@
+#include <stdio.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+exec sql include sqlca;
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+exec sql whenever not found sqlprint;
+
+static void
+print_result(long sec, long usec, char *text)
+{
+ if (usec < 0)
+ {
+ sec--;
+ usec+=1000000;
+ }
+ printf("%ld seconds and %ld microseconds for test %s\n", sec, usec, text);
+ exec sql vacuum;
+ sleep(1);
+}
+
+int
+main (void)
+{
+exec sql begin declare section;
+ long i;
+exec sql end declare section;
+ struct timeval tvs, tve;
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql create table perftest1(number int4, ascii char(16));
+
+ exec sql create unique index number1 on perftest1(number);
+
+ exec sql create table perftest2(number int4, next_number int4);
+
+ exec sql create unique index number2 on perftest2(number);
+
+ exec sql commit;
+
+ exec sql set autocommit to on;
+
+ exec sql begin transaction;
+
+ gettimeofday(&tvs, NULL);
+
+ for (i = 0;i < 1407; i++)
+ {
+ exec sql begin declare section;
+ char text[16];
+ exec sql end declare section;
+
+ sprintf(text, "%ld", i);
+ exec sql insert into perftest1(number, ascii) values (:i, :text);
+ exec sql insert into perftest2(number, next_number) values (:i, :i+1);
+ }
+
+ exec sql commit;
+
+ gettimeofday(&tve, NULL);
+
+ print_result(tve.tv_sec - tvs.tv_sec, tve.tv_usec - tvs.tv_usec, "insert");
+
+ exec sql begin transaction;
+
+ gettimeofday(&tvs, NULL);
+
+ for (i = 0;i < 1407; i++)
+ {
+ exec sql begin declare section;
+ char text[16];
+ exec sql end declare section;
+
+ exec sql select ascii into :text from perftest1 where number = :i;
+ }
+
+ exec sql commit;
+
+ gettimeofday(&tve, NULL);
+
+ print_result(tve.tv_sec - tvs.tv_sec, tve.tv_usec - tvs.tv_usec, "selection&projection");
+
+ exec sql begin transaction;
+
+ gettimeofday(&tvs, NULL);
+
+ for (i = 0;i < 1407; i++)
+ {
+ exec sql begin declare section;
+ char text[16];
+ exec sql end declare section;
+
+ exec sql select perftest1.ascii into :text from perftest1, perftest2 where perftest1.number = perftest2.number and perftest2.number = :i;
+ }
+
+ exec sql commit;
+
+ gettimeofday(&tve, NULL);
+
+ print_result(tve.tv_sec - tvs.tv_sec, tve.tv_usec - tvs.tv_usec, "join");
+
+ exec sql begin transaction;
+
+ gettimeofday(&tvs, NULL);
+
+ exec sql update perftest2 set next_number = next_number + 1;
+
+ exec sql commit;
+
+ gettimeofday(&tve, NULL);
+
+ print_result(tve.tv_sec - tvs.tv_sec, tve.tv_usec - tvs.tv_usec, "update");
+
+ exec sql begin transaction;
+
+ gettimeofday(&tvs, NULL);
+
+ exec sql delete from perftest2;
+
+ exec sql commit;
+
+ gettimeofday(&tve, NULL);
+
+ print_result(tve.tv_sec - tvs.tv_sec, tve.tv_usec - tvs.tv_usec, "delete");
+
+ exec sql set autocommit = off;
+
+ exec sql drop index number2;
+
+ exec sql drop table perftest2;
+
+ exec sql drop index number1;
+
+ exec sql drop table perftest1;
+
+ exec sql commit;
+
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/pg_regress_ecpg.c b/src/interfaces/ecpg/test/pg_regress_ecpg.c
new file mode 100644
index 0000000..15f588a
--- /dev/null
+++ b/src/interfaces/ecpg/test/pg_regress_ecpg.c
@@ -0,0 +1,261 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_regress_ecpg --- regression test driver for ecpg
+ *
+ * This is a C implementation of the previous shell script for running
+ * the regression tests, and should be mostly compatible with it.
+ * Initial author of C translation: Magnus Hagander
+ *
+ * This code is released under the terms of the PostgreSQL License.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/ecpg/test/pg_regress_ecpg.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "pg_regress.h"
+#include "common/string.h"
+#include "lib/stringinfo.h"
+
+
+/*
+ * Create a filtered copy of sourcefile, removing any path
+ * appearing in #line directives; for example, replace
+ * #line x "./../bla/foo.h" with #line x "foo.h".
+ * This is needed because the path part can vary depending
+ * on compiler, platform, build options, etc.
+ */
+static void
+ecpg_filter_source(const char *sourcefile, const char *outfile)
+{
+ FILE *s,
+ *t;
+ StringInfoData linebuf;
+
+ s = fopen(sourcefile, "r");
+ if (!s)
+ {
+ fprintf(stderr, "Could not open file %s for reading\n", sourcefile);
+ exit(2);
+ }
+ t = fopen(outfile, "w");
+ if (!t)
+ {
+ fprintf(stderr, "Could not open file %s for writing\n", outfile);
+ exit(2);
+ }
+
+ initStringInfo(&linebuf);
+
+ while (pg_get_line_buf(s, &linebuf))
+ {
+ /* check for "#line " in the beginning */
+ if (strstr(linebuf.data, "#line ") == linebuf.data)
+ {
+ char *p = strchr(linebuf.data, '"');
+ int plen = 1;
+
+ while (*p && (*(p + plen) == '.' || strchr(p + plen, '/') != NULL))
+ {
+ plen++;
+ }
+ /* plen is one more than the number of . and / characters */
+ if (plen > 1)
+ {
+ memmove(p + 1, p + plen, strlen(p + plen) + 1);
+ /* we don't bother to fix up linebuf.len */
+ }
+ }
+ fputs(linebuf.data, t);
+ }
+
+ pfree(linebuf.data);
+ fclose(s);
+ fclose(t);
+}
+
+/*
+ * Remove the details of connection failure error messages
+ * in a test result file, since the target host/pathname and/or port
+ * can vary. Rewrite the result file in-place.
+ *
+ * At some point it might be interesting to unify this with
+ * ecpg_filter_source, but building a general pattern matcher
+ * is no fun, nor does it seem desirable to introduce a
+ * dependency on an external one.
+ */
+static void
+ecpg_filter_stderr(const char *resultfile, const char *tmpfile)
+{
+ FILE *s,
+ *t;
+ StringInfoData linebuf;
+
+ s = fopen(resultfile, "r");
+ if (!s)
+ {
+ fprintf(stderr, "Could not open file %s for reading\n", resultfile);
+ exit(2);
+ }
+ t = fopen(tmpfile, "w");
+ if (!t)
+ {
+ fprintf(stderr, "Could not open file %s for writing\n", tmpfile);
+ exit(2);
+ }
+
+ initStringInfo(&linebuf);
+
+ while (pg_get_line_buf(s, &linebuf))
+ {
+ char *p1 = strstr(linebuf.data, "connection to server ");
+
+ if (p1)
+ {
+ char *p2 = strstr(p1, "failed: ");
+
+ if (p2)
+ {
+ memmove(p1 + 21, p2, strlen(p2) + 1);
+ /* we don't bother to fix up linebuf.len */
+ }
+ }
+ fputs(linebuf.data, t);
+ }
+
+ pfree(linebuf.data);
+ fclose(s);
+ fclose(t);
+ if (rename(tmpfile, resultfile) != 0)
+ {
+ fprintf(stderr, "Could not overwrite file %s with %s\n",
+ resultfile, tmpfile);
+ exit(2);
+ }
+}
+
+/*
+ * start an ecpg test process for specified file (including redirection),
+ * and return process ID
+ */
+
+static PID_TYPE
+ecpg_start_test(const char *testname,
+ _stringlist **resultfiles,
+ _stringlist **expectfiles,
+ _stringlist **tags)
+{
+ PID_TYPE pid;
+ char inprg[MAXPGPATH];
+ char insource[MAXPGPATH];
+ StringInfoData testname_dash;
+ char outfile_stdout[MAXPGPATH],
+ expectfile_stdout[MAXPGPATH];
+ char outfile_stderr[MAXPGPATH],
+ expectfile_stderr[MAXPGPATH];
+ char outfile_source[MAXPGPATH],
+ expectfile_source[MAXPGPATH];
+ char cmd[MAXPGPATH * 3];
+ char *appnameenv;
+
+ snprintf(inprg, sizeof(inprg), "%s/%s", inputdir, testname);
+ snprintf(insource, sizeof(insource), "%s.c", testname);
+
+ initStringInfo(&testname_dash);
+ appendStringInfoString(&testname_dash, testname);
+ replace_string(&testname_dash, "/", "-");
+
+ snprintf(expectfile_stdout, sizeof(expectfile_stdout),
+ "%s/expected/%s.stdout",
+ outputdir, testname_dash.data);
+ snprintf(expectfile_stderr, sizeof(expectfile_stderr),
+ "%s/expected/%s.stderr",
+ outputdir, testname_dash.data);
+ snprintf(expectfile_source, sizeof(expectfile_source),
+ "%s/expected/%s.c",
+ outputdir, testname_dash.data);
+
+ snprintf(outfile_stdout, sizeof(outfile_stdout),
+ "%s/results/%s.stdout",
+ outputdir, testname_dash.data);
+ snprintf(outfile_stderr, sizeof(outfile_stderr),
+ "%s/results/%s.stderr",
+ outputdir, testname_dash.data);
+ snprintf(outfile_source, sizeof(outfile_source),
+ "%s/results/%s.c",
+ outputdir, testname_dash.data);
+
+ add_stringlist_item(resultfiles, outfile_stdout);
+ add_stringlist_item(expectfiles, expectfile_stdout);
+ add_stringlist_item(tags, "stdout");
+
+ add_stringlist_item(resultfiles, outfile_stderr);
+ add_stringlist_item(expectfiles, expectfile_stderr);
+ add_stringlist_item(tags, "stderr");
+
+ add_stringlist_item(resultfiles, outfile_source);
+ add_stringlist_item(expectfiles, expectfile_source);
+ add_stringlist_item(tags, "source");
+
+ ecpg_filter_source(insource, outfile_source);
+
+ snprintf(cmd, sizeof(cmd),
+ "\"%s\" >\"%s\" 2>\"%s\"",
+ inprg,
+ outfile_stdout,
+ outfile_stderr);
+
+ appnameenv = psprintf("ecpg/%s", testname_dash.data);
+ setenv("PGAPPNAME", appnameenv, 1);
+ free(appnameenv);
+
+ pid = spawn_process(cmd);
+
+ if (pid == INVALID_PID)
+ {
+ fprintf(stderr, _("could not start process for test %s\n"),
+ testname);
+ exit(2);
+ }
+
+ unsetenv("PGAPPNAME");
+
+ free(testname_dash.data);
+
+ return pid;
+}
+
+static void
+ecpg_postprocess_result(const char *filename)
+{
+ int nlen = strlen(filename);
+
+ /* Only stderr files require filtering, at the moment */
+ if (nlen > 7 && strcmp(filename + nlen - 7, ".stderr") == 0)
+ {
+ char *tmpfile = psprintf("%s.tmp", filename);
+
+ ecpg_filter_stderr(filename, tmpfile);
+ pfree(tmpfile);
+ }
+}
+
+static void
+ecpg_init(int argc, char *argv[])
+{
+ /* nothing to do here at the moment */
+}
+
+int
+main(int argc, char *argv[])
+{
+ return regression_main(argc, argv,
+ ecpg_init,
+ ecpg_start_test,
+ ecpg_postprocess_result);
+}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/.gitignore b/src/interfaces/ecpg/test/pgtypeslib/.gitignore
new file mode 100644
index 0000000..2987fef
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/.gitignore
@@ -0,0 +1,10 @@
+/dt_test
+/dt_test.c
+/dt_test2
+/dt_test2.c
+/nan_test
+/nan_test.c
+/num_test
+/num_test.c
+/num_test2
+/num_test2.c
diff --git a/src/interfaces/ecpg/test/pgtypeslib/Makefile b/src/interfaces/ecpg/test/pgtypeslib/Makefile
new file mode 100644
index 0000000..ee59691
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/Makefile
@@ -0,0 +1,12 @@
+subdir = src/interfaces/ecpg/test/pgtypeslib
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+TESTS = dt_test dt_test.c \
+ dt_test2 dt_test2.c \
+ num_test num_test.c \
+ num_test2 num_test2.c \
+ nan_test nan_test.c
+
+all: $(TESTS)
diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
new file mode 100644
index 0000000..f81a392
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
@@ -0,0 +1,385 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <pgtypes_date.h>
+#include <pgtypes_timestamp.h>
+#include <pgtypes_interval.h>
+
+exec sql include ../regression;
+
+int
+main(void)
+{
+ exec sql begin declare section;
+ date date1;
+ timestamp ts1;
+ interval *iv1, iv2;
+ char *text;
+ exec sql end declare section;
+ date date2;
+ int mdy[3] = { 4, 19, 1998 };
+ char *fmt, *out, *in;
+ char *d1 = "Mon Jan 17 1966";
+ char *t1 = "2000-7-12 17:34:29";
+ int i;
+
+ ECPGdebug(1, stderr);
+ exec sql whenever sqlerror do sqlprint();
+ exec sql connect to REGRESSDB1;
+ exec sql create table date_test (d date, ts timestamp);
+ exec sql set datestyle to iso;
+ exec sql set intervalstyle to postgres_verbose;
+
+ date1 = PGTYPESdate_from_asc(d1, NULL);
+ ts1 = PGTYPEStimestamp_from_asc(t1, NULL);
+
+ exec sql insert into date_test(d, ts) values (:date1, :ts1);
+
+ exec sql select * into :date1, :ts1 from date_test where d=:date1;
+
+ text = PGTYPESdate_to_asc(date1);
+ printf ("Date: %s\n", text);
+ PGTYPESchar_free(text);
+
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf ("timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+
+ iv1 = PGTYPESinterval_from_asc("13556 days 12 hours 34 minutes 14 seconds ", NULL);
+ PGTYPESinterval_copy(iv1, &iv2);
+ text = PGTYPESinterval_to_asc(&iv2);
+ printf ("interval: %s\n", text);
+ PGTYPESinterval_free(iv1);
+ PGTYPESchar_free(text);
+
+ PGTYPESdate_mdyjul(mdy, &date2);
+ printf("m: %d, d: %d, y: %d\n", mdy[0], mdy[1], mdy[2]);
+ /* reset */
+ mdy[0] = mdy[1] = mdy[2] = 0;
+
+ printf("date seems to get encoded to julian %ld\n", date2);
+
+ PGTYPESdate_julmdy(date2, mdy);
+ printf("m: %d, d: %d, y: %d\n", mdy[0], mdy[1], mdy[2]);
+
+ ts1 = PGTYPEStimestamp_from_asc("2003-12-04 17:34:29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ fmt = "(ddd), mmm. dd, yyyy, repeat: (ddd), mmm. dd, yyyy. end";
+ out = (char*) malloc(strlen(fmt) + 1);
+ date1 = PGTYPESdate_from_timestamp(ts1);
+ PGTYPESdate_fmt_asc(date1, fmt, out);
+ printf("date_day of %s is %d\n", text, PGTYPESdate_dayofweek(date1));
+ printf("Above date in format \"%s\" is \"%s\"\n", fmt, out);
+ PGTYPESchar_free(text);
+ free(out);
+
+ out = (char*) malloc(48);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 47, "Which is day number %j in %Y.");
+ printf("%s\n", out);
+ free(out);
+
+
+ /* rdate_defmt_asc() */
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "In the year 1995, the month of December, it is the 25th day";
+ /* 0123456789012345678901234567890123456789012345678901234567890
+ * 0 1 2 3 4 5 6
+ */
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc1: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmmm. dd. yyyy";
+ in = "12/25/95";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc2: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "95/12/25";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc3: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yy/mm/dd";
+ in = "1995, December 25th";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc4: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "dd-mm-yy";
+ in = "This is 25th day of December, 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc5: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmddyy";
+ in = "Dec. 25th, 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc6: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmm. dd. yyyy";
+ in = "dec 25th 1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc7: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mmm. dd. yyyy";
+ in = "DEC-25-1995";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc8: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mm yy dd.";
+ in = "12199525";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc9: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "yyyy fierj mm dd.";
+ in = "19951225";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc10: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = 0;
+ fmt = "mm/dd/yy";
+ in = "122595";
+ PGTYPESdate_defmt_asc(&date1, fmt, in);
+ text = PGTYPESdate_to_asc(date1);
+ printf("date_defmt_asc12: %s\n", text);
+ PGTYPESchar_free(text);
+
+ PGTYPEStimestamp_current(&ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ /* can't output this in regression mode */
+ /* printf("timestamp_current: Now: %s\n", text); */
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("96-02-29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc1: %s\n", text);
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("1994-02-11 3:10:35", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc2: %s\n", text);
+ PGTYPESchar_free(text);
+
+ ts1 = PGTYPEStimestamp_from_asc("1994-02-11 26:10:35", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_to_asc3: %s\n", text);
+ PGTYPESchar_free(text);
+
+/* abc-03:10:35-def-02/11/94-gh */
+/* 12345678901234567890123456789 */
+
+ out = (char*) malloc(32);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 31, "abc-%X-def-%x-ghi%%");
+ printf("timestamp_fmt_asc: %d: %s\n", i, out);
+ free(out);
+
+ fmt = "This is a %m/%d/%y %H-%Ml%Stest";
+ in = "This is a 4/12/80 3-39l12test";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 2000";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1900";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b %d %H:%M:%S %z %Y";
+ in = " Jul 31 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b %d %H:%M:%S %z %Y";
+ in = " Jul 32 17:28:44 +0200 1996";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %d %H:%M:%S %z %Y";
+ in = "Tue Feb 29 17:28:44 +0200 1997";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "a %";
+ in = "Tue Jul 22 17:28:44 +0200 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%b, %d %H_%M`%S %z %Y";
+ in = " Jul, 22 17_28 `44 +0200 2003 ";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %%%d %H:%M:%S %Z %Y";
+ in = "Tue Jul %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%a %b %%%d %H:%M:%S %Z %Y";
+ in = "Tue Jul %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "abc%n %C %B %%%d %H:%M:%S %Z %Y";
+ in = "abc\n 19 October %22 17:28:44 CEST 2003";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "abc%n %C %B %%%d %H:%M:%S %Z %y";
+ in = "abc\n 18 October %34 17:28:44 CEST 80";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "";
+ in = "abc\n 18 October %34 17:28:44 CEST 80";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error (should be error!): %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = NULL;
+ in = "1980-04-12 3:49:44 ";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, NULL) = %s, error: %d\n", in, text, i);
+ PGTYPESchar_free(text);
+
+ fmt = "%B %d, %Y. Time: %I:%M%p";
+ in = "July 14, 1988. Time: 9:15am";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = "September 6 at 01:30 pm in the year 1983";
+ fmt = "%B %d at %I:%M %p in the year %Y";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, July 14. Time: 9:15am";
+ fmt = "%Y, %B %d. Time: %I:%M %p";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, July 14. Time: 9:15 am";
+ fmt = "%Y, %B %d. Time: %I:%M%p";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = " 1976, P.M. July 14. Time: 9:15";
+ fmt = "%Y, %P %B %d. Time: %I:%M";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ in = "1234567890";
+ fmt = "%s";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, text, i);
+ PGTYPESchar_free(text);
+
+ out = (char*) malloc(64);
+ fmt = "%a %b %d %H:%M:%S %Y";
+ in = "Mon Dec 30 17:28:44 2019";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 63, fmt);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, out, i);
+ free(out);
+
+ out = (char*) malloc(64);
+ fmt = "%a %b %d %H:%M:%S %Y";
+ in = "Mon December 30 17:28:44 2019";
+ i = PGTYPEStimestamp_defmt_asc(in, fmt, &ts1);
+ i = PGTYPEStimestamp_fmt_asc(&ts1, out, 63, fmt);
+ printf("timestamp_defmt_asc(%s, %s) = %s, error: %d\n", in, fmt, out, i);
+ free(out);
+
+ exec sql rollback;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
new file mode 100644
index 0000000..62b934b
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
@@ -0,0 +1,151 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <pgtypes_date.h>
+#include <pgtypes_timestamp.h>
+
+exec sql include ../regression;
+
+char *dates[] = { "19990108foobar",
+ "19990108 foobar",
+ "1999-01-08 foobar",
+ "January 8, 1999",
+ "1999-01-08",
+ "1/8/1999",
+ "1/18/1999",
+ "01/02/03",
+ "1999-Jan-08",
+ "Jan-08-1999",
+ "08-Jan-1999",
+ "99-Jan-08",
+ "08-Jan-99",
+ "08-Jan-06",
+ "Jan-08-99",
+ "19990108",
+ "990108",
+ "1999.008",
+ "J2451187",
+ "January 8, 99 BC",
+ /*
+ * Maximize space usage in ParseDateTime() with 25
+ * (MAXDATEFIELDS) fields and 128 (MAXDATELEN) total length.
+ */
+ "........................Xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ /* 26 fields */
+ ".........................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ NULL };
+
+/* do not conflict with libc "times" symbol */
+static char *times[] = { "0:04",
+ "1:59 PDT",
+ "13:24:40 -8:00",
+ "13:24:40.495+3",
+ "13:24:40.123456123+3",
+ NULL };
+
+char *intervals[] = { "1 minute",
+ "1 12:59:10",
+ "2 day 12 hour 59 minute 10 second",
+ "1 days 12 hrs 59 mins 10 secs",
+ "1 days 1 hours 1 minutes 1 seconds",
+ "1 year 59 mins",
+ "1 year 59 mins foobar",
+ NULL };
+
+int
+main(void)
+{
+ exec sql begin declare section;
+ date date1;
+ timestamp ts1, ts2;
+ char *text;
+ interval *i1;
+ date *dc;
+ exec sql end declare section;
+
+ int i, j;
+ char *endptr;
+
+ ECPGdebug(1, stderr);
+
+ ts1 = PGTYPEStimestamp_from_asc("2003-12-04 17:34:29", NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+
+ printf("timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+
+ date1 = PGTYPESdate_from_timestamp(ts1);
+ dc = PGTYPESdate_new();
+ *dc = date1;
+ text = PGTYPESdate_to_asc(*dc);
+ printf("Date of timestamp: %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESdate_free(dc);
+
+ for (i = 0; dates[i]; i++)
+ {
+ bool err = false;
+ date1 = PGTYPESdate_from_asc(dates[i], &endptr);
+ if (date1 == INT_MIN) {
+ err = true;
+ }
+ text = PGTYPESdate_to_asc(date1);
+ printf("Date[%d]: %s (%c - %c)\n",
+ i, err ? "-" : text,
+ endptr ? 'N' : 'Y',
+ err ? 'T' : 'F');
+ PGTYPESchar_free(text);
+ if (!err)
+ {
+ for (j = 0; times[j]; j++)
+ {
+ int length = strlen(dates[i])
+ + 1
+ + strlen(times[j])
+ + 1;
+ char* t = malloc(length);
+ sprintf(t, "%s %s", dates[i], times[j]);
+ ts1 = PGTYPEStimestamp_from_asc(t, NULL);
+ text = PGTYPEStimestamp_to_asc(ts1);
+ printf("TS[%d,%d]: %s\n",
+ i, j, errno ? "-" : text);
+ PGTYPESchar_free(text);
+ free(t);
+ }
+ }
+ }
+
+ ts1 = PGTYPEStimestamp_from_asc("2004-04-04 23:23:23", NULL);
+
+ for (i = 0; intervals[i]; i++)
+ {
+ interval *ic;
+ i1 = PGTYPESinterval_from_asc(intervals[i], &endptr);
+ if (*endptr)
+ printf("endptr set to %s\n", endptr);
+ if (!i1)
+ {
+ printf("Error parsing interval %d\n", i);
+ continue;
+ }
+ j = PGTYPEStimestamp_add_interval(&ts1, i1, &ts2);
+ if (j < 0)
+ continue;
+ text = PGTYPESinterval_to_asc(i1);
+ printf("interval[%d]: %s\n", i, text ? text : "-");
+ PGTYPESchar_free(text);
+
+ ic = PGTYPESinterval_new();
+ PGTYPESinterval_copy(i1, ic);
+ text = PGTYPESinterval_to_asc(i1);
+ printf("interval_copy[%d]: %s\n", i, text ? text : "-");
+ PGTYPESchar_free(text);
+ PGTYPESinterval_free(ic);
+ PGTYPESinterval_free(i1);
+ }
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
new file mode 100644
index 0000000..04ddbde
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
@@ -0,0 +1,87 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+#include <pgtypes_numeric.h>
+#include <decimal.h>
+
+exec sql include ../regression;
+
+int
+main(void)
+{
+ exec sql begin declare section;
+ int id, loopcount;
+ double d;
+ numeric *num;
+ char val[16];
+ exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+ exec sql whenever sqlerror do sqlprint();
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql create table nantest1 (id int4, d float8);
+ exec sql insert into nantest1 (id, d) values (1, 'nan'::float8), (2, 'infinity'::float8), (3, '-infinity'::float8);
+
+ exec sql declare cur cursor for select id, d, d from nantest1;
+ exec sql open cur;
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ exec sql fetch from cur into :id, :d, :val;
+ if (sqlca.sqlcode)
+ break;
+ if (isnan(d))
+ printf("%d NaN '%s'\n", id, val);
+ else if (isinf(d))
+ printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
+
+ exec sql insert into nantest1 (id, d) values (:id + 3, :d);
+ exec sql insert into nantest1 (id, d) values (:id + 6, :val);
+ }
+ exec sql close cur;
+
+ exec sql open cur;
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ exec sql fetch from cur into :id, :d, :val;
+ if (sqlca.sqlcode)
+ break;
+ if (isinf(d))
+ printf("%d %sInf '%s'\n", id, (d < 0 ? "-" : "+"), val);
+ if (isnan(d))
+ printf("%d NaN '%s'\n", id, val);
+ }
+ exec sql close cur;
+
+ num = PGTYPESnumeric_new();
+
+ exec sql create table nantest2 (id int4, d numeric);
+ exec sql insert into nantest2 (id, d) values (4, 'nan'::numeric);
+
+ exec sql select id, d, d into :id, :num, :val from nantest2 where id = 4;
+
+ printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
+
+ exec sql insert into nantest2 (id, d) values (5, :num);
+ exec sql insert into nantest2 (id, d) values (6, :val);
+
+ exec sql declare cur1 cursor for select id, d, d from nantest2;
+ exec sql open cur1;
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ exec sql fetch from cur1 into :id, :num, :val;
+ if (sqlca.sqlcode)
+ break;
+ printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val);
+ }
+ exec sql close cur1;
+
+ PGTYPESnumeric_free(num);
+
+ exec sql rollback;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
new file mode 100644
index 0000000..c6c2858
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
@@ -0,0 +1,105 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <decimal.h>
+
+exec sql include ../regression;
+
+exec sql include ../printf_hack;
+
+
+int
+main(void)
+{
+ char *text="error\n";
+ numeric *value1, *value2, *res;
+ exec sql begin declare section;
+ numeric(14,7) *des;
+ /* = {0, 0, 0, 0, 0, NULL, NULL} ; */
+ exec sql end declare section;
+ double d;
+ long l1, l2;
+ int i, min, max;
+
+ ECPGdebug(1, stderr);
+ exec sql whenever sqlerror do sqlprint();
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql set autocommit = off;
+ exec sql create table test (text char(5), num numeric(14,7));
+
+ value1 = PGTYPESnumeric_new();
+ PGTYPESnumeric_from_int(1407, value1);
+ text = PGTYPESnumeric_to_asc(value1, -1);
+ printf("from int = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value1);
+
+ value1 = PGTYPESnumeric_from_asc("2369.7", NULL);
+ value2 = PGTYPESnumeric_from_asc("10.0", NULL);
+ res = PGTYPESnumeric_new();
+ PGTYPESnumeric_add(value1, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("add = %s\n", text);
+ PGTYPESchar_free(text);
+
+ PGTYPESnumeric_sub(res, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("sub = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value2);
+
+ des = PGTYPESnumeric_new();
+ PGTYPESnumeric_copy(res, des);
+ exec sql insert into test (text, num) values ('test', :des);
+
+ value2 = PGTYPESnumeric_from_asc("2369.7", NULL);
+ PGTYPESnumeric_mul(value1, value2, res);
+ PGTYPESnumeric_free(value2);
+
+ exec sql select num into :des from test where text = 'test';
+
+ PGTYPESnumeric_mul(res, des, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ printf("mul = %s\n", text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(des);
+
+ value2 = PGTYPESnumeric_from_asc("10000", NULL);
+ PGTYPESnumeric_div(res, value2, res);
+ text = PGTYPESnumeric_to_asc(res, -1);
+ PGTYPESnumeric_to_double(res, &d);
+ printf("div = %s ", text);
+ print_double(d);
+ printf("\n");
+
+ PGTYPESnumeric_free(value1);
+ PGTYPESnumeric_free(value2);
+
+ value1 = PGTYPESnumeric_from_asc("2E7", NULL);
+ value2 = PGTYPESnumeric_from_asc("14", NULL);
+ i = PGTYPESnumeric_to_long(value1, &l1) | PGTYPESnumeric_to_long(value2, &l2);
+ printf("to long(%d) = %ld %ld\n", i, l1, l2);
+
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(value1);
+ PGTYPESnumeric_free(value2);
+ PGTYPESnumeric_free(res);
+
+ /* check conversion of numeric to int */
+ value1 = PGTYPESnumeric_from_asc("-2147483648", NULL);
+ PGTYPESnumeric_to_int(value1, &min);
+ printf("min int = %d\n", min);
+ PGTYPESnumeric_free(value1);
+
+ value2 = PGTYPESnumeric_from_asc("2147483647", NULL);
+ PGTYPESnumeric_to_int(value2, &max);
+ printf("max int = %d\n", max);
+ PGTYPESnumeric_free(value2);
+
+ exec sql rollback;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
new file mode 100644
index 0000000..8241d45
--- /dev/null
+++ b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
@@ -0,0 +1,239 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_error.h>
+#include <decimal.h>
+
+exec sql include ../regression;
+
+exec sql include ../printf_hack;
+
+
+char* nums[] = { "2E394", "-2", ".794", "3.44", "592.49E21", "-32.84e4",
+ "2E-394", ".1E-2", "+.0", "-592.49E-07", "+32.84e-4",
+ ".500001", "-.5000001",
+ "1234567890123456789012345678.91", /* 30 digits should fit
+ into decimal */
+ "1234567890123456789012345678.921", /* 31 digits should NOT
+ fit into decimal */
+ "not a number",
+ NULL};
+
+
+static void
+check_errno(void);
+
+int
+main(void)
+{
+ char *text="error\n";
+ char *endptr;
+ numeric *num, *nin;
+ decimal *dec;
+ long l;
+ int i, j, k, q, r, count = 0;
+ double d;
+ numeric **numarr = (numeric **) calloc(1, sizeof(numeric));
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; nums[i]; i++)
+ {
+ num = PGTYPESnumeric_from_asc(nums[i], &endptr);
+ if (!num) check_errno();
+ if (endptr != NULL)
+ {
+ printf("endptr of %d is not NULL\n", i);
+ if (*endptr != '\0')
+ printf("*endptr of %d is not \\0\n", i);
+ }
+ if (!num) continue;
+
+ numarr = realloc(numarr, sizeof(numeric *) * (count + 1));
+ numarr[count++] = num;
+
+ text = PGTYPESnumeric_to_asc(num, -1);
+ if (!text) check_errno();
+ printf("num[%d,1]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 0);
+ if (!text) check_errno();
+ printf("num[%d,2]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 1);
+ if (!text) check_errno();
+ printf("num[%d,3]: %s\n", i, text); PGTYPESchar_free(text);
+ text = PGTYPESnumeric_to_asc(num, 2);
+ if (!text) check_errno();
+ printf("num[%d,4]: %s\n", i, text); PGTYPESchar_free(text);
+
+ nin = PGTYPESnumeric_new();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ if (!text) check_errno();
+ printf("num[%d,5]: %s\n", i, text); PGTYPESchar_free(text);
+
+ r = PGTYPESnumeric_to_long(num, &l);
+ if (r) check_errno();
+ printf("num[%d,6]: %ld (r: %d)\n", i, r?0L:l, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_long(l, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,7]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ r = PGTYPESnumeric_to_int(num, &k);
+ if (r) check_errno();
+ printf("num[%d,8]: %d (r: %d)\n", i, r?0:k, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_int(k, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,9]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+
+ r = PGTYPESnumeric_to_double(num, &d);
+ if (r) check_errno();
+ printf("num[%d,10]: ", i);
+ print_double(r ? 0.0 : d);
+ printf(" (r: %d)\n", r);
+ }
+
+ /* do not test double to numeric because
+ * - extra digits are different on different architectures
+ * - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
+ */
+
+ dec = PGTYPESdecimal_new();
+ r = PGTYPESnumeric_to_decimal(num, dec);
+ if (r) check_errno();
+ /* we have no special routine for outputting decimal, it would
+ * convert to a numeric anyway */
+ printf("num[%d,11]: - (r: %d)\n", i, r);
+ if (r == 0)
+ {
+ r = PGTYPESnumeric_from_decimal(dec, nin);
+ if (r) check_errno();
+ text = PGTYPESnumeric_to_asc(nin, 2);
+ q = PGTYPESnumeric_cmp(num, nin);
+ printf("num[%d,12]: %s (r: %d - cmp: %d)\n", i, text, r, q);
+ PGTYPESchar_free(text);
+ }
+
+ PGTYPESdecimal_free(dec);
+ PGTYPESnumeric_free(nin);
+ printf("\n");
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ for (j = 0; j < count; j++)
+ {
+ numeric* a = PGTYPESnumeric_new();
+ numeric* s = PGTYPESnumeric_new();
+ numeric* m = PGTYPESnumeric_new();
+ numeric* d = PGTYPESnumeric_new();
+ r = PGTYPESnumeric_add(numarr[i], numarr[j], a);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(a, 10);
+ printf("num[a,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_sub(numarr[i], numarr[j], s);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(s, 10);
+ printf("num[s,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_mul(numarr[i], numarr[j], m);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(m, 10);
+ printf("num[m,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+ r = PGTYPESnumeric_div(numarr[i], numarr[j], d);
+ if (r)
+ {
+ check_errno();
+ printf("r: %d\n", r);
+ }
+ else
+ {
+ text = PGTYPESnumeric_to_asc(d, 10);
+ printf("num[d,%d,%d]: %s\n", i, j, text);
+ PGTYPESchar_free(text);
+ }
+
+ PGTYPESnumeric_free(a);
+ PGTYPESnumeric_free(s);
+ PGTYPESnumeric_free(m);
+ PGTYPESnumeric_free(d);
+ }
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ text = PGTYPESnumeric_to_asc(numarr[i], -1);
+ printf("%d: %s\n", i, text);
+ PGTYPESchar_free(text);
+ PGTYPESnumeric_free(numarr[i]);
+ }
+ free(numarr);
+
+ return 0;
+}
+
+static void
+check_errno(void)
+{
+ switch(errno)
+ {
+ case 0:
+ printf("(no errno set) - ");
+ break;
+ case PGTYPES_NUM_OVERFLOW:
+ printf("(errno == PGTYPES_NUM_OVERFLOW) - ");
+ break;
+ case PGTYPES_NUM_UNDERFLOW:
+ printf("(errno == PGTYPES_NUM_UNDERFLOW) - ");
+ break;
+ case PGTYPES_NUM_BAD_NUMERIC:
+ printf("(errno == PGTYPES_NUM_BAD_NUMERIC) - ");
+ break;
+ case PGTYPES_NUM_DIVIDE_ZERO:
+ printf("(errno == PGTYPES_NUM_DIVIDE_ZERO) - ");
+ break;
+ default:
+ printf("(unknown errno (%d))\n", errno);
+ printf("(libc: (%s)) ", strerror(errno));
+ break;
+ }
+
+}
diff --git a/src/interfaces/ecpg/test/preproc/.gitignore b/src/interfaces/ecpg/test/preproc/.gitignore
new file mode 100644
index 0000000..fd63e64
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/.gitignore
@@ -0,0 +1,26 @@
+/array_of_struct
+/array_of_struct.c
+/autoprep
+/autoprep.c
+/comment
+/comment.c
+/cursor
+/cursor.c
+/define
+/define.c
+/init
+/init.c
+/outofscope
+/outofscope.c
+/pointer_to_struct
+/pointer_to_struct.c
+/strings
+/strings.c
+/type
+/type.c
+/variable
+/variable.c
+/whenever
+/whenever.c
+/whenever_do_continue
+/whenever_do_continue.c
diff --git a/src/interfaces/ecpg/test/preproc/Makefile b/src/interfaces/ecpg/test/preproc/Makefile
new file mode 100644
index 0000000..39b1974
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/Makefile
@@ -0,0 +1,33 @@
+subdir = src/interfaces/ecpg/test/preproc
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+
+TESTS = array_of_struct array_of_struct.c \
+ autoprep autoprep.c \
+ comment comment.c \
+ cursor cursor.c \
+ define define.c \
+ init init.c \
+ strings strings.c \
+ outofscope outofscope.c \
+ type type.c \
+ variable variable.c \
+ whenever whenever.c \
+ whenever_do_continue whenever_do_continue.c \
+ pointer_to_struct pointer_to_struct.c
+
+all: $(TESTS)
+
+array_of_struct.c: array_of_struct.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -c -o $@ $<
+
+pointer_to_struct.c: pointer_to_struct.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -c -o $@ $<
+
+autoprep.c: autoprep.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -r prepare -o $@ $<
+
+strings.c: strings.pgc strings.h $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -i -o $@ $<
diff --git a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
new file mode 100644
index 0000000..69f5758
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
@@ -0,0 +1,95 @@
+#include <stdio.h>
+
+exec sql include ../regression;
+
+EXEC SQL WHENEVER sqlerror sqlprint;
+EXEC SQL WHENEVER sqlwarning sqlprint;
+EXEC SQL WHENEVER not found sqlprint;
+
+EXEC SQL TYPE customer IS
+ struct
+ {
+ varchar name[50];
+ int phone;
+ };
+
+EXEC SQL TYPE cust_ind IS
+ struct ind
+ {
+ short name_ind;
+ short phone_ind;
+ };
+
+int main()
+{
+ EXEC SQL begin declare section;
+ customer custs1[10];
+ cust_ind inds[10];
+ typedef struct
+ {
+ varchar name[50];
+ int phone;
+ } customer2;
+ customer2 custs2[10];
+ struct customer3
+ {
+ varchar name[50];
+ int phone;
+ } custs3[10];
+ struct customer4
+ {
+ varchar name[50];
+ int phone;
+ } custs4;
+ int r;
+ varchar onlyname[2][50];
+ EXEC SQL end declare section;
+
+ ECPGdebug(1, stderr);
+
+ EXEC SQL connect to REGRESSDB1;
+
+ EXEC SQL create table customers (c varchar(50), p int);
+ EXEC SQL insert into customers values ('John Doe', '12345');
+ EXEC SQL insert into customers values ('Jane Doe', '67890');
+
+ EXEC SQL select * INTO :custs1:inds from customers limit 2;
+ printf("custs1:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs1[r].name.arr );
+ printf( "phone - %d\n", custs1[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs2:inds from customers limit 2;
+ printf("\ncusts2:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs2[r].name.arr );
+ printf( "phone - %d\n", custs2[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs3:inds from customers limit 2;
+ printf("\ncusts3:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs3[r].name.arr );
+ printf( "phone - %d\n", custs3[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs4:inds[0] from customers limit 1;
+ printf("\ncusts4:\n");
+ printf( "name - %s\n", custs4.name.arr );
+ printf( "phone - %d\n", custs4.phone );
+
+ EXEC SQL select c INTO :onlyname from customers limit 2;
+ printf("\nname:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", onlyname[r].arr );
+ }
+
+ EXEC SQL disconnect all;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/autoprep.pgc b/src/interfaces/ecpg/test/preproc/autoprep.pgc
new file mode 100644
index 0000000..d3d9305
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/autoprep.pgc
@@ -0,0 +1,72 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* test automatic prepare for all statements */
+EXEC SQL INCLUDE ../regression;
+
+static void test(void) {
+ EXEC SQL BEGIN DECLARE SECTION;
+ int item[4], ind[4], i = 1;
+ int item1, ind1;
+ char sqlstr[64] = "SELECT item2 FROM T ORDER BY item2 NULLS LAST";
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL CREATE TABLE T ( Item1 int, Item2 int );
+
+ EXEC SQL INSERT INTO T VALUES ( 1, null );
+ EXEC SQL INSERT INTO T VALUES ( 1, :i );
+ i++;
+ EXEC SQL INSERT INTO T VALUES ( 1, :i );
+ EXEC SQL PREPARE I AS INSERT INTO T VALUES ( 1, 2 );
+ EXEC SQL EXECUTE I;
+
+ EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
+
+ for (i=0; i<4; i++)
+ printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
+
+ EXEC SQL DECLARE C CURSOR FOR SELECT Item1 FROM T;
+
+ EXEC SQL OPEN C;
+
+ EXEC SQL FETCH 1 IN C INTO :i;
+ printf("i = %d\n", i);
+
+ EXEC SQL CLOSE C;
+
+ EXEC SQL PREPARE stmt1 FROM :sqlstr;
+
+ EXEC SQL DECLARE cur1 CURSOR FOR stmt1;
+
+ EXEC SQL OPEN cur1;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+
+ i = 0;
+ while (i < 100)
+ {
+ EXEC SQL FETCH cur1 INTO :item1:ind1;
+ printf("item[%d] = %d\n", i, ind1 ? -1 : item1);
+ i++;
+ }
+
+ EXEC SQL CLOSE cur1;
+
+ EXEC SQL DROP TABLE T;
+
+ EXEC SQL DISCONNECT ALL;
+}
+
+int main() {
+ test();
+ test(); /* retry */
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/comment.pgc b/src/interfaces/ecpg/test/preproc/comment.pgc
new file mode 100644
index 0000000..c3ce20c
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/comment.pgc
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+
+exec sql include ../regression;
+
+/* just a test comment */ int i;
+/* just a test comment int j*/;
+
+/****************************************************************************/
+/* Test comment */
+/*--------------------------------------------------------------------------*/
+
+int main(void)
+{
+ ECPGdebug(1, stderr);
+
+ exec sql --this is a comment too
+ connect to REGRESSDB1;
+
+ exec sql disconnect;
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/preproc/cursor.pgc b/src/interfaces/ecpg/test/preproc/cursor.pgc
new file mode 100644
index 0000000..8a286ad
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/cursor.pgc
@@ -0,0 +1,256 @@
+#include <stdlib.h>
+#include <string.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror stop;
+
+exec sql type c is char reference;
+typedef char* c;
+
+exec sql type ind is union { int integer; short smallint; };
+typedef union { int integer; short smallint; } ind;
+
+#define BUFFERSIZ 8
+exec sql type str is varchar[BUFFERSIZ];
+
+#define CURNAME "mycur"
+
+int
+main (void)
+{
+exec sql begin declare section;
+ char *stmt1 = "SELECT id, t FROM t1";
+ char *curname1 = CURNAME;
+ char *curname2 = CURNAME;
+ char *curname3 = CURNAME;
+ varchar curname4[50];
+ char *curname5 = CURNAME;
+ int count;
+ int id;
+ char t[64];
+exec sql end declare section;
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1 as test1;
+ exec sql connect to REGRESSDB2 as test2;
+
+ strcpy(msg, "set");
+ exec sql at test1 set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql at test1 create table t1(id serial primary key, t text);
+ exec sql at test2 create table t1(id serial primary key, t text);
+
+ strcpy(msg, "insert");
+ exec sql at test1 insert into t1(id, t) values (default, 'a');
+ exec sql at test1 insert into t1(id, t) values (default, 'b');
+ exec sql at test1 insert into t1(id, t) values (default, 'c');
+ exec sql at test1 insert into t1(id, t) values (default, 'd');
+ exec sql at test2 insert into t1(id, t) values (default, 'e');
+
+ strcpy(msg, "commit");
+ exec sql at test1 commit;
+ exec sql at test2 commit;
+
+ /* Dynamic cursorname test with INTO list in FETCH stmts */
+
+ strcpy(msg, "declare");
+ exec sql at test1 declare :curname1 cursor for
+ select id, t from t1;
+
+ strcpy(msg, "open");
+ exec sql at test1 open :curname1;
+
+ strcpy(msg, "fetch from");
+ exec sql at test1 fetch forward from :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ exec sql at test1 fetch forward :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ exec sql at test1 fetch 1 from :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ exec sql at test1 fetch :count from :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move in");
+ exec sql at test1 move absolute 0 in :curname1;
+
+ strcpy(msg, "fetch 1");
+ exec sql at test1 fetch 1 :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ exec sql at test1 fetch :count :curname1 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ exec sql at test1 close :curname1;
+
+ /* Dynamic cursorname test with INTO list in DECLARE stmt */
+
+ strcpy(msg, "declare");
+ exec sql at test1 declare :curname2 cursor for
+ select id, t into :id, :t from t1;
+
+ strcpy(msg, "open");
+ exec sql at test1 open :curname2;
+
+ strcpy(msg, "fetch from");
+ exec sql at test1 fetch from :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ exec sql at test1 fetch :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ exec sql at test1 fetch 1 from :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ exec sql at test1 fetch :count from :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ exec sql at test1 move absolute 0 :curname2;
+
+ strcpy(msg, "fetch 1");
+ exec sql at test1 fetch 1 :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ exec sql at test1 fetch :count :curname2;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ exec sql at test1 close :curname2;
+
+ /* Dynamic cursorname test with PREPARED stmt */
+
+ strcpy(msg, "prepare");
+ exec sql at test1 prepare st_id1 from :stmt1;
+ exec sql at test2 prepare st_id1 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql at test1 declare :curname3 cursor for st_id1;
+ exec sql at test2 declare :curname5 cursor for st_id1;
+
+ strcpy(msg, "open");
+ exec sql at test1 open :curname3;
+ exec sql at test2 open :curname5;
+
+ strcpy(msg, "fetch");
+ exec sql at test2 fetch :curname5 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch from");
+ exec sql at test1 fetch from :curname3 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ exec sql at test1 fetch 1 from :curname3 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ exec sql at test1 fetch :count from :curname3 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ exec sql at test1 move absolute 0 :curname3;
+
+ strcpy(msg, "fetch 1");
+ exec sql at test1 fetch 1 :curname3 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ exec sql at test1 fetch :count :curname3 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ exec sql at test1 close :curname3;
+ exec sql at test2 close :curname5;
+
+ strcpy(msg, "deallocate prepare");
+ exec sql at test1 deallocate prepare st_id1;
+ exec sql at test2 deallocate prepare st_id1;
+
+ /* Dynamic cursorname test with PREPARED stmt,
+ cursor name in varchar */
+
+ curname4.len = strlen(CURNAME);
+ strcpy(curname4.arr, CURNAME);
+
+ strcpy(msg, "prepare");
+ exec sql at test1 prepare st_id2 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql at test1 declare :curname4 cursor for st_id2;
+
+ strcpy(msg, "open");
+ exec sql at test1 open :curname4;
+
+ strcpy(msg, "fetch from");
+ exec sql at test1 fetch from :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch");
+ exec sql at test1 fetch :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch 1 from");
+ exec sql at test1 fetch 1 from :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count from");
+ count = 1;
+ exec sql at test1 fetch :count from :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "move");
+ exec sql at test1 move absolute 0 :curname4;
+
+ strcpy(msg, "fetch 1");
+ exec sql at test1 fetch 1 :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "fetch :count");
+ count = 1;
+ exec sql at test1 fetch :count :curname4 into :id, :t;
+ printf("%d %s\n", id, t);
+
+ strcpy(msg, "close");
+ exec sql at test1 close :curname4;
+
+ strcpy(msg, "deallocate prepare");
+ exec sql at test1 deallocate prepare st_id2;
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ exec sql at test1 drop table t1;
+ exec sql at test2 drop table t1;
+
+ strcpy(msg, "commit");
+ exec sql at test1 commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect all;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/define.pgc b/src/interfaces/ecpg/test/preproc/define.pgc
new file mode 100644
index 0000000..90dc328
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/define.pgc
@@ -0,0 +1,78 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+exec sql define AMOUNT 6;
+exec sql define NAMELEN 8;
+
+exec sql type intarray is int[AMOUNT];
+typedef int intarray[AMOUNT];
+
+int
+main(void)
+{
+exec sql begin declare section;
+
+exec sql ifdef NAMELEN;
+ typedef char string[NAMELEN];
+ intarray amount;
+ char name[AMOUNT][NAMELEN];
+exec sql elif AMOUNT;
+ should not get here;
+exec sql else;
+ should not get here either;
+exec sql endif;
+
+exec sql ifndef NAMELEN;
+ should not get here;
+exec sql elif AMOUNT;
+ exec sql ifdef NOSUCHNAME;
+ should not get here;
+ exec sql else;
+ char letter[AMOUNT][1];
+#if 0
+ int not_used;
+#endif
+ exec sql endif;
+exec sql elif AMOUNT;
+ should not get here;
+exec sql endif;
+
+exec sql end declare section;
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql create table test (name char(NAMELEN), amount int, letter char(1));
+ exec sql commit;
+
+ exec sql insert into Test (name, amount, letter) values ('false', 1, 'f');
+ exec sql insert into test (name, amount, letter) values ('true', 2, 't');
+ exec sql commit;
+
+ exec sql select * into :name, :amount, :letter from test;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ exec sql begin declare section;
+ string n;
+ char l = letter[i][0];
+ int a = amount[i];
+ exec sql end declare section;
+
+ strncpy(n, name[i], NAMELEN);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql drop table test;
+ exec sql commit;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/init.pgc b/src/interfaces/ecpg/test/preproc/init.pgc
new file mode 100644
index 0000000..b1f7199
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/init.pgc
@@ -0,0 +1,100 @@
+exec sql include sqlca;
+
+enum e { ENUM0, ENUM1 };
+struct sa { int member; };
+
+static int fa(void)
+{
+ printf("in fa\n");
+ return 2;
+}
+
+static int
+fb(int x)
+{
+ printf("in fb (%d)\n", x);
+ return x;
+}
+
+static int
+fc(const char *x)
+{
+ printf("in fc (%s)\n", x);
+ return *x;
+}
+
+static int fd(const char *x,int i)
+{
+ printf("in fd (%s, %d)\n", x, i);
+ return (*x)*i;
+}
+
+static int fe(enum e x)
+{
+ printf("in fe (%d)\n", (int) x);
+ return (int)x;
+}
+
+static void sqlnotice(const char *notice, short trans)
+{
+ if (!notice)
+ notice = "-empty-";
+ printf("in sqlnotice (%s, %d)\n", notice, trans);
+}
+
+exec sql define NONO 0;
+
+#define YES 1
+
+#ifdef _cplusplus
+namespace N
+{
+ static const int i=2;
+};
+#endif
+
+int main(void)
+{
+ struct sa x = { 14 },*y = &x;
+ exec sql begin declare section;
+ int a=(int)2;
+ int b=2+2;
+ int b2=(14*7);
+ int d=x.member;
+ int g=fb(2);
+ int i=3^1;
+ int j=1?1:2;
+
+ int e=y->member;
+ int c=10>>2;
+ bool h=2||1;
+ long iay /* = 1L */ ;
+ exec sql end declare section;
+
+ int f=fa();
+
+#ifdef _cplusplus
+ exec sql begin declare section;
+ int k=N::i; /* compile error */
+ exec sql end declare section;
+#endif
+
+ ECPGdebug(1, stderr);
+
+ printf("%d %d %d %d %d %d %d %d %d %d %d\n", a, b, b2, c, d, e, f, g, h, i, j);
+ iay = 0;
+ printf("%ld\n", iay);
+ exec sql whenever sqlerror do fa();
+ exec sql select now();
+ exec sql whenever sqlerror do fb(20);
+ exec sql select now();
+ exec sql whenever sqlerror do fc("50");
+ exec sql select now();
+ exec sql whenever sqlerror do fd("50",1);
+ exec sql select now();
+ exec sql whenever sqlerror do fe(ENUM0);
+ exec sql select now();
+ exec sql whenever sqlerror do sqlnotice(NULL, NONO);
+ exec sql select now();
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/outofscope.pgc b/src/interfaces/ecpg/test/preproc/outofscope.pgc
new file mode 100644
index 0000000..ed60782
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/outofscope.pgc
@@ -0,0 +1,116 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+exec sql include ../regression;
+
+exec sql include pgtypes_numeric.h;
+
+exec sql begin declare section;
+exec sql include struct.h;
+exec sql end declare section;
+
+exec sql whenever sqlerror stop;
+
+/* Functions for test 1 */
+
+static void
+get_var1(MYTYPE **myvar0, MYNULLTYPE **mynullvar0)
+{
+ exec sql begin declare section;
+ MYTYPE *myvar = malloc(sizeof(MYTYPE));
+ MYNULLTYPE *mynullvar = malloc(sizeof(MYNULLTYPE));
+ exec sql end declare section;
+
+ /* Test DECLARE ... SELECT ... INTO with pointers */
+
+ exec sql declare mycur cursor for select * INTO :myvar :mynullvar from a1;
+
+ if (sqlca.sqlcode != 0)
+ exit(1);
+
+ *myvar0 = myvar;
+ *mynullvar0 = mynullvar;
+}
+
+static void
+open_cur1(void)
+{
+ exec sql open mycur;
+}
+
+static void
+get_record1(void)
+{
+ exec sql fetch mycur;
+}
+
+static void
+close_cur1(void)
+{
+ exec sql close mycur;
+}
+
+int
+main (void)
+{
+ MYTYPE *myvar;
+ MYNULLTYPE *mynullvar;
+ int loopcount;
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table a1(id serial primary key, t text, d1 numeric, d2 float8, c character(10));
+
+ strcpy(msg, "insert");
+ exec sql insert into a1(id, t, d1, d2, c) values (default, 'a', 1.0, 2, 'a');
+ exec sql insert into a1(id, t, d1, d2, c) values (default, null, null, null, null);
+ exec sql insert into a1(id, t, d1, d2, c) values (default, 'b', 2.0, 3, 'b');
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ /* Test out-of-scope DECLARE/OPEN/FETCH/CLOSE */
+
+ get_var1(&myvar, &mynullvar);
+ open_cur1();
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ memset(myvar, 0, sizeof(MYTYPE));
+ get_record1();
+ if (sqlca.sqlcode == ECPG_NOT_FOUND)
+ break;
+ printf("id=%d%s t='%s'%s d1=%f%s d2=%f%s c = '%s'%s\n",
+ myvar->id, mynullvar->id ? " (NULL)" : "",
+ myvar->t, mynullvar->t ? " (NULL)" : "",
+ myvar->d1, mynullvar->d1 ? " (NULL)" : "",
+ myvar->d2, mynullvar->d2 ? " (NULL)" : "",
+ myvar->c, mynullvar->c ? " (NULL)" : "");
+ }
+
+ close_cur1();
+
+ free(myvar);
+ free(mynullvar);
+
+ strcpy(msg, "drop");
+ exec sql drop table a1;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc b/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc
new file mode 100644
index 0000000..1ec651e
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc
@@ -0,0 +1,100 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+exec sql include ../regression;
+
+EXEC SQL WHENEVER sqlerror sqlprint;
+EXEC SQL WHENEVER sqlwarning sqlprint;
+EXEC SQL WHENEVER not found sqlprint;
+
+EXEC SQL TYPE customer IS
+ struct
+ {
+ varchar name[50];
+ int phone;
+ };
+
+EXEC SQL TYPE cust_ind IS
+ struct ind
+ {
+ short name_ind;
+ short phone_ind;
+ };
+
+int main()
+{
+ EXEC SQL begin declare section;
+ customer *custs1 = (customer *) malloc(sizeof(customer) * 10);
+ cust_ind *inds = (cust_ind *) malloc(sizeof(cust_ind) * 10);
+ typedef struct
+ {
+ varchar name[50];
+ int phone;
+ } customer2;
+ customer2 *custs2 = (customer2 *) malloc(sizeof(customer2) * 10);
+
+ struct customer3
+ {
+ char name[50];
+ int phone;
+ } *custs3 = (struct customer3 *) malloc(sizeof(struct customer3) * 10);
+
+ struct customer4
+ {
+ varchar name[50];
+ int phone;
+ } *custs4 = (struct customer4 *) malloc(sizeof(struct customer4));
+
+ int r;
+ varchar onlyname[2][50];
+ EXEC SQL end declare section;
+
+ ECPGdebug(1, stderr);
+
+ EXEC SQL connect to REGRESSDB1;
+
+ EXEC SQL create table customers (c varchar(50), p int);
+ EXEC SQL insert into customers values ('John Doe', '12345');
+ EXEC SQL insert into customers values ('Jane Doe', '67890');
+
+ EXEC SQL select * INTO :custs1:inds from customers limit 2;
+ printf("custs1:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs1[r].name.arr );
+ printf( "phone - %d\n", custs1[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs2:inds from customers limit 2;
+ printf("\ncusts2:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs2[r].name.arr );
+ printf( "phone - %d\n", custs2[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs3:inds from customers limit 2;
+ printf("\ncusts3:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", custs3[r].name );
+ printf( "phone - %d\n", custs3[r].phone );
+ }
+
+ EXEC SQL select * INTO :custs4:inds from customers limit 1;
+ printf("\ncusts4:\n");
+ printf( "name - %s\n", custs4->name.arr );
+ printf( "phone - %d\n", custs4->phone );
+
+ EXEC SQL select c INTO :onlyname from customers limit 2;
+ printf("\nname:\n");
+ for (r = 0; r < 2; r++)
+ {
+ printf( "name - %s\n", onlyname[r].arr );
+ }
+
+ EXEC SQL disconnect all;
+
+ /* All the memory will anyway be freed at the end */
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/strings.h b/src/interfaces/ecpg/test/preproc/strings.h
new file mode 100644
index 0000000..edb5be5
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/strings.h
@@ -0,0 +1,8 @@
+char *s1,
+ *s2,
+ *s3,
+ *s4,
+ *s5,
+ *s6,
+ *s7,
+ *s8;
diff --git a/src/interfaces/ecpg/test/preproc/strings.pgc b/src/interfaces/ecpg/test/preproc/strings.pgc
new file mode 100644
index 0000000..f3b253e
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/strings.pgc
@@ -0,0 +1,32 @@
+#include <../regression.h>
+
+exec sql begin declare section;
+#include <strings.h>
+exec sql end declare section;
+
+int main(void)
+{
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql set standard_conforming_strings to on;
+
+ exec sql select 'abc''d\ef',
+ N'abc''d\ef' AS foo,
+ E'abc''d\\ef' AS "foo""bar",
+ U&'d\0061t\0061' AS U&"foo""bar",
+ U&'d!+000061t!+000061' uescape '!',
+ $foo$abc$def$foo$
+ into :s1, :s2, :s3, :s4, :s5, :s6;
+
+ printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6);
+
+ exec sql select b'0010', X'019ABcd'
+ into :s7, :s8;
+
+ printf("%s %s\n", s7, s8);
+
+ exec sql disconnect;
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/struct.h b/src/interfaces/ecpg/test/preproc/struct.h
new file mode 100644
index 0000000..19da316
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/struct.h
@@ -0,0 +1,19 @@
+struct mytype
+{
+ int id;
+ char t[64];
+ double d1; /* dec_t */
+ double d2;
+ char c[30];
+};
+typedef struct mytype MYTYPE;
+
+struct mynulltype
+{
+ int id;
+ int t;
+ int d1;
+ int d2;
+ int c;
+};
+typedef struct mynulltype MYNULLTYPE;
diff --git a/src/interfaces/ecpg/test/preproc/type.pgc b/src/interfaces/ecpg/test/preproc/type.pgc
new file mode 100644
index 0000000..3200c91
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/type.pgc
@@ -0,0 +1,80 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+EXEC SQL include ../regression;
+
+EXEC SQL typedef long mmInteger;
+EXEC SQL typedef char mmChar;
+EXEC SQL typedef short mmSmallInt;
+
+exec sql type string is char[11];
+typedef char string[11];
+
+exec sql type c is char reference;
+typedef char* c;
+
+EXEC SQL BEGIN DECLARE SECTION;
+struct TBempl
+{
+ mmInteger idnum;
+ mmChar name[21];
+ mmSmallInt accs;
+};
+EXEC SQL END DECLARE SECTION;
+
+int
+main (void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ struct TBempl empl;
+ string str;
+ c ptr = NULL;
+ struct varchar
+ {
+ int len;
+ char text[10];
+ } vc;
+ EXEC SQL END DECLARE SECTION;
+
+ EXEC SQL var vc is varchar[10];
+ ECPGdebug (1, stderr);
+
+ empl.idnum = 1;
+ EXEC SQL connect to REGRESSDB1;
+ if (sqlca.sqlcode)
+ {
+ printf ("connect error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ EXEC SQL create table empl
+ (idnum integer, name char(20), accs smallint, string1 char(10), string2 char(10), string3 char(10));
+ if (sqlca.sqlcode)
+ {
+ printf ("create error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ EXEC SQL insert into empl values (1, 'user name', 320, 'first str', 'second str', 'third str');
+ if (sqlca.sqlcode)
+ {
+ printf ("insert error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+
+ EXEC SQL select idnum, name, accs, string1, string2, string3
+ into :empl, :str, :ptr, :vc
+ from empl
+ where idnum =:empl.idnum;
+ if (sqlca.sqlcode)
+ {
+ printf ("select error = %ld\n", sqlca.sqlcode);
+ exit (sqlca.sqlcode);
+ }
+ printf ("id=%ld name='%s' accs=%d str='%s' ptr='%s' vc='%10.10s'\n", empl.idnum, empl.name, empl.accs, str, ptr, vc.text);
+
+ EXEC SQL disconnect;
+
+ free(ptr);
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/preproc/variable.pgc b/src/interfaces/ecpg/test/preproc/variable.pgc
new file mode 100644
index 0000000..423a01c
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/variable.pgc
@@ -0,0 +1,101 @@
+#include <stdlib.h>
+#include <string.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror stop;
+
+exec sql type c is char reference;
+typedef char* c;
+
+exec sql type ind is union { int integer; short smallint; };
+typedef union { int integer; short smallint; } ind;
+
+#define BUFFERSIZ 8
+exec sql type str is varchar[BUFFERSIZ];
+
+exec sql declare cur cursor for
+ select name, born, age, married, children from family;
+
+int
+main (void)
+{
+ exec sql struct birthinfo { long born; short age; };
+exec sql begin declare section;
+ struct personal_struct { str name;
+ struct birthinfo birth;
+ } personal, *p;
+ struct personal_indicator { int ind_name;
+ struct birthinfo ind_birth;
+ } ind_personal, *i;
+ ind ind_children;
+ struct t1 { str name; }; struct t2 { str name; };
+exec sql end declare section;
+
+ exec sql char *married = NULL;
+ exec sql long ind_married;
+ exec sql ind children;
+ int loopcount;
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table family(name char(8), born integer, age smallint, married date, children integer);
+
+ strcpy(msg, "insert");
+ exec sql insert into family(name, married, children) values ('Mum', '19870714', 3);
+ exec sql insert into family(name, born, married, children) values ('Dad', '19610721', '19870714', 3);
+ exec sql insert into family(name, age) values ('Child 1', 16);
+ exec sql insert into family(name, age) values ('Child 2', 14);
+ exec sql insert into family(name, age) values ('Child 3', 9);
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "open");
+ exec sql open cur;
+
+ exec sql whenever not found do break;
+
+ p=&personal;
+ i=&ind_personal;
+ memset(i, 0, sizeof(ind_personal));
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ strcpy(msg, "fetch");
+ exec sql fetch cur into :p:i, :married:ind_married, :children.integer:ind_children.smallint;
+ printf("%8.8s", personal.name.arr);
+ if (i->ind_birth.born >= 0)
+ printf(", born %ld", personal.birth.born);
+ if (i->ind_birth.age >= 0)
+ printf(", age = %d", personal.birth.age);
+ if (ind_married >= 0)
+ printf(", married %s", married);
+ if (ind_children.smallint >= 0)
+ printf(", children = %d", children.integer);
+ putchar('\n');
+
+ free(married);
+ married = NULL;
+ }
+
+ strcpy(msg, "close");
+ exec sql close cur;
+
+ strcpy(msg, "drop");
+ exec sql drop table family;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/preproc/whenever.pgc b/src/interfaces/ecpg/test/preproc/whenever.pgc
new file mode 100644
index 0000000..6090e5f
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/whenever.pgc
@@ -0,0 +1,67 @@
+#include <stdlib.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+static void print(const char *msg)
+{
+ fprintf(stderr, "Error in statement '%s':\n", msg);
+ sqlprint();
+}
+
+static void print2(void)
+{
+ fprintf(stderr, "Found another error\n");
+ sqlprint();
+}
+
+static void warn(void)
+{
+ fprintf(stderr, "Warning: At least one column was truncated\n");
+}
+
+int main(void)
+{
+ exec sql int i;
+ exec sql char c[6];
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1;
+ exec sql create table test(i int, c char(10));
+ exec sql insert into test values(1, 'abcdefghij');
+
+ exec sql whenever sqlwarning do warn();
+ exec sql select * into :i, :c from test;
+ exec sql rollback;
+
+ exec sql select * into :i from nonexistent;
+ exec sql rollback;
+
+ exec sql whenever sqlerror do print("select");
+ exec sql select * into :i from nonexistent;
+ exec sql rollback;
+
+ exec sql whenever sqlerror call print2();
+ exec sql select * into :i from nonexistent;
+ exec sql rollback;
+
+ exec sql whenever sqlerror continue;
+ exec sql select * into :i from nonexistent;
+ exec sql rollback;
+
+ exec sql whenever sqlerror goto error;
+ exec sql select * into :i from nonexistent;
+ printf("Should not be reachable\n");
+
+ error:
+ exec sql rollback;
+
+ exec sql whenever sqlerror stop;
+ /* This cannot fail, thus we don't get an exit value not equal 0. */
+ /* However, it still test the precompiler output. */
+ exec sql select 1 into :i;
+ exec sql rollback;
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc b/src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc
new file mode 100644
index 0000000..025ac12
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/whenever_do_continue.pgc
@@ -0,0 +1,63 @@
+#include <stdlib.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror stop;
+
+int main(void)
+{
+ exec sql begin declare section;
+ struct
+ {
+ char ename[12];
+ float sal;
+ float comm;
+ } emp;
+ int loopcount;
+ char msg[128];
+ exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+
+ strcpy(msg, "create");
+ exec sql create table emp(ename varchar,sal double precision, comm double precision);
+
+ strcpy(msg, "insert");
+ exec sql insert into emp values ('Ram',111100,21);
+ exec sql insert into emp values ('aryan',11110,null);
+ exec sql insert into emp values ('josh',10000,10);
+ exec sql insert into emp values ('tom',20000,null);
+
+ exec sql declare c cursor for select ename, sal, comm from emp order by ename collate "C" asc;
+
+ exec sql open c;
+
+ /* The 'BREAK' condition to exit the loop. */
+ exec sql whenever not found do break;
+
+ /* The DO CONTINUE makes the loop start at the next iteration when an error occurs.*/
+ exec sql whenever sqlerror do continue;
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ exec sql fetch c into :emp;
+ /* The employees with non-NULL commissions will be displayed. */
+ printf("%s %7.2f %9.2f\n", emp.ename, emp.sal, emp.comm);
+ }
+
+ /*
+ * This 'CONTINUE' shuts off the 'DO CONTINUE' and allow the program to
+ * proceed if any further errors do occur.
+ */
+ exec sql whenever sqlerror continue;
+
+ exec sql close c;
+
+ strcpy(msg, "drop");
+ exec sql drop table emp;
+
+ exit(0);
+}
diff --git a/src/interfaces/ecpg/test/printf_hack.h b/src/interfaces/ecpg/test/printf_hack.h
new file mode 100644
index 0000000..ef584c0
--- /dev/null
+++ b/src/interfaces/ecpg/test/printf_hack.h
@@ -0,0 +1,29 @@
+/*
+ * print_double(x) has the same effect as printf("%g", x), but is intended
+ * to produce the same formatting across all platforms.
+ */
+static void
+print_double(double x)
+{
+#ifdef WIN32
+ /* Change Windows' 3-digit exponents to look like everyone else's */
+ char convert[128];
+ int vallen;
+
+ sprintf(convert, "%g", x);
+ vallen = strlen(convert);
+
+ if (vallen >= 6 &&
+ convert[vallen - 5] == 'e' &&
+ convert[vallen - 3] == '0')
+ {
+ convert[vallen - 3] = convert[vallen - 2];
+ convert[vallen - 2] = convert[vallen - 1];
+ convert[vallen - 1] = '\0';
+ }
+
+ printf("%s", convert);
+#else
+ printf("%g", x);
+#endif
+}
diff --git a/src/interfaces/ecpg/test/regression.h b/src/interfaces/ecpg/test/regression.h
new file mode 100644
index 0000000..6b7fba1
--- /dev/null
+++ b/src/interfaces/ecpg/test/regression.h
@@ -0,0 +1,5 @@
+exec sql define REGRESSDB1 ecpg1_regression;
+exec sql define REGRESSDB2 ecpg2_regression;
+
+exec sql define REGRESSUSER1 regress_ecpg_user1;
+exec sql define REGRESSUSER2 regress_ecpg_user2;
diff --git a/src/interfaces/ecpg/test/sql/.gitignore b/src/interfaces/ecpg/test/sql/.gitignore
new file mode 100644
index 0000000..d3aaa62
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/.gitignore
@@ -0,0 +1,50 @@
+/array
+/array.c
+/binary
+/binary.c
+/bytea
+/bytea.c
+/code100
+/code100.c
+/copystdout
+/copystdout.c
+/createtableas
+/createtableas.c
+/declare
+/declare.c
+/define
+/define.c
+/desc
+/desc.c
+/describe
+/describe.c
+/dynalloc
+/dynalloc.c
+/dynalloc2
+/dynalloc2.c
+/dyntest
+/dyntest.c
+/execute
+/execute.c
+/fetch
+/fetch.c
+/func
+/func.c
+/indicators
+/indicators.c
+/insupd
+/insupd.c
+/oldexec
+/oldexec.c
+/parser
+/parser.c
+/prepareas
+/prepareas.c
+/quote
+/quote.c
+/show
+/show.c
+/sqlda
+/sqlda.c
+/twophase
+/twophase.c
diff --git a/src/interfaces/ecpg/test/sql/Makefile b/src/interfaces/ecpg/test/sql/Makefile
new file mode 100644
index 0000000..876ca8d
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/Makefile
@@ -0,0 +1,36 @@
+subdir = src/interfaces/ecpg/test/sql
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+TESTS = array array.c \
+ binary binary.c \
+ code100 code100.c \
+ copystdout copystdout.c \
+ createtableas createtableas.c \
+ define define.c \
+ desc desc.c \
+ sqlda sqlda.c \
+ describe describe.c \
+ dyntest dyntest.c \
+ dynalloc dynalloc.c \
+ dynalloc2 dynalloc2.c \
+ execute execute.c \
+ fetch fetch.c \
+ func func.c \
+ indicators indicators.c \
+ oldexec oldexec.c \
+ parser parser.c \
+ quote quote.c \
+ show show.c \
+ insupd insupd.c \
+ twophase twophase.c \
+ insupd insupd.c \
+ declare declare.c \
+ bytea bytea.c \
+ prepareas prepareas.c
+
+all: $(TESTS)
+
+oldexec.c: oldexec.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -r questionmarks -o $@ $<
diff --git a/src/interfaces/ecpg/test/sql/array.pgc b/src/interfaces/ecpg/test/sql/array.pgc
new file mode 100644
index 0000000..8ca9992
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/array.pgc
@@ -0,0 +1,111 @@
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <pgtypes_date.h>
+#include <pgtypes_interval.h>
+#include <pgtypes_numeric.h>
+#include <pgtypes_timestamp.h>
+
+exec sql whenever sqlerror sqlprint;
+
+exec sql include sqlca;
+exec sql include ../regression;
+
+int
+main (void)
+{
+EXEC SQL BEGIN DECLARE SECTION;
+ int i = 1, j;
+ int *did = &i;
+ short a[10] = {9,8,7,6,5,4,3,2,1,0};
+ timestamp ts[10];
+ date d[10];
+ interval in[10];
+ numeric n[10];
+ char text[25] = "klmnopqrst";
+ char *t = (char *)malloc(11);
+ double f;
+EXEC SQL END DECLARE SECTION;
+
+ strcpy(t, "0123456789");
+ setlocale(LC_ALL, "C");
+
+ ECPGdebug(1, stderr);
+
+ for (j = 0; j < 10; j++) {
+ char str[28];
+ numeric *value;
+ interval *inter;
+
+ sprintf(str, "2000-1-1 0%d:00:00", j);
+ ts[j] = PGTYPEStimestamp_from_asc(str, NULL);
+ sprintf(str, "2000-1-1%d\n", j);
+ d[j] = PGTYPESdate_from_asc(str, NULL);
+ sprintf(str, "%d hours", j+10);
+ inter = PGTYPESinterval_from_asc(str, NULL);
+ in[j] = *inter;
+ value = PGTYPESnumeric_new();
+ PGTYPESnumeric_from_int(j, value);
+ n[j] = *value;
+ }
+
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL SET AUTOCOMMIT = ON;
+
+ EXEC SQL BEGIN WORK;
+
+ EXEC SQL CREATE TABLE test (f float, i int, a int[10], text char(10), ts timestamp[10], n numeric[10], d date[10], inter interval[10]);
+
+ EXEC SQL INSERT INTO test(f,i,a,text,ts,n,d,inter) VALUES(404.90,3,'{0,1,2,3,4,5,6,7,8,9}','abcdefghij',:ts,:n,:d,:in);
+
+ EXEC SQL INSERT INTO test(f,i,a,text,ts,n,d,inter) VALUES(140787.0,2,:a,:text,:ts,:n,:d,:in);
+
+ EXEC SQL INSERT INTO test(f,i,a,text,ts,n,d,inter) VALUES(14.07,:did,:a,:t,:ts,:n,:d,:in);
+
+ EXEC SQL COMMIT;
+
+ for (j = 0; j < 10; j++) {
+ ts[j] = PGTYPEStimestamp_from_asc("1900-01-01 00:00:00", NULL);
+ d[j] = PGTYPESdate_from_asc("1900-01-01", NULL);
+ in[j] = *PGTYPESinterval_new();
+ n[j] = *PGTYPESnumeric_new();
+ }
+ EXEC SQL BEGIN WORK;
+
+ EXEC SQL SELECT f,text
+ INTO :f,:text
+ FROM test
+ WHERE i = 1;
+
+ printf("Found f=%f text=%10.10s\n", f, text);
+
+ f=140787;
+ EXEC SQL SELECT a,text,ts,n,d,inter
+ INTO :a,:t,:ts,:n,:d,:in
+ FROM test
+ WHERE f = :f;
+
+ for (i = 0; i < 10; i++)
+ printf("Found a[%d] = %d ts[%d] = %s n[%d] = %s d[%d] = %s in[%d] = %s\n", i, a[i], i, PGTYPEStimestamp_to_asc(ts[i]), i, PGTYPESnumeric_to_asc(&(n[i]), -1), i, PGTYPESdate_to_asc(d[i]), i, PGTYPESinterval_to_asc(&(in[i])));
+
+ printf("Found text=%10.10s\n", t);
+
+ EXEC SQL SELECT a
+ INTO :text
+ FROM test
+ WHERE f = :f;
+
+ printf("Found text=%s\n", text);
+
+ EXEC SQL DROP TABLE test;
+
+ EXEC SQL COMMIT;
+
+ EXEC SQL DISCONNECT;
+
+ free(t);
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/binary.pgc b/src/interfaces/ecpg/test/sql/binary.pgc
new file mode 100644
index 0000000..1f6abd1
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/binary.pgc
@@ -0,0 +1,70 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+EXEC SQL include ../regression;
+
+EXEC SQL BEGIN DECLARE SECTION;
+struct TBempl
+{
+ long idnum;
+ char name[21];
+ short accs;
+ char byte[20];
+};
+EXEC SQL END DECLARE SECTION;
+
+EXEC SQL WHENEVER SQLERROR STOP;
+
+int
+main (void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ struct TBempl empl;
+ char *pointer = NULL;
+ char *data = "\\001\\155\\000\\212";
+ EXEC SQL END DECLARE SECTION;
+ int i;
+
+ ECPGdebug (1, stderr);
+
+ empl.idnum = 1;
+ EXEC SQL connect to REGRESSDB1;
+ EXEC SQL set bytea_output = escape;
+ EXEC SQL create table empl
+ (idnum integer, name char (20), accs smallint, byte bytea);
+ EXEC SQL insert into empl values (1, 'first user', 320, :data);
+ EXEC SQL DECLARE C CURSOR FOR select name, accs, byte from empl where idnum =:empl.idnum;
+ EXEC SQL OPEN C;
+ EXEC SQL FETCH C INTO:empl.name,:empl.accs,:empl.byte;
+ printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
+
+ EXEC SQL CLOSE C;
+
+ memset(empl.name, 0, 21L);
+ EXEC SQL DECLARE B BINARY CURSOR FOR select name, accs, byte from empl where idnum =:empl.idnum;
+ EXEC SQL OPEN B;
+ EXEC SQL FETCH B INTO :empl.name,:empl.accs,:empl.byte;
+ EXEC SQL CLOSE B;
+
+ /* do not print a.accs because big/little endian will have different outputs here */
+ printf ("name=%s, byte=", empl.name);
+ for (i=0; i<4; i++)
+ printf("(%o)", (unsigned char)empl.byte[i]);
+ printf("\n");
+
+ EXEC SQL DECLARE A BINARY CURSOR FOR select byte from empl where idnum =:empl.idnum;
+ EXEC SQL OPEN A;
+ EXEC SQL FETCH A INTO :pointer;
+ EXEC SQL CLOSE A;
+
+ if (pointer) {
+ printf ("pointer=");
+ for (i=0; i<4; i++)
+ printf("(%o)", (unsigned char)pointer[i]);
+ printf("\n");
+ free(pointer);
+ }
+
+ EXEC SQL disconnect;
+ exit (0);
+}
diff --git a/src/interfaces/ecpg/test/sql/bytea.pgc b/src/interfaces/ecpg/test/sql/bytea.pgc
new file mode 100644
index 0000000..e874123
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/bytea.pgc
@@ -0,0 +1,120 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+
+exec sql include ../regression;
+exec sql whenever sqlerror sqlprint;
+
+static void
+dump_binary(char *buf, int len, int ind)
+{
+ int i;
+
+ printf("len=%d, ind=%d, data=0x", len, ind);
+ for (i = 0; i < len; ++i)
+ printf("%02x", 0xff & buf[i]);
+ printf("\n");
+}
+
+#define DATA_SIZE 0x200
+#define LACK_SIZE 13
+#
+int
+main(void)
+{
+exec sql begin declare section;
+ bytea send_buf[2][512];
+ bytea recv_buf[2][DATA_SIZE];
+ bytea recv_vlen_buf[][DATA_SIZE];
+ bytea recv_short_buf[DATA_SIZE - LACK_SIZE];
+ int ind[2];
+exec sql end declare section;
+ int i, j, c;
+
+#define init() { \
+ for (i = 0; i < 2; ++i) \
+ { \
+ memset(recv_buf[i].arr, 0x0, sizeof(recv_buf[i].arr)); \
+ recv_buf[i].len = 0; \
+ ind[i] = 0; \
+ } \
+ recv_vlen_buf = NULL, \
+ memset(recv_short_buf.arr, 0x0, sizeof(recv_short_buf.arr)); \
+} \
+while (0)
+
+ ECPGdebug(1, stderr);
+
+ for (i = 0; i < 2; ++i)
+ {
+ for (j = 0, c = 0xff; (c == -1 ? c = 0xff : 1), j < DATA_SIZE; ++j, --c)
+ send_buf[i].arr[j] = c;
+
+ send_buf[i].len = DATA_SIZE;
+ }
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql create table if not exists test (data1 bytea, data2 bytea);
+
+ exec sql prepare ins_stmt from "insert into test values(?,?)";
+ exec sql prepare sel_stmt from "select data1,data2 from test";
+ exec sql allocate descriptor idesc;
+ exec sql allocate descriptor odesc;
+
+ /* Test for static sql statement with normal host variable, indicator */
+ init();
+ exec sql truncate test;
+ exec sql insert into test values(:send_buf[0], :send_buf[1]);
+ exec sql select data1,data2 into :recv_buf[0]:ind[0], :recv_short_buf:ind[1] from test;
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ /* Test for cursor */
+ init();
+ exec sql truncate test;
+ exec sql insert into test values(:send_buf[0], :send_buf[1]);
+ exec sql declare cursor1 cursor for select data1 from test where data1 = :send_buf[0];
+ exec sql open cursor1;
+ exec sql fetch from cursor1 INTO :recv_buf[0];
+ exec sql close cursor1;
+ exec sql free cursor1 ;
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, 0);
+
+ /* Test for variable length array */
+ init();
+ exec sql truncate test;
+ exec sql insert into test values(:send_buf[0], :send_buf[1]);
+ exec sql insert into test values(:send_buf[0], :send_buf[1]);
+ exec sql select data1 into :recv_vlen_buf from test;
+ dump_binary(recv_vlen_buf[0].arr, recv_vlen_buf[0].len, 0);
+ dump_binary(recv_vlen_buf[1].arr, recv_vlen_buf[1].len, 0);
+ free(recv_vlen_buf);
+
+ /* Test for dynamic sql statement with normal host variable, indicator */
+ init();
+ exec sql truncate test;
+ exec sql execute ins_stmt using :send_buf[0], :send_buf[1];
+ exec sql execute sel_stmt into :recv_buf[0]:ind[0], :recv_short_buf:ind[1];
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ /* Test for dynamic sql statement with sql descriptor */
+ init();
+ exec sql truncate test;
+ exec sql set descriptor idesc value 1 data = :send_buf[0];
+ exec sql set descriptor idesc value 2 data = :send_buf[1];
+ exec sql execute ins_stmt using sql descriptor idesc;
+ exec sql execute sel_stmt into sql descriptor odesc;
+ exec sql get descriptor odesc value 1 :recv_buf[0] = data, :ind[0] = indicator;
+ exec sql get descriptor odesc value 2 :recv_short_buf = data, :ind[1] = indicator;
+ dump_binary(recv_buf[0].arr, recv_buf[0].len, ind[0]);
+ dump_binary(recv_short_buf.arr, recv_short_buf.len, ind[1]);
+
+ exec sql drop table test;
+ exec sql commit;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/code100.pgc b/src/interfaces/ecpg/test/sql/code100.pgc
new file mode 100644
index 0000000..d9a5e52
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/code100.pgc
@@ -0,0 +1,52 @@
+exec sql include sqlca;
+#include <stdio.h>
+
+exec sql include ../regression;
+
+
+int main()
+{ exec sql begin declare section;
+ int index;
+ exec sql end declare section;
+
+
+ ECPGdebug(1,stderr);
+
+ exec sql connect to REGRESSDB1;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql create table test (
+ "index" numeric(3) primary key,
+ "payload" int4 NOT NULL);
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ exec sql commit work;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ for (index=0;index<10;++index)
+ { exec sql insert into test
+ (payload, index)
+ values (0, :index);
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ }
+ exec sql commit work;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql update test
+ set payload=payload+1 where index=-1;
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql delete from test where index=-1;
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql insert into test (select * from test where index=-1);
+ if (sqlca.sqlcode!=100) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql drop table test;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ exec sql commit work;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+
+ exec sql disconnect;
+ if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/copystdout.pgc b/src/interfaces/ecpg/test/sql/copystdout.pgc
new file mode 100644
index 0000000..9ecce7d
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/copystdout.pgc
@@ -0,0 +1,25 @@
+#include <stdio.h>
+
+EXEC SQL INCLUDE sqlca;
+exec sql include ../regression;
+
+EXEC SQL WHENEVER SQLERROR sqlprint;
+
+int
+main ()
+{
+ ECPGdebug (1, stderr);
+
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL CREATE TABLE foo (a int, b varchar);
+ EXEC SQL INSERT INTO foo VALUES (5, 'abc');
+ EXEC SQL INSERT INTO foo VALUES (6, 'def');
+ EXEC SQL INSERT INTO foo VALUES (7, 'ghi');
+
+ EXEC SQL COPY foo TO STDOUT WITH DELIMITER ',';
+ printf ("copy to STDOUT : sqlca.sqlcode = %ld\n", sqlca.sqlcode);
+
+ EXEC SQL DISCONNECT;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/createtableas.pgc b/src/interfaces/ecpg/test/sql/createtableas.pgc
new file mode 100644
index 0000000..72f7077
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/createtableas.pgc
@@ -0,0 +1,41 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+int
+main(void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ int id;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL connect to REGRESSDB1;
+
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL CREATE TABLE cta_test (id int);
+ EXEC SQL INSERT INTO cta_test values (100);
+
+ EXEC SQL CREATE TABLE IF NOT EXISTS cta_test1 AS SELECT * FROM cta_test;
+ EXEC SQL SELECT id INTO :id FROM cta_test1;
+ printf("ID = %d\n", id);
+
+ EXEC SQL CREATE TABLE cta_test2 AS SELECT * FROM cta_test WITH NO DATA;
+ EXEC SQL SELECT count(id) INTO :id FROM cta_test2;
+ printf("ID = %d\n", id);
+
+ EXEC SQL DROP TABLE cta_test;
+ EXEC SQL DROP TABLE cta_test1;
+ EXEC SQL DROP TABLE cta_test2;
+ EXEC SQL DISCONNECT all;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/declare.pgc b/src/interfaces/ecpg/test/sql/declare.pgc
new file mode 100644
index 0000000..e7ee4aa
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/declare.pgc
@@ -0,0 +1,212 @@
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+
+EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+EXEC SQL INCLUDE sqlca;
+EXEC SQL INCLUDE ../regression;
+
+#define ARRAY_SIZE 2
+
+void execute_test(void);
+void commitTable(void);
+void reset(void);
+void printResult(char *tc_name, int loop);
+
+EXEC SQL BEGIN DECLARE SECTION;
+int f1[ARRAY_SIZE];
+int f2[ARRAY_SIZE];
+char f3[ARRAY_SIZE][20];
+EXEC SQL END DECLARE SECTION;
+
+int main(void)
+{
+ setlocale(LC_ALL, "C");
+
+ ECPGdebug(1, stderr);
+
+ EXEC SQL CONNECT TO REGRESSDB1 AS con1;
+ EXEC SQL CONNECT TO REGRESSDB2 AS con2;
+
+ EXEC SQL AT con1 CREATE TABLE source(f1 integer, f2 integer, f3 varchar(20));
+ EXEC SQL AT con2 CREATE TABLE source(f1 integer, f2 integer, f3 varchar(20));
+
+ EXEC SQL AT con1 INSERT INTO source VALUES(1, 10, 'db on con1');
+ EXEC SQL AT con1 INSERT INTO source VALUES(2, 20, 'db on con1');
+
+ EXEC SQL AT con2 INSERT INTO source VALUES(1, 10, 'db on con2');
+ EXEC SQL AT con2 INSERT INTO source VALUES(2, 20, 'db on con2');
+
+ commitTable();
+
+ execute_test();
+
+ EXEC SQL AT con1 DROP TABLE IF EXISTS source;
+ EXEC SQL AT con2 DROP TABLE IF EXISTS source;
+
+ commitTable();
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
+
+/*
+ * default connection: con2
+ * Non-default connection: con1
+ *
+ */
+void execute_test(void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ int i, count, length;
+ char *selectString = "SELECT f1,f2,f3 FROM source";
+ EXEC SQL END DECLARE SECTION;
+
+ /*
+ * testcase1. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and CURSOR statement without using AT clause
+ */
+ reset();
+
+ EXEC SQL DECLARE stmt_1 STATEMENT;
+ EXEC SQL PREPARE stmt_1 FROM :selectString;
+ EXEC SQL DECLARE cur_1 CURSOR FOR stmt_1;
+ EXEC SQL OPEN cur_1;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+ i = 0;
+ while (1)
+ {
+ EXEC SQL FETCH cur_1 INTO :f1[i], :f2[i], :f3[i];
+ i++;
+ }
+ EXEC SQL CLOSE cur_1;
+ EXEC SQL DEALLOCATE PREPARE stmt_1;
+ EXEC SQL WHENEVER NOT FOUND CONTINUE;
+
+ printResult("testcase1", 2);
+
+
+ /*
+ * testcase2. using DECLARE STATEMENT at con1,
+ * using PREPARE and CURSOR statement without using AT clause
+ */
+ reset();
+
+ EXEC SQL AT con1 DECLARE stmt_2 STATEMENT;
+ EXEC SQL PREPARE stmt_2 FROM :selectString;
+ EXEC SQL DECLARE cur_2 CURSOR FOR stmt_2;
+ EXEC SQL OPEN cur_2;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+ i = 0;
+ while (1)
+ {
+ EXEC SQL FETCH cur_2 INTO :f1[i], :f2[i], :f3[i];
+ i++;
+ }
+ EXEC SQL CLOSE cur_2;
+ EXEC SQL DEALLOCATE PREPARE stmt_2;
+ EXEC SQL WHENEVER NOT FOUND CONTINUE;
+
+ printResult("testcase2", 2);
+
+ /*
+ * testcase3. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and EXECUTE statement without using AT clause
+ */
+ reset();
+
+ EXEC SQL DECLARE stmt_3 STATEMENT;
+ EXEC SQL PREPARE stmt_3 FROM :selectString;
+ EXEC SQL EXECUTE stmt_3 INTO :f1, :f2, :f3;
+
+ EXEC SQL DEALLOCATE PREPARE stmt_3;
+
+ printResult("testcase3", 2);
+
+ /*
+ * testcase4. using DECLARE STATEMENT without using AT clause,
+ * using PREPARE and CURSOR statement at con2
+ */
+ reset();
+
+ EXEC SQL DECLARE stmt_4 STATEMENT;
+ EXEC SQL AT con2 PREPARE stmt_4 FROM :selectString;
+ EXEC SQL AT con2 DECLARE cur_4 CURSOR FOR stmt_4;
+ EXEC SQL AT con2 OPEN cur_4;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+ i = 0;
+ while (1)
+ {
+ EXEC SQL AT con2 FETCH cur_4 INTO :f1[i], :f2[i], :f3[i];
+ i++;
+ }
+ EXEC SQL AT con2 CLOSE cur_4;
+ EXEC SQL AT con2 DEALLOCATE PREPARE stmt_4;
+ EXEC SQL WHENEVER NOT FOUND CONTINUE;
+
+ printResult("testcase4", 2);
+
+ /*
+ * DESCRIBE statement is also supported.
+ */
+ EXEC SQL AT con1 DECLARE stmt_desc STATEMENT;
+ EXEC SQL PREPARE stmt_desc FROM :selectString;
+ EXEC SQL DECLARE cur_desc CURSOR FOR stmt_desc;
+ EXEC SQL OPEN cur_desc;
+
+ /* descriptor can be used for describe statement */
+ EXEC SQL AT con1 ALLOCATE DESCRIPTOR desc_for_describe;
+ EXEC SQL DESCRIBE stmt_desc INTO SQL DESCRIPTOR desc_for_describe;
+
+ EXEC SQL AT con1 GET DESCRIPTOR desc_for_describe :count = COUNT;
+ EXEC SQL AT con1 GET DESCRIPTOR desc_for_describe VALUE 3 :length = LENGTH;
+
+ EXEC SQL AT con1 DEALLOCATE DESCRIPTOR desc_for_describe;
+
+ /* for fetch statement */
+ EXEC SQL AT con1 ALLOCATE DESCRIPTOR desc_for_fetch;
+ EXEC SQL FETCH cur_desc INTO SQL DESCRIPTOR desc_for_fetch;
+
+ EXEC SQL AT con1 GET DESCRIPTOR desc_for_fetch VALUE 3 :f3[0] = DATA;
+
+ EXEC SQL AT con1 DEALLOCATE DESCRIPTOR desc_for_fetch;
+ EXEC SQL CLOSE cur_desc;
+ EXEC SQL DEALLOCATE stmt_desc;
+
+ printf("****descriptor results****\n");
+ printf("count: %d, length: %d, data: %s\n", count, length, f3[0]);
+}
+
+void commitTable()
+{
+ EXEC SQL AT con1 COMMIT;
+ EXEC SQL AT con2 COMMIT;
+}
+
+/*
+ * reset all the output variables
+ */
+void reset()
+{
+ memset(f1, 0, sizeof(f1));
+ memset(f2, 0, sizeof(f2));
+ memset(f3, 0, sizeof(f3));
+}
+
+void printResult(char *tc_name, int loop)
+{
+ int i;
+
+ if (tc_name)
+ printf("****%s test results:****\n", tc_name);
+
+ for (i = 0; i < loop; i++)
+ printf("f1=%d, f2=%d, f3=%s\n", f1[i], f2[i], f3[i]);
+
+ printf("\n");
+}
diff --git a/src/interfaces/ecpg/test/sql/define.pgc b/src/interfaces/ecpg/test/sql/define.pgc
new file mode 100644
index 0000000..ed58a4b
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/define.pgc
@@ -0,0 +1,58 @@
+exec sql include sqlca;
+exec sql include ../regression;
+exec sql define STR 'abcdef';
+exec sql define INSERTNULL 1;
+exec sql define NUMBER 29;
+
+int main(void)
+{
+ exec sql begin declare section;
+ int i;
+ char s[200];
+ exec sql end declare section;
+
+ ECPGdebug(1, stderr);
+
+ exec sql whenever sqlerror do sqlprint();
+ exec sql connect to REGRESSDB1;
+
+ exec sql create table test (a int, b text);
+ exec sql insert into test values (NUMBER, STR);
+
+ exec sql ifdef INSERTNULL;
+ exec sql insert into test values (NULL, 'defined');
+ exec sql endif;
+
+ exec sql ifndef INSERTNULL;
+ exec sql insert into test values (NULL, 'not defined');
+ exec sql elif SOMEOTHERVAR;
+ exec sql insert into test values (NULL, 'someothervar defined');
+ exec sql else;
+ exec sql insert into test values (NULL, 'someothervar not defined');
+ exec sql endif;
+
+ exec sql define NUMBER 29;
+
+ exec sql select INSERTNULL, NUMBER::text || '-' || STR INTO :i, :s;
+
+ printf("i: %d, s: %s\n", i, s);
+
+ exec sql undef STR;
+ exec sql ifndef STR;
+ exec sql insert into test values (NUMBER, 'no string');
+ exec sql endif;
+
+ exec sql define TZVAR; /* no value */
+ exec sql define TZVAR 'UTC';
+
+ exec sql ifndef TZVAR;
+ exec sql SET TIMEZONE TO 'GMT';
+ exec sql elif TZNAME;
+ exec sql SET TIMEZONE TO TZNAME;
+ exec sql else;
+ exec sql SET TIMEZONE TO TZVAR;
+ exec sql endif;
+
+ exec sql disconnect;
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/desc.pgc b/src/interfaces/ecpg/test/sql/desc.pgc
new file mode 100644
index 0000000..abda771
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/desc.pgc
@@ -0,0 +1,89 @@
+EXEC SQL INCLUDE ../regression;
+EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+int
+main(void)
+{
+ EXEC SQL BEGIN DECLARE SECTION;
+ char *stmt1 = "INSERT INTO test1 VALUES ($1, $2)";
+ char *stmt2 = "SELECT * from test1 where a = $1 and b = $2";
+ char *stmt3 = "SELECT * from test1 where :var = a";
+
+ int val1 = 1;
+ char val2[4] = "one", val2output[] = "AAA";
+ int val1output = 2, val2i = 0;
+ int val2null = -1;
+ int ind1, ind2;
+ char desc1[8] = "outdesc";
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+
+ EXEC SQL ALLOCATE DESCRIPTOR indesc;
+ EXEC SQL ALLOCATE DESCRIPTOR :desc1;
+
+ EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1;
+ EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2i, DATA = :val2;
+
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL CREATE TABLE test1 (a int, b text);
+ EXEC SQL PREPARE foo1 FROM :stmt1;
+ EXEC SQL PREPARE "Foo-1" FROM :stmt1;
+ EXEC SQL PREPARE foo2 FROM :stmt2;
+ EXEC SQL PREPARE foo3 FROM :stmt3;
+
+ EXEC SQL EXECUTE foo1 USING SQL DESCRIPTOR indesc;
+
+ EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 2;
+ EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2null, DATA = :val2;
+
+ EXEC SQL EXECUTE foo1 USING SQL DESCRIPTOR indesc;
+
+ EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 3;
+ EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val1, DATA = 'this is a long test';
+
+ EXEC SQL EXECUTE "Foo-1" USING SQL DESCRIPTOR indesc;
+
+ EXEC SQL DEALLOCATE "Foo-1";
+
+ EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1;
+ EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2i, DATA = :val2;
+
+ EXEC SQL EXECUTE foo2 USING SQL DESCRIPTOR indesc INTO SQL DESCRIPTOR :desc1;
+
+ EXEC SQL GET DESCRIPTOR :desc1 VALUE 1 :val2output = DATA;
+ printf("output = %s\n", val2output);
+
+ EXEC SQL DECLARE c1 CURSOR FOR foo2;
+ EXEC SQL OPEN c1 USING SQL DESCRIPTOR indesc;
+
+ EXEC SQL FETCH next FROM c1 INTO :val1output:ind1, :val2output:ind2;
+ printf("val1=%d (ind1: %d) val2=%s (ind2: %d)\n",
+ val1output, ind1, val2output, ind2);
+
+ EXEC SQL CLOSE c1;
+
+ EXEC SQL SET DESCRIPTOR indesc COUNT = 1;
+ EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 2;
+
+ EXEC SQL DECLARE c2 CURSOR FOR foo3;
+ EXEC SQL OPEN c2 USING SQL DESCRIPTOR indesc;
+
+ EXEC SQL FETCH next FROM c2 INTO :val1output, :val2output :val2i;
+ printf("val1=%d val2=%s\n", val1output, val2i ? "null" : val2output);
+
+ EXEC SQL CLOSE c2;
+
+ EXEC SQL SELECT * INTO :val1output, :val2output:val2i FROM test1 where a = 3;
+ printf("val1=%d val2=%c%c%c%c warn=%c truncate=%d\n", val1output, val2output[0], val2output[1], val2output[2], val2output[3], sqlca.sqlwarn[0], val2i);
+
+ EXEC SQL DROP TABLE test1;
+ EXEC SQL DEALLOCATE ALL;
+ EXEC SQL DISCONNECT;
+
+ EXEC SQL DEALLOCATE DESCRIPTOR indesc;
+ EXEC SQL DEALLOCATE DESCRIPTOR :desc1;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/describe.pgc b/src/interfaces/ecpg/test/sql/describe.pgc
new file mode 100644
index 0000000..87d6bd9
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/describe.pgc
@@ -0,0 +1,199 @@
+#include <stdlib.h>
+#include <string.h>
+
+exec sql include ../regression;
+exec sql include sqlda.h;
+
+exec sql whenever sqlerror stop;
+
+sqlda_t *sqlda1, *sqlda2, *sqlda3;
+
+int
+main (void)
+{
+exec sql begin declare section;
+ char *stmt1 = "SELECT id, t FROM descr_t2";
+ char *stmt2 = "SELECT id, t FROM descr_t2 WHERE id = -1";
+ int i, count1, count2;
+ char field_name1[30] = "not set";
+ char field_name2[30] = "not set";
+exec sql end declare section;
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table descr_t2(id serial primary key, t text);
+
+ strcpy(msg, "insert");
+ exec sql insert into descr_t2(id, t) values (default, 'a');
+ exec sql insert into descr_t2(id, t) values (default, 'b');
+ exec sql insert into descr_t2(id, t) values (default, 'c');
+ exec sql insert into descr_t2(id, t) values (default, 'd');
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ /*
+ * Test DESCRIBE with a query producing tuples.
+ * DESCRIPTOR and SQL DESCRIPTOR are NOT the same in
+ * Informix-compat mode.
+ */
+
+ strcpy(msg, "allocate");
+ exec sql allocate descriptor desc1;
+ exec sql allocate descriptor desc2;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id1 FROM :stmt1;
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ exec sql describe st_id1 into sql descriptor desc1;
+ exec sql describe st_id1 using sql descriptor desc2;
+
+ exec sql describe st_id1 into descriptor sqlda1;
+ exec sql describe st_id1 using descriptor sqlda2;
+ exec sql describe st_id1 into sqlda3;
+
+ if (sqlda1 == NULL)
+ {
+ printf("sqlda1 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda2 == NULL)
+ {
+ printf("sqlda2 NULL\n");
+ exit(1);
+ }
+
+ if (sqlda3 == NULL)
+ {
+ printf("sqlda3 NULL\n");
+ exit(1);
+ }
+
+ strcpy(msg, "get descriptor");
+ exec sql get descriptor desc1 :count1 = count;
+ exec sql get descriptor desc1 :count2 = count;
+
+ if (count1 != count2)
+ {
+ printf("count1 (%d) != count2 (%d)\n", count1, count2);
+ exit(1);
+ }
+
+ if (count1 != sqlda1->sqld)
+ {
+ printf("count1 (%d) != sqlda1->sqld (%d)\n", count1, sqlda1->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda2->sqld)
+ {
+ printf("count1 (%d) != sqlda2->sqld (%d)\n", count1, sqlda2->sqld);
+ exit(1);
+ }
+
+ if (count1 != sqlda3->sqld)
+ {
+ printf("count1 (%d) != sqlda3->sqld (%d)\n", count1, sqlda3->sqld);
+ exit(1);
+ }
+
+ for (i = 1; i <= count1; i++)
+ {
+ exec sql get descriptor desc1 value :i :field_name1 = name;
+ exec sql get descriptor desc2 value :i :field_name2 = name;
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname.data,
+ sqlda2->sqlvar[i-1].sqlname.data,
+ sqlda3->sqlvar[i-1].sqlname.data);
+ }
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate descriptor desc1;
+ exec sql deallocate descriptor desc2;
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ exec sql deallocate prepare st_id1;
+
+ /* Test DESCRIBE with a query not producing tuples */
+
+ strcpy(msg, "allocate");
+ exec sql allocate descriptor desc1;
+ exec sql allocate descriptor desc2;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id2 FROM :stmt2;
+
+ sqlda1 = sqlda2 = sqlda3 = NULL;
+
+ strcpy(msg, "describe");
+ exec sql describe st_id2 into sql descriptor desc1;
+ exec sql describe st_id2 using sql descriptor desc2;
+
+ exec sql describe st_id2 into descriptor sqlda1;
+ exec sql describe st_id2 using descriptor sqlda2;
+ exec sql describe st_id2 into sqlda3;
+
+ if (sqlda1 == NULL || sqlda2 == NULL || sqlda3 == NULL)
+ exit(1);
+
+ strcpy(msg, "get descriptor");
+ exec sql get descriptor desc1 :count1 = count;
+ exec sql get descriptor desc1 :count2 = count;
+
+ if (!( count1 == count2 &&
+ count1 == sqlda1->sqld &&
+ count1 == sqlda2->sqld &&
+ count1 == sqlda3->sqld))
+ exit(1);
+
+ for (i = 1; i <= count1; i++)
+ {
+ exec sql get descriptor desc1 value :i :field_name1 = name;
+ exec sql get descriptor desc2 value :i :field_name2 = name;
+ printf("%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
+ "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
+ i, field_name1, field_name2,
+ sqlda1->sqlvar[i-1].sqlname.data,
+ sqlda2->sqlvar[i-1].sqlname.data,
+ sqlda3->sqlvar[i-1].sqlname.data);
+ }
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate descriptor desc1;
+ exec sql deallocate descriptor desc2;
+ free(sqlda1);
+ free(sqlda2);
+ free(sqlda3);
+
+ exec sql deallocate prepare st_id2;
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ exec sql drop table descr_t2;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/dynalloc.pgc b/src/interfaces/ecpg/test/sql/dynalloc.pgc
new file mode 100644
index 0000000..8aa810f
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/dynalloc.pgc
@@ -0,0 +1,89 @@
+#include <stdio.h>
+exec sql include sqlca;
+#include <stdlib.h>
+exec sql include ../regression;
+
+int main(void)
+{
+ exec sql begin declare section;
+ int *d1=0;
+ double *d2=0;
+ char **d3=0;
+ char **d4=0;
+ char **d5=0;
+ char **d6=0;
+ char **d7=0;
+/* char **d8=0; */
+ char **d9=0;
+ int *i1=0;
+ int *i2=0;
+ int *i3=0;
+ int *i4=0;
+ int *i5=0;
+ int *i6=0;
+ int *i7=0;
+/* int *i8=0; */
+ int *i9=0;
+ exec sql end declare section;
+ int i;
+
+ ECPGdebug(1, stderr);
+
+ exec sql whenever sqlerror do sqlprint();
+ exec sql connect to REGRESSDB1;
+
+ exec sql set datestyle to mdy;
+
+ exec sql create table test (a serial, b numeric(12,3), c varchar, d varchar(3), e char(4), f timestamptz, g boolean, h box, i inet);
+ exec sql insert into test (b, c, d, e, f, g, h, i) values (23.456, 'varchar', 'v', 'c', '2003-03-03 12:33:07 PDT', true, '(1,2,3,4)', '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128');
+ exec sql insert into test (b, c, d, e, f, g, h, i) values (2.446456, NULL, 'v', 'c', '2003-03-03 12:33:07 PDT', false, NULL, NULL);
+
+ exec sql allocate descriptor mydesc;
+ exec sql select a,b,c,d,e,f,g,h,i into sql descriptor mydesc from test order by a;
+ exec sql get descriptor mydesc value 1 :d1=DATA, :i1=INDICATOR;
+ exec sql get descriptor mydesc value 2 :d2=DATA, :i2=INDICATOR;
+ exec sql get descriptor mydesc value 3 :d3=DATA, :i3=INDICATOR;
+ exec sql get descriptor mydesc value 4 :d4=DATA, :i4=INDICATOR;
+ exec sql get descriptor mydesc value 5 :d5=DATA, :i5=INDICATOR;
+ exec sql get descriptor mydesc value 6 :d6=DATA, :i6=INDICATOR;
+ exec sql get descriptor mydesc value 7 :d7=DATA, :i7=INDICATOR;
+ /* skip box for now */
+ /* exec sql get descriptor mydesc value 8 :d8=DATA, :i8=INDICATOR; */
+ exec sql get descriptor mydesc value 9 :d9=DATA, :i9=INDICATOR;
+
+ printf("Result:\n");
+ for (i=0;i<sqlca.sqlerrd[2];++i)
+ {
+ if (i1[i]) printf("NULL, ");
+ else printf("%d, ",d1[i]);
+
+ if (i2[i]) printf("NULL, ");
+ else printf("%f, ",d2[i]);
+
+ if (i3[i]) printf("NULL, ");
+ else printf("'%s', ",d3[i]);
+
+ if (i4[i]) printf("NULL, ");
+ else printf("'%s', ",d4[i]);
+
+ if (i5[i]) printf("NULL, ");
+ else printf("'%s', ",d5[i]);
+
+ if (i6[i]) printf("NULL, ");
+ else printf("'%s', ",d6[i]);
+
+ if (i7[i]) printf("NULL, ");
+ else printf("'%s', ",d7[i]);
+
+ if (i9[i]) printf("NULL, ");
+ else printf("'%s', ",d9[i]);
+
+ printf("\n");
+ }
+ ECPGfree_auto_mem();
+ printf("\n");
+
+ exec sql deallocate descriptor mydesc;
+ exec sql disconnect;
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/dynalloc2.pgc b/src/interfaces/ecpg/test/sql/dynalloc2.pgc
new file mode 100644
index 0000000..67d9077
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/dynalloc2.pgc
@@ -0,0 +1,55 @@
+#include <stdio.h>
+exec sql include sqlca;
+#include <stdlib.h>
+exec sql include ../regression;
+
+int main(void)
+{
+ exec sql begin declare section;
+ int *ip1=0;
+ char **cp2=0;
+ int *ipointer1=0;
+ int *ipointer2=0;
+ int colnum;
+ exec sql end declare section;
+ int i;
+
+ ECPGdebug(1, stderr);
+
+ exec sql whenever sqlerror do sqlprint();
+ exec sql connect to REGRESSDB1;
+
+ exec sql set datestyle to postgres;
+
+ exec sql create table test (a int, b text);
+ exec sql insert into test values (1, 'one');
+ exec sql insert into test values (2, 'two');
+ exec sql insert into test values (NULL, 'three');
+ exec sql insert into test values (4, 'four');
+ exec sql insert into test values (5, NULL);
+ exec sql insert into test values (NULL, NULL);
+
+ exec sql allocate descriptor mydesc;
+ exec sql select * into sql descriptor mydesc from test;
+ exec sql get descriptor mydesc :colnum=COUNT;
+ exec sql get descriptor mydesc value 1 :ip1=DATA, :ipointer1=INDICATOR;
+ exec sql get descriptor mydesc value 2 :cp2=DATA, :ipointer2=INDICATOR;
+
+ printf("Result (%d columns):\n", colnum);
+ for (i=0;i < sqlca.sqlerrd[2];++i)
+ {
+ if (ipointer1[i]) printf("NULL, ");
+ else printf("%d, ",ip1[i]);
+
+ if (ipointer2[i]) printf("NULL, ");
+ else printf("'%s', ",cp2[i]);
+ printf("\n");
+ }
+ ECPGfree_auto_mem();
+ printf("\n");
+
+ exec sql deallocate descriptor mydesc;
+ exec sql rollback;
+ exec sql disconnect;
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/dyntest.pgc b/src/interfaces/ecpg/test/sql/dyntest.pgc
new file mode 100644
index 0000000..0222c89
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/dyntest.pgc
@@ -0,0 +1,199 @@
+/* dynamic SQL test program
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+exec sql include sql3types;
+exec sql include sqlca;
+exec sql include ../regression;
+
+static void
+error (void)
+{
+ printf ("\n#%ld:%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
+ exit (1);
+}
+
+int
+main ()
+{
+ exec sql begin declare section;
+ int COUNT;
+ int INTVAR;
+ int INDEX;
+ int INDICATOR;
+ int TYPE, LENGTH, OCTET_LENGTH, PRECISION, SCALE, RETURNED_OCTET_LENGTH;
+ int DATETIME_INTERVAL_CODE;
+ char NAME[120], BOOLVAR;
+ char STRINGVAR[1024];
+ double DOUBLEVAR;
+ char *QUERY;
+ exec sql end declare section;
+ int done = 0;
+
+ exec sql var BOOLVAR is bool;
+
+ ECPGdebug (1, stderr);
+
+ QUERY = "select * from dyntest";
+
+ exec sql whenever sqlerror
+ do
+ error ();
+
+ exec sql allocate descriptor MYDESC;
+
+ exec sql connect to REGRESSDB1;
+
+ exec sql set datestyle to german;
+
+ exec sql create table dyntest (name char (14), d float8, i int,
+ bignumber int8, b boolean, comment text,
+ day date);
+ exec sql insert into dyntest values ('first entry', 14.7, 14, 123045607890, true, 'The world''s most advanced open source database.', '1987-07-14');
+ exec sql insert into dyntest values ('second entry', 1407.87, 1407, 987065403210, false, 'The elephant never forgets.', '1999-11-5');
+
+ exec sql prepare MYQUERY from :QUERY;
+ exec sql declare MYCURS cursor for MYQUERY;
+
+ exec sql open MYCURS;
+
+ while (1)
+ {
+ exec sql fetch in MYCURS into sql descriptor MYDESC;
+
+ if (sqlca.sqlcode)
+ break;
+
+ exec sql get descriptor MYDESC:COUNT = count;
+ if (!done)
+ {
+ printf ("Found %d columns\n", COUNT);
+ done = 1;
+ }
+
+ for (INDEX = 1; INDEX <= COUNT; ++INDEX)
+ {
+ exec sql get descriptor MYDESC value :INDEX
+ :TYPE = type,
+ :LENGTH = length,
+ :OCTET_LENGTH = octet_length,
+ :RETURNED_OCTET_LENGTH = returned_octet_length,
+ :PRECISION = precision,
+ :SCALE = scale,
+ :NAME = name,
+ :INDICATOR = indicator;
+ printf ("%2d\t%s (type: %d length: %d precision: %d scale: %d = " , INDEX, NAME, TYPE, LENGTH, PRECISION, SCALE);
+ switch (TYPE)
+ {
+ case SQL3_BOOLEAN:
+ printf ("bool");
+ break;
+ case SQL3_NUMERIC:
+ printf ("numeric(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_DECIMAL:
+ printf ("decimal(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_INTEGER:
+ printf ("integer");
+ break;
+ case SQL3_SMALLINT:
+ printf ("smallint");
+ break;
+ case SQL3_FLOAT:
+ printf ("float(%d,%d)", PRECISION, SCALE);
+ break;
+ case SQL3_REAL:
+ printf ("real");
+ break;
+ case SQL3_DOUBLE_PRECISION:
+ printf ("double precision");
+ break;
+ case SQL3_DATE_TIME_TIMESTAMP:
+ exec sql get descriptor MYDESC value :INDEX
+ :DATETIME_INTERVAL_CODE = datetime_interval_code;
+ switch (DATETIME_INTERVAL_CODE)
+ {
+ case SQL3_DDT_DATE:
+ printf ("date");
+ break;
+ case SQL3_DDT_TIME:
+ printf ("time");
+ break;
+ case SQL3_DDT_TIMESTAMP:
+ printf ("timestamp");
+ break;
+ case SQL3_DDT_TIME_WITH_TIME_ZONE:
+ printf ("time with time zone");
+ break;
+ case SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE:
+ printf ("timestamp with time zone");
+ break;
+ }
+ break;
+ case SQL3_INTERVAL:
+ printf ("interval");
+ break;
+ case SQL3_CHARACTER:
+ if (LENGTH > 0)
+ printf ("char(%d)", LENGTH);
+ else
+ printf ("text");
+ break;
+ case SQL3_CHARACTER_VARYING:
+ if (LENGTH > 0)
+ printf ("varchar(%d)", LENGTH);
+ else
+ printf ("varchar()");
+ break;
+ default:
+ printf ("<SQL3 %d>", TYPE);
+ break;
+ }
+ printf (")\n\toctet_length: %d returned_octet_length: %d)\n\t= ",
+ OCTET_LENGTH, RETURNED_OCTET_LENGTH);
+ if (INDICATOR == -1)
+ printf ("NULL\n");
+ else
+ switch (TYPE)
+ {
+ case SQL3_BOOLEAN:
+ exec sql get descriptor MYDESC value :INDEX :BOOLVAR = data;
+ printf ("%s\n", BOOLVAR ? "true" : "false");
+ break;
+ case SQL3_INTEGER:
+ case SQL3_SMALLINT:
+ exec sql get descriptor MYDESC value :INDEX :INTVAR = data;
+ printf ("%d\n", INTVAR);
+ break;
+ case SQL3_DOUBLE_PRECISION:
+ exec sql get descriptor MYDESC value :INDEX :DOUBLEVAR = data;
+ printf ("%.*f\n", PRECISION, DOUBLEVAR);
+ break;
+ case SQL3_DATE_TIME_TIMESTAMP:
+ exec sql get descriptor MYDESC value :INDEX
+ :DATETIME_INTERVAL_CODE = datetime_interval_code,
+ :STRINGVAR = data;
+ printf ("%d \"%s\"\n", DATETIME_INTERVAL_CODE, STRINGVAR);
+ break;
+ case SQL3_CHARACTER:
+ case SQL3_CHARACTER_VARYING:
+ exec sql get descriptor MYDESC value :INDEX :STRINGVAR = data;
+ printf ("\"%s\"\n", STRINGVAR);
+ break;
+ default:
+ exec sql get descriptor MYDESC value :INDEX :STRINGVAR = data;
+ printf ("<\"%s\">\n", STRINGVAR);
+ break;
+ }
+ }
+ }
+
+ exec sql close MYCURS;
+
+ exec sql deallocate descriptor MYDESC;
+
+ return 0;
+ }
diff --git a/src/interfaces/ecpg/test/sql/execute.pgc b/src/interfaces/ecpg/test/sql/execute.pgc
new file mode 100644
index 0000000..43171bb
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/execute.pgc
@@ -0,0 +1,113 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+int
+main(void)
+{
+exec sql begin declare section;
+ int amount[8];
+ int increment=100;
+ char name[8][8];
+ char letter[8][1];
+ char command[128];
+exec sql end declare section;
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1 as main;
+ exec sql create table test (name char(8), amount int, letter char(1));
+ exec sql commit;
+
+ /* test handling of embedded quotes in EXECUTE IMMEDIATE "literal" */
+ exec sql execute immediate "insert into test (name, \042amount\042, letter) values ('db: ''r1''', 1, 'f')";
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
+ exec sql execute immediate :command;
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
+ exec sql execute immediate :command;
+
+ printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
+ exec sql prepare I from :command;
+ exec sql execute I using :increment;
+
+ printf("Inserted %ld tuples via prepared execute\n", sqlca.sqlerrd[2]);
+
+ exec sql commit;
+
+ sprintf (command, "select * from test");
+
+ exec sql prepare f from :command;
+ exec sql declare CUR cursor for f;
+
+ exec sql open CUR;
+ exec sql fetch 8 in CUR into :name, :amount, :letter;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ exec sql begin declare section;
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+ exec sql end declare section;
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql close CUR;
+ exec sql deallocate f;
+
+ sprintf (command, "select * from test where amount = $1");
+
+ exec sql prepare f from :command;
+ exec sql declare CUR2 cursor for f;
+
+ exec sql open CUR2 using 1;
+ exec sql fetch in CUR2 into :name, :amount, :letter;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ exec sql begin declare section;
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+ exec sql end declare section;
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql close CUR2;
+ exec sql deallocate f;
+
+ sprintf (command, "select * from test where amount = $1");
+
+ exec sql prepare f from :command;
+ exec sql execute f using 2 into :name, :amount, :letter;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ exec sql begin declare section;
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+ exec sql end declare section;
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql deallocate f;
+ exec sql drop table test;
+ exec sql commit;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/fetch.pgc b/src/interfaces/ecpg/test/sql/fetch.pgc
new file mode 100644
index 0000000..31e525e
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/fetch.pgc
@@ -0,0 +1,58 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL BEGIN DECLARE SECTION;
+ char str[25];
+ int i, count=1, loopcount;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR STOP;
+
+ EXEC SQL CREATE TABLE My_Table ( Item1 int, Item2 text );
+
+ EXEC SQL INSERT INTO My_Table VALUES ( 1, 'text1');
+ EXEC SQL INSERT INTO My_Table VALUES ( 2, 'text2');
+ EXEC SQL INSERT INTO My_Table VALUES ( 3, 'text3');
+ EXEC SQL INSERT INTO My_Table VALUES ( 4, 'text4');
+
+ EXEC SQL DECLARE C CURSOR FOR SELECT * FROM My_Table;
+
+ EXEC SQL OPEN C;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+ for (loopcount = 0; loopcount < 100; loopcount++) {
+ EXEC SQL FETCH 1 IN C INTO :i, :str;
+ printf("%d: %s\n", i, str);
+ }
+
+ EXEC SQL WHENEVER NOT FOUND CONTINUE;
+ EXEC SQL MOVE BACKWARD 2 IN C;
+
+ EXEC SQL FETCH :count IN C INTO :i, :str;
+ printf("%d: %s\n", i, str);
+
+ EXEC SQL CLOSE C;
+
+ EXEC SQL DECLARE D CURSOR FOR SELECT * FROM My_Table WHERE Item1 = $1;
+
+ EXEC SQL OPEN D using 1;
+
+ EXEC SQL FETCH 1 IN D INTO :i, :str;
+ printf("%d: %s\n", i, str);
+
+ EXEC SQL CLOSE D;
+
+ EXEC SQL DROP TABLE My_Table;
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/func.pgc b/src/interfaces/ecpg/test/sql/func.pgc
new file mode 100644
index 0000000..5ebcafa
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/func.pgc
@@ -0,0 +1,47 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL char text[25];
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL CREATE TABLE My_Table ( Item1 int, Item2 text );
+ EXEC SQL CREATE TABLE Log (name text, w text);
+
+ EXEC SQL CREATE FUNCTION My_Table_Check() RETURNS trigger
+ AS $test$
+ BEGIN
+ INSERT INTO Log VALUES(TG_NAME, TG_WHEN);
+ RETURN NEW;
+ END; $test$
+ LANGUAGE plpgsql;
+
+ EXEC SQL CREATE TRIGGER My_Table_Check_Trigger
+ BEFORE INSERT
+ ON My_Table
+ FOR EACH ROW
+ EXECUTE PROCEDURE My_Table_Check();
+
+ EXEC SQL INSERT INTO My_Table VALUES (1234, 'Some random text');
+ EXEC SQL INSERT INTO My_Table VALUES (5678, 'The Quick Brown');
+ EXEC SQL SELECT name INTO :text FROM Log LIMIT 1;
+ printf("Trigger %s fired.\n", text);
+
+ EXEC SQL DROP TRIGGER My_Table_Check_Trigger ON My_Table;
+ EXEC SQL DROP FUNCTION My_Table_Check();
+ EXEC SQL DROP TABLE Log;
+ EXEC SQL DROP TABLE My_Table;
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/indicators.pgc b/src/interfaces/ecpg/test/sql/indicators.pgc
new file mode 100644
index 0000000..c1f26e3
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/indicators.pgc
@@ -0,0 +1,50 @@
+#include <stdio.h>
+
+exec sql include sqlca;
+exec sql include ../regression;
+
+int main()
+{
+ exec sql begin declare section;
+ int intvar = 5;
+ int nullind = -1;
+ exec sql end declare section;
+
+ ECPGdebug(1,stderr);
+
+ exec sql connect to REGRESSDB1;
+ exec sql set autocommit to off;
+
+ exec sql create table indicator_test (
+ "id" int primary key,
+ "str" text NOT NULL,
+ val int null);
+ exec sql commit work;
+
+ exec sql insert into indicator_test (id, str, val) values ( 1, 'Hello', 0);
+
+ /* use indicator in insert */
+ exec sql insert into indicator_test (id, str, val) values ( 2, 'Hi there', :intvar :nullind);
+ nullind = 0;
+ exec sql insert into indicator_test (id, str, val) values ( 3, 'Good evening', :intvar :nullind);
+ exec sql commit work;
+
+ /* use indicators to get information about selects */
+ exec sql select val into :intvar from indicator_test where id = 1;
+ exec sql select val into :intvar :nullind from indicator_test where id = 2;
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+ exec sql select val into :intvar :nullind from indicator_test where id = 3;
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+
+ /* use indicators for update */
+ intvar = 5; nullind = -1;
+ exec sql update indicator_test set val = :intvar :nullind where id = 1;
+ exec sql select val into :intvar :nullind from indicator_test where id = 1;
+ printf("intvar: %d, nullind: %d\n", intvar, nullind);
+
+ exec sql drop table indicator_test;
+ exec sql commit work;
+
+ exec sql disconnect;
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/insupd.pgc b/src/interfaces/ecpg/test/sql/insupd.pgc
new file mode 100644
index 0000000..b12f66f
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/insupd.pgc
@@ -0,0 +1,36 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL BEGIN DECLARE SECTION;
+ int i1[3], i2[3], i3[3], i4;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL CREATE TABLE insupd_test(a int, b int);
+
+ EXEC SQL INSERT INTO insupd_test (a,b) values (1, 1);
+ EXEC SQL INSERT INTO insupd_test (a,b) values (2, 2);
+ EXEC SQL INSERT INTO insupd_test (a,b) values (3, 3) returning a into :i4;
+
+ EXEC SQL UPDATE insupd_test set a=a+1 returning a into :i3;
+ EXEC SQL UPDATE insupd_test set (a,b)=(5,5) where a = 4;
+ EXEC SQL UPDATE insupd_test set a=4 where a=3;;
+
+ EXEC SQL SELECT a,b into :i1,:i2 from insupd_test order by a;
+
+ printf("changes\n%d %d %d %d\n", i3[0], i3[1], i3[2], i4);
+ printf("test\na b\n%d %d\n%d %d\n%d %d\n", i1[0], i2[0], i1[1], i2[1], i1[2], i2[2]);
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/oldexec.pgc b/src/interfaces/ecpg/test/sql/oldexec.pgc
new file mode 100644
index 0000000..4f94a18
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/oldexec.pgc
@@ -0,0 +1,90 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+int
+main(void)
+{
+exec sql begin declare section;
+ int amount[8];
+ int increment=100;
+ char name[8][8];
+ char letter[8][1];
+ char command[128];
+exec sql end declare section;
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ exec sql connect to REGRESSDB1 as main;
+
+ exec sql create table test (name char(8), amount int, letter char(1));
+ exec sql commit;
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f')");
+ exec sql execute immediate :command;
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
+ exec sql execute immediate :command;
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
+ exec sql execute immediate :command;
+
+ printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
+
+ sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
+ exec sql prepare I from :command;
+ exec sql execute I using :increment;
+
+ printf("Inserted %ld tuples via prepared execute\n", sqlca.sqlerrd[2]);
+
+ exec sql commit;
+
+ sprintf (command, "select * from test");
+
+ exec sql prepare F from :command;
+ exec sql declare CUR cursor for F;
+
+ exec sql open CUR;
+ exec sql fetch 8 in CUR into :name, :amount, :letter;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql close CUR;
+
+ sprintf (command, "select * from test where ? = amount");
+
+ exec sql prepare F from :command;
+ exec sql declare CUR3 cursor for F;
+
+ exec sql open CUR3 using 1;
+ exec sql fetch in CUR3 into :name, :amount, :letter;
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ char n[8], l = letter[i][0];
+ int a = amount[i];
+
+ strncpy(n, name[i], 8);
+ printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
+ }
+
+ exec sql close CUR3;
+ exec sql drop table test;
+ exec sql commit;
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/parser.pgc b/src/interfaces/ecpg/test/sql/parser.pgc
new file mode 100644
index 0000000..6e15f13
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/parser.pgc
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* test parser addition that merges two tokens into one */
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL BEGIN DECLARE SECTION;
+ int item[3], ind[3], i;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL CREATE TABLE T ( Item1 int, Item2 int );
+
+ EXEC SQL INSERT INTO t
+ SELECT 1,nullif(y-1,0)
+ FROM generate_series(1,3) WITH ORDINALITY AS series(x,y);
+
+ EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
+
+ for (i=0; i<3; i++)
+ printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
+
+ EXEC SQL ALTER TABLE T ALTER Item1 TYPE bigint;
+ EXEC SQL ALTER TABLE T ALTER COLUMN Item2 SET DATA TYPE smallint;
+
+ EXEC SQL DROP TABLE T;
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/prepareas.pgc b/src/interfaces/ecpg/test/sql/prepareas.pgc
new file mode 100644
index 0000000..85f03d7
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/prepareas.pgc
@@ -0,0 +1,198 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+exec sql include ../regression;
+exec sql whenever sqlerror sqlprint;
+
+static void
+check_result_of_insert(void)
+{
+ exec sql begin declare section;
+ int ivar1 = 0, ivar2 = 0;
+ exec sql end declare section;
+
+ exec sql select c1,c2 into :ivar1,:ivar2 from test;
+ printf("%d %d\n", ivar1, ivar2);
+}
+
+int main(void)
+{
+ exec sql begin declare section;
+ int ivar1 = 1, ivar2 = 2;
+ char v_include_dq_name[16], v_include_ws_name[16], v_normal_name[16], v_query[64];
+ exec sql end declare section;
+
+ strcpy(v_normal_name, "normal_name");
+ strcpy(v_include_dq_name, "include_\"_name");
+ strcpy(v_include_ws_name, "include_ _name");
+ strcpy(v_query, "insert into test values(?,?)");
+
+ /*
+ * preparing for test
+ */
+ exec sql connect to REGRESSDB1;
+ exec sql begin;
+ exec sql create table test (c1 int, c2 int);
+ exec sql commit work;
+ exec sql begin;
+
+ /*
+ * Non dynamic statement
+ */
+ exec sql truncate test;
+ printf("+++++ Test for prepnormal +++++\n");
+ printf("insert into test values(:ivar1,:ivar2)\n");
+ exec sql insert into test values(:ivar1,:ivar2);
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for execute immediate +++++\n");
+ printf("execute immediate \"insert into test values(1,2)\"\n");
+ exec sql execute immediate "insert into test values(1,2)";
+ check_result_of_insert();
+
+ /*
+ * PREPARE FROM
+ */
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE ident FROM CString +++++\n");
+ printf("prepare ident_name from \"insert into test values(?,?)\"\n");
+ exec sql prepare ident_name from "insert into test values(?,?)";
+ printf("execute ident_name using :ivar1,:ivar2\n");
+ exec sql execute ident_name using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE char_variable_normal_name FROM char_variable +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ exec sql prepare :v_normal_name from :v_query;
+ printf("execute :v_normal_name using :ivar1,:ivar2\n");
+ exec sql execute :v_normal_name using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE char_variable_inc_dq_name FROM char_variable +++++\n");
+ printf("prepare :v_include_dq_name from :v_query\n");
+ exec sql prepare :v_include_dq_name from :v_query;
+ printf("execute :v_include_dq_name using :ivar1,:ivar2\n");
+ exec sql execute :v_include_dq_name using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE char_variable_inc_ws_name FROM char_variable +++++\n");
+ printf("prepare :v_include_ws_name from :v_query\n");
+ exec sql prepare :v_include_ws_name from :v_query;
+ printf("execute :v_include_ws_name using :ivar1,:ivar2\n");
+ exec sql execute :v_include_ws_name using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE CString_inc_ws_name FROM char_variable +++++\n");
+ printf("prepare \"include_ _name\" from :v_query\n");
+ exec sql prepare "include_ _name" from :v_query;
+ printf("exec sql execute \"include_ _name\" using :ivar1,:ivar2\n");
+ exec sql execute "include_ _name" using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE CString_normal_name FROM char_variable +++++\n");
+ printf("prepare \"norma_name\" from :v_query\n");
+ exec sql prepare "normal_name" from :v_query;
+ printf("exec sql execute \"normal_name\" using :ivar1,:ivar2\n");
+ exec sql execute "normal_name" using :ivar1,:ivar2;
+ check_result_of_insert();
+
+ /*
+ * PREPARE AS
+ */
+ exec sql deallocate "ident_name";
+ exec sql deallocate "normal_name";
+ exec sql deallocate "include_ _name";
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE ident(typelist) AS +++++\n");
+ printf("prepare ident_name(int,int) as insert into test values($1,$2)\n");
+ exec sql prepare ident_name(int,int) as insert into test values($1,$2);
+ printf("execute ident_name(:ivar1,:ivar2)\n");
+ exec sql execute ident_name(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "ident_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE CString_normal_name(typelist) AS +++++\n");
+ printf("prepare \"normal_name\"(int,int) as insert into test values($1,$2)\n");
+ exec sql prepare "normal_name"(int,int) as insert into test values($1,$2);
+ printf("execute \"normal_name\"(:ivar1,:ivar2)\n");
+ exec sql execute "normal_name"(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "normal_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE CString_include_ws_name(typelist) AS +++++\n");
+ printf("prepare \"include_ _name\"(int,int) as insert into test values($1,$2)\n");
+ exec sql prepare "include_ _name"(int,int) as insert into test values($1,$2);
+ printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
+ exec sql execute "include_ _name"(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "include_ _name";
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE char_variable_normal_name(typelist) AS +++++\n");
+ printf("prepare :v_normal_name(int,int) as insert into test values($1,$2)\n");
+ exec sql prepare :v_normal_name(int,int) as insert into test values($1,$2);
+ printf("execute :v_normal_name(:ivar1,:ivar2)\n");
+ exec sql execute :v_normal_name(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "normal_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for PREPARE char_variable_include_ws_name(typelist) AS +++++\n");
+ printf("prepare :v_include_ws_name(int,int) as insert into test values($1,$2)\n");
+ exec sql prepare :v_include_ws_name(int,int) as insert into test values($1,$2);
+ printf("execute :v_include_ws_name(:ivar1,:ivar2)\n");
+ exec sql execute :v_include_ws_name(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "include_ _name";
+
+ exec sql truncate test;
+ printf("+++++ Test for EXECUTE :v_normal_name(const,const) +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ exec sql prepare :v_normal_name from :v_query;
+ printf("execute :v_normal_name(1,2)\n");
+ exec sql execute :v_normal_name(1,2);
+ check_result_of_insert();
+ exec sql deallocate "normal_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for EXECUTE :v_normal_name(expr,expr) +++++\n");
+ printf("prepare :v_normal_name from :v_query\n");
+ exec sql prepare :v_normal_name from :v_query;
+ printf("execute :v_normal_name(0+1,1+1)\n");
+ exec sql execute :v_normal_name(0+1,1+1);
+ check_result_of_insert();
+ exec sql deallocate "normal_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for combination PREPARE FROM and EXECUTE ident(typelist) +++++\n");
+ printf("prepare ident_name from :v_query\n");
+ exec sql prepare ident_name from :v_query;
+ printf("execute ident_name(:ivar1,:ivar2)\n");
+ exec sql execute ident_name(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "ident_name";
+
+ exec sql truncate test;
+ printf("+++++ Test for combination PREPARE FROM and EXECUTE CString_include_ws_name(typelist) +++++\n");
+ printf("prepare \"include_ _name\" from :v_query\n");
+ exec sql prepare "include_ _name" from :v_query;
+ printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
+ exec sql execute "include_ _name"(:ivar1,:ivar2);
+ check_result_of_insert();
+ exec sql deallocate "include_ _name";
+
+ exec sql drop table test;
+ exec sql commit work;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/quote.pgc b/src/interfaces/ecpg/test/sql/quote.pgc
new file mode 100644
index 0000000..9b62b7d
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/quote.pgc
@@ -0,0 +1,61 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL BEGIN DECLARE SECTION;
+ char var[25];
+ int i, loopcount;
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR STOP;
+
+ EXEC SQL CREATE TABLE "My_Table" ( Item1 int, Item2 text );
+
+ EXEC SQL SET standard_conforming_strings TO off;
+
+ EXEC SQL SHOW standard_conforming_strings INTO :var;
+ printf("Standard conforming strings: %s\n", var);
+
+ /* this is a\\b actually */
+ EXEC SQL INSERT INTO "My_Table" VALUES ( 1, 'a\\\\b' );
+ /* this is a\\b */
+ EXEC SQL INSERT INTO "My_Table" VALUES ( 1, E'a\\\\b' );
+
+ EXEC SQL SET standard_conforming_strings TO on;
+
+ EXEC SQL SHOW standard_conforming_strings INTO :var;
+ printf("Standard conforming strings: %s\n", var);
+
+ /* this is a\\\\b actually */
+ EXEC SQL INSERT INTO "My_Table" VALUES ( 2, 'a\\\\b' );
+ /* this is a\\b */
+ EXEC SQL INSERT INTO "My_Table" VALUES ( 2, E'a\\\\b' );
+
+ EXEC SQL BEGIN;
+ EXEC SQL DECLARE C CURSOR FOR SELECT * FROM "My_Table";
+
+ EXEC SQL OPEN C;
+
+ EXEC SQL WHENEVER NOT FOUND DO BREAK;
+
+ for (loopcount = 0; loopcount < 100; loopcount++)
+ {
+ EXEC SQL FETCH C INTO :i, :var;
+ printf("value: %d %s\n", i, var);
+ }
+
+ EXEC SQL ROLLBACK;
+ EXEC SQL DROP TABLE "My_Table";
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/show.pgc b/src/interfaces/ecpg/test/sql/show.pgc
new file mode 100644
index 0000000..339678a
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/show.pgc
@@ -0,0 +1,41 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+EXEC SQL INCLUDE ../regression;
+
+int main() {
+ EXEC SQL BEGIN DECLARE SECTION;
+ char var[25] = "public";
+ EXEC SQL END DECLARE SECTION;
+
+ ECPGdebug(1, stderr);
+ EXEC SQL CONNECT TO REGRESSDB1;
+
+ EXEC SQL WHENEVER SQLWARNING SQLPRINT;
+ EXEC SQL WHENEVER SQLERROR SQLPRINT;
+
+ EXEC SQL SET search_path TO :var;
+ EXEC SQL SHOW search_path INTO :var;
+ printf("Var: Search path: %s\n", var);
+
+ EXEC SQL SET search_path TO 'public';
+ EXEC SQL SHOW search_path INTO :var;
+ printf("Var: Search path: %s\n", var);
+
+ EXEC SQL SET standard_conforming_strings TO off;
+ EXEC SQL SHOW standard_conforming_strings INTO :var;
+ printf("Var: Standard conforming strings: %s\n", var);
+
+ EXEC SQL SET TIME ZONE PST8PDT;
+ EXEC SQL SHOW TIME ZONE INTO :var;
+ printf("Time Zone: %s\n", var);
+
+ EXEC SQL SET TRANSACTION ISOLATION LEVEL read committed;
+ EXEC SQL SHOW TRANSACTION ISOLATION LEVEL INTO :var;
+ printf("Transaction isolation level: %s\n", var);
+
+ EXEC SQL DISCONNECT ALL;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc
new file mode 100644
index 0000000..e551385
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/sqlda.pgc
@@ -0,0 +1,266 @@
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include "ecpg_config.h"
+
+exec sql include ../regression;
+exec sql include sqlda.h;
+exec sql include pgtypes_numeric.h;
+
+exec sql whenever sqlerror stop;
+
+/* These shouldn't be under DECLARE SECTION */
+sqlda_t *inp_sqlda, *outp_sqlda, *outp_sqlda1;
+
+static void
+dump_sqlda(sqlda_t *sqlda)
+{
+ int i;
+
+ if (sqlda == NULL)
+ {
+ printf("dump_sqlda called with NULL sqlda\n");
+ return;
+ }
+
+ for (i = 0; i < sqlda->sqld; i++)
+ {
+ if (sqlda->sqlvar[i].sqlind && *(sqlda->sqlvar[i].sqlind) == -1)
+ printf("name sqlda descriptor: '%s' value NULL'\n", sqlda->sqlvar[i].sqlname.data);
+ else
+ switch (sqlda->sqlvar[i].sqltype)
+ {
+ case ECPGt_char:
+ printf("name sqlda descriptor: '%s' value '%s'\n", sqlda->sqlvar[i].sqlname.data, sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_int:
+ printf("name sqlda descriptor: '%s' value %d\n", sqlda->sqlvar[i].sqlname.data, *(int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_long:
+ printf("name sqlda descriptor: '%s' value %ld\n", sqlda->sqlvar[i].sqlname.data, *(long int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_long_long:
+ printf(
+#ifdef _WIN32
+ "name sqlda descriptor: '%s' value %I64d\n",
+#else
+ "name sqlda descriptor: '%s' value %lld\n",
+#endif
+ sqlda->sqlvar[i].sqlname.data, *(long long int *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_double:
+ printf("name sqlda descriptor: '%s' value %f\n", sqlda->sqlvar[i].sqlname.data, *(double *)sqlda->sqlvar[i].sqldata);
+ break;
+ case ECPGt_numeric:
+ {
+ char *val;
+
+ val = PGTYPESnumeric_to_asc((numeric*)sqlda->sqlvar[i].sqldata, -1);
+ printf("name sqlda descriptor: '%s' value NUMERIC '%s'\n", sqlda->sqlvar[i].sqlname.data, val);
+ PGTYPESchar_free(val);
+ break;
+ }
+ }
+ }
+}
+
+int
+main (void)
+{
+exec sql begin declare section;
+ char *stmt1 = "SELECT * FROM t1";
+ char *stmt2 = "SELECT * FROM t1 WHERE id = ?";
+ int rec;
+ int id;
+exec sql end declare section;
+
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1 as regress1;
+
+ strcpy(msg, "set");
+ exec sql set datestyle to iso;
+
+ strcpy(msg, "create");
+ exec sql create table t1(
+ id integer,
+ t text,
+ d1 numeric,
+ d2 float8,
+ c char(10),
+ big bigint
+ );
+
+ strcpy(msg, "insert");
+ exec sql insert into t1 values
+ (1, 'a', 1.0, 1, 'a',1111111111111111111),
+ (2, null, null, null, null,null),
+ (3, 'c', 0.0, 3, 'c',3333333333333333333),
+ (4, 'd', 'NaN', 4, 'd',4444444444444444444),
+ (5, 'e', 0.001234, 5, 'e',5555555555555555555);
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ /* SQLDA test for getting all records from a table */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id1 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql declare mycur1 cursor for st_id1;
+
+ strcpy(msg, "open");
+ exec sql open mycur1;
+
+ exec sql whenever not found do break;
+
+ rec = 0;
+ while (1)
+ {
+ strcpy(msg, "fetch");
+ exec sql fetch 1 from mycur1 into descriptor outp_sqlda;
+
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda);
+ }
+
+ exec sql whenever not found continue;
+
+ strcpy(msg, "close");
+ exec sql close mycur1;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id1;
+
+ free(outp_sqlda);
+
+ /* SQLDA test for getting ALL records into the sqlda list */
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id2 from :stmt1;
+
+ strcpy(msg, "declare");
+ exec sql declare mycur2 cursor for st_id2;
+
+ strcpy(msg, "open");
+ exec sql open mycur2;
+
+ strcpy(msg, "fetch");
+ exec sql fetch all from mycur2 into descriptor outp_sqlda;
+
+ outp_sqlda1 = outp_sqlda;
+ rec = 0;
+ while (outp_sqlda1)
+ {
+ sqlda_t *ptr;
+ printf("FETCH RECORD %d\n", ++rec);
+ dump_sqlda(outp_sqlda1);
+
+ ptr = outp_sqlda1;
+ outp_sqlda1 = outp_sqlda1->desc_next;
+ free(ptr);
+ }
+
+ strcpy(msg, "close");
+ exec sql close mycur2;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id2;
+
+ /* SQLDA test for getting one record using an input descriptor */
+
+ /*
+ * Input sqlda has to be built manually
+ * sqlda_t contains 1 sqlvar_t structure already.
+ */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqln = 1;
+
+ inp_sqlda->sqlvar[0].sqltype = ECPGt_int;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql prepare st_id3 FROM :stmt2;
+
+ strcpy(msg, "execute");
+ exec sql execute st_id3 using descriptor inp_sqlda into descriptor outp_sqlda;
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id3;
+
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ /* SQLDA test for getting one record using an input descriptor
+ * on a named connection
+ */
+
+ exec sql connect to REGRESSDB1 as con2;
+
+ /*
+ * Input sqlda has to be built manually
+ * sqlda_t contains 1 sqlvar_t structure already.
+ */
+ inp_sqlda = (sqlda_t *)malloc(sizeof(sqlda_t));
+ memset(inp_sqlda, 0, sizeof(sqlda_t));
+ inp_sqlda->sqln = 1;
+
+ inp_sqlda->sqlvar[0].sqltype = ECPGt_int;
+ inp_sqlda->sqlvar[0].sqldata = (char *)&id;
+
+ printf("EXECUTE RECORD 4\n");
+
+ id = 4;
+
+ outp_sqlda = NULL;
+
+ strcpy(msg, "prepare");
+ exec sql at con2 prepare st_id4 FROM :stmt2;
+
+ strcpy(msg, "execute");
+ exec sql at con2 execute st_id4 using descriptor inp_sqlda into descriptor outp_sqlda;
+
+ dump_sqlda(outp_sqlda);
+
+ strcpy(msg, "commit");
+ exec sql at con2 commit;
+
+ strcpy(msg, "deallocate");
+ exec sql deallocate prepare st_id4;
+
+ free(inp_sqlda);
+ free(outp_sqlda);
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect con2;
+
+ /* End test */
+
+ strcpy(msg, "drop");
+ exec sql drop table t1;
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/sql/twophase.pgc b/src/interfaces/ecpg/test/sql/twophase.pgc
new file mode 100644
index 0000000..38913d7
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/twophase.pgc
@@ -0,0 +1,44 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+
+int main(void)
+{
+ char msg[128];
+
+ ECPGdebug(1, stderr);
+
+ strcpy(msg, "connect");
+ exec sql connect to REGRESSDB1;
+ exec sql set autocommit to off;
+
+ strcpy(msg, "create");
+ exec sql create table t1(c int);
+
+ strcpy(msg, "commit");
+ exec sql commit;
+
+ strcpy(msg, "begin");
+ exec sql begin;
+
+ strcpy(msg, "insert");
+ exec sql insert into t1 values(1);
+
+ strcpy(msg, "prepare transaction");
+ exec sql prepare transaction 'gxid';
+
+ strcpy(msg, "commit prepared");
+ exec sql commit prepared 'gxid';
+
+ strcpy(msg, "drop");
+ exec sql drop table t1;
+
+ strcpy(msg, "disconnect");
+ exec sql disconnect current;
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/thread/.gitignore b/src/interfaces/ecpg/test/thread/.gitignore
new file mode 100644
index 0000000..12ff319
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/.gitignore
@@ -0,0 +1,10 @@
+/alloc
+/alloc.c
+/descriptor
+/descriptor.c
+/prep
+/prep.c
+/thread
+/thread.c
+/thread_implicit
+/thread_implicit.c
diff --git a/src/interfaces/ecpg/test/thread/Makefile b/src/interfaces/ecpg/test/thread/Makefile
new file mode 100644
index 0000000..1b4ddcf
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/Makefile
@@ -0,0 +1,13 @@
+subdir = src/interfaces/ecpg/test/thread
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+
+TESTS = thread_implicit thread_implicit.c \
+ thread thread.c \
+ prep prep.c \
+ descriptor descriptor.c \
+ alloc alloc.c
+
+all: $(TESTS)
diff --git a/src/interfaces/ecpg/test/thread/alloc.pgc b/src/interfaces/ecpg/test/thread/alloc.pgc
new file mode 100644
index 0000000..c0021a7
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/alloc.pgc
@@ -0,0 +1,90 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50
+
+exec sql include sqlca;
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+exec sql whenever not found sqlprint;
+
+#ifdef WIN32
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ EXEC SQL BEGIN DECLARE SECTION;
+ int value;
+ char name[100];
+ char **r = NULL;
+ EXEC SQL END DECLARE SECTION;
+
+ value = (intptr_t) arg;
+ sprintf(name, "Connection: %d", value);
+
+ EXEC SQL CONNECT TO REGRESSDB1 AS :name;
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ EXEC SQL SELECT relname INTO :r FROM pg_class WHERE relname = 'pg_class';
+ free(r);
+ r = NULL;
+ }
+ EXEC SQL DISCONNECT :name;
+
+ return 0;
+}
+
+int main ()
+{
+ intptr_t i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, (void*)i, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, (void *) i);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+
+ return 0;
+}
+#endif
diff --git a/src/interfaces/ecpg/test/thread/descriptor.pgc b/src/interfaces/ecpg/test/thread/descriptor.pgc
new file mode 100644
index 0000000..76a7a5d
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/descriptor.pgc
@@ -0,0 +1,68 @@
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50000
+
+EXEC SQL include sqlca;
+EXEC SQL whenever sqlerror sqlprint;
+EXEC SQL whenever not found sqlprint;
+
+#if defined(ENABLE_THREAD_SAFETY) && defined(WIN32)
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ EXEC SQL ALLOCATE DESCRIPTOR mydesc;
+ EXEC SQL DEALLOCATE DESCRIPTOR mydesc;
+ }
+
+ return 0;
+}
+
+int main ()
+{
+#ifdef ENABLE_THREAD_SAFETY
+ int i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, NULL, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, NULL);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+#else
+ fn(NULL);
+#endif
+
+ return 0;
+}
diff --git a/src/interfaces/ecpg/test/thread/prep.pgc b/src/interfaces/ecpg/test/thread/prep.pgc
new file mode 100644
index 0000000..d7ecfd4
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/prep.pgc
@@ -0,0 +1,96 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <process.h>
+#include <locale.h>
+#else
+#include <pthread.h>
+#endif
+#include <stdio.h>
+
+#define THREADS 16
+#define REPEATS 50
+
+exec sql include sqlca;
+exec sql include ../regression;
+
+exec sql whenever sqlerror sqlprint;
+exec sql whenever not found sqlprint;
+
+#ifdef WIN32
+static unsigned __stdcall fn(void* arg)
+#else
+static void* fn(void* arg)
+#endif
+{
+ int i;
+
+ EXEC SQL BEGIN DECLARE SECTION;
+ int value;
+ char name[100];
+ char query[256] = "INSERT INTO T VALUES ( ? )";
+ EXEC SQL END DECLARE SECTION;
+
+ value = (intptr_t) arg;
+ sprintf(name, "Connection: %d", value);
+
+ EXEC SQL CONNECT TO REGRESSDB1 AS :name;
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ for (i = 1; i <= REPEATS; ++i)
+ {
+ EXEC SQL PREPARE I FROM :query;
+ EXEC SQL EXECUTE I USING :value;
+ }
+ EXEC SQL DEALLOCATE I;
+ EXEC SQL DISCONNECT :name;
+
+ return 0;
+}
+
+int main ()
+{
+ intptr_t i;
+#ifdef WIN32
+ HANDLE threads[THREADS];
+#else
+ pthread_t threads[THREADS];
+#endif
+
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL SET AUTOCOMMIT TO ON;
+ EXEC SQL DROP TABLE IF EXISTS T;
+ EXEC SQL CREATE TABLE T ( i int );
+ EXEC SQL DISCONNECT;
+
+#ifdef WIN32
+ for (i = 0; i < THREADS; ++i)
+ {
+ unsigned id;
+ threads[i] = (HANDLE)_beginthreadex(NULL, 0, fn, (void*)i, 0, &id);
+ }
+
+ WaitForMultipleObjects(THREADS, threads, TRUE, INFINITE);
+ for (i = 0; i < THREADS; ++i)
+ CloseHandle(threads[i]);
+#else
+ for (i = 0; i < THREADS; ++i)
+ pthread_create(&threads[i], NULL, fn, (void *) i);
+ for (i = 0; i < THREADS; ++i)
+ pthread_join(threads[i], NULL);
+#endif
+
+ return 0;
+}
+#endif
diff --git a/src/interfaces/ecpg/test/thread/thread.pgc b/src/interfaces/ecpg/test/thread/thread.pgc
new file mode 100644
index 0000000..e7d8c00
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/thread.pgc
@@ -0,0 +1,136 @@
+/*
+ * Thread test program
+ * by Philip Yarra & Lee Kindness.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifndef WIN32
+#include <pthread.h>
+#else
+#include <windows.h>
+#include <locale.h>
+#endif
+
+exec sql include ../regression;
+
+void *test_thread(void *arg);
+
+int nthreads = 10;
+int iterations = 20;
+
+int main()
+{
+#ifndef WIN32
+ pthread_t *threads;
+#else
+ HANDLE *threads;
+#endif
+ intptr_t n;
+ EXEC SQL BEGIN DECLARE SECTION;
+ int l_rows;
+ EXEC SQL END DECLARE SECTION;
+
+ /* Do not switch on debug output for regression tests. The threads get executed in
+ * more or less random order */
+ /* ECPGdebug(1, stderr); */
+
+ /* setup test_thread table */
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL DROP TABLE test_thread; /* DROP might fail */
+ EXEC SQL COMMIT;
+ EXEC SQL CREATE TABLE
+ test_thread(tstamp TIMESTAMP NOT NULL DEFAULT CAST(timeofday() AS TIMESTAMP),
+ thread TEXT NOT NULL,
+ iteration INTEGER NOT NULL,
+ PRIMARY KEY(thread, iteration));
+ EXEC SQL COMMIT;
+ EXEC SQL DISCONNECT;
+
+ /* create, and start, threads */
+ threads = calloc(nthreads, sizeof(threads[0]));
+ if( threads == NULL )
+ {
+ fprintf(stderr, "Cannot alloc memory\n");
+ return 1;
+ }
+ for( n = 0; n < nthreads; n++ )
+ {
+#ifndef WIN32
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+#else
+ threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n + 1), 0, NULL);
+#endif
+ }
+
+ /* wait for thread completion */
+#ifndef WIN32
+ for( n = 0; n < nthreads; n++ )
+ {
+ pthread_join(threads[n], NULL);
+ }
+#else
+ WaitForMultipleObjects(nthreads, threads, TRUE, INFINITE);
+#endif
+ free(threads);
+
+ /* and check results */
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL SELECT COUNT(*) INTO :l_rows FROM test_thread;
+ EXEC SQL COMMIT;
+ EXEC SQL DISCONNECT;
+ if( l_rows == (nthreads * iterations) )
+ printf("Success.\n");
+ else
+ printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
+
+ return 0;
+}
+
+void *test_thread(void *arg)
+{
+ long threadnum = (intptr_t) arg;
+
+ EXEC SQL BEGIN DECLARE SECTION;
+ int l_i;
+ char l_connection[128];
+ EXEC SQL END DECLARE SECTION;
+
+ /* build up connection name, and connect to database */
+#ifndef _MSC_VER
+ snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
+ EXEC SQL WHENEVER sqlerror sqlprint;
+ EXEC SQL CONNECT TO REGRESSDB1 AS :l_connection;
+ if( sqlca.sqlcode != 0 )
+ {
+ printf("%s: ERROR: cannot connect to database!\n", l_connection);
+ return NULL;
+ }
+ EXEC SQL AT :l_connection BEGIN;
+
+ /* insert into test_thread table */
+ for( l_i = 1; l_i <= iterations; l_i++ )
+ {
+ EXEC SQL AT :l_connection INSERT INTO test_thread(thread, iteration) VALUES(:l_connection, :l_i);
+ if( sqlca.sqlcode != 0 )
+ printf("%s: ERROR: insert failed!\n", l_connection);
+ }
+
+ /* all done */
+ EXEC SQL AT :l_connection COMMIT;
+ EXEC SQL DISCONNECT :l_connection;
+ return NULL;
+}
+#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/thread/thread_implicit.pgc b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
new file mode 100644
index 0000000..b4cae7e
--- /dev/null
+++ b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
@@ -0,0 +1,136 @@
+/*
+ * Thread test program
+ * by Lee Kindness.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include "ecpg_config.h"
+
+#ifndef ENABLE_THREAD_SAFETY
+int
+main(void)
+{
+ printf("No threading enabled.\n");
+ return 0;
+}
+#else
+#ifndef WIN32
+#include <pthread.h>
+#else
+#include <windows.h>
+#include <locale.h>
+#endif
+
+exec sql include ../regression;
+
+void *test_thread(void *arg);
+
+int nthreads = 10;
+int iterations = 20;
+
+int main()
+{
+#ifndef WIN32
+ pthread_t *threads;
+#else
+ HANDLE *threads;
+#endif
+ intptr_t n;
+ EXEC SQL BEGIN DECLARE SECTION;
+ int l_rows;
+ EXEC SQL END DECLARE SECTION;
+
+ /* Do not switch on debug output for regression tests. The threads get executed in
+ * more or less random order */
+ /* ECPGdebug(1, stderr); */
+
+ /* setup test_thread table */
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL DROP TABLE test_thread; /* DROP might fail */
+ EXEC SQL COMMIT;
+ EXEC SQL CREATE TABLE
+ test_thread(tstamp TIMESTAMP NOT NULL DEFAULT CAST(timeofday() AS TIMESTAMP),
+ thread TEXT NOT NULL,
+ iteration INTEGER NOT NULL,
+ PRIMARY KEY(thread, iteration));
+ EXEC SQL COMMIT;
+ EXEC SQL DISCONNECT;
+
+ /* create, and start, threads */
+ threads = calloc(nthreads, sizeof(threads[0]));
+ if( threads == NULL )
+ {
+ fprintf(stderr, "Cannot alloc memory\n");
+ return 1;
+ }
+ for( n = 0; n < nthreads; n++ )
+ {
+#ifndef WIN32
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
+#else
+ threads[n] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) (void (*) (void)) test_thread, (void *) (n+1), 0, NULL);
+#endif
+ }
+
+ /* wait for thread completion */
+#ifndef WIN32
+ for( n = 0; n < nthreads; n++ )
+ {
+ pthread_join(threads[n], NULL);
+ }
+#else
+ WaitForMultipleObjects(nthreads, threads, TRUE, INFINITE);
+#endif
+ free(threads);
+
+ /* and check results */
+ EXEC SQL CONNECT TO REGRESSDB1;
+ EXEC SQL SELECT COUNT(*) INTO :l_rows FROM test_thread;
+ EXEC SQL COMMIT;
+ EXEC SQL DISCONNECT;
+ if( l_rows == (nthreads * iterations) )
+ printf("Success.\n");
+ else
+ printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
+
+ return 0;
+}
+
+void *test_thread(void *arg)
+{
+ long threadnum = (intptr_t) arg;
+
+ EXEC SQL BEGIN DECLARE SECTION;
+ int l_i;
+ char l_connection[128];
+ EXEC SQL END DECLARE SECTION;
+
+ /* build up connection name, and connect to database */
+#ifndef _MSC_VER
+ snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
+ EXEC SQL WHENEVER sqlerror sqlprint;
+ EXEC SQL CONNECT TO REGRESSDB1 AS :l_connection;
+ if( sqlca.sqlcode != 0 )
+ {
+ printf("%s: ERROR: cannot connect to database!\n", l_connection);
+ return NULL;
+ }
+ EXEC SQL BEGIN;
+
+ /* insert into test_thread table */
+ for( l_i = 1; l_i <= iterations; l_i++ )
+ {
+ EXEC SQL INSERT INTO test_thread(thread, iteration) VALUES(:l_connection, :l_i);
+ if( sqlca.sqlcode != 0 )
+ printf("%s: ERROR: insert failed!\n", l_connection);
+ }
+
+ /* all done */
+ EXEC SQL COMMIT;
+ EXEC SQL DISCONNECT :l_connection;
+ return NULL;
+}
+#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/libpq/.gitignore b/src/interfaces/libpq/.gitignore
new file mode 100644
index 0000000..a4afe7c
--- /dev/null
+++ b/src/interfaces/libpq/.gitignore
@@ -0,0 +1 @@
+/exports.list
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
new file mode 100644
index 0000000..4368257
--- /dev/null
+++ b/src/interfaces/libpq/Makefile
@@ -0,0 +1,142 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces/libpq library
+#
+# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/interfaces/libpq/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces/libpq
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+
+PGFILEDESC = "PostgreSQL Access Library"
+
+# shared library parameters
+NAME= pq
+SO_MAJOR_VERSION= 5
+SO_MINOR_VERSION= $(MAJORVERSION)
+
+override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port -I$(top_srcdir)/src/port
+ifneq ($(PORTNAME), win32)
+override CFLAGS += $(PTHREAD_CFLAGS)
+endif
+
+# The MSVC build system scrapes OBJS from this file. If you change any of
+# the conditional additions of files to OBJS, update Mkvcbuild.pm to match.
+
+OBJS = \
+ $(WIN32RES) \
+ fe-auth-scram.o \
+ fe-connect.o \
+ fe-exec.o \
+ fe-lobj.o \
+ fe-misc.o \
+ fe-print.o \
+ fe-protocol3.o \
+ fe-secure.o \
+ fe-trace.o \
+ legacy-pqsignal.o \
+ libpq-events.o \
+ pqexpbuffer.o \
+ fe-auth.o
+
+# File shared across all SSL implementations supported.
+ifneq ($(with_ssl),no)
+OBJS += \
+ fe-secure-common.o
+endif
+
+ifeq ($(with_ssl),openssl)
+OBJS += \
+ fe-secure-openssl.o
+endif
+
+ifeq ($(with_gssapi),yes)
+OBJS += \
+ fe-gssapi-common.o \
+ fe-secure-gssapi.o
+endif
+
+ifeq ($(PORTNAME), cygwin)
+override shlib = cyg$(NAME)$(DLSUFFIX)
+endif
+
+ifeq ($(PORTNAME), win32)
+OBJS += \
+ win32.o
+
+ifeq ($(enable_thread_safety), yes)
+OBJS += pthread-win32.o
+endif
+endif
+
+
+# Add libraries that libpq depends (or might depend) on into the
+# shared library link. (The order in which you list them here doesn't
+# matter.) Note that we filter out -lpgcommon and -lpgport from LIBS and
+# instead link with -lpgcommon_shlib and -lpgport_shlib, to get object files
+# that are built correctly for use in a shlib.
+SHLIB_LINK_INTERNAL = -lpgcommon_shlib -lpgport_shlib
+ifneq ($(PORTNAME), win32)
+SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi_krb5 -lgss -lgssapi -lssl -lsocket -lnsl -lresolv -lintl -lm, $(LIBS)) $(LDAP_LIBS_FE) $(PTHREAD_LIBS)
+else
+SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi32 -lssl -lsocket -lnsl -lresolv -lintl -lm $(PTHREAD_LIBS), $(LIBS)) $(LDAP_LIBS_FE)
+endif
+ifeq ($(PORTNAME), win32)
+SHLIB_LINK += -lshell32 -lws2_32 -lsecur32 $(filter -leay32 -lssleay32 -lcomerr32 -lkrb5_32, $(LIBS))
+endif
+SHLIB_PREREQS = submake-libpgport
+
+SHLIB_EXPORTS = exports.txt
+
+ifeq ($(with_ssl),openssl)
+PKG_CONFIG_REQUIRES_PRIVATE = libssl libcrypto
+endif
+
+all: all-lib
+
+# Shared library stuff
+include $(top_srcdir)/src/Makefile.shlib
+backend_src = $(top_srcdir)/src/backend
+
+
+# Make dependencies on pg_config_paths.h visible in all builds.
+fe-connect.o: fe-connect.c $(top_builddir)/src/port/pg_config_paths.h
+fe-misc.o: fe-misc.c $(top_builddir)/src/port/pg_config_paths.h
+
+$(top_builddir)/src/port/pg_config_paths.h:
+ $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
+
+install: all installdirs install-lib
+ $(INSTALL_DATA) $(srcdir)/libpq-fe.h '$(DESTDIR)$(includedir)'
+ $(INSTALL_DATA) $(srcdir)/libpq-events.h '$(DESTDIR)$(includedir)'
+ $(INSTALL_DATA) $(srcdir)/libpq-int.h '$(DESTDIR)$(includedir_internal)'
+ $(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
+ $(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
+
+installcheck:
+ $(MAKE) -C test $@
+
+installdirs: installdirs-lib
+ $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)' '$(DESTDIR)$(datadir)'
+
+uninstall: uninstall-lib
+ rm -f '$(DESTDIR)$(includedir)/libpq-fe.h'
+ rm -f '$(DESTDIR)$(includedir)/libpq-events.h'
+ rm -f '$(DESTDIR)$(includedir_internal)/libpq-int.h'
+ rm -f '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h'
+ rm -f '$(DESTDIR)$(datadir)/pg_service.conf.sample'
+
+clean distclean: clean-lib
+ $(MAKE) -C test $@
+ rm -f $(OBJS) pthread.h
+# Might be left over from a Win32 client-only build
+ rm -f pg_config_paths.h
+
+maintainer-clean: distclean
+ $(MAKE) -C test $@
diff --git a/src/interfaces/libpq/README b/src/interfaces/libpq/README
new file mode 100644
index 0000000..0dcef75
--- /dev/null
+++ b/src/interfaces/libpq/README
@@ -0,0 +1,3 @@
+src/interfaces/libpq/README
+
+This directory contains the C version of Libpq, the POSTGRES frontend library.
diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt
new file mode 100644
index 0000000..e8bcc88
--- /dev/null
+++ b/src/interfaces/libpq/exports.txt
@@ -0,0 +1,188 @@
+# src/interfaces/libpq/exports.txt
+# Functions to be exported by libpq DLLs
+PQconnectdb 1
+PQsetdbLogin 2
+PQconndefaults 3
+PQfinish 4
+PQreset 5
+PQrequestCancel 6
+PQdb 7
+PQuser 8
+PQpass 9
+PQhost 10
+PQport 11
+PQtty 12
+PQoptions 13
+PQstatus 14
+PQerrorMessage 15
+PQsocket 16
+PQbackendPID 17
+PQtrace 18
+PQuntrace 19
+PQsetNoticeProcessor 20
+PQexec 21
+PQnotifies 22
+PQsendQuery 23
+PQgetResult 24
+PQisBusy 25
+PQconsumeInput 26
+PQgetline 27
+PQputline 28
+PQgetlineAsync 29
+PQputnbytes 30
+PQendcopy 31
+PQfn 32
+PQresultStatus 33
+PQntuples 34
+PQnfields 35
+PQbinaryTuples 36
+PQfname 37
+PQfnumber 38
+PQftype 39
+PQfsize 40
+PQfmod 41
+PQcmdStatus 42
+PQoidStatus 43
+PQcmdTuples 44
+PQgetvalue 45
+PQgetlength 46
+PQgetisnull 47
+PQclear 48
+PQmakeEmptyPGresult 49
+PQprint 50
+PQdisplayTuples 51
+PQprintTuples 52
+lo_open 53
+lo_close 54
+lo_read 55
+lo_write 56
+lo_lseek 57
+lo_creat 58
+lo_tell 59
+lo_unlink 60
+lo_import 61
+lo_export 62
+pgresStatus 63
+PQmblen 64
+PQresultErrorMessage 65
+PQresStatus 66
+termPQExpBuffer 67
+appendPQExpBufferChar 68
+initPQExpBuffer 69
+resetPQExpBuffer 70
+PQoidValue 71
+PQclientEncoding 72
+PQenv2encoding 73
+appendBinaryPQExpBuffer 74
+appendPQExpBufferStr 75
+destroyPQExpBuffer 76
+createPQExpBuffer 77
+PQconninfoFree 78
+PQconnectPoll 79
+PQconnectStart 80
+PQflush 81
+PQisnonblocking 82
+PQresetPoll 83
+PQresetStart 84
+PQsetClientEncoding 85
+PQsetnonblocking 86
+PQfreeNotify 87
+PQescapeString 88
+PQescapeBytea 89
+printfPQExpBuffer 90
+appendPQExpBuffer 91
+pg_encoding_to_char 92
+pg_utf_mblen 93
+PQunescapeBytea 94
+PQfreemem 95
+PQtransactionStatus 96
+PQparameterStatus 97
+PQprotocolVersion 98
+PQsetErrorVerbosity 99
+PQsetNoticeReceiver 100
+PQexecParams 101
+PQsendQueryParams 102
+PQputCopyData 103
+PQputCopyEnd 104
+PQgetCopyData 105
+PQresultErrorField 106
+PQftable 107
+PQftablecol 108
+PQfformat 109
+PQexecPrepared 110
+PQsendQueryPrepared 111
+PQdsplen 112
+PQserverVersion 113
+PQgetssl 114
+pg_char_to_encoding 115
+pg_valid_server_encoding 116
+pqsignal 117
+PQprepare 118
+PQsendPrepare 119
+PQgetCancel 120
+PQfreeCancel 121
+PQcancel 122
+lo_create 123
+PQinitSSL 124
+PQregisterThreadLock 125
+PQescapeStringConn 126
+PQescapeByteaConn 127
+PQencryptPassword 128
+PQisthreadsafe 129
+enlargePQExpBuffer 130
+PQnparams 131
+PQparamtype 132
+PQdescribePrepared 133
+PQdescribePortal 134
+PQsendDescribePrepared 135
+PQsendDescribePortal 136
+lo_truncate 137
+PQconnectionUsedPassword 138
+pg_valid_server_encoding_id 139
+PQconnectionNeedsPassword 140
+lo_import_with_oid 141
+PQcopyResult 142
+PQsetResultAttrs 143
+PQsetvalue 144
+PQresultAlloc 145
+PQregisterEventProc 146
+PQinstanceData 147
+PQsetInstanceData 148
+PQresultInstanceData 149
+PQresultSetInstanceData 150
+PQfireResultCreateEvents 151
+PQconninfoParse 152
+PQinitOpenSSL 153
+PQescapeLiteral 154
+PQescapeIdentifier 155
+PQconnectdbParams 156
+PQconnectStartParams 157
+PQping 158
+PQpingParams 159
+PQlibVersion 160
+PQsetSingleRowMode 161
+lo_lseek64 162
+lo_tell64 163
+lo_truncate64 164
+PQconninfo 165
+PQsslInUse 166
+PQsslStruct 167
+PQsslAttributeNames 168
+PQsslAttribute 169
+PQsetErrorContextVisibility 170
+PQresultVerboseErrorMessage 171
+PQencryptPasswordConn 172
+PQresultMemorySize 173
+PQhostaddr 174
+PQgssEncInUse 175
+PQgetgssctx 176
+PQsetSSLKeyPassHook_OpenSSL 177
+PQgetSSLKeyPassHook_OpenSSL 178
+PQdefaultSSLKeyPassHook_OpenSSL 179
+PQenterPipelineMode 180
+PQexitPipelineMode 181
+PQpipelineSync 182
+PQpipelineStatus 183
+PQsetTraceFlags 184
+PQmblenBounded 185
+PQsendFlushRequest 186
diff --git a/src/interfaces/libpq/fe-auth-scram.c b/src/interfaces/libpq/fe-auth-scram.c
new file mode 100644
index 0000000..5881386
--- /dev/null
+++ b/src/interfaces/libpq/fe-auth-scram.c
@@ -0,0 +1,905 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-auth-scram.c
+ * The front-end (client) implementation of SCRAM authentication.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-auth-scram.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "common/base64.h"
+#include "common/hmac.h"
+#include "common/saslprep.h"
+#include "common/scram-common.h"
+#include "fe-auth.h"
+
+
+/*
+ * Status of exchange messages used for SCRAM authentication via the
+ * SASL protocol.
+ */
+typedef enum
+{
+ FE_SCRAM_INIT,
+ FE_SCRAM_NONCE_SENT,
+ FE_SCRAM_PROOF_SENT,
+ FE_SCRAM_FINISHED
+} fe_scram_state_enum;
+
+typedef struct
+{
+ fe_scram_state_enum state;
+
+ /* These are supplied by the user */
+ PGconn *conn;
+ char *password;
+ char *sasl_mechanism;
+
+ /* We construct these */
+ uint8 SaltedPassword[SCRAM_KEY_LEN];
+ char *client_nonce;
+ char *client_first_message_bare;
+ char *client_final_message_without_proof;
+
+ /* These come from the server-first message */
+ char *server_first_message;
+ char *salt;
+ int saltlen;
+ int iterations;
+ char *nonce;
+
+ /* These come from the server-final message */
+ char *server_final_message;
+ char ServerSignature[SCRAM_KEY_LEN];
+} fe_scram_state;
+
+static bool read_server_first_message(fe_scram_state *state, char *input);
+static bool read_server_final_message(fe_scram_state *state, char *input);
+static char *build_client_first_message(fe_scram_state *state);
+static char *build_client_final_message(fe_scram_state *state);
+static bool verify_server_signature(fe_scram_state *state, bool *match);
+static bool calculate_client_proof(fe_scram_state *state,
+ const char *client_final_message_without_proof,
+ uint8 *result);
+
+/*
+ * Initialize SCRAM exchange status.
+ */
+void *
+pg_fe_scram_init(PGconn *conn,
+ const char *password,
+ const char *sasl_mechanism)
+{
+ fe_scram_state *state;
+ char *prep_password;
+ pg_saslprep_rc rc;
+
+ Assert(sasl_mechanism != NULL);
+
+ state = (fe_scram_state *) malloc(sizeof(fe_scram_state));
+ if (!state)
+ return NULL;
+ memset(state, 0, sizeof(fe_scram_state));
+ state->conn = conn;
+ state->state = FE_SCRAM_INIT;
+ state->sasl_mechanism = strdup(sasl_mechanism);
+
+ if (!state->sasl_mechanism)
+ {
+ free(state);
+ return NULL;
+ }
+
+ /* Normalize the password with SASLprep, if possible */
+ rc = pg_saslprep(password, &prep_password);
+ if (rc == SASLPREP_OOM)
+ {
+ free(state->sasl_mechanism);
+ free(state);
+ return NULL;
+ }
+ if (rc != SASLPREP_SUCCESS)
+ {
+ prep_password = strdup(password);
+ if (!prep_password)
+ {
+ free(state->sasl_mechanism);
+ free(state);
+ return NULL;
+ }
+ }
+ state->password = prep_password;
+
+ return state;
+}
+
+/*
+ * Return true if channel binding was employed and the SCRAM exchange
+ * completed. This should be used after a successful exchange to determine
+ * whether the server authenticated itself to the client.
+ *
+ * Note that the caller must also ensure that the exchange was actually
+ * successful.
+ */
+bool
+pg_fe_scram_channel_bound(void *opaq)
+{
+ fe_scram_state *state = (fe_scram_state *) opaq;
+
+ /* no SCRAM exchange done */
+ if (state == NULL)
+ return false;
+
+ /* SCRAM exchange not completed */
+ if (state->state != FE_SCRAM_FINISHED)
+ return false;
+
+ /* channel binding mechanism not used */
+ if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0)
+ return false;
+
+ /* all clear! */
+ return true;
+}
+
+/*
+ * Free SCRAM exchange status
+ */
+void
+pg_fe_scram_free(void *opaq)
+{
+ fe_scram_state *state = (fe_scram_state *) opaq;
+
+ if (state->password)
+ free(state->password);
+ if (state->sasl_mechanism)
+ free(state->sasl_mechanism);
+
+ /* client messages */
+ if (state->client_nonce)
+ free(state->client_nonce);
+ if (state->client_first_message_bare)
+ free(state->client_first_message_bare);
+ if (state->client_final_message_without_proof)
+ free(state->client_final_message_without_proof);
+
+ /* first message from server */
+ if (state->server_first_message)
+ free(state->server_first_message);
+ if (state->salt)
+ free(state->salt);
+ if (state->nonce)
+ free(state->nonce);
+
+ /* final message from server */
+ if (state->server_final_message)
+ free(state->server_final_message);
+
+ free(state);
+}
+
+/*
+ * Exchange a SCRAM message with backend.
+ */
+void
+pg_fe_scram_exchange(void *opaq, char *input, int inputlen,
+ char **output, int *outputlen,
+ bool *done, bool *success)
+{
+ fe_scram_state *state = (fe_scram_state *) opaq;
+ PGconn *conn = state->conn;
+
+ *done = false;
+ *success = false;
+ *output = NULL;
+ *outputlen = 0;
+
+ /*
+ * Check that the input length agrees with the string length of the input.
+ * We can ignore inputlen after this.
+ */
+ if (state->state != FE_SCRAM_INIT)
+ {
+ if (inputlen == 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (empty message)\n"));
+ goto error;
+ }
+ if (inputlen != strlen(input))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (length mismatch)\n"));
+ goto error;
+ }
+ }
+
+ switch (state->state)
+ {
+ case FE_SCRAM_INIT:
+ /* Begin the SCRAM handshake, by sending client nonce */
+ *output = build_client_first_message(state);
+ if (*output == NULL)
+ goto error;
+
+ *outputlen = strlen(*output);
+ *done = false;
+ state->state = FE_SCRAM_NONCE_SENT;
+ break;
+
+ case FE_SCRAM_NONCE_SENT:
+ /* Receive salt and server nonce, send response. */
+ if (!read_server_first_message(state, input))
+ goto error;
+
+ *output = build_client_final_message(state);
+ if (*output == NULL)
+ goto error;
+
+ *outputlen = strlen(*output);
+ *done = false;
+ state->state = FE_SCRAM_PROOF_SENT;
+ break;
+
+ case FE_SCRAM_PROOF_SENT:
+ /* Receive server signature */
+ if (!read_server_final_message(state, input))
+ goto error;
+
+ /*
+ * Verify server signature, to make sure we're talking to the
+ * genuine server.
+ */
+ if (!verify_server_signature(state, success))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not verify server signature\n"));
+ goto error;
+ }
+
+ if (!*success)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("incorrect server signature\n"));
+ }
+ *done = true;
+ state->state = FE_SCRAM_FINISHED;
+ break;
+
+ default:
+ /* shouldn't happen */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("invalid SCRAM exchange state\n"));
+ goto error;
+ }
+ return;
+
+error:
+ *done = true;
+ *success = false;
+}
+
+/*
+ * Read value for an attribute part of a SCRAM message.
+ *
+ * The buffer at **input is destructively modified, and *input is
+ * advanced over the "attr=value" string and any following comma.
+ *
+ * On failure, append an error message to *errorMessage and return NULL.
+ */
+static char *
+read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
+{
+ char *begin = *input;
+ char *end;
+
+ if (*begin != attr)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("malformed SCRAM message (attribute \"%c\" expected)\n"),
+ attr);
+ return NULL;
+ }
+ begin++;
+
+ if (*begin != '=')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"),
+ attr);
+ return NULL;
+ }
+ begin++;
+
+ end = begin;
+ while (*end && *end != ',')
+ end++;
+
+ if (*end)
+ {
+ *end = '\0';
+ *input = end + 1;
+ }
+ else
+ *input = end;
+
+ return begin;
+}
+
+/*
+ * Build the first exchange message sent by the client.
+ */
+static char *
+build_client_first_message(fe_scram_state *state)
+{
+ PGconn *conn = state->conn;
+ char raw_nonce[SCRAM_RAW_NONCE_LEN + 1];
+ char *result;
+ int channel_info_len;
+ int encoded_len;
+ PQExpBufferData buf;
+
+ /*
+ * Generate a "raw" nonce. This is converted to ASCII-printable form by
+ * base64-encoding it.
+ */
+ if (!pg_strong_random(raw_nonce, SCRAM_RAW_NONCE_LEN))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not generate nonce\n"));
+ return NULL;
+ }
+
+ encoded_len = pg_b64_enc_len(SCRAM_RAW_NONCE_LEN);
+ /* don't forget the zero-terminator */
+ state->client_nonce = malloc(encoded_len + 1);
+ if (state->client_nonce == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ encoded_len = pg_b64_encode(raw_nonce, SCRAM_RAW_NONCE_LEN,
+ state->client_nonce, encoded_len);
+ if (encoded_len < 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not encode nonce\n"));
+ return NULL;
+ }
+ state->client_nonce[encoded_len] = '\0';
+
+ /*
+ * Generate message. The username is left empty as the backend uses the
+ * value provided by the startup packet. Also, as this username is not
+ * prepared with SASLprep, the message parsing would fail if it includes
+ * '=' or ',' characters.
+ */
+
+ initPQExpBuffer(&buf);
+
+ /*
+ * First build the gs2-header with channel binding information.
+ */
+ if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0)
+ {
+ Assert(conn->ssl_in_use);
+ appendPQExpBufferStr(&buf, "p=tls-server-end-point");
+ }
+#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
+ else if (conn->channel_binding[0] != 'd' && /* disable */
+ conn->ssl_in_use)
+ {
+ /*
+ * Client supports channel binding, but thinks the server does not.
+ */
+ appendPQExpBufferChar(&buf, 'y');
+ }
+#endif
+ else
+ {
+ /*
+ * Client does not support channel binding, or has disabled it.
+ */
+ appendPQExpBufferChar(&buf, 'n');
+ }
+
+ if (PQExpBufferDataBroken(buf))
+ goto oom_error;
+
+ channel_info_len = buf.len;
+
+ appendPQExpBuffer(&buf, ",,n=,r=%s", state->client_nonce);
+ if (PQExpBufferDataBroken(buf))
+ goto oom_error;
+
+ /*
+ * The first message content needs to be saved without channel binding
+ * information.
+ */
+ state->client_first_message_bare = strdup(buf.data + channel_info_len + 2);
+ if (!state->client_first_message_bare)
+ goto oom_error;
+
+ result = strdup(buf.data);
+ if (result == NULL)
+ goto oom_error;
+
+ termPQExpBuffer(&buf);
+ return result;
+
+oom_error:
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+}
+
+/*
+ * Build the final exchange message sent from the client.
+ */
+static char *
+build_client_final_message(fe_scram_state *state)
+{
+ PQExpBufferData buf;
+ PGconn *conn = state->conn;
+ uint8 client_proof[SCRAM_KEY_LEN];
+ char *result;
+ int encoded_len;
+
+ initPQExpBuffer(&buf);
+
+ /*
+ * Construct client-final-message-without-proof. We need to remember it
+ * for verifying the server proof in the final step of authentication.
+ *
+ * The channel binding flag handling (p/y/n) must be consistent with
+ * build_client_first_message(), because the server will check that it's
+ * the same flag both times.
+ */
+ if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0)
+ {
+#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
+ char *cbind_data = NULL;
+ size_t cbind_data_len = 0;
+ size_t cbind_header_len;
+ char *cbind_input;
+ size_t cbind_input_len;
+ int encoded_cbind_len;
+
+ /* Fetch hash data of server's SSL certificate */
+ cbind_data =
+ pgtls_get_peer_certificate_hash(state->conn,
+ &cbind_data_len);
+ if (cbind_data == NULL)
+ {
+ /* error message is already set on error */
+ termPQExpBuffer(&buf);
+ return NULL;
+ }
+
+ appendPQExpBufferStr(&buf, "c=");
+
+ /* p=type,, */
+ cbind_header_len = strlen("p=tls-server-end-point,,");
+ cbind_input_len = cbind_header_len + cbind_data_len;
+ cbind_input = malloc(cbind_input_len);
+ if (!cbind_input)
+ {
+ free(cbind_data);
+ goto oom_error;
+ }
+ memcpy(cbind_input, "p=tls-server-end-point,,", cbind_header_len);
+ memcpy(cbind_input + cbind_header_len, cbind_data, cbind_data_len);
+
+ encoded_cbind_len = pg_b64_enc_len(cbind_input_len);
+ if (!enlargePQExpBuffer(&buf, encoded_cbind_len))
+ {
+ free(cbind_data);
+ free(cbind_input);
+ goto oom_error;
+ }
+ encoded_cbind_len = pg_b64_encode(cbind_input, cbind_input_len,
+ buf.data + buf.len,
+ encoded_cbind_len);
+ if (encoded_cbind_len < 0)
+ {
+ free(cbind_data);
+ free(cbind_input);
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ "could not encode cbind data for channel binding\n");
+ return NULL;
+ }
+ buf.len += encoded_cbind_len;
+ buf.data[buf.len] = '\0';
+
+ free(cbind_data);
+ free(cbind_input);
+#else
+ /*
+ * Chose channel binding, but the SSL library doesn't support it.
+ * Shouldn't happen.
+ */
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ "channel binding not supported by this build\n");
+ return NULL;
+#endif /* HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH */
+ }
+#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
+ else if (conn->channel_binding[0] != 'd' && /* disable */
+ conn->ssl_in_use)
+ appendPQExpBufferStr(&buf, "c=eSws"); /* base64 of "y,," */
+#endif
+ else
+ appendPQExpBufferStr(&buf, "c=biws"); /* base64 of "n,," */
+
+ if (PQExpBufferDataBroken(buf))
+ goto oom_error;
+
+ appendPQExpBuffer(&buf, ",r=%s", state->nonce);
+ if (PQExpBufferDataBroken(buf))
+ goto oom_error;
+
+ state->client_final_message_without_proof = strdup(buf.data);
+ if (state->client_final_message_without_proof == NULL)
+ goto oom_error;
+
+ /* Append proof to it, to form client-final-message. */
+ if (!calculate_client_proof(state,
+ state->client_final_message_without_proof,
+ client_proof))
+ {
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not calculate client proof\n"));
+ return NULL;
+ }
+
+ appendPQExpBufferStr(&buf, ",p=");
+ encoded_len = pg_b64_enc_len(SCRAM_KEY_LEN);
+ if (!enlargePQExpBuffer(&buf, encoded_len))
+ goto oom_error;
+ encoded_len = pg_b64_encode((char *) client_proof,
+ SCRAM_KEY_LEN,
+ buf.data + buf.len,
+ encoded_len);
+ if (encoded_len < 0)
+ {
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not encode client proof\n"));
+ return NULL;
+ }
+ buf.len += encoded_len;
+ buf.data[buf.len] = '\0';
+
+ result = strdup(buf.data);
+ if (result == NULL)
+ goto oom_error;
+
+ termPQExpBuffer(&buf);
+ return result;
+
+oom_error:
+ termPQExpBuffer(&buf);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+}
+
+/*
+ * Read the first exchange message coming from the server.
+ */
+static bool
+read_server_first_message(fe_scram_state *state, char *input)
+{
+ PGconn *conn = state->conn;
+ char *iterations_str;
+ char *endptr;
+ char *encoded_salt;
+ char *nonce;
+ int decoded_salt_len;
+
+ state->server_first_message = strdup(input);
+ if (state->server_first_message == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+
+ /* parse the message */
+ nonce = read_attr_value(&input, 'r',
+ &conn->errorMessage);
+ if (nonce == NULL)
+ {
+ /* read_attr_value() has appended an error string */
+ return false;
+ }
+
+ /* Verify immediately that the server used our part of the nonce */
+ if (strlen(nonce) < strlen(state->client_nonce) ||
+ memcmp(nonce, state->client_nonce, strlen(state->client_nonce)) != 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("invalid SCRAM response (nonce mismatch)\n"));
+ return false;
+ }
+
+ state->nonce = strdup(nonce);
+ if (state->nonce == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+
+ encoded_salt = read_attr_value(&input, 's', &conn->errorMessage);
+ if (encoded_salt == NULL)
+ {
+ /* read_attr_value() has appended an error string */
+ return false;
+ }
+ decoded_salt_len = pg_b64_dec_len(strlen(encoded_salt));
+ state->salt = malloc(decoded_salt_len);
+ if (state->salt == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ state->saltlen = pg_b64_decode(encoded_salt,
+ strlen(encoded_salt),
+ state->salt,
+ decoded_salt_len);
+ if (state->saltlen < 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (invalid salt)\n"));
+ return false;
+ }
+
+ iterations_str = read_attr_value(&input, 'i', &conn->errorMessage);
+ if (iterations_str == NULL)
+ {
+ /* read_attr_value() has appended an error string */
+ return false;
+ }
+ state->iterations = strtol(iterations_str, &endptr, 10);
+ if (*endptr != '\0' || state->iterations < 1)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (invalid iteration count)\n"));
+ return false;
+ }
+
+ if (*input != '\0')
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (garbage at end of server-first-message)\n"));
+
+ return true;
+}
+
+/*
+ * Read the final exchange message coming from the server.
+ */
+static bool
+read_server_final_message(fe_scram_state *state, char *input)
+{
+ PGconn *conn = state->conn;
+ char *encoded_server_signature;
+ char *decoded_server_signature;
+ int server_signature_len;
+
+ state->server_final_message = strdup(input);
+ if (!state->server_final_message)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+
+ /* Check for error result. */
+ if (*input == 'e')
+ {
+ char *errmsg = read_attr_value(&input, 'e',
+ &conn->errorMessage);
+
+ if (errmsg == NULL)
+ {
+ /* read_attr_value() has appended an error message */
+ return false;
+ }
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("error received from server in SCRAM exchange: %s\n"),
+ errmsg);
+ return false;
+ }
+
+ /* Parse the message. */
+ encoded_server_signature = read_attr_value(&input, 'v',
+ &conn->errorMessage);
+ if (encoded_server_signature == NULL)
+ {
+ /* read_attr_value() has appended an error message */
+ return false;
+ }
+
+ if (*input != '\0')
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (garbage at end of server-final-message)\n"));
+
+ server_signature_len = pg_b64_dec_len(strlen(encoded_server_signature));
+ decoded_server_signature = malloc(server_signature_len);
+ if (!decoded_server_signature)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+
+ server_signature_len = pg_b64_decode(encoded_server_signature,
+ strlen(encoded_server_signature),
+ decoded_server_signature,
+ server_signature_len);
+ if (server_signature_len != SCRAM_KEY_LEN)
+ {
+ free(decoded_server_signature);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (invalid server signature)\n"));
+ return false;
+ }
+ memcpy(state->ServerSignature, decoded_server_signature, SCRAM_KEY_LEN);
+ free(decoded_server_signature);
+
+ return true;
+}
+
+/*
+ * Calculate the client proof, part of the final exchange message sent
+ * by the client. Returns true on success, false on failure.
+ */
+static bool
+calculate_client_proof(fe_scram_state *state,
+ const char *client_final_message_without_proof,
+ uint8 *result)
+{
+ uint8 StoredKey[SCRAM_KEY_LEN];
+ uint8 ClientKey[SCRAM_KEY_LEN];
+ uint8 ClientSignature[SCRAM_KEY_LEN];
+ int i;
+ pg_hmac_ctx *ctx;
+
+ ctx = pg_hmac_create(PG_SHA256);
+ if (ctx == NULL)
+ return false;
+
+ /*
+ * Calculate SaltedPassword, and store it in 'state' so that we can reuse
+ * it later in verify_server_signature.
+ */
+ if (scram_SaltedPassword(state->password, state->salt, state->saltlen,
+ state->iterations, state->SaltedPassword) < 0 ||
+ scram_ClientKey(state->SaltedPassword, ClientKey) < 0 ||
+ scram_H(ClientKey, SCRAM_KEY_LEN, StoredKey) < 0 ||
+ pg_hmac_init(ctx, StoredKey, SCRAM_KEY_LEN) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) state->client_first_message_bare,
+ strlen(state->client_first_message_bare)) < 0 ||
+ pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) state->server_first_message,
+ strlen(state->server_first_message)) < 0 ||
+ pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) client_final_message_without_proof,
+ strlen(client_final_message_without_proof)) < 0 ||
+ pg_hmac_final(ctx, ClientSignature, sizeof(ClientSignature)) < 0)
+ {
+ pg_hmac_free(ctx);
+ return false;
+ }
+
+ for (i = 0; i < SCRAM_KEY_LEN; i++)
+ result[i] = ClientKey[i] ^ ClientSignature[i];
+
+ pg_hmac_free(ctx);
+ return true;
+}
+
+/*
+ * Validate the server signature, received as part of the final exchange
+ * message received from the server. *match tracks if the server signature
+ * matched or not. Returns true if the server signature got verified, and
+ * false for a processing error.
+ */
+static bool
+verify_server_signature(fe_scram_state *state, bool *match)
+{
+ uint8 expected_ServerSignature[SCRAM_KEY_LEN];
+ uint8 ServerKey[SCRAM_KEY_LEN];
+ pg_hmac_ctx *ctx;
+
+ ctx = pg_hmac_create(PG_SHA256);
+ if (ctx == NULL)
+ return false;
+
+ if (scram_ServerKey(state->SaltedPassword, ServerKey) < 0 ||
+ /* calculate ServerSignature */
+ pg_hmac_init(ctx, ServerKey, SCRAM_KEY_LEN) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) state->client_first_message_bare,
+ strlen(state->client_first_message_bare)) < 0 ||
+ pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) state->server_first_message,
+ strlen(state->server_first_message)) < 0 ||
+ pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
+ pg_hmac_update(ctx,
+ (uint8 *) state->client_final_message_without_proof,
+ strlen(state->client_final_message_without_proof)) < 0 ||
+ pg_hmac_final(ctx, expected_ServerSignature,
+ sizeof(expected_ServerSignature)) < 0)
+ {
+ pg_hmac_free(ctx);
+ return false;
+ }
+
+ pg_hmac_free(ctx);
+
+ /* signature processed, so now check after it */
+ if (memcmp(expected_ServerSignature, state->ServerSignature, SCRAM_KEY_LEN) != 0)
+ *match = false;
+ else
+ *match = true;
+
+ return true;
+}
+
+/*
+ * Build a new SCRAM secret.
+ */
+char *
+pg_fe_scram_build_secret(const char *password)
+{
+ char *prep_password;
+ pg_saslprep_rc rc;
+ char saltbuf[SCRAM_DEFAULT_SALT_LEN];
+ char *result;
+
+ /*
+ * Normalize the password with SASLprep. If that doesn't work, because
+ * the password isn't valid UTF-8 or contains prohibited characters, just
+ * proceed with the original password. (See comments at top of file.)
+ */
+ rc = pg_saslprep(password, &prep_password);
+ if (rc == SASLPREP_OOM)
+ return NULL;
+ if (rc == SASLPREP_SUCCESS)
+ password = (const char *) prep_password;
+
+ /* Generate a random salt */
+ if (!pg_strong_random(saltbuf, SCRAM_DEFAULT_SALT_LEN))
+ {
+ if (prep_password)
+ free(prep_password);
+ return NULL;
+ }
+
+ result = scram_build_secret(saltbuf, SCRAM_DEFAULT_SALT_LEN,
+ SCRAM_DEFAULT_ITERATIONS, password);
+
+ if (prep_password)
+ free(prep_password);
+
+ return result;
+}
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
new file mode 100644
index 0000000..e806264
--- /dev/null
+++ b/src/interfaces/libpq/fe-auth.c
@@ -0,0 +1,1285 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-auth.c
+ * The front-end (client) authorization routines
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-auth.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*
+ * INTERFACE ROUTINES
+ * frontend (client) routines:
+ * pg_fe_sendauth send authentication information
+ * pg_fe_getauthname get user's name according to the client side
+ * of the authentication system
+ */
+
+#include "postgres_fe.h"
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/param.h> /* for MAXHOSTNAMELEN on most */
+#include <sys/socket.h>
+#ifdef HAVE_SYS_UCRED_H
+#include <sys/ucred.h>
+#endif
+#ifndef MAXHOSTNAMELEN
+#include <netdb.h> /* for MAXHOSTNAMELEN on some */
+#endif
+#include <pwd.h>
+#endif
+
+#include "common/md5.h"
+#include "common/scram-common.h"
+#include "fe-auth.h"
+#include "libpq-fe.h"
+
+#ifdef ENABLE_GSS
+/*
+ * GSSAPI authentication system.
+ */
+
+#include "fe-gssapi-common.h"
+
+/*
+ * Continue GSS authentication with next token as needed.
+ */
+static int
+pg_GSS_continue(PGconn *conn, int payloadlen)
+{
+ OM_uint32 maj_stat,
+ min_stat,
+ lmin_s;
+ gss_buffer_desc ginbuf;
+ gss_buffer_desc goutbuf;
+
+ /*
+ * On first call, there's no input token. On subsequent calls, read the
+ * input token into a GSS buffer.
+ */
+ if (conn->gctx != GSS_C_NO_CONTEXT)
+ {
+ ginbuf.length = payloadlen;
+ ginbuf.value = malloc(payloadlen);
+ if (!ginbuf.value)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory allocating GSSAPI buffer (%d)\n"),
+ payloadlen);
+ return STATUS_ERROR;
+ }
+ if (pqGetnchar(ginbuf.value, payloadlen, conn))
+ {
+ /*
+ * Shouldn't happen, because the caller should've ensured that the
+ * whole message is already in the input buffer.
+ */
+ free(ginbuf.value);
+ return STATUS_ERROR;
+ }
+ }
+ else
+ {
+ ginbuf.length = 0;
+ ginbuf.value = NULL;
+ }
+
+ maj_stat = gss_init_sec_context(&min_stat,
+ GSS_C_NO_CREDENTIAL,
+ &conn->gctx,
+ conn->gtarg_nam,
+ GSS_C_NO_OID,
+ GSS_C_MUTUAL_FLAG,
+ 0,
+ GSS_C_NO_CHANNEL_BINDINGS,
+ (ginbuf.value == NULL) ? GSS_C_NO_BUFFER : &ginbuf,
+ NULL,
+ &goutbuf,
+ NULL,
+ NULL);
+
+ if (ginbuf.value)
+ free(ginbuf.value);
+
+ if (goutbuf.length != 0)
+ {
+ /*
+ * GSS generated data to send to the server. We don't care if it's the
+ * first or subsequent packet, just send the same kind of password
+ * packet.
+ */
+ if (pqPacketSend(conn, 'p',
+ goutbuf.value, goutbuf.length) != STATUS_OK)
+ {
+ gss_release_buffer(&lmin_s, &goutbuf);
+ return STATUS_ERROR;
+ }
+ }
+ gss_release_buffer(&lmin_s, &goutbuf);
+
+ if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI continuation error"),
+ conn,
+ maj_stat, min_stat);
+ gss_release_name(&lmin_s, &conn->gtarg_nam);
+ if (conn->gctx)
+ gss_delete_sec_context(&lmin_s, &conn->gctx, GSS_C_NO_BUFFER);
+ return STATUS_ERROR;
+ }
+
+ if (maj_stat == GSS_S_COMPLETE)
+ gss_release_name(&lmin_s, &conn->gtarg_nam);
+
+ return STATUS_OK;
+}
+
+/*
+ * Send initial GSS authentication token
+ */
+static int
+pg_GSS_startup(PGconn *conn, int payloadlen)
+{
+ int ret;
+ char *host = conn->connhost[conn->whichhost].host;
+
+ if (!(host && host[0] != '\0'))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("host name must be specified\n"));
+ return STATUS_ERROR;
+ }
+
+ if (conn->gctx)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("duplicate GSS authentication request\n"));
+ return STATUS_ERROR;
+ }
+
+ ret = pg_GSS_load_servicename(conn);
+ if (ret != STATUS_OK)
+ return ret;
+
+ /*
+ * Initial packet is the same as a continuation packet with no initial
+ * context.
+ */
+ conn->gctx = GSS_C_NO_CONTEXT;
+
+ return pg_GSS_continue(conn, payloadlen);
+}
+#endif /* ENABLE_GSS */
+
+
+#ifdef ENABLE_SSPI
+/*
+ * SSPI authentication system (Windows only)
+ */
+
+static void
+pg_SSPI_error(PGconn *conn, const char *mprefix, SECURITY_STATUS r)
+{
+ char sysmsg[256];
+
+ if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, r, 0,
+ sysmsg, sizeof(sysmsg), NULL) == 0)
+ appendPQExpBuffer(&conn->errorMessage, "%s: SSPI error %x\n",
+ mprefix, (unsigned int) r);
+ else
+ appendPQExpBuffer(&conn->errorMessage, "%s: %s (%x)\n",
+ mprefix, sysmsg, (unsigned int) r);
+}
+
+/*
+ * Continue SSPI authentication with next token as needed.
+ */
+static int
+pg_SSPI_continue(PGconn *conn, int payloadlen)
+{
+ SECURITY_STATUS r;
+ CtxtHandle newContext;
+ ULONG contextAttr;
+ SecBufferDesc inbuf;
+ SecBufferDesc outbuf;
+ SecBuffer OutBuffers[1];
+ SecBuffer InBuffers[1];
+ char *inputbuf = NULL;
+
+ if (conn->sspictx != NULL)
+ {
+ /*
+ * On runs other than the first we have some data to send. Put this
+ * data in a SecBuffer type structure.
+ */
+ inputbuf = malloc(payloadlen);
+ if (!inputbuf)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory allocating SSPI buffer (%d)\n"),
+ payloadlen);
+ return STATUS_ERROR;
+ }
+ if (pqGetnchar(inputbuf, payloadlen, conn))
+ {
+ /*
+ * Shouldn't happen, because the caller should've ensured that the
+ * whole message is already in the input buffer.
+ */
+ free(inputbuf);
+ return STATUS_ERROR;
+ }
+
+ inbuf.ulVersion = SECBUFFER_VERSION;
+ inbuf.cBuffers = 1;
+ inbuf.pBuffers = InBuffers;
+ InBuffers[0].pvBuffer = inputbuf;
+ InBuffers[0].cbBuffer = payloadlen;
+ InBuffers[0].BufferType = SECBUFFER_TOKEN;
+ }
+
+ OutBuffers[0].pvBuffer = NULL;
+ OutBuffers[0].BufferType = SECBUFFER_TOKEN;
+ OutBuffers[0].cbBuffer = 0;
+ outbuf.cBuffers = 1;
+ outbuf.pBuffers = OutBuffers;
+ outbuf.ulVersion = SECBUFFER_VERSION;
+
+ r = InitializeSecurityContext(conn->sspicred,
+ conn->sspictx,
+ conn->sspitarget,
+ ISC_REQ_ALLOCATE_MEMORY,
+ 0,
+ SECURITY_NETWORK_DREP,
+ (conn->sspictx == NULL) ? NULL : &inbuf,
+ 0,
+ &newContext,
+ &outbuf,
+ &contextAttr,
+ NULL);
+
+ /* we don't need the input anymore */
+ if (inputbuf)
+ free(inputbuf);
+
+ if (r != SEC_E_OK && r != SEC_I_CONTINUE_NEEDED)
+ {
+ pg_SSPI_error(conn, libpq_gettext("SSPI continuation error"), r);
+
+ return STATUS_ERROR;
+ }
+
+ if (conn->sspictx == NULL)
+ {
+ /* On first run, transfer retrieved context handle */
+ conn->sspictx = malloc(sizeof(CtxtHandle));
+ if (conn->sspictx == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+ }
+ memcpy(conn->sspictx, &newContext, sizeof(CtxtHandle));
+ }
+
+ /*
+ * If SSPI returned any data to be sent to the server (as it normally
+ * would), send this data as a password packet.
+ */
+ if (outbuf.cBuffers > 0)
+ {
+ if (outbuf.cBuffers != 1)
+ {
+ /*
+ * This should never happen, at least not for Kerberos
+ * authentication. Keep check in case it shows up with other
+ * authentication methods later.
+ */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "SSPI returned invalid number of output buffers\n");
+ return STATUS_ERROR;
+ }
+
+ /*
+ * If the negotiation is complete, there may be zero bytes to send.
+ * The server is at this point not expecting any more data, so don't
+ * send it.
+ */
+ if (outbuf.pBuffers[0].cbBuffer > 0)
+ {
+ if (pqPacketSend(conn, 'p',
+ outbuf.pBuffers[0].pvBuffer, outbuf.pBuffers[0].cbBuffer))
+ {
+ FreeContextBuffer(outbuf.pBuffers[0].pvBuffer);
+ return STATUS_ERROR;
+ }
+ }
+ FreeContextBuffer(outbuf.pBuffers[0].pvBuffer);
+ }
+
+ /* Cleanup is handled by the code in freePGconn() */
+ return STATUS_OK;
+}
+
+/*
+ * Send initial SSPI authentication token.
+ * If use_negotiate is 0, use kerberos authentication package which is
+ * compatible with Unix. If use_negotiate is 1, use the negotiate package
+ * which supports both kerberos and NTLM, but is not compatible with Unix.
+ */
+static int
+pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen)
+{
+ SECURITY_STATUS r;
+ TimeStamp expire;
+ char *host = conn->connhost[conn->whichhost].host;
+
+ if (conn->sspictx)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("duplicate SSPI authentication request\n"));
+ return STATUS_ERROR;
+ }
+
+ /*
+ * Retrieve credentials handle
+ */
+ conn->sspicred = malloc(sizeof(CredHandle));
+ if (conn->sspicred == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+ }
+
+ r = AcquireCredentialsHandle(NULL,
+ use_negotiate ? "negotiate" : "kerberos",
+ SECPKG_CRED_OUTBOUND,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ conn->sspicred,
+ &expire);
+ if (r != SEC_E_OK)
+ {
+ pg_SSPI_error(conn, libpq_gettext("could not acquire SSPI credentials"), r);
+ free(conn->sspicred);
+ conn->sspicred = NULL;
+ return STATUS_ERROR;
+ }
+
+ /*
+ * Compute target principal name. SSPI has a different format from GSSAPI,
+ * but not more complex. We can skip the @REALM part, because Windows will
+ * fill that in for us automatically.
+ */
+ if (!(host && host[0] != '\0'))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("host name must be specified\n"));
+ return STATUS_ERROR;
+ }
+ conn->sspitarget = malloc(strlen(conn->krbsrvname) + strlen(host) + 2);
+ if (!conn->sspitarget)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+ }
+ sprintf(conn->sspitarget, "%s/%s", conn->krbsrvname, host);
+
+ /*
+ * Indicate that we're in SSPI authentication mode to make sure that
+ * pg_SSPI_continue is called next time in the negotiation.
+ */
+ conn->usesspi = 1;
+
+ return pg_SSPI_continue(conn, payloadlen);
+}
+#endif /* ENABLE_SSPI */
+
+/*
+ * Initialize SASL authentication exchange.
+ */
+static int
+pg_SASL_init(PGconn *conn, int payloadlen)
+{
+ char *initialresponse = NULL;
+ int initialresponselen;
+ bool done;
+ bool success;
+ const char *selected_mechanism;
+ PQExpBufferData mechanism_buf;
+ char *password;
+
+ initPQExpBuffer(&mechanism_buf);
+
+ if (conn->channel_binding[0] == 'r' && /* require */
+ !conn->ssl_in_use)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("channel binding required, but SSL not in use\n"));
+ goto error;
+ }
+
+ if (conn->sasl_state)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("duplicate SASL authentication request\n"));
+ goto error;
+ }
+
+ /*
+ * Parse the list of SASL authentication mechanisms in the
+ * AuthenticationSASL message, and select the best mechanism that we
+ * support. SCRAM-SHA-256-PLUS and SCRAM-SHA-256 are the only ones
+ * supported at the moment, listed by order of decreasing importance.
+ */
+ selected_mechanism = NULL;
+ for (;;)
+ {
+ if (pqGets(&mechanism_buf, conn))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ "fe_sendauth: invalid authentication request from server: invalid list of authentication mechanisms\n");
+ goto error;
+ }
+ if (PQExpBufferDataBroken(mechanism_buf))
+ goto oom_error;
+
+ /* An empty string indicates end of list */
+ if (mechanism_buf.data[0] == '\0')
+ break;
+
+ /*
+ * Select the mechanism to use. Pick SCRAM-SHA-256-PLUS over anything
+ * else if a channel binding type is set and if the client supports it
+ * (and did not set channel_binding=disable). Pick SCRAM-SHA-256 if
+ * nothing else has already been picked. If we add more mechanisms, a
+ * more refined priority mechanism might become necessary.
+ */
+ if (strcmp(mechanism_buf.data, SCRAM_SHA_256_PLUS_NAME) == 0)
+ {
+ if (conn->ssl_in_use)
+ {
+ /* The server has offered SCRAM-SHA-256-PLUS. */
+
+#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
+ /*
+ * The client supports channel binding, which is chosen if
+ * channel_binding is not disabled.
+ */
+ if (conn->channel_binding[0] != 'd') /* disable */
+ selected_mechanism = SCRAM_SHA_256_PLUS_NAME;
+#else
+ /*
+ * The client does not support channel binding. If it is
+ * required, complain immediately instead of the error below
+ * which would be confusing as the server is publishing
+ * SCRAM-SHA-256-PLUS.
+ */
+ if (conn->channel_binding[0] == 'r') /* require */
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("channel binding is required, but client does not support it\n"));
+ goto error;
+ }
+#endif
+ }
+ else
+ {
+ /*
+ * The server offered SCRAM-SHA-256-PLUS, but the connection
+ * is not SSL-encrypted. That's not sane. Perhaps SSL was
+ * stripped by a proxy? There's no point in continuing,
+ * because the server will reject the connection anyway if we
+ * try authenticate without channel binding even though both
+ * the client and server supported it. The SCRAM exchange
+ * checks for that, to prevent downgrade attacks.
+ */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"));
+ goto error;
+ }
+ }
+ else if (strcmp(mechanism_buf.data, SCRAM_SHA_256_NAME) == 0 &&
+ !selected_mechanism)
+ selected_mechanism = SCRAM_SHA_256_NAME;
+ }
+
+ if (!selected_mechanism)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("none of the server's SASL authentication mechanisms are supported\n"));
+ goto error;
+ }
+
+ if (conn->channel_binding[0] == 'r' && /* require */
+ strcmp(selected_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("channel binding is required, but server did not offer an authentication method that supports channel binding\n"));
+ goto error;
+ }
+
+ /*
+ * Now that the SASL mechanism has been chosen for the exchange,
+ * initialize its state information.
+ */
+
+ /*
+ * First, select the password to use for the exchange, complaining if
+ * there isn't one. Currently, all supported SASL mechanisms require a
+ * password, so we can just go ahead here without further distinction.
+ */
+ conn->password_needed = true;
+ password = conn->connhost[conn->whichhost].password;
+ if (password == NULL)
+ password = conn->pgpass;
+ if (password == NULL || password[0] == '\0')
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ PQnoPasswordSupplied);
+ goto error;
+ }
+
+ /*
+ * Initialize the SASL state information with all the information gathered
+ * during the initial exchange.
+ *
+ * Note: Only tls-unique is supported for the moment.
+ */
+ conn->sasl_state = pg_fe_scram_init(conn,
+ password,
+ selected_mechanism);
+ if (!conn->sasl_state)
+ goto oom_error;
+
+ /* Get the mechanism-specific Initial Client Response, if any */
+ pg_fe_scram_exchange(conn->sasl_state,
+ NULL, -1,
+ &initialresponse, &initialresponselen,
+ &done, &success);
+
+ if (done && !success)
+ goto error;
+
+ /*
+ * Build a SASLInitialResponse message, and send it.
+ */
+ if (pqPutMsgStart('p', conn))
+ goto error;
+ if (pqPuts(selected_mechanism, conn))
+ goto error;
+ if (initialresponse)
+ {
+ if (pqPutInt(initialresponselen, 4, conn))
+ goto error;
+ if (pqPutnchar(initialresponse, initialresponselen, conn))
+ goto error;
+ }
+ if (pqPutMsgEnd(conn))
+ goto error;
+ if (pqFlush(conn))
+ goto error;
+
+ termPQExpBuffer(&mechanism_buf);
+ if (initialresponse)
+ free(initialresponse);
+
+ return STATUS_OK;
+
+error:
+ termPQExpBuffer(&mechanism_buf);
+ if (initialresponse)
+ free(initialresponse);
+ return STATUS_ERROR;
+
+oom_error:
+ termPQExpBuffer(&mechanism_buf);
+ if (initialresponse)
+ free(initialresponse);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+}
+
+/*
+ * Exchange a message for SASL communication protocol with the backend.
+ * This should be used after calling pg_SASL_init to set up the status of
+ * the protocol.
+ */
+static int
+pg_SASL_continue(PGconn *conn, int payloadlen, bool final)
+{
+ char *output;
+ int outputlen;
+ bool done;
+ bool success;
+ int res;
+ char *challenge;
+
+ /* Read the SASL challenge from the AuthenticationSASLContinue message. */
+ challenge = malloc(payloadlen + 1);
+ if (!challenge)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory allocating SASL buffer (%d)\n"),
+ payloadlen);
+ return STATUS_ERROR;
+ }
+
+ if (pqGetnchar(challenge, payloadlen, conn))
+ {
+ free(challenge);
+ return STATUS_ERROR;
+ }
+ /* For safety and convenience, ensure the buffer is NULL-terminated. */
+ challenge[payloadlen] = '\0';
+
+ pg_fe_scram_exchange(conn->sasl_state,
+ challenge, payloadlen,
+ &output, &outputlen,
+ &done, &success);
+ free(challenge); /* don't need the input anymore */
+
+ if (final && !done)
+ {
+ if (outputlen != 0)
+ free(output);
+
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"));
+ return STATUS_ERROR;
+ }
+ if (outputlen != 0)
+ {
+ /*
+ * Send the SASL response to the server.
+ */
+ res = pqPacketSend(conn, 'p', output, outputlen);
+ free(output);
+
+ if (res != STATUS_OK)
+ return STATUS_ERROR;
+ }
+
+ if (done && !success)
+ return STATUS_ERROR;
+
+ return STATUS_OK;
+}
+
+/*
+ * Respond to AUTH_REQ_SCM_CREDS challenge.
+ *
+ * Note: this is dead code as of Postgres 9.1, because current backends will
+ * never send this challenge. But we must keep it as long as libpq needs to
+ * interoperate with pre-9.1 servers. It is believed to be needed only on
+ * Debian/kFreeBSD (ie, FreeBSD kernel with Linux userland, so that the
+ * getpeereid() function isn't provided by libc).
+ */
+static int
+pg_local_sendauth(PGconn *conn)
+{
+#ifdef HAVE_STRUCT_CMSGCRED
+ char buf;
+ struct iovec iov;
+ struct msghdr msg;
+ struct cmsghdr *cmsg;
+ union
+ {
+ struct cmsghdr hdr;
+ unsigned char buf[CMSG_SPACE(sizeof(struct cmsgcred))];
+ } cmsgbuf;
+
+ /*
+ * The backend doesn't care what we send here, but it wants exactly one
+ * character to force recvmsg() to block and wait for us.
+ */
+ buf = '\0';
+ iov.iov_base = &buf;
+ iov.iov_len = 1;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ /* We must set up a message that will be filled in by kernel */
+ memset(&cmsgbuf, 0, sizeof(cmsgbuf));
+ msg.msg_control = &cmsgbuf.buf;
+ msg.msg_controllen = sizeof(cmsgbuf.buf);
+ cmsg = CMSG_FIRSTHDR(&msg);
+ cmsg->cmsg_len = CMSG_LEN(sizeof(struct cmsgcred));
+ cmsg->cmsg_level = SOL_SOCKET;
+ cmsg->cmsg_type = SCM_CREDS;
+
+ if (sendmsg(conn->sock, &msg, 0) == -1)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ "pg_local_sendauth: sendmsg: %s\n",
+ strerror_r(errno, sebuf, sizeof(sebuf)));
+ return STATUS_ERROR;
+ }
+ return STATUS_OK;
+#else
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SCM_CRED authentication method not supported\n"));
+ return STATUS_ERROR;
+#endif
+}
+
+static int
+pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
+{
+ int ret;
+ char *crypt_pwd = NULL;
+ const char *pwd_to_send;
+ char md5Salt[4];
+
+ /* Read the salt from the AuthenticationMD5Password message. */
+ if (areq == AUTH_REQ_MD5)
+ {
+ if (pqGetnchar(md5Salt, 4, conn))
+ return STATUS_ERROR; /* shouldn't happen */
+ }
+
+ /* Encrypt the password if needed. */
+
+ switch (areq)
+ {
+ case AUTH_REQ_MD5:
+ {
+ char *crypt_pwd2;
+
+ /* Allocate enough space for two MD5 hashes */
+ crypt_pwd = malloc(2 * (MD5_PASSWD_LEN + 1));
+ if (!crypt_pwd)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+ }
+
+ crypt_pwd2 = crypt_pwd + MD5_PASSWD_LEN + 1;
+ if (!pg_md5_encrypt(password, conn->pguser,
+ strlen(conn->pguser), crypt_pwd2))
+ {
+ free(crypt_pwd);
+ return STATUS_ERROR;
+ }
+ if (!pg_md5_encrypt(crypt_pwd2 + strlen("md5"), md5Salt,
+ 4, crypt_pwd))
+ {
+ free(crypt_pwd);
+ return STATUS_ERROR;
+ }
+
+ pwd_to_send = crypt_pwd;
+ break;
+ }
+ case AUTH_REQ_PASSWORD:
+ pwd_to_send = password;
+ break;
+ default:
+ return STATUS_ERROR;
+ }
+ ret = pqPacketSend(conn, 'p', pwd_to_send, strlen(pwd_to_send) + 1);
+ if (crypt_pwd)
+ free(crypt_pwd);
+ return ret;
+}
+
+/*
+ * Verify that the authentication request is expected, given the connection
+ * parameters. This is especially important when the client wishes to
+ * authenticate the server before any sensitive information is exchanged.
+ */
+static bool
+check_expected_areq(AuthRequest areq, PGconn *conn)
+{
+ bool result = true;
+
+ /*
+ * When channel_binding=require, we must protect against two cases: (1) we
+ * must not respond to non-SASL authentication requests, which might leak
+ * information such as the client's password; and (2) even if we receive
+ * AUTH_REQ_OK, we still must ensure that channel binding has happened in
+ * order to authenticate the server.
+ */
+ if (conn->channel_binding[0] == 'r' /* require */ )
+ {
+ switch (areq)
+ {
+ case AUTH_REQ_SASL:
+ case AUTH_REQ_SASL_CONT:
+ case AUTH_REQ_SASL_FIN:
+ break;
+ case AUTH_REQ_OK:
+ if (!pg_fe_scram_channel_bound(conn->sasl_state))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("channel binding required, but server authenticated client without channel binding\n"));
+ result = false;
+ }
+ break;
+ default:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("channel binding required but not supported by server's authentication request\n"));
+ result = false;
+ break;
+ }
+ }
+
+ return result;
+}
+
+/*
+ * pg_fe_sendauth
+ * client demux routine for processing an authentication request
+ *
+ * The server has sent us an authentication challenge (or OK). Send an
+ * appropriate response. The caller has ensured that the whole message is
+ * now in the input buffer, and has already read the type and length of
+ * it. We are responsible for reading any remaining extra data, specific
+ * to the authentication method. 'payloadlen' is the remaining length in
+ * the message.
+ */
+int
+pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn)
+{
+ int oldmsglen;
+
+ if (!check_expected_areq(areq, conn))
+ return STATUS_ERROR;
+
+ switch (areq)
+ {
+ case AUTH_REQ_OK:
+ break;
+
+ case AUTH_REQ_KRB4:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("Kerberos 4 authentication not supported\n"));
+ return STATUS_ERROR;
+
+ case AUTH_REQ_KRB5:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("Kerberos 5 authentication not supported\n"));
+ return STATUS_ERROR;
+
+#if defined(ENABLE_GSS) || defined(ENABLE_SSPI)
+ case AUTH_REQ_GSS:
+#if !defined(ENABLE_SSPI)
+ /* no native SSPI, so use GSSAPI library for it */
+ case AUTH_REQ_SSPI:
+#endif
+ {
+ int r;
+
+ pglock_thread();
+
+ /*
+ * If we have both GSS and SSPI support compiled in, use SSPI
+ * support by default. This is overridable by a connection
+ * string parameter. Note that when using SSPI we still leave
+ * the negotiate parameter off, since we want SSPI to use the
+ * GSSAPI kerberos protocol. For actual SSPI negotiate
+ * protocol, we use AUTH_REQ_SSPI.
+ */
+#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
+ if (conn->gsslib && (pg_strcasecmp(conn->gsslib, "gssapi") == 0))
+ r = pg_GSS_startup(conn, payloadlen);
+ else
+ r = pg_SSPI_startup(conn, 0, payloadlen);
+#elif defined(ENABLE_GSS) && !defined(ENABLE_SSPI)
+ r = pg_GSS_startup(conn, payloadlen);
+#elif !defined(ENABLE_GSS) && defined(ENABLE_SSPI)
+ r = pg_SSPI_startup(conn, 0, payloadlen);
+#endif
+ if (r != STATUS_OK)
+ {
+ /* Error message already filled in. */
+ pgunlock_thread();
+ return STATUS_ERROR;
+ }
+ pgunlock_thread();
+ }
+ break;
+
+ case AUTH_REQ_GSS_CONT:
+ {
+ int r;
+
+ pglock_thread();
+#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
+ if (conn->usesspi)
+ r = pg_SSPI_continue(conn, payloadlen);
+ else
+ r = pg_GSS_continue(conn, payloadlen);
+#elif defined(ENABLE_GSS) && !defined(ENABLE_SSPI)
+ r = pg_GSS_continue(conn, payloadlen);
+#elif !defined(ENABLE_GSS) && defined(ENABLE_SSPI)
+ r = pg_SSPI_continue(conn, payloadlen);
+#endif
+ if (r != STATUS_OK)
+ {
+ /* Error message already filled in. */
+ pgunlock_thread();
+ return STATUS_ERROR;
+ }
+ pgunlock_thread();
+ }
+ break;
+#else /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */
+ /* No GSSAPI *or* SSPI support */
+ case AUTH_REQ_GSS:
+ case AUTH_REQ_GSS_CONT:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("GSSAPI authentication not supported\n"));
+ return STATUS_ERROR;
+#endif /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */
+
+#ifdef ENABLE_SSPI
+ case AUTH_REQ_SSPI:
+
+ /*
+ * SSPI has its own startup message so libpq can decide which
+ * method to use. Indicate to pg_SSPI_startup that we want SSPI
+ * negotiation instead of Kerberos.
+ */
+ pglock_thread();
+ if (pg_SSPI_startup(conn, 1, payloadlen) != STATUS_OK)
+ {
+ /* Error message already filled in. */
+ pgunlock_thread();
+ return STATUS_ERROR;
+ }
+ pgunlock_thread();
+ break;
+#else
+
+ /*
+ * No SSPI support. However, if we have GSSAPI but not SSPI
+ * support, AUTH_REQ_SSPI will have been handled in the codepath
+ * for AUTH_REQ_GSS above, so don't duplicate the case label in
+ * that case.
+ */
+#if !defined(ENABLE_GSS)
+ case AUTH_REQ_SSPI:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSPI authentication not supported\n"));
+ return STATUS_ERROR;
+#endif /* !define(ENABLE_GSS) */
+#endif /* ENABLE_SSPI */
+
+
+ case AUTH_REQ_CRYPT:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("Crypt authentication not supported\n"));
+ return STATUS_ERROR;
+
+ case AUTH_REQ_MD5:
+ case AUTH_REQ_PASSWORD:
+ {
+ char *password;
+
+ conn->password_needed = true;
+ password = conn->connhost[conn->whichhost].password;
+ if (password == NULL)
+ password = conn->pgpass;
+ if (password == NULL || password[0] == '\0')
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ PQnoPasswordSupplied);
+ return STATUS_ERROR;
+ }
+ if (pg_password_sendauth(conn, password, areq) != STATUS_OK)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ "fe_sendauth: error sending password authentication\n");
+ return STATUS_ERROR;
+ }
+ break;
+ }
+
+ case AUTH_REQ_SASL:
+
+ /*
+ * The request contains the name (as assigned by IANA) of the
+ * authentication mechanism.
+ */
+ if (pg_SASL_init(conn, payloadlen) != STATUS_OK)
+ {
+ /* pg_SASL_init already set the error message */
+ return STATUS_ERROR;
+ }
+ break;
+
+ case AUTH_REQ_SASL_CONT:
+ case AUTH_REQ_SASL_FIN:
+ if (conn->sasl_state == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ "fe_sendauth: invalid authentication request from server: AUTH_REQ_SASL_CONT without AUTH_REQ_SASL\n");
+ return STATUS_ERROR;
+ }
+ oldmsglen = conn->errorMessage.len;
+ if (pg_SASL_continue(conn, payloadlen,
+ (areq == AUTH_REQ_SASL_FIN)) != STATUS_OK)
+ {
+ /* Use this message if pg_SASL_continue didn't supply one */
+ if (conn->errorMessage.len == oldmsglen)
+ appendPQExpBufferStr(&conn->errorMessage,
+ "fe_sendauth: error in SASL authentication\n");
+ return STATUS_ERROR;
+ }
+ break;
+
+ case AUTH_REQ_SCM_CREDS:
+ if (pg_local_sendauth(conn) != STATUS_OK)
+ return STATUS_ERROR;
+ break;
+
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("authentication method %u not supported\n"), areq);
+ return STATUS_ERROR;
+ }
+
+ return STATUS_OK;
+}
+
+
+/*
+ * pg_fe_getauthname
+ *
+ * Returns a pointer to malloc'd space containing whatever name the user
+ * has authenticated to the system. If there is an error, return NULL,
+ * and append a suitable error message to *errorMessage if that's not NULL.
+ */
+char *
+pg_fe_getauthname(PQExpBuffer errorMessage)
+{
+ char *result = NULL;
+ const char *name = NULL;
+
+#ifdef WIN32
+ /* Microsoft recommends buffer size of UNLEN+1, where UNLEN = 256 */
+ char username[256 + 1];
+ DWORD namesize = sizeof(username);
+#else
+ uid_t user_id = geteuid();
+ char pwdbuf[BUFSIZ];
+ struct passwd pwdstr;
+ struct passwd *pw = NULL;
+ int pwerr;
+#endif
+
+ /*
+ * Some users are using configure --enable-thread-safety-force, so we
+ * might as well do the locking within our library to protect
+ * pqGetpwuid(). In fact, application developers can use getpwuid() in
+ * their application if they use the locking call we provide, or install
+ * their own locking function using PQregisterThreadLock().
+ */
+ pglock_thread();
+
+#ifdef WIN32
+ if (GetUserName(username, &namesize))
+ name = username;
+ else if (errorMessage)
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("user name lookup failure: error code %lu\n"),
+ GetLastError());
+#else
+ pwerr = pqGetpwuid(user_id, &pwdstr, pwdbuf, sizeof(pwdbuf), &pw);
+ if (pw != NULL)
+ name = pw->pw_name;
+ else if (errorMessage)
+ {
+ if (pwerr != 0)
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("could not look up local user ID %d: %s\n"),
+ (int) user_id,
+ strerror_r(pwerr, pwdbuf, sizeof(pwdbuf)));
+ else
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("local user with ID %d does not exist\n"),
+ (int) user_id);
+ }
+#endif
+
+ if (name)
+ {
+ result = strdup(name);
+ if (result == NULL && errorMessage)
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ }
+
+ pgunlock_thread();
+
+ return result;
+}
+
+
+/*
+ * PQencryptPassword -- exported routine to encrypt a password with MD5
+ *
+ * This function is equivalent to calling PQencryptPasswordConn with
+ * "md5" as the encryption method, except that this doesn't require
+ * a connection object. This function is deprecated, use
+ * PQencryptPasswordConn instead.
+ */
+char *
+PQencryptPassword(const char *passwd, const char *user)
+{
+ char *crypt_pwd;
+
+ crypt_pwd = malloc(MD5_PASSWD_LEN + 1);
+ if (!crypt_pwd)
+ return NULL;
+
+ if (!pg_md5_encrypt(passwd, user, strlen(user), crypt_pwd))
+ {
+ free(crypt_pwd);
+ return NULL;
+ }
+
+ return crypt_pwd;
+}
+
+/*
+ * PQencryptPasswordConn -- exported routine to encrypt a password
+ *
+ * This is intended to be used by client applications that wish to send
+ * commands like ALTER USER joe PASSWORD 'pwd'. The password need not
+ * be sent in cleartext if it is encrypted on the client side. This is
+ * good because it ensures the cleartext password won't end up in logs,
+ * pg_stat displays, etc. We export the function so that clients won't
+ * be dependent on low-level details like whether the encryption is MD5
+ * or something else.
+ *
+ * Arguments are a connection object, the cleartext password, the SQL
+ * name of the user it is for, and a string indicating the algorithm to
+ * use for encrypting the password. If algorithm is NULL, this queries
+ * the server for the current 'password_encryption' value. If you wish
+ * to avoid that, e.g. to avoid blocking, you can execute
+ * 'show password_encryption' yourself before calling this function, and
+ * pass it as the algorithm.
+ *
+ * Return value is a malloc'd string. The client may assume the string
+ * doesn't contain any special characters that would require escaping.
+ * On error, an error message is stored in the connection object, and
+ * returns NULL.
+ */
+char *
+PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user,
+ const char *algorithm)
+{
+#define MAX_ALGORITHM_NAME_LEN 50
+ char algobuf[MAX_ALGORITHM_NAME_LEN + 1];
+ char *crypt_pwd = NULL;
+
+ if (!conn)
+ return NULL;
+
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* If no algorithm was given, ask the server. */
+ if (algorithm == NULL)
+ {
+ PGresult *res;
+ char *val;
+
+ res = PQexec(conn, "show password_encryption");
+ if (res == NULL)
+ {
+ /* PQexec() should've set conn->errorMessage already */
+ return NULL;
+ }
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ /* PQexec() should've set conn->errorMessage already */
+ PQclear(res);
+ return NULL;
+ }
+ if (PQntuples(res) != 1 || PQnfields(res) != 1)
+ {
+ PQclear(res);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("unexpected shape of result set returned for SHOW\n"));
+ return NULL;
+ }
+ val = PQgetvalue(res, 0, 0);
+
+ if (strlen(val) > MAX_ALGORITHM_NAME_LEN)
+ {
+ PQclear(res);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("password_encryption value too long\n"));
+ return NULL;
+ }
+ strcpy(algobuf, val);
+ PQclear(res);
+
+ algorithm = algobuf;
+ }
+
+ /*
+ * Also accept "on" and "off" as aliases for "md5", because
+ * password_encryption was a boolean before PostgreSQL 10. We refuse to
+ * send the password in plaintext even if it was "off".
+ */
+ if (strcmp(algorithm, "on") == 0 ||
+ strcmp(algorithm, "off") == 0)
+ algorithm = "md5";
+
+ /*
+ * Ok, now we know what algorithm to use
+ */
+ if (strcmp(algorithm, "scram-sha-256") == 0)
+ {
+ crypt_pwd = pg_fe_scram_build_secret(passwd);
+ }
+ else if (strcmp(algorithm, "md5") == 0)
+ {
+ crypt_pwd = malloc(MD5_PASSWD_LEN + 1);
+ if (crypt_pwd)
+ {
+ if (!pg_md5_encrypt(passwd, user, strlen(user), crypt_pwd))
+ {
+ free(crypt_pwd);
+ crypt_pwd = NULL;
+ }
+ }
+ }
+ else
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
+ algorithm);
+ return NULL;
+ }
+
+ if (!crypt_pwd)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+
+ return crypt_pwd;
+}
diff --git a/src/interfaces/libpq/fe-auth.h b/src/interfaces/libpq/fe-auth.h
new file mode 100644
index 0000000..7877dcb
--- /dev/null
+++ b/src/interfaces/libpq/fe-auth.h
@@ -0,0 +1,36 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-auth.h
+ *
+ * Definitions for network authentication routines
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/fe-auth.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef FE_AUTH_H
+#define FE_AUTH_H
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+
+
+/* Prototypes for functions in fe-auth.c */
+extern int pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn);
+extern char *pg_fe_getauthname(PQExpBuffer errorMessage);
+
+/* Prototypes for functions in fe-auth-scram.c */
+extern void *pg_fe_scram_init(PGconn *conn,
+ const char *password,
+ const char *sasl_mechanism);
+extern bool pg_fe_scram_channel_bound(void *opaq);
+extern void pg_fe_scram_free(void *opaq);
+extern void pg_fe_scram_exchange(void *opaq, char *input, int inputlen,
+ char **output, int *outputlen,
+ bool *done, bool *success);
+extern char *pg_fe_scram_build_secret(const char *password);
+
+#endif /* FE_AUTH_H */
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
new file mode 100644
index 0000000..709ba15
--- /dev/null
+++ b/src/interfaces/libpq/fe-connect.c
@@ -0,0 +1,7367 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-connect.c
+ * functions related to setting up a connection to the backend
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-connect.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "common/ip.h"
+#include "common/link-canary.h"
+#include "common/scram-common.h"
+#include "common/string.h"
+#include "fe-auth.h"
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "mb/pg_wchar.h"
+#include "pg_config_paths.h"
+#include "port/pg_bswap.h"
+
+#ifdef WIN32
+#include "win32.h"
+#ifdef _WIN32_IE
+#undef _WIN32_IE
+#endif
+#define _WIN32_IE 0x0500
+#ifdef near
+#undef near
+#endif
+#define near
+#include <shlobj.h>
+#ifdef _MSC_VER /* mstcpip.h is missing on mingw */
+#include <mstcpip.h>
+#endif
+#else
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+#endif
+
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#include "pthread-win32.h"
+#else
+#include <pthread.h>
+#endif
+#endif
+
+#ifdef USE_LDAP
+#ifdef WIN32
+#include <winldap.h>
+#else
+/* OpenLDAP deprecates RFC 1823, but we want standard conformance */
+#define LDAP_DEPRECATED 1
+#include <ldap.h>
+typedef struct timeval LDAP_TIMEVAL;
+#endif
+static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
+ PQExpBuffer errorMessage);
+#endif
+
+#ifndef WIN32
+#define PGPASSFILE ".pgpass"
+#else
+#define PGPASSFILE "pgpass.conf"
+#endif
+
+/*
+ * Pre-9.0 servers will return this SQLSTATE if asked to set
+ * application_name in a startup packet. We hard-wire the value rather
+ * than looking into errcodes.h since it reflects historical behavior
+ * rather than that of the current code.
+ */
+#define ERRCODE_APPNAME_UNKNOWN "42704"
+
+/* This is part of the protocol so just define it */
+#define ERRCODE_INVALID_PASSWORD "28P01"
+/* This too */
+#define ERRCODE_CANNOT_CONNECT_NOW "57P03"
+
+/*
+ * Cope with the various platform-specific ways to spell TCP keepalive socket
+ * options. This doesn't cover Windows, which as usual does its own thing.
+ */
+#if defined(TCP_KEEPIDLE)
+/* TCP_KEEPIDLE is the name of this option on Linux and *BSD */
+#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPIDLE
+#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPIDLE"
+#elif defined(TCP_KEEPALIVE_THRESHOLD)
+/* TCP_KEEPALIVE_THRESHOLD is the name of this option on Solaris >= 11 */
+#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPALIVE_THRESHOLD
+#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPALIVE_THRESHOLD"
+#elif defined(TCP_KEEPALIVE) && defined(__darwin__)
+/* TCP_KEEPALIVE is the name of this option on macOS */
+/* Caution: Solaris has this symbol but it means something different */
+#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPALIVE
+#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPALIVE"
+#endif
+
+/*
+ * fall back options if they are not specified by arguments or defined
+ * by environment variables
+ */
+#define DefaultHost "localhost"
+#define DefaultOption ""
+#ifdef USE_SSL
+#define DefaultChannelBinding "prefer"
+#else
+#define DefaultChannelBinding "disable"
+#endif
+#define DefaultTargetSessionAttrs "any"
+#ifdef USE_SSL
+#define DefaultSSLMode "prefer"
+#else
+#define DefaultSSLMode "disable"
+#endif
+#ifdef ENABLE_GSS
+#include "fe-gssapi-common.h"
+#define DefaultGSSMode "prefer"
+#else
+#define DefaultGSSMode "disable"
+#endif
+
+/* ----------
+ * Definition of the conninfo parameters and their fallback resources.
+ *
+ * If Environment-Var and Compiled-in are specified as NULL, no
+ * fallback is available. If after all no value can be determined
+ * for an option, an error is returned.
+ *
+ * The value for the username is treated specially in conninfo_add_defaults.
+ * If the value is not obtained any other way, the username is determined
+ * by pg_fe_getauthname().
+ *
+ * The Label and Disp-Char entries are provided for applications that
+ * want to use PQconndefaults() to create a generic database connection
+ * dialog. Disp-Char is defined as follows:
+ * "" Normal input field
+ * "*" Password field - hide value
+ * "D" Debug option - don't show by default
+ *
+ * PQconninfoOptions[] is a constant static array that we use to initialize
+ * a dynamically allocated working copy. All the "val" fields in
+ * PQconninfoOptions[] *must* be NULL. In a working copy, non-null "val"
+ * fields point to malloc'd strings that should be freed when the working
+ * array is freed (see PQconninfoFree).
+ *
+ * The first part of each struct is identical to the one in libpq-fe.h,
+ * which is required since we memcpy() data between the two!
+ * ----------
+ */
+typedef struct _internalPQconninfoOption
+{
+ char *keyword; /* The keyword of the option */
+ char *envvar; /* Fallback environment variable name */
+ char *compiled; /* Fallback compiled in default value */
+ char *val; /* Option's current value, or NULL */
+ char *label; /* Label for field in connect dialog */
+ char *dispchar; /* Indicates how to display this field in a
+ * connect dialog. Values are: "" Display
+ * entered value as is "*" Password field -
+ * hide value "D" Debug option - don't show
+ * by default */
+ int dispsize; /* Field size in characters for dialog */
+ /* ---
+ * Anything above this comment must be synchronized with
+ * PQconninfoOption in libpq-fe.h, since we memcpy() data
+ * between them!
+ * ---
+ */
+ off_t connofs; /* Offset into PGconn struct, -1 if not there */
+} internalPQconninfoOption;
+
+static const internalPQconninfoOption PQconninfoOptions[] = {
+ {"service", "PGSERVICE", NULL, NULL,
+ "Database-Service", "", 20, -1},
+
+ {"user", "PGUSER", NULL, NULL,
+ "Database-User", "", 20,
+ offsetof(struct pg_conn, pguser)},
+
+ {"password", "PGPASSWORD", NULL, NULL,
+ "Database-Password", "*", 20,
+ offsetof(struct pg_conn, pgpass)},
+
+ {"passfile", "PGPASSFILE", NULL, NULL,
+ "Database-Password-File", "", 64,
+ offsetof(struct pg_conn, pgpassfile)},
+
+ {"channel_binding", "PGCHANNELBINDING", DefaultChannelBinding, NULL,
+ "Channel-Binding", "", 8, /* sizeof("require") == 8 */
+ offsetof(struct pg_conn, channel_binding)},
+
+ {"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
+ "Connect-timeout", "", 10, /* strlen(INT32_MAX) == 10 */
+ offsetof(struct pg_conn, connect_timeout)},
+
+ {"dbname", "PGDATABASE", NULL, NULL,
+ "Database-Name", "", 20,
+ offsetof(struct pg_conn, dbName)},
+
+ {"host", "PGHOST", NULL, NULL,
+ "Database-Host", "", 40,
+ offsetof(struct pg_conn, pghost)},
+
+ {"hostaddr", "PGHOSTADDR", NULL, NULL,
+ "Database-Host-IP-Address", "", 45,
+ offsetof(struct pg_conn, pghostaddr)},
+
+ {"port", "PGPORT", DEF_PGPORT_STR, NULL,
+ "Database-Port", "", 6,
+ offsetof(struct pg_conn, pgport)},
+
+ {"client_encoding", "PGCLIENTENCODING", NULL, NULL,
+ "Client-Encoding", "", 10,
+ offsetof(struct pg_conn, client_encoding_initial)},
+
+ {"options", "PGOPTIONS", DefaultOption, NULL,
+ "Backend-Options", "", 40,
+ offsetof(struct pg_conn, pgoptions)},
+
+ {"application_name", "PGAPPNAME", NULL, NULL,
+ "Application-Name", "", 64,
+ offsetof(struct pg_conn, appname)},
+
+ {"fallback_application_name", NULL, NULL, NULL,
+ "Fallback-Application-Name", "", 64,
+ offsetof(struct pg_conn, fbappname)},
+
+ {"keepalives", NULL, NULL, NULL,
+ "TCP-Keepalives", "", 1, /* should be just '0' or '1' */
+ offsetof(struct pg_conn, keepalives)},
+
+ {"keepalives_idle", NULL, NULL, NULL,
+ "TCP-Keepalives-Idle", "", 10, /* strlen(INT32_MAX) == 10 */
+ offsetof(struct pg_conn, keepalives_idle)},
+
+ {"keepalives_interval", NULL, NULL, NULL,
+ "TCP-Keepalives-Interval", "", 10, /* strlen(INT32_MAX) == 10 */
+ offsetof(struct pg_conn, keepalives_interval)},
+
+ {"keepalives_count", NULL, NULL, NULL,
+ "TCP-Keepalives-Count", "", 10, /* strlen(INT32_MAX) == 10 */
+ offsetof(struct pg_conn, keepalives_count)},
+
+ {"tcp_user_timeout", NULL, NULL, NULL,
+ "TCP-User-Timeout", "", 10, /* strlen(INT32_MAX) == 10 */
+ offsetof(struct pg_conn, pgtcp_user_timeout)},
+
+ /*
+ * ssl options are allowed even without client SSL support because the
+ * client can still handle SSL modes "disable" and "allow". Other
+ * parameters have no effect on non-SSL connections, so there is no reason
+ * to exclude them since none of them are mandatory.
+ */
+ {"sslmode", "PGSSLMODE", DefaultSSLMode, NULL,
+ "SSL-Mode", "", 12, /* sizeof("verify-full") == 12 */
+ offsetof(struct pg_conn, sslmode)},
+
+ {"sslcompression", "PGSSLCOMPRESSION", "0", NULL,
+ "SSL-Compression", "", 1,
+ offsetof(struct pg_conn, sslcompression)},
+
+ {"sslcert", "PGSSLCERT", NULL, NULL,
+ "SSL-Client-Cert", "", 64,
+ offsetof(struct pg_conn, sslcert)},
+
+ {"sslkey", "PGSSLKEY", NULL, NULL,
+ "SSL-Client-Key", "", 64,
+ offsetof(struct pg_conn, sslkey)},
+
+ {"sslpassword", NULL, NULL, NULL,
+ "SSL-Client-Key-Password", "*", 20,
+ offsetof(struct pg_conn, sslpassword)},
+
+ {"sslrootcert", "PGSSLROOTCERT", NULL, NULL,
+ "SSL-Root-Certificate", "", 64,
+ offsetof(struct pg_conn, sslrootcert)},
+
+ {"sslcrl", "PGSSLCRL", NULL, NULL,
+ "SSL-Revocation-List", "", 64,
+ offsetof(struct pg_conn, sslcrl)},
+
+ {"sslcrldir", "PGSSLCRLDIR", NULL, NULL,
+ "SSL-Revocation-List-Dir", "", 64,
+ offsetof(struct pg_conn, sslcrldir)},
+
+ {"sslsni", "PGSSLSNI", "1", NULL,
+ "SSL-SNI", "", 1,
+ offsetof(struct pg_conn, sslsni)},
+
+ {"requirepeer", "PGREQUIREPEER", NULL, NULL,
+ "Require-Peer", "", 10,
+ offsetof(struct pg_conn, requirepeer)},
+
+ {"ssl_min_protocol_version", "PGSSLMINPROTOCOLVERSION", "TLSv1.2", NULL,
+ "SSL-Minimum-Protocol-Version", "", 8, /* sizeof("TLSv1.x") == 8 */
+ offsetof(struct pg_conn, ssl_min_protocol_version)},
+
+ {"ssl_max_protocol_version", "PGSSLMAXPROTOCOLVERSION", NULL, NULL,
+ "SSL-Maximum-Protocol-Version", "", 8, /* sizeof("TLSv1.x") == 8 */
+ offsetof(struct pg_conn, ssl_max_protocol_version)},
+
+ /*
+ * As with SSL, all GSS options are exposed even in builds that don't have
+ * support.
+ */
+ {"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
+ "GSSENC-Mode", "", 8, /* sizeof("disable") == 8 */
+ offsetof(struct pg_conn, gssencmode)},
+
+ /* Kerberos and GSSAPI authentication support specifying the service name */
+ {"krbsrvname", "PGKRBSRVNAME", PG_KRB_SRVNAM, NULL,
+ "Kerberos-service-name", "", 20,
+ offsetof(struct pg_conn, krbsrvname)},
+
+ {"gsslib", "PGGSSLIB", NULL, NULL,
+ "GSS-library", "", 7, /* sizeof("gssapi") == 7 */
+ offsetof(struct pg_conn, gsslib)},
+
+ {"replication", NULL, NULL, NULL,
+ "Replication", "D", 5,
+ offsetof(struct pg_conn, replication)},
+
+ {"target_session_attrs", "PGTARGETSESSIONATTRS",
+ DefaultTargetSessionAttrs, NULL,
+ "Target-Session-Attrs", "", 15, /* sizeof("prefer-standby") = 15 */
+ offsetof(struct pg_conn, target_session_attrs)},
+
+ /* Terminating entry --- MUST BE LAST */
+ {NULL, NULL, NULL, NULL,
+ NULL, NULL, 0}
+};
+
+static const PQEnvironmentOption EnvironmentOptions[] =
+{
+ /* common user-interface settings */
+ {
+ "PGDATESTYLE", "datestyle"
+ },
+ {
+ "PGTZ", "timezone"
+ },
+ /* internal performance-related settings */
+ {
+ "PGGEQO", "geqo"
+ },
+ {
+ NULL, NULL
+ }
+};
+
+/* The connection URI must start with either of the following designators: */
+static const char uri_designator[] = "postgresql://";
+static const char short_uri_designator[] = "postgres://";
+
+static bool connectOptions1(PGconn *conn, const char *conninfo);
+static bool connectOptions2(PGconn *conn);
+static int connectDBStart(PGconn *conn);
+static int connectDBComplete(PGconn *conn);
+static PGPing internal_ping(PGconn *conn);
+static PGconn *makeEmptyPGconn(void);
+static bool fillPGconn(PGconn *conn, PQconninfoOption *connOptions);
+static void freePGconn(PGconn *conn);
+static void closePGconn(PGconn *conn);
+static void release_conn_addrinfo(PGconn *conn);
+static void sendTerminateConn(PGconn *conn);
+static PQconninfoOption *conninfo_init(PQExpBuffer errorMessage);
+static PQconninfoOption *parse_connection_string(const char *conninfo,
+ PQExpBuffer errorMessage, bool use_defaults);
+static int uri_prefix_length(const char *connstr);
+static bool recognized_connection_string(const char *connstr);
+static PQconninfoOption *conninfo_parse(const char *conninfo,
+ PQExpBuffer errorMessage, bool use_defaults);
+static PQconninfoOption *conninfo_array_parse(const char *const *keywords,
+ const char *const *values, PQExpBuffer errorMessage,
+ bool use_defaults, int expand_dbname);
+static bool conninfo_add_defaults(PQconninfoOption *options,
+ PQExpBuffer errorMessage);
+static PQconninfoOption *conninfo_uri_parse(const char *uri,
+ PQExpBuffer errorMessage, bool use_defaults);
+static bool conninfo_uri_parse_options(PQconninfoOption *options,
+ const char *uri, PQExpBuffer errorMessage);
+static bool conninfo_uri_parse_params(char *params,
+ PQconninfoOption *connOptions,
+ PQExpBuffer errorMessage);
+static char *conninfo_uri_decode(const char *str, PQExpBuffer errorMessage);
+static bool get_hexdigit(char digit, int *value);
+static const char *conninfo_getval(PQconninfoOption *connOptions,
+ const char *keyword);
+static PQconninfoOption *conninfo_storeval(PQconninfoOption *connOptions,
+ const char *keyword, const char *value,
+ PQExpBuffer errorMessage, bool ignoreMissing, bool uri_decode);
+static PQconninfoOption *conninfo_find(PQconninfoOption *connOptions,
+ const char *keyword);
+static void defaultNoticeReceiver(void *arg, const PGresult *res);
+static void defaultNoticeProcessor(void *arg, const char *message);
+static int parseServiceInfo(PQconninfoOption *options,
+ PQExpBuffer errorMessage);
+static int parseServiceFile(const char *serviceFile,
+ const char *service,
+ PQconninfoOption *options,
+ PQExpBuffer errorMessage,
+ bool *group_found);
+static char *pwdfMatchesString(char *buf, const char *token);
+static char *passwordFromFile(const char *hostname, const char *port, const char *dbname,
+ const char *username, const char *pgpassfile);
+static void pgpassfileWarning(PGconn *conn);
+static void default_threadlock(int acquire);
+static bool sslVerifyProtocolVersion(const char *version);
+static bool sslVerifyProtocolRange(const char *min, const char *max);
+
+
+/* global variable because fe-auth.c needs to access it */
+pgthreadlock_t pg_g_threadlock = default_threadlock;
+
+
+/*
+ * pqDropConnection
+ *
+ * Close any physical connection to the server, and reset associated
+ * state inside the connection object. We don't release state that
+ * would be needed to reconnect, though, nor local state that might still
+ * be useful later.
+ *
+ * We can always flush the output buffer, since there's no longer any hope
+ * of sending that data. However, unprocessed input data might still be
+ * valuable, so the caller must tell us whether to flush that or not.
+ */
+void
+pqDropConnection(PGconn *conn, bool flushInput)
+{
+ /* Drop any SSL state */
+ pqsecure_close(conn);
+
+ /* Close the socket itself */
+ if (conn->sock != PGINVALID_SOCKET)
+ closesocket(conn->sock);
+ conn->sock = PGINVALID_SOCKET;
+
+ /* Optionally discard any unread data */
+ if (flushInput)
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+
+ /* Always discard any unsent data */
+ conn->outCount = 0;
+
+ /* Free authentication/encryption state */
+#ifdef ENABLE_GSS
+ {
+ OM_uint32 min_s;
+
+ if (conn->gcred != GSS_C_NO_CREDENTIAL)
+ {
+ gss_release_cred(&min_s, &conn->gcred);
+ conn->gcred = GSS_C_NO_CREDENTIAL;
+ }
+ if (conn->gctx)
+ gss_delete_sec_context(&min_s, &conn->gctx, GSS_C_NO_BUFFER);
+ if (conn->gtarg_nam)
+ gss_release_name(&min_s, &conn->gtarg_nam);
+ if (conn->gss_SendBuffer)
+ {
+ free(conn->gss_SendBuffer);
+ conn->gss_SendBuffer = NULL;
+ }
+ if (conn->gss_RecvBuffer)
+ {
+ free(conn->gss_RecvBuffer);
+ conn->gss_RecvBuffer = NULL;
+ }
+ if (conn->gss_ResultBuffer)
+ {
+ free(conn->gss_ResultBuffer);
+ conn->gss_ResultBuffer = NULL;
+ }
+ conn->gssenc = false;
+ }
+#endif
+#ifdef ENABLE_SSPI
+ if (conn->sspitarget)
+ {
+ free(conn->sspitarget);
+ conn->sspitarget = NULL;
+ }
+ if (conn->sspicred)
+ {
+ FreeCredentialsHandle(conn->sspicred);
+ free(conn->sspicred);
+ conn->sspicred = NULL;
+ }
+ if (conn->sspictx)
+ {
+ DeleteSecurityContext(conn->sspictx);
+ free(conn->sspictx);
+ conn->sspictx = NULL;
+ }
+ conn->usesspi = 0;
+#endif
+ if (conn->sasl_state)
+ {
+ /*
+ * XXX: if support for more authentication mechanisms is added, this
+ * needs to call the right 'free' function.
+ */
+ pg_fe_scram_free(conn->sasl_state);
+ conn->sasl_state = NULL;
+ }
+}
+
+/*
+ * pqFreeCommandQueue
+ * Free all the entries of PGcmdQueueEntry queue passed.
+ */
+static void
+pqFreeCommandQueue(PGcmdQueueEntry *queue)
+{
+ while (queue != NULL)
+ {
+ PGcmdQueueEntry *cur = queue;
+
+ queue = cur->next;
+ if (cur->query)
+ free(cur->query);
+ free(cur);
+ }
+}
+
+/*
+ * pqDropServerData
+ *
+ * Clear all connection state data that was received from (or deduced about)
+ * the server. This is essential to do between connection attempts to
+ * different servers, else we may incorrectly hold over some data from the
+ * old server.
+ *
+ * It would be better to merge this into pqDropConnection, perhaps, but
+ * right now we cannot because that function is called immediately on
+ * detection of connection loss (cf. pqReadData, for instance). This data
+ * should be kept until we are actually starting a new connection.
+ */
+static void
+pqDropServerData(PGconn *conn)
+{
+ PGnotify *notify;
+ pgParameterStatus *pstatus;
+
+ /* Forget pending notifies */
+ notify = conn->notifyHead;
+ while (notify != NULL)
+ {
+ PGnotify *prev = notify;
+
+ notify = notify->next;
+ free(prev);
+ }
+ conn->notifyHead = conn->notifyTail = NULL;
+
+ pqFreeCommandQueue(conn->cmd_queue_head);
+ conn->cmd_queue_head = conn->cmd_queue_tail = NULL;
+
+ pqFreeCommandQueue(conn->cmd_queue_recycle);
+ conn->cmd_queue_recycle = NULL;
+
+ /* Reset ParameterStatus data, as well as variables deduced from it */
+ pstatus = conn->pstatus;
+ while (pstatus != NULL)
+ {
+ pgParameterStatus *prev = pstatus;
+
+ pstatus = pstatus->next;
+ free(prev);
+ }
+ conn->pstatus = NULL;
+ conn->client_encoding = PG_SQL_ASCII;
+ conn->std_strings = false;
+ conn->default_transaction_read_only = PG_BOOL_UNKNOWN;
+ conn->in_hot_standby = PG_BOOL_UNKNOWN;
+ conn->sversion = 0;
+
+ /* Drop large-object lookup data */
+ if (conn->lobjfuncs)
+ free(conn->lobjfuncs);
+ conn->lobjfuncs = NULL;
+
+ /* Reset assorted other per-connection state */
+ conn->last_sqlstate[0] = '\0';
+ conn->auth_req_received = false;
+ conn->password_needed = false;
+ conn->write_failed = false;
+ if (conn->write_err_msg)
+ free(conn->write_err_msg);
+ conn->write_err_msg = NULL;
+ conn->be_pid = 0;
+ conn->be_key = 0;
+}
+
+
+/*
+ * Connecting to a Database
+ *
+ * There are now six different ways a user of this API can connect to the
+ * database. Two are not recommended for use in new code, because of their
+ * lack of extensibility with respect to the passing of options to the
+ * backend. These are PQsetdb and PQsetdbLogin (the former now being a macro
+ * to the latter).
+ *
+ * If it is desired to connect in a synchronous (blocking) manner, use the
+ * function PQconnectdb or PQconnectdbParams. The former accepts a string of
+ * option = value pairs (or a URI) which must be parsed; the latter takes two
+ * NULL terminated arrays instead.
+ *
+ * To connect in an asynchronous (non-blocking) manner, use the functions
+ * PQconnectStart or PQconnectStartParams (which differ in the same way as
+ * PQconnectdb and PQconnectdbParams) and PQconnectPoll.
+ *
+ * Internally, the static functions connectDBStart, connectDBComplete
+ * are part of the connection procedure.
+ */
+
+/*
+ * PQconnectdbParams
+ *
+ * establishes a connection to a postgres backend through the postmaster
+ * using connection information in two arrays.
+ *
+ * The keywords array is defined as
+ *
+ * const char *params[] = {"option1", "option2", NULL}
+ *
+ * The values array is defined as
+ *
+ * const char *values[] = {"value1", "value2", NULL}
+ *
+ * Returns a PGconn* which is needed for all subsequent libpq calls, or NULL
+ * if a memory allocation failed.
+ * If the status field of the connection returned is CONNECTION_BAD,
+ * then some fields may be null'ed out instead of having valid values.
+ *
+ * You should call PQfinish (if conn is not NULL) regardless of whether this
+ * call succeeded.
+ */
+PGconn *
+PQconnectdbParams(const char *const *keywords,
+ const char *const *values,
+ int expand_dbname)
+{
+ PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
+
+ if (conn && conn->status != CONNECTION_BAD)
+ (void) connectDBComplete(conn);
+
+ return conn;
+
+}
+
+/*
+ * PQpingParams
+ *
+ * check server status, accepting parameters identical to PQconnectdbParams
+ */
+PGPing
+PQpingParams(const char *const *keywords,
+ const char *const *values,
+ int expand_dbname)
+{
+ PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
+ PGPing ret;
+
+ ret = internal_ping(conn);
+ PQfinish(conn);
+
+ return ret;
+}
+
+/*
+ * PQconnectdb
+ *
+ * establishes a connection to a postgres backend through the postmaster
+ * using connection information in a string.
+ *
+ * The conninfo string is either a whitespace-separated list of
+ *
+ * option = value
+ *
+ * definitions or a URI (refer to the documentation for details.) Value
+ * might be a single value containing no whitespaces or a single quoted
+ * string. If a single quote should appear anywhere in the value, it must be
+ * escaped with a backslash like \'
+ *
+ * Returns a PGconn* which is needed for all subsequent libpq calls, or NULL
+ * if a memory allocation failed.
+ * If the status field of the connection returned is CONNECTION_BAD,
+ * then some fields may be null'ed out instead of having valid values.
+ *
+ * You should call PQfinish (if conn is not NULL) regardless of whether this
+ * call succeeded.
+ */
+PGconn *
+PQconnectdb(const char *conninfo)
+{
+ PGconn *conn = PQconnectStart(conninfo);
+
+ if (conn && conn->status != CONNECTION_BAD)
+ (void) connectDBComplete(conn);
+
+ return conn;
+}
+
+/*
+ * PQping
+ *
+ * check server status, accepting parameters identical to PQconnectdb
+ */
+PGPing
+PQping(const char *conninfo)
+{
+ PGconn *conn = PQconnectStart(conninfo);
+ PGPing ret;
+
+ ret = internal_ping(conn);
+ PQfinish(conn);
+
+ return ret;
+}
+
+/*
+ * PQconnectStartParams
+ *
+ * Begins the establishment of a connection to a postgres backend through the
+ * postmaster using connection information in a struct.
+ *
+ * See comment for PQconnectdbParams for the definition of the string format.
+ *
+ * Returns a PGconn*. If NULL is returned, a malloc error has occurred, and
+ * you should not attempt to proceed with this connection. If the status
+ * field of the connection returned is CONNECTION_BAD, an error has
+ * occurred. In this case you should call PQfinish on the result, (perhaps
+ * inspecting the error message first). Other fields of the structure may not
+ * be valid if that occurs. If the status field is not CONNECTION_BAD, then
+ * this stage has succeeded - call PQconnectPoll, using select(2) to see when
+ * this is necessary.
+ *
+ * See PQconnectPoll for more info.
+ */
+PGconn *
+PQconnectStartParams(const char *const *keywords,
+ const char *const *values,
+ int expand_dbname)
+{
+ PGconn *conn;
+ PQconninfoOption *connOptions;
+
+ /*
+ * Allocate memory for the conn structure. Note that we also expect this
+ * to initialize conn->errorMessage to empty. All subsequent steps during
+ * connection initialization will only append to that buffer.
+ */
+ conn = makeEmptyPGconn();
+ if (conn == NULL)
+ return NULL;
+
+ /*
+ * Parse the conninfo arrays
+ */
+ connOptions = conninfo_array_parse(keywords, values,
+ &conn->errorMessage,
+ true, expand_dbname);
+ if (connOptions == NULL)
+ {
+ conn->status = CONNECTION_BAD;
+ /* errorMessage is already set */
+ return conn;
+ }
+
+ /*
+ * Move option values into conn structure
+ */
+ if (!fillPGconn(conn, connOptions))
+ {
+ PQconninfoFree(connOptions);
+ return conn;
+ }
+
+ /*
+ * Free the option info - all is in conn now
+ */
+ PQconninfoFree(connOptions);
+
+ /*
+ * Compute derived options
+ */
+ if (!connectOptions2(conn))
+ return conn;
+
+ /*
+ * Connect to the database
+ */
+ if (!connectDBStart(conn))
+ {
+ /* Just in case we failed to set it in connectDBStart */
+ conn->status = CONNECTION_BAD;
+ }
+
+ return conn;
+}
+
+/*
+ * PQconnectStart
+ *
+ * Begins the establishment of a connection to a postgres backend through the
+ * postmaster using connection information in a string.
+ *
+ * See comment for PQconnectdb for the definition of the string format.
+ *
+ * Returns a PGconn*. If NULL is returned, a malloc error has occurred, and
+ * you should not attempt to proceed with this connection. If the status
+ * field of the connection returned is CONNECTION_BAD, an error has
+ * occurred. In this case you should call PQfinish on the result, (perhaps
+ * inspecting the error message first). Other fields of the structure may not
+ * be valid if that occurs. If the status field is not CONNECTION_BAD, then
+ * this stage has succeeded - call PQconnectPoll, using select(2) to see when
+ * this is necessary.
+ *
+ * See PQconnectPoll for more info.
+ */
+PGconn *
+PQconnectStart(const char *conninfo)
+{
+ PGconn *conn;
+
+ /*
+ * Allocate memory for the conn structure. Note that we also expect this
+ * to initialize conn->errorMessage to empty. All subsequent steps during
+ * connection initialization will only append to that buffer.
+ */
+ conn = makeEmptyPGconn();
+ if (conn == NULL)
+ return NULL;
+
+ /*
+ * Parse the conninfo string
+ */
+ if (!connectOptions1(conn, conninfo))
+ return conn;
+
+ /*
+ * Compute derived options
+ */
+ if (!connectOptions2(conn))
+ return conn;
+
+ /*
+ * Connect to the database
+ */
+ if (!connectDBStart(conn))
+ {
+ /* Just in case we failed to set it in connectDBStart */
+ conn->status = CONNECTION_BAD;
+ }
+
+ return conn;
+}
+
+/*
+ * Move option values into conn structure
+ *
+ * Don't put anything cute here --- intelligence should be in
+ * connectOptions2 ...
+ *
+ * Returns true on success. On failure, returns false and sets error message.
+ */
+static bool
+fillPGconn(PGconn *conn, PQconninfoOption *connOptions)
+{
+ const internalPQconninfoOption *option;
+
+ for (option = PQconninfoOptions; option->keyword; option++)
+ {
+ if (option->connofs >= 0)
+ {
+ const char *tmp = conninfo_getval(connOptions, option->keyword);
+
+ if (tmp)
+ {
+ char **connmember = (char **) ((char *) conn + option->connofs);
+
+ if (*connmember)
+ free(*connmember);
+ *connmember = strdup(tmp);
+ if (*connmember == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+/*
+ * connectOptions1
+ *
+ * Internal subroutine to set up connection parameters given an already-
+ * created PGconn and a conninfo string. Derived settings should be
+ * processed by calling connectOptions2 next. (We split them because
+ * PQsetdbLogin overrides defaults in between.)
+ *
+ * Returns true if OK, false if trouble (in which case errorMessage is set
+ * and so is conn->status).
+ */
+static bool
+connectOptions1(PGconn *conn, const char *conninfo)
+{
+ PQconninfoOption *connOptions;
+
+ /*
+ * Parse the conninfo string
+ */
+ connOptions = parse_connection_string(conninfo, &conn->errorMessage, true);
+ if (connOptions == NULL)
+ {
+ conn->status = CONNECTION_BAD;
+ /* errorMessage is already set */
+ return false;
+ }
+
+ /*
+ * Move option values into conn structure
+ */
+ if (!fillPGconn(conn, connOptions))
+ {
+ conn->status = CONNECTION_BAD;
+ PQconninfoFree(connOptions);
+ return false;
+ }
+
+ /*
+ * Free the option info - all is in conn now
+ */
+ PQconninfoFree(connOptions);
+
+ return true;
+}
+
+/*
+ * Count the number of elements in a simple comma-separated list.
+ */
+static int
+count_comma_separated_elems(const char *input)
+{
+ int n;
+
+ n = 1;
+ for (; *input != '\0'; input++)
+ {
+ if (*input == ',')
+ n++;
+ }
+
+ return n;
+}
+
+/*
+ * Parse a simple comma-separated list.
+ *
+ * On each call, returns a malloc'd copy of the next element, and sets *more
+ * to indicate whether there are any more elements in the list after this,
+ * and updates *startptr to point to the next element, if any.
+ *
+ * On out of memory, returns NULL.
+ */
+static char *
+parse_comma_separated_list(char **startptr, bool *more)
+{
+ char *p;
+ char *s = *startptr;
+ char *e;
+ int len;
+
+ /*
+ * Search for the end of the current element; a comma or end-of-string
+ * acts as a terminator.
+ */
+ e = s;
+ while (*e != '\0' && *e != ',')
+ ++e;
+ *more = (*e == ',');
+
+ len = e - s;
+ p = (char *) malloc(sizeof(char) * (len + 1));
+ if (p)
+ {
+ memcpy(p, s, len);
+ p[len] = '\0';
+ }
+ *startptr = e + 1;
+
+ return p;
+}
+
+/*
+ * connectOptions2
+ *
+ * Compute derived connection options after absorbing all user-supplied info.
+ *
+ * Returns true if OK, false if trouble (in which case errorMessage is set
+ * and so is conn->status).
+ */
+static bool
+connectOptions2(PGconn *conn)
+{
+ int i;
+
+ /*
+ * Allocate memory for details about each host to which we might possibly
+ * try to connect. For that, count the number of elements in the hostaddr
+ * or host options. If neither is given, assume one host.
+ */
+ conn->whichhost = 0;
+ if (conn->pghostaddr && conn->pghostaddr[0] != '\0')
+ conn->nconnhost = count_comma_separated_elems(conn->pghostaddr);
+ else if (conn->pghost && conn->pghost[0] != '\0')
+ conn->nconnhost = count_comma_separated_elems(conn->pghost);
+ else
+ conn->nconnhost = 1;
+ conn->connhost = (pg_conn_host *)
+ calloc(conn->nconnhost, sizeof(pg_conn_host));
+ if (conn->connhost == NULL)
+ goto oom_error;
+
+ /*
+ * We now have one pg_conn_host structure per possible host. Fill in the
+ * host and hostaddr fields for each, by splitting the parameter strings.
+ */
+ if (conn->pghostaddr != NULL && conn->pghostaddr[0] != '\0')
+ {
+ char *s = conn->pghostaddr;
+ bool more = true;
+
+ for (i = 0; i < conn->nconnhost && more; i++)
+ {
+ conn->connhost[i].hostaddr = parse_comma_separated_list(&s, &more);
+ if (conn->connhost[i].hostaddr == NULL)
+ goto oom_error;
+ }
+
+ /*
+ * If hostaddr was given, the array was allocated according to the
+ * number of elements in the hostaddr list, so it really should be the
+ * right size.
+ */
+ Assert(!more);
+ Assert(i == conn->nconnhost);
+ }
+
+ if (conn->pghost != NULL && conn->pghost[0] != '\0')
+ {
+ char *s = conn->pghost;
+ bool more = true;
+
+ for (i = 0; i < conn->nconnhost && more; i++)
+ {
+ conn->connhost[i].host = parse_comma_separated_list(&s, &more);
+ if (conn->connhost[i].host == NULL)
+ goto oom_error;
+ }
+
+ /* Check for wrong number of host items. */
+ if (more || i != conn->nconnhost)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not match %d host names to %d hostaddr values\n"),
+ count_comma_separated_elems(conn->pghost), conn->nconnhost);
+ return false;
+ }
+ }
+
+ /*
+ * Now, for each host slot, identify the type of address spec, and fill in
+ * the default address if nothing was given.
+ */
+ for (i = 0; i < conn->nconnhost; i++)
+ {
+ pg_conn_host *ch = &conn->connhost[i];
+
+ if (ch->hostaddr != NULL && ch->hostaddr[0] != '\0')
+ ch->type = CHT_HOST_ADDRESS;
+ else if (ch->host != NULL && ch->host[0] != '\0')
+ {
+ ch->type = CHT_HOST_NAME;
+#ifdef HAVE_UNIX_SOCKETS
+ if (is_unixsock_path(ch->host))
+ ch->type = CHT_UNIX_SOCKET;
+#endif
+ }
+ else
+ {
+ if (ch->host)
+ free(ch->host);
+
+ /*
+ * This bit selects the default host location. If you change
+ * this, see also pg_regress.
+ */
+#ifdef HAVE_UNIX_SOCKETS
+ if (DEFAULT_PGSOCKET_DIR[0])
+ {
+ ch->host = strdup(DEFAULT_PGSOCKET_DIR);
+ ch->type = CHT_UNIX_SOCKET;
+ }
+ else
+#endif
+ {
+ ch->host = strdup(DefaultHost);
+ ch->type = CHT_HOST_NAME;
+ }
+ if (ch->host == NULL)
+ goto oom_error;
+ }
+ }
+
+ /*
+ * Next, work out the port number corresponding to each host name.
+ *
+ * Note: unlike the above for host names, this could leave the port fields
+ * as null or empty strings. We will substitute DEF_PGPORT whenever we
+ * read such a port field.
+ */
+ if (conn->pgport != NULL && conn->pgport[0] != '\0')
+ {
+ char *s = conn->pgport;
+ bool more = true;
+
+ for (i = 0; i < conn->nconnhost && more; i++)
+ {
+ conn->connhost[i].port = parse_comma_separated_list(&s, &more);
+ if (conn->connhost[i].port == NULL)
+ goto oom_error;
+ }
+
+ /*
+ * If exactly one port was given, use it for every host. Otherwise,
+ * there must be exactly as many ports as there were hosts.
+ */
+ if (i == 1 && !more)
+ {
+ for (i = 1; i < conn->nconnhost; i++)
+ {
+ conn->connhost[i].port = strdup(conn->connhost[0].port);
+ if (conn->connhost[i].port == NULL)
+ goto oom_error;
+ }
+ }
+ else if (more || i != conn->nconnhost)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not match %d port numbers to %d hosts\n"),
+ count_comma_separated_elems(conn->pgport), conn->nconnhost);
+ return false;
+ }
+ }
+
+ /*
+ * If user name was not given, fetch it. (Most likely, the fetch will
+ * fail, since the only way we get here is if pg_fe_getauthname() failed
+ * during conninfo_add_defaults(). But now we want an error message.)
+ */
+ if (conn->pguser == NULL || conn->pguser[0] == '\0')
+ {
+ if (conn->pguser)
+ free(conn->pguser);
+ conn->pguser = pg_fe_getauthname(&conn->errorMessage);
+ if (!conn->pguser)
+ {
+ conn->status = CONNECTION_BAD;
+ return false;
+ }
+ }
+
+ /*
+ * If database name was not given, default it to equal user name
+ */
+ if (conn->dbName == NULL || conn->dbName[0] == '\0')
+ {
+ if (conn->dbName)
+ free(conn->dbName);
+ conn->dbName = strdup(conn->pguser);
+ if (!conn->dbName)
+ goto oom_error;
+ }
+
+ /*
+ * If password was not given, try to look it up in password file. Note
+ * that the result might be different for each host/port pair.
+ */
+ if (conn->pgpass == NULL || conn->pgpass[0] == '\0')
+ {
+ /* If password file wasn't specified, use ~/PGPASSFILE */
+ if (conn->pgpassfile == NULL || conn->pgpassfile[0] == '\0')
+ {
+ char homedir[MAXPGPATH];
+
+ if (pqGetHomeDirectory(homedir, sizeof(homedir)))
+ {
+ if (conn->pgpassfile)
+ free(conn->pgpassfile);
+ conn->pgpassfile = malloc(MAXPGPATH);
+ if (!conn->pgpassfile)
+ goto oom_error;
+ snprintf(conn->pgpassfile, MAXPGPATH, "%s/%s",
+ homedir, PGPASSFILE);
+ }
+ }
+
+ if (conn->pgpassfile != NULL && conn->pgpassfile[0] != '\0')
+ {
+ for (i = 0; i < conn->nconnhost; i++)
+ {
+ /*
+ * Try to get a password for this host from file. We use host
+ * for the hostname search key if given, else hostaddr (at
+ * least one of them is guaranteed nonempty by now).
+ */
+ const char *pwhost = conn->connhost[i].host;
+
+ if (pwhost == NULL || pwhost[0] == '\0')
+ pwhost = conn->connhost[i].hostaddr;
+
+ conn->connhost[i].password =
+ passwordFromFile(pwhost,
+ conn->connhost[i].port,
+ conn->dbName,
+ conn->pguser,
+ conn->pgpassfile);
+ }
+ }
+ }
+
+ /*
+ * validate channel_binding option
+ */
+ if (conn->channel_binding)
+ {
+ if (strcmp(conn->channel_binding, "disable") != 0
+ && strcmp(conn->channel_binding, "prefer") != 0
+ && strcmp(conn->channel_binding, "require") != 0)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "channel_binding", conn->channel_binding);
+ return false;
+ }
+ }
+ else
+ {
+ conn->channel_binding = strdup(DefaultChannelBinding);
+ if (!conn->channel_binding)
+ goto oom_error;
+ }
+
+ /*
+ * validate sslmode option
+ */
+ if (conn->sslmode)
+ {
+ if (strcmp(conn->sslmode, "disable") != 0
+ && strcmp(conn->sslmode, "allow") != 0
+ && strcmp(conn->sslmode, "prefer") != 0
+ && strcmp(conn->sslmode, "require") != 0
+ && strcmp(conn->sslmode, "verify-ca") != 0
+ && strcmp(conn->sslmode, "verify-full") != 0)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "sslmode", conn->sslmode);
+ return false;
+ }
+
+#ifndef USE_SSL
+ switch (conn->sslmode[0])
+ {
+ case 'a': /* "allow" */
+ case 'p': /* "prefer" */
+
+ /*
+ * warn user that an SSL connection will never be negotiated
+ * since SSL was not compiled in?
+ */
+ break;
+
+ case 'r': /* "require" */
+ case 'v': /* "verify-ca" or "verify-full" */
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("sslmode value \"%s\" invalid when SSL support is not compiled in\n"),
+ conn->sslmode);
+ return false;
+ }
+#endif
+ }
+ else
+ {
+ conn->sslmode = strdup(DefaultSSLMode);
+ if (!conn->sslmode)
+ goto oom_error;
+ }
+
+ /*
+ * Validate TLS protocol versions for ssl_min_protocol_version and
+ * ssl_max_protocol_version.
+ */
+ if (!sslVerifyProtocolVersion(conn->ssl_min_protocol_version))
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "ssl_min_protocol_version",
+ conn->ssl_min_protocol_version);
+ return false;
+ }
+ if (!sslVerifyProtocolVersion(conn->ssl_max_protocol_version))
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "ssl_max_protocol_version",
+ conn->ssl_max_protocol_version);
+ return false;
+ }
+
+ /*
+ * Check if the range of SSL protocols defined is correct. This is done
+ * at this early step because this is independent of the SSL
+ * implementation used, and this avoids unnecessary cycles with an
+ * already-built SSL context when the connection is being established, as
+ * it would be doomed anyway.
+ */
+ if (!sslVerifyProtocolRange(conn->ssl_min_protocol_version,
+ conn->ssl_max_protocol_version))
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("invalid SSL protocol version range\n"));
+ return false;
+ }
+
+ /*
+ * validate gssencmode option
+ */
+ if (conn->gssencmode)
+ {
+ if (strcmp(conn->gssencmode, "disable") != 0 &&
+ strcmp(conn->gssencmode, "prefer") != 0 &&
+ strcmp(conn->gssencmode, "require") != 0)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "gssencmode",
+ conn->gssencmode);
+ return false;
+ }
+#ifndef ENABLE_GSS
+ if (strcmp(conn->gssencmode, "require") == 0)
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"),
+ conn->gssencmode);
+ return false;
+ }
+#endif
+ }
+ else
+ {
+ conn->gssencmode = strdup(DefaultGSSMode);
+ if (!conn->gssencmode)
+ goto oom_error;
+ }
+
+ /*
+ * validate target_session_attrs option, and set target_server_type
+ */
+ if (conn->target_session_attrs)
+ {
+ if (strcmp(conn->target_session_attrs, "any") == 0)
+ conn->target_server_type = SERVER_TYPE_ANY;
+ else if (strcmp(conn->target_session_attrs, "read-write") == 0)
+ conn->target_server_type = SERVER_TYPE_READ_WRITE;
+ else if (strcmp(conn->target_session_attrs, "read-only") == 0)
+ conn->target_server_type = SERVER_TYPE_READ_ONLY;
+ else if (strcmp(conn->target_session_attrs, "primary") == 0)
+ conn->target_server_type = SERVER_TYPE_PRIMARY;
+ else if (strcmp(conn->target_session_attrs, "standby") == 0)
+ conn->target_server_type = SERVER_TYPE_STANDBY;
+ else if (strcmp(conn->target_session_attrs, "prefer-standby") == 0)
+ conn->target_server_type = SERVER_TYPE_PREFER_STANDBY;
+ else
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid %s value: \"%s\"\n"),
+ "target_session_attrs",
+ conn->target_session_attrs);
+ return false;
+ }
+ }
+ else
+ conn->target_server_type = SERVER_TYPE_ANY;
+
+ /*
+ * Resolve special "auto" client_encoding from the locale
+ */
+ if (conn->client_encoding_initial &&
+ strcmp(conn->client_encoding_initial, "auto") == 0)
+ {
+ free(conn->client_encoding_initial);
+ conn->client_encoding_initial = strdup(pg_encoding_to_char(pg_get_encoding_from_locale(NULL, true)));
+ if (!conn->client_encoding_initial)
+ goto oom_error;
+ }
+
+ /*
+ * Only if we get this far is it appropriate to try to connect. (We need a
+ * state flag, rather than just the boolean result of this function, in
+ * case someone tries to PQreset() the PGconn.)
+ */
+ conn->options_valid = true;
+
+ return true;
+
+oom_error:
+ conn->status = CONNECTION_BAD;
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+}
+
+/*
+ * PQconndefaults
+ *
+ * Construct a default connection options array, which identifies all the
+ * available options and shows any default values that are available from the
+ * environment etc. On error (eg out of memory), NULL is returned.
+ *
+ * Using this function, an application may determine all possible options
+ * and their current default values.
+ *
+ * NOTE: as of PostgreSQL 7.0, the returned array is dynamically allocated
+ * and should be freed when no longer needed via PQconninfoFree(). (In prior
+ * versions, the returned array was static, but that's not thread-safe.)
+ * Pre-7.0 applications that use this function will see a small memory leak
+ * until they are updated to call PQconninfoFree.
+ */
+PQconninfoOption *
+PQconndefaults(void)
+{
+ PQExpBufferData errorBuf;
+ PQconninfoOption *connOptions;
+
+ /* We don't actually report any errors here, but callees want a buffer */
+ initPQExpBuffer(&errorBuf);
+ if (PQExpBufferDataBroken(errorBuf))
+ return NULL; /* out of memory already :-( */
+
+ connOptions = conninfo_init(&errorBuf);
+ if (connOptions != NULL)
+ {
+ /* pass NULL errorBuf to ignore errors */
+ if (!conninfo_add_defaults(connOptions, NULL))
+ {
+ PQconninfoFree(connOptions);
+ connOptions = NULL;
+ }
+ }
+
+ termPQExpBuffer(&errorBuf);
+ return connOptions;
+}
+
+/* ----------------
+ * PQsetdbLogin
+ *
+ * establishes a connection to a postgres backend through the postmaster
+ * at the specified host and port.
+ *
+ * returns a PGconn* which is needed for all subsequent libpq calls
+ *
+ * if the status field of the connection returned is CONNECTION_BAD,
+ * then only the errorMessage is likely to be useful.
+ * ----------------
+ */
+PGconn *
+PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions,
+ const char *pgtty, const char *dbName, const char *login,
+ const char *pwd)
+{
+ PGconn *conn;
+
+ /*
+ * Allocate memory for the conn structure. Note that we also expect this
+ * to initialize conn->errorMessage to empty. All subsequent steps during
+ * connection initialization will only append to that buffer.
+ */
+ conn = makeEmptyPGconn();
+ if (conn == NULL)
+ return NULL;
+
+ /*
+ * If the dbName parameter contains what looks like a connection string,
+ * parse it into conn struct using connectOptions1.
+ */
+ if (dbName && recognized_connection_string(dbName))
+ {
+ if (!connectOptions1(conn, dbName))
+ return conn;
+ }
+ else
+ {
+ /*
+ * Old-style path: first, parse an empty conninfo string in order to
+ * set up the same defaults that PQconnectdb() would use.
+ */
+ if (!connectOptions1(conn, ""))
+ return conn;
+
+ /* Insert dbName parameter value into struct */
+ if (dbName && dbName[0] != '\0')
+ {
+ if (conn->dbName)
+ free(conn->dbName);
+ conn->dbName = strdup(dbName);
+ if (!conn->dbName)
+ goto oom_error;
+ }
+ }
+
+ /*
+ * Insert remaining parameters into struct, overriding defaults (as well
+ * as any conflicting data from dbName taken as a conninfo).
+ */
+ if (pghost && pghost[0] != '\0')
+ {
+ if (conn->pghost)
+ free(conn->pghost);
+ conn->pghost = strdup(pghost);
+ if (!conn->pghost)
+ goto oom_error;
+ }
+
+ if (pgport && pgport[0] != '\0')
+ {
+ if (conn->pgport)
+ free(conn->pgport);
+ conn->pgport = strdup(pgport);
+ if (!conn->pgport)
+ goto oom_error;
+ }
+
+ if (pgoptions && pgoptions[0] != '\0')
+ {
+ if (conn->pgoptions)
+ free(conn->pgoptions);
+ conn->pgoptions = strdup(pgoptions);
+ if (!conn->pgoptions)
+ goto oom_error;
+ }
+
+ if (login && login[0] != '\0')
+ {
+ if (conn->pguser)
+ free(conn->pguser);
+ conn->pguser = strdup(login);
+ if (!conn->pguser)
+ goto oom_error;
+ }
+
+ if (pwd && pwd[0] != '\0')
+ {
+ if (conn->pgpass)
+ free(conn->pgpass);
+ conn->pgpass = strdup(pwd);
+ if (!conn->pgpass)
+ goto oom_error;
+ }
+
+ /*
+ * Compute derived options
+ */
+ if (!connectOptions2(conn))
+ return conn;
+
+ /*
+ * Connect to the database
+ */
+ if (connectDBStart(conn))
+ (void) connectDBComplete(conn);
+
+ return conn;
+
+oom_error:
+ conn->status = CONNECTION_BAD;
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return conn;
+}
+
+
+/* ----------
+ * connectNoDelay -
+ * Sets the TCP_NODELAY socket option.
+ * Returns 1 if successful, 0 if not.
+ * ----------
+ */
+static int
+connectNoDelay(PGconn *conn)
+{
+#ifdef TCP_NODELAY
+ int on = 1;
+
+ if (setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY,
+ (char *) &on,
+ sizeof(on)) < 0)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set socket to TCP no delay mode: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+
+/* ----------
+ * Write currently connected IP address into host_addr (of len host_addr_len).
+ * If unable to, set it to the empty string.
+ * ----------
+ */
+static void
+getHostaddr(PGconn *conn, char *host_addr, int host_addr_len)
+{
+ struct sockaddr_storage *addr = &conn->raddr.addr;
+
+ if (addr->ss_family == AF_INET)
+ {
+ if (pg_inet_net_ntop(AF_INET,
+ &((struct sockaddr_in *) addr)->sin_addr.s_addr,
+ 32,
+ host_addr, host_addr_len) == NULL)
+ host_addr[0] = '\0';
+ }
+#ifdef HAVE_IPV6
+ else if (addr->ss_family == AF_INET6)
+ {
+ if (pg_inet_net_ntop(AF_INET6,
+ &((struct sockaddr_in6 *) addr)->sin6_addr.s6_addr,
+ 128,
+ host_addr, host_addr_len) == NULL)
+ host_addr[0] = '\0';
+ }
+#endif
+ else
+ host_addr[0] = '\0';
+}
+
+/*
+ * emitHostIdentityInfo -
+ * Speculatively append "connection to server so-and-so failed: " to
+ * conn->errorMessage once we've identified the current connection target
+ * address. This ensures that any subsequent error message will be properly
+ * attributed to the server we couldn't connect to. conn->raddr must be
+ * valid, and the result of getHostaddr() must be supplied.
+ */
+static void
+emitHostIdentityInfo(PGconn *conn, const char *host_addr)
+{
+#ifdef HAVE_UNIX_SOCKETS
+ if (IS_AF_UNIX(conn->raddr.addr.ss_family))
+ {
+ char service[NI_MAXHOST];
+
+ pg_getnameinfo_all(&conn->raddr.addr, conn->raddr.salen,
+ NULL, 0,
+ service, sizeof(service),
+ NI_NUMERICSERV);
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("connection to server on socket \"%s\" failed: "),
+ service);
+ }
+ else
+#endif /* HAVE_UNIX_SOCKETS */
+ {
+ const char *displayed_host;
+ const char *displayed_port;
+
+ /* To which host and port were we actually connecting? */
+ if (conn->connhost[conn->whichhost].type == CHT_HOST_ADDRESS)
+ displayed_host = conn->connhost[conn->whichhost].hostaddr;
+ else
+ displayed_host = conn->connhost[conn->whichhost].host;
+ displayed_port = conn->connhost[conn->whichhost].port;
+ if (displayed_port == NULL || displayed_port[0] == '\0')
+ displayed_port = DEF_PGPORT_STR;
+
+ /*
+ * If the user did not supply an IP address using 'hostaddr', and
+ * 'host' was missing or does not match our lookup, display the
+ * looked-up IP address.
+ */
+ if (conn->connhost[conn->whichhost].type != CHT_HOST_ADDRESS &&
+ host_addr[0] &&
+ strcmp(displayed_host, host_addr) != 0)
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("connection to server at \"%s\" (%s), port %s failed: "),
+ displayed_host, host_addr,
+ displayed_port);
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("connection to server at \"%s\", port %s failed: "),
+ displayed_host,
+ displayed_port);
+ }
+}
+
+/* ----------
+ * connectFailureMessage -
+ * create a friendly error message on connection failure,
+ * using the given errno value. Use this for error cases that
+ * imply that there's no server there.
+ * ----------
+ */
+static void
+connectFailureMessage(PGconn *conn, int errorno)
+{
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ "%s\n",
+ SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)));
+
+#ifdef HAVE_UNIX_SOCKETS
+ if (IS_AF_UNIX(conn->raddr.addr.ss_family))
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("\tIs the server running locally and accepting connections on that socket?\n"));
+ else
+#endif
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("\tIs the server running on that host and accepting TCP/IP connections?\n"));
+}
+
+/*
+ * Should we use keepalives? Returns 1 if yes, 0 if no, and -1 if
+ * conn->keepalives is set to a value which is not parseable as an
+ * integer.
+ */
+static int
+useKeepalives(PGconn *conn)
+{
+ char *ep;
+ int val;
+
+ if (conn->keepalives == NULL)
+ return 1;
+ val = strtol(conn->keepalives, &ep, 10);
+ if (*ep)
+ return -1;
+ return val != 0 ? 1 : 0;
+}
+
+/*
+ * Parse and try to interpret "value" as an integer value, and if successful,
+ * store it in *result, complaining if there is any trailing garbage or an
+ * overflow. This allows any number of leading and trailing whitespaces.
+ */
+static bool
+parse_int_param(const char *value, int *result, PGconn *conn,
+ const char *context)
+{
+ char *end;
+ long numval;
+
+ Assert(value != NULL);
+
+ *result = 0;
+
+ /* strtol(3) skips leading whitespaces */
+ errno = 0;
+ numval = strtol(value, &end, 10);
+
+ /*
+ * If no progress was done during the parsing or an error happened, fail.
+ * This tests properly for overflows of the result.
+ */
+ if (value == end || errno != 0 || numval != (int) numval)
+ goto error;
+
+ /*
+ * Skip any trailing whitespace; if anything but whitespace remains before
+ * the terminating character, fail
+ */
+ while (*end != '\0' && isspace((unsigned char) *end))
+ end++;
+
+ if (*end != '\0')
+ goto error;
+
+ *result = numval;
+ return true;
+
+error:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid integer value \"%s\" for connection option \"%s\"\n"),
+ value, context);
+ return false;
+}
+
+#ifndef WIN32
+/*
+ * Set the keepalive idle timer.
+ */
+static int
+setKeepalivesIdle(PGconn *conn)
+{
+ int idle;
+
+ if (conn->keepalives_idle == NULL)
+ return 1;
+
+ if (!parse_int_param(conn->keepalives_idle, &idle, conn,
+ "keepalives_idle"))
+ return 0;
+ if (idle < 0)
+ idle = 0;
+
+#ifdef PG_TCP_KEEPALIVE_IDLE
+ if (setsockopt(conn->sock, IPPROTO_TCP, PG_TCP_KEEPALIVE_IDLE,
+ (char *) &idle, sizeof(idle)) < 0)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: %s\n"),
+ "setsockopt",
+ PG_TCP_KEEPALIVE_IDLE_STR,
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+
+/*
+ * Set the keepalive interval.
+ */
+static int
+setKeepalivesInterval(PGconn *conn)
+{
+ int interval;
+
+ if (conn->keepalives_interval == NULL)
+ return 1;
+
+ if (!parse_int_param(conn->keepalives_interval, &interval, conn,
+ "keepalives_interval"))
+ return 0;
+ if (interval < 0)
+ interval = 0;
+
+#ifdef TCP_KEEPINTVL
+ if (setsockopt(conn->sock, IPPROTO_TCP, TCP_KEEPINTVL,
+ (char *) &interval, sizeof(interval)) < 0)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: %s\n"),
+ "setsockopt",
+ "TCP_KEEPINTVL",
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+
+/*
+ * Set the count of lost keepalive packets that will trigger a connection
+ * break.
+ */
+static int
+setKeepalivesCount(PGconn *conn)
+{
+ int count;
+
+ if (conn->keepalives_count == NULL)
+ return 1;
+
+ if (!parse_int_param(conn->keepalives_count, &count, conn,
+ "keepalives_count"))
+ return 0;
+ if (count < 0)
+ count = 0;
+
+#ifdef TCP_KEEPCNT
+ if (setsockopt(conn->sock, IPPROTO_TCP, TCP_KEEPCNT,
+ (char *) &count, sizeof(count)) < 0)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: %s\n"),
+ "setsockopt",
+ "TCP_KEEPCNT",
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+#else /* WIN32 */
+#ifdef SIO_KEEPALIVE_VALS
+/*
+ * Enable keepalives and set the keepalive values on Win32,
+ * where they are always set in one batch.
+ */
+static int
+setKeepalivesWin32(PGconn *conn)
+{
+ struct tcp_keepalive ka;
+ DWORD retsize;
+ int idle = 0;
+ int interval = 0;
+
+ if (conn->keepalives_idle &&
+ !parse_int_param(conn->keepalives_idle, &idle, conn,
+ "keepalives_idle"))
+ return 0;
+ if (idle <= 0)
+ idle = 2 * 60 * 60; /* 2 hours = default */
+
+ if (conn->keepalives_interval &&
+ !parse_int_param(conn->keepalives_interval, &interval, conn,
+ "keepalives_interval"))
+ return 0;
+ if (interval <= 0)
+ interval = 1; /* 1 second = default */
+
+ ka.onoff = 1;
+ ka.keepalivetime = idle * 1000;
+ ka.keepaliveinterval = interval * 1000;
+
+ if (WSAIoctl(conn->sock,
+ SIO_KEEPALIVE_VALS,
+ (LPVOID) &ka,
+ sizeof(ka),
+ NULL,
+ 0,
+ &retsize,
+ NULL,
+ NULL)
+ != 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: error code %d\n"),
+ "WSAIoctl", "SIO_KEEPALIVE_VALS",
+ WSAGetLastError());
+ return 0;
+ }
+ return 1;
+}
+#endif /* SIO_KEEPALIVE_VALS */
+#endif /* WIN32 */
+
+/*
+ * Set the TCP user timeout.
+ */
+static int
+setTCPUserTimeout(PGconn *conn)
+{
+ int timeout;
+
+ if (conn->pgtcp_user_timeout == NULL)
+ return 1;
+
+ if (!parse_int_param(conn->pgtcp_user_timeout, &timeout, conn,
+ "tcp_user_timeout"))
+ return 0;
+
+ if (timeout < 0)
+ timeout = 0;
+
+#ifdef TCP_USER_TIMEOUT
+ if (setsockopt(conn->sock, IPPROTO_TCP, TCP_USER_TIMEOUT,
+ (char *) &timeout, sizeof(timeout)) < 0)
+ {
+ char sebuf[256];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: %s\n"),
+ "setsockopt",
+ "TCP_USER_TIMEOUT",
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+
+/* ----------
+ * connectDBStart -
+ * Begin the process of making a connection to the backend.
+ *
+ * Returns 1 if successful, 0 if not.
+ * ----------
+ */
+static int
+connectDBStart(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ if (!conn->options_valid)
+ goto connect_errReturn;
+
+ /*
+ * Check for bad linking to backend-internal versions of src/common
+ * functions (see comments in link-canary.c for the reason we need this).
+ * Nobody but developers should see this message, so we don't bother
+ * translating it.
+ */
+ if (!pg_link_canary_is_frontend())
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ "libpq is incorrectly linked to backend functions\n");
+ goto connect_errReturn;
+ }
+
+ /* Ensure our buffers are empty */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ conn->outCount = 0;
+
+ /*
+ * Set up to try to connect to the first host. (Setting whichhost = -1 is
+ * a bit of a cheat, but PQconnectPoll will advance it to 0 before
+ * anything else looks at it.)
+ */
+ conn->whichhost = -1;
+ conn->try_next_addr = false;
+ conn->try_next_host = true;
+ conn->status = CONNECTION_NEEDED;
+
+ /* Also reset the target_server_type state if needed */
+ if (conn->target_server_type == SERVER_TYPE_PREFER_STANDBY_PASS2)
+ conn->target_server_type = SERVER_TYPE_PREFER_STANDBY;
+
+ /*
+ * The code for processing CONNECTION_NEEDED state is in PQconnectPoll(),
+ * so that it can easily be re-executed if needed again during the
+ * asynchronous startup process. However, we must run it once here,
+ * because callers expect a success return from this routine to mean that
+ * we are in PGRES_POLLING_WRITING connection state.
+ */
+ if (PQconnectPoll(conn) == PGRES_POLLING_WRITING)
+ return 1;
+
+connect_errReturn:
+
+ /*
+ * If we managed to open a socket, close it immediately rather than
+ * waiting till PQfinish. (The application cannot have gotten the socket
+ * from PQsocket yet, so this doesn't risk breaking anything.)
+ */
+ pqDropConnection(conn, true);
+ conn->status = CONNECTION_BAD;
+ return 0;
+}
+
+
+/*
+ * connectDBComplete
+ *
+ * Block and complete a connection.
+ *
+ * Returns 1 on success, 0 on failure.
+ */
+static int
+connectDBComplete(PGconn *conn)
+{
+ PostgresPollingStatusType flag = PGRES_POLLING_WRITING;
+ time_t finish_time = ((time_t) -1);
+ int timeout = 0;
+ int last_whichhost = -2; /* certainly different from whichhost */
+ struct addrinfo *last_addr_cur = NULL;
+
+ if (conn == NULL || conn->status == CONNECTION_BAD)
+ return 0;
+
+ /*
+ * Set up a time limit, if connect_timeout isn't zero.
+ */
+ if (conn->connect_timeout != NULL)
+ {
+ if (!parse_int_param(conn->connect_timeout, &timeout, conn,
+ "connect_timeout"))
+ {
+ /* mark the connection as bad to report the parsing failure */
+ conn->status = CONNECTION_BAD;
+ return 0;
+ }
+
+ if (timeout > 0)
+ {
+ /*
+ * Rounding could cause connection to fail unexpectedly quickly;
+ * to prevent possibly waiting hardly-at-all, insist on at least
+ * two seconds.
+ */
+ if (timeout < 2)
+ timeout = 2;
+ }
+ else /* negative means 0 */
+ timeout = 0;
+ }
+
+ for (;;)
+ {
+ int ret = 0;
+
+ /*
+ * (Re)start the connect_timeout timer if it's active and we are
+ * considering a different host than we were last time through. If
+ * we've already succeeded, though, needn't recalculate.
+ */
+ if (flag != PGRES_POLLING_OK &&
+ timeout > 0 &&
+ (conn->whichhost != last_whichhost ||
+ conn->addr_cur != last_addr_cur))
+ {
+ finish_time = time(NULL) + timeout;
+ last_whichhost = conn->whichhost;
+ last_addr_cur = conn->addr_cur;
+ }
+
+ /*
+ * Wait, if necessary. Note that the initial state (just after
+ * PQconnectStart) is to wait for the socket to select for writing.
+ */
+ switch (flag)
+ {
+ case PGRES_POLLING_OK:
+ return 1; /* success! */
+
+ case PGRES_POLLING_READING:
+ ret = pqWaitTimed(1, 0, conn, finish_time);
+ if (ret == -1)
+ {
+ /* hard failure, eg select() problem, aborts everything */
+ conn->status = CONNECTION_BAD;
+ return 0;
+ }
+ break;
+
+ case PGRES_POLLING_WRITING:
+ ret = pqWaitTimed(0, 1, conn, finish_time);
+ if (ret == -1)
+ {
+ /* hard failure, eg select() problem, aborts everything */
+ conn->status = CONNECTION_BAD;
+ return 0;
+ }
+ break;
+
+ default:
+ /* Just in case we failed to set it in PQconnectPoll */
+ conn->status = CONNECTION_BAD;
+ return 0;
+ }
+
+ if (ret == 1) /* connect_timeout elapsed */
+ {
+ /*
+ * Give up on current server/address, try the next one.
+ */
+ conn->try_next_addr = true;
+ conn->status = CONNECTION_NEEDED;
+ }
+
+ /*
+ * Now try to advance the state machine.
+ */
+ flag = PQconnectPoll(conn);
+ }
+}
+
+/* ----------------
+ * PQconnectPoll
+ *
+ * Poll an asynchronous connection.
+ *
+ * Returns a PostgresPollingStatusType.
+ * Before calling this function, use select(2) to determine when data
+ * has arrived..
+ *
+ * You must call PQfinish whether or not this fails.
+ *
+ * This function and PQconnectStart are intended to allow connections to be
+ * made without blocking the execution of your program on remote I/O. However,
+ * there are a number of caveats:
+ *
+ * o If you call PQtrace, ensure that the stream object into which you trace
+ * will not block.
+ * o If you do not supply an IP address for the remote host (i.e. you
+ * supply a host name instead) then PQconnectStart will block on
+ * gethostbyname. You will be fine if using Unix sockets (i.e. by
+ * supplying neither a host name nor a host address).
+ * o If your backend wants to use Kerberos authentication then you must
+ * supply both a host name and a host address, otherwise this function
+ * may block on gethostname.
+ *
+ * ----------------
+ */
+PostgresPollingStatusType
+PQconnectPoll(PGconn *conn)
+{
+ bool reset_connection_state_machine = false;
+ bool need_new_connection = false;
+ PGresult *res;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+ int optval;
+
+ if (conn == NULL)
+ return PGRES_POLLING_FAILED;
+
+ /* Get the new data */
+ switch (conn->status)
+ {
+ /*
+ * We really shouldn't have been polled in these two cases, but we
+ * can handle it.
+ */
+ case CONNECTION_BAD:
+ return PGRES_POLLING_FAILED;
+ case CONNECTION_OK:
+ return PGRES_POLLING_OK;
+
+ /* These are reading states */
+ case CONNECTION_AWAITING_RESPONSE:
+ case CONNECTION_AUTH_OK:
+ case CONNECTION_CHECK_WRITABLE:
+ case CONNECTION_CONSUME:
+ case CONNECTION_CHECK_STANDBY:
+ {
+ /* Load waiting data */
+ int n = pqReadData(conn);
+
+ if (n < 0)
+ goto error_return;
+ if (n == 0)
+ return PGRES_POLLING_READING;
+
+ break;
+ }
+
+ /* These are writing states, so we just proceed. */
+ case CONNECTION_STARTED:
+ case CONNECTION_MADE:
+ break;
+
+ /* Special cases: proceed without waiting. */
+ case CONNECTION_SSL_STARTUP:
+ case CONNECTION_NEEDED:
+ case CONNECTION_GSS_STARTUP:
+ case CONNECTION_CHECK_TARGET:
+ break;
+
+ default:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("invalid connection state, probably indicative of memory corruption\n"));
+ goto error_return;
+ }
+
+
+keep_going: /* We will come back to here until there is
+ * nothing left to do. */
+
+ /* Time to advance to next address, or next host if no more addresses? */
+ if (conn->try_next_addr)
+ {
+ if (conn->addr_cur && conn->addr_cur->ai_next)
+ {
+ conn->addr_cur = conn->addr_cur->ai_next;
+ reset_connection_state_machine = true;
+ }
+ else
+ conn->try_next_host = true;
+ conn->try_next_addr = false;
+ }
+
+ /* Time to advance to next connhost[] entry? */
+ if (conn->try_next_host)
+ {
+ pg_conn_host *ch;
+ struct addrinfo hint;
+ int thisport;
+ int ret;
+ char portstr[MAXPGPATH];
+
+ if (conn->whichhost + 1 < conn->nconnhost)
+ conn->whichhost++;
+ else
+ {
+ /*
+ * Oops, no more hosts.
+ *
+ * If we are trying to connect in "prefer-standby" mode, then drop
+ * the standby requirement and start over.
+ *
+ * Otherwise, an appropriate error message is already set up, so
+ * we just need to set the right status.
+ */
+ if (conn->target_server_type == SERVER_TYPE_PREFER_STANDBY &&
+ conn->nconnhost > 0)
+ {
+ conn->target_server_type = SERVER_TYPE_PREFER_STANDBY_PASS2;
+ conn->whichhost = 0;
+ }
+ else
+ goto error_return;
+ }
+
+ /* Drop any address info for previous host */
+ release_conn_addrinfo(conn);
+
+ /*
+ * Look up info for the new host. On failure, log the problem in
+ * conn->errorMessage, then loop around to try the next host. (Note
+ * we don't clear try_next_host until we've succeeded.)
+ */
+ ch = &conn->connhost[conn->whichhost];
+
+ /* Initialize hint structure */
+ MemSet(&hint, 0, sizeof(hint));
+ hint.ai_socktype = SOCK_STREAM;
+ conn->addrlist_family = hint.ai_family = AF_UNSPEC;
+
+ /* Figure out the port number we're going to use. */
+ if (ch->port == NULL || ch->port[0] == '\0')
+ thisport = DEF_PGPORT;
+ else
+ {
+ if (!parse_int_param(ch->port, &thisport, conn, "port"))
+ goto error_return;
+
+ if (thisport < 1 || thisport > 65535)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid port number: \"%s\"\n"),
+ ch->port);
+ goto keep_going;
+ }
+ }
+ snprintf(portstr, sizeof(portstr), "%d", thisport);
+
+ /* Use pg_getaddrinfo_all() to resolve the address */
+ switch (ch->type)
+ {
+ case CHT_HOST_NAME:
+ ret = pg_getaddrinfo_all(ch->host, portstr, &hint,
+ &conn->addrlist);
+ if (ret || !conn->addrlist)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not translate host name \"%s\" to address: %s\n"),
+ ch->host, gai_strerror(ret));
+ goto keep_going;
+ }
+ break;
+
+ case CHT_HOST_ADDRESS:
+ hint.ai_flags = AI_NUMERICHOST;
+ ret = pg_getaddrinfo_all(ch->hostaddr, portstr, &hint,
+ &conn->addrlist);
+ if (ret || !conn->addrlist)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not parse network address \"%s\": %s\n"),
+ ch->hostaddr, gai_strerror(ret));
+ goto keep_going;
+ }
+ break;
+
+ case CHT_UNIX_SOCKET:
+#ifdef HAVE_UNIX_SOCKETS
+ conn->addrlist_family = hint.ai_family = AF_UNIX;
+ UNIXSOCK_PATH(portstr, thisport, ch->host);
+ if (strlen(portstr) >= UNIXSOCK_PATH_BUFLEN)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"),
+ portstr,
+ (int) (UNIXSOCK_PATH_BUFLEN - 1));
+ goto keep_going;
+ }
+
+ /*
+ * NULL hostname tells pg_getaddrinfo_all to parse the service
+ * name as a Unix-domain socket path.
+ */
+ ret = pg_getaddrinfo_all(NULL, portstr, &hint,
+ &conn->addrlist);
+ if (ret || !conn->addrlist)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not translate Unix-domain socket path \"%s\" to address: %s\n"),
+ portstr, gai_strerror(ret));
+ goto keep_going;
+ }
+#else
+ Assert(false);
+#endif
+ break;
+ }
+
+ /* OK, scan this addrlist for a working server address */
+ conn->addr_cur = conn->addrlist;
+ reset_connection_state_machine = true;
+ conn->try_next_host = false;
+ }
+
+ /* Reset connection state machine? */
+ if (reset_connection_state_machine)
+ {
+ /*
+ * (Re) initialize our connection control variables for a set of
+ * connection attempts to a single server address. These variables
+ * must persist across individual connection attempts, but we must
+ * reset them when we start to consider a new server.
+ */
+ conn->pversion = PG_PROTOCOL(3, 0);
+ conn->send_appname = true;
+#ifdef USE_SSL
+ /* initialize these values based on SSL mode */
+ conn->allow_ssl_try = (conn->sslmode[0] != 'd'); /* "disable" */
+ conn->wait_ssl_try = (conn->sslmode[0] == 'a'); /* "allow" */
+#endif
+#ifdef ENABLE_GSS
+ conn->try_gss = (conn->gssencmode[0] != 'd'); /* "disable" */
+#endif
+
+ reset_connection_state_machine = false;
+ need_new_connection = true;
+ }
+
+ /* Force a new connection (perhaps to the same server as before)? */
+ if (need_new_connection)
+ {
+ /* Drop any existing connection */
+ pqDropConnection(conn, true);
+
+ /* Reset all state obtained from old server */
+ pqDropServerData(conn);
+
+ /* Drop any PGresult we might have, too */
+ conn->asyncStatus = PGASYNC_IDLE;
+ conn->xactStatus = PQTRANS_IDLE;
+ conn->pipelineStatus = PQ_PIPELINE_OFF;
+ pqClearAsyncResult(conn);
+
+ /* Reset conn->status to put the state machine in the right state */
+ conn->status = CONNECTION_NEEDED;
+
+ need_new_connection = false;
+ }
+
+ /* Now try to advance the state machine for this connection */
+ switch (conn->status)
+ {
+ case CONNECTION_NEEDED:
+ {
+ /*
+ * Try to initiate a connection to one of the addresses
+ * returned by pg_getaddrinfo_all(). conn->addr_cur is the
+ * next one to try.
+ *
+ * The extra level of braces here is historical. It's not
+ * worth reindenting this whole switch case to remove 'em.
+ */
+ {
+ struct addrinfo *addr_cur = conn->addr_cur;
+ char host_addr[NI_MAXHOST];
+
+ /*
+ * Advance to next possible host, if we've tried all of
+ * the addresses for the current host.
+ */
+ if (addr_cur == NULL)
+ {
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+
+ /* Remember current address for possible use later */
+ memcpy(&conn->raddr.addr, addr_cur->ai_addr,
+ addr_cur->ai_addrlen);
+ conn->raddr.salen = addr_cur->ai_addrlen;
+
+ /*
+ * Set connip, too. Note we purposely ignore strdup
+ * failure; not a big problem if it fails.
+ */
+ if (conn->connip != NULL)
+ {
+ free(conn->connip);
+ conn->connip = NULL;
+ }
+ getHostaddr(conn, host_addr, NI_MAXHOST);
+ if (host_addr[0])
+ conn->connip = strdup(host_addr);
+
+ /* Try to create the socket */
+ conn->sock = socket(addr_cur->ai_family, SOCK_STREAM, 0);
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ int errorno = SOCK_ERRNO;
+
+ /*
+ * Silently ignore socket() failure if we have more
+ * addresses to try; this reduces useless chatter in
+ * cases where the address list includes both IPv4 and
+ * IPv6 but kernel only accepts one family.
+ */
+ if (addr_cur->ai_next != NULL ||
+ conn->whichhost + 1 < conn->nconnhost)
+ {
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+ emitHostIdentityInfo(conn, host_addr);
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not create socket: %s\n"),
+ SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+
+ /*
+ * Once we've identified a target address, all errors
+ * except the preceding socket()-failure case should be
+ * prefixed with host-identity information. (If the
+ * connection succeeds, the contents of conn->errorMessage
+ * won't matter, so this is harmless.)
+ */
+ emitHostIdentityInfo(conn, host_addr);
+
+ /*
+ * Select socket options: no delay of outgoing data for
+ * TCP sockets, nonblock mode, close-on-exec. Try the
+ * next address if any of this fails.
+ */
+ if (!IS_AF_UNIX(addr_cur->ai_family))
+ {
+ if (!connectNoDelay(conn))
+ {
+ /* error message already created */
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+ }
+ if (!pg_set_noblock(conn->sock))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set socket to nonblocking mode: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+
+#ifdef F_SETFD
+ if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set socket to close-on-exec mode: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+#endif /* F_SETFD */
+
+ if (!IS_AF_UNIX(addr_cur->ai_family))
+ {
+#ifndef WIN32
+ int on = 1;
+#endif
+ int usekeepalives = useKeepalives(conn);
+ int err = 0;
+
+ if (usekeepalives < 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("keepalives parameter must be an integer\n"));
+ err = 1;
+ }
+ else if (usekeepalives == 0)
+ {
+ /* Do nothing */
+ }
+#ifndef WIN32
+ else if (setsockopt(conn->sock,
+ SOL_SOCKET, SO_KEEPALIVE,
+ (char *) &on, sizeof(on)) < 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s(%s) failed: %s\n"),
+ "setsockopt",
+ "SO_KEEPALIVE",
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ err = 1;
+ }
+ else if (!setKeepalivesIdle(conn)
+ || !setKeepalivesInterval(conn)
+ || !setKeepalivesCount(conn))
+ err = 1;
+#else /* WIN32 */
+#ifdef SIO_KEEPALIVE_VALS
+ else if (!setKeepalivesWin32(conn))
+ err = 1;
+#endif /* SIO_KEEPALIVE_VALS */
+#endif /* WIN32 */
+ else if (!setTCPUserTimeout(conn))
+ err = 1;
+
+ if (err)
+ {
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+ }
+
+ /*----------
+ * We have three methods of blocking SIGPIPE during
+ * send() calls to this socket:
+ *
+ * - setsockopt(sock, SO_NOSIGPIPE)
+ * - send(sock, ..., MSG_NOSIGNAL)
+ * - setting the signal mask to SIG_IGN during send()
+ *
+ * The third method requires three syscalls per send,
+ * so we prefer either of the first two, but they are
+ * less portable. The state is tracked in the following
+ * members of PGconn:
+ *
+ * conn->sigpipe_so - we have set up SO_NOSIGPIPE
+ * conn->sigpipe_flag - we're specifying MSG_NOSIGNAL
+ *
+ * If we can use SO_NOSIGPIPE, then set sigpipe_so here
+ * and we're done. Otherwise, set sigpipe_flag so that
+ * we will try MSG_NOSIGNAL on sends. If we get an error
+ * with MSG_NOSIGNAL, we'll clear that flag and revert to
+ * signal masking.
+ *----------
+ */
+ conn->sigpipe_so = false;
+#ifdef MSG_NOSIGNAL
+ conn->sigpipe_flag = true;
+#else
+ conn->sigpipe_flag = false;
+#endif /* MSG_NOSIGNAL */
+
+#ifdef SO_NOSIGPIPE
+ optval = 1;
+ if (setsockopt(conn->sock, SOL_SOCKET, SO_NOSIGPIPE,
+ (char *) &optval, sizeof(optval)) == 0)
+ {
+ conn->sigpipe_so = true;
+ conn->sigpipe_flag = false;
+ }
+#endif /* SO_NOSIGPIPE */
+
+ /*
+ * Start/make connection. This should not block, since we
+ * are in nonblock mode. If it does, well, too bad.
+ */
+ if (connect(conn->sock, addr_cur->ai_addr,
+ addr_cur->ai_addrlen) < 0)
+ {
+ if (SOCK_ERRNO == EINPROGRESS ||
+#ifdef WIN32
+ SOCK_ERRNO == EWOULDBLOCK ||
+#endif
+ SOCK_ERRNO == EINTR)
+ {
+ /*
+ * This is fine - we're in non-blocking mode, and
+ * the connection is in progress. Tell caller to
+ * wait for write-ready on socket.
+ */
+ conn->status = CONNECTION_STARTED;
+ return PGRES_POLLING_WRITING;
+ }
+ /* otherwise, trouble */
+ }
+ else
+ {
+ /*
+ * Hm, we're connected already --- seems the "nonblock
+ * connection" wasn't. Advance the state machine and
+ * go do the next stuff.
+ */
+ conn->status = CONNECTION_STARTED;
+ goto keep_going;
+ }
+
+ /*
+ * This connection failed. Add the error report to
+ * conn->errorMessage, then try the next address if any.
+ */
+ connectFailureMessage(conn, SOCK_ERRNO);
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+ }
+
+ case CONNECTION_STARTED:
+ {
+ ACCEPT_TYPE_ARG3 optlen = sizeof(optval);
+
+ /*
+ * Write ready, since we've made it here, so the connection
+ * has been made ... or has failed.
+ */
+
+ /*
+ * Now check (using getsockopt) that there is not an error
+ * state waiting for us on the socket.
+ */
+
+ if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
+ (char *) &optval, &optlen) == -1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not get socket error status: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+ else if (optval != 0)
+ {
+ /*
+ * When using a nonblocking connect, we will typically see
+ * connect failures at this point, so provide a friendly
+ * error message.
+ */
+ connectFailureMessage(conn, optval);
+
+ /*
+ * Try the next address if any, just as in the case where
+ * connect() returned failure immediately.
+ */
+ conn->try_next_addr = true;
+ goto keep_going;
+ }
+
+ /* Fill in the client address */
+ conn->laddr.salen = sizeof(conn->laddr.addr);
+ if (getsockname(conn->sock,
+ (struct sockaddr *) &conn->laddr.addr,
+ &conn->laddr.salen) < 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not get client address from socket: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+
+ /*
+ * Make sure we can write before advancing to next step.
+ */
+ conn->status = CONNECTION_MADE;
+ return PGRES_POLLING_WRITING;
+ }
+
+ case CONNECTION_MADE:
+ {
+ char *startpacket;
+ int packetlen;
+
+ /*
+ * Implement requirepeer check, if requested and it's a
+ * Unix-domain socket.
+ */
+ if (conn->requirepeer && conn->requirepeer[0] &&
+ IS_AF_UNIX(conn->raddr.addr.ss_family))
+ {
+#ifndef WIN32
+ char pwdbuf[BUFSIZ];
+ struct passwd pass_buf;
+ struct passwd *pass;
+ int passerr;
+#endif
+ uid_t uid;
+ gid_t gid;
+
+ errno = 0;
+ if (getpeereid(conn->sock, &uid, &gid) != 0)
+ {
+ /*
+ * Provide special error message if getpeereid is a
+ * stub
+ */
+ if (errno == ENOSYS)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("requirepeer parameter is not supported on this platform\n"));
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not get peer credentials: %s\n"),
+ strerror_r(errno, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+
+#ifndef WIN32
+ passerr = pqGetpwuid(uid, &pass_buf, pwdbuf, sizeof(pwdbuf), &pass);
+ if (pass == NULL)
+ {
+ if (passerr != 0)
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not look up local user ID %d: %s\n"),
+ (int) uid,
+ strerror_r(passerr, sebuf, sizeof(sebuf)));
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("local user with ID %d does not exist\n"),
+ (int) uid);
+ goto error_return;
+ }
+
+ if (strcmp(pass->pw_name, conn->requirepeer) != 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"),
+ conn->requirepeer, pass->pw_name);
+ goto error_return;
+ }
+#else /* WIN32 */
+ /* should have failed with ENOSYS above */
+ Assert(false);
+#endif /* WIN32 */
+ }
+
+ if (IS_AF_UNIX(conn->raddr.addr.ss_family))
+ {
+ /* Don't request SSL or GSSAPI over Unix sockets */
+#ifdef USE_SSL
+ conn->allow_ssl_try = false;
+#endif
+#ifdef ENABLE_GSS
+ conn->try_gss = false;
+#endif
+ }
+
+#ifdef ENABLE_GSS
+
+ /*
+ * If GSSAPI encryption is enabled, then call
+ * pg_GSS_have_cred_cache() which will return true if we can
+ * acquire credentials (and give us a handle to use in
+ * conn->gcred), and then send a packet to the server asking
+ * for GSSAPI Encryption (and skip past SSL negotiation and
+ * regular startup below).
+ */
+ if (conn->try_gss && !conn->gctx)
+ conn->try_gss = pg_GSS_have_cred_cache(&conn->gcred);
+ if (conn->try_gss && !conn->gctx)
+ {
+ ProtocolVersion pv = pg_hton32(NEGOTIATE_GSS_CODE);
+
+ if (pqPacketSend(conn, 0, &pv, sizeof(pv)) != STATUS_OK)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not send GSSAPI negotiation packet: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+
+ /* Ok, wait for response */
+ conn->status = CONNECTION_GSS_STARTUP;
+ return PGRES_POLLING_READING;
+ }
+ else if (!conn->gctx && conn->gssencmode[0] == 'r')
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"));
+ goto error_return;
+ }
+#endif
+
+#ifdef USE_SSL
+
+ /*
+ * Enable the libcrypto callbacks before checking if SSL needs
+ * to be done. This is done before sending the startup packet
+ * as depending on the type of authentication done, like MD5
+ * or SCRAM that use cryptohashes, the callbacks would be
+ * required even without a SSL connection
+ */
+ if (pqsecure_initialize(conn, false, true) < 0)
+ goto error_return;
+
+ /*
+ * If SSL is enabled and we haven't already got encryption of
+ * some sort running, request SSL instead of sending the
+ * startup message.
+ */
+ if (conn->allow_ssl_try && !conn->wait_ssl_try &&
+ !conn->ssl_in_use
+#ifdef ENABLE_GSS
+ && !conn->gssenc
+#endif
+ )
+ {
+ ProtocolVersion pv;
+
+ /*
+ * Send the SSL request packet.
+ *
+ * Theoretically, this could block, but it really
+ * shouldn't since we only got here if the socket is
+ * write-ready.
+ */
+ pv = pg_hton32(NEGOTIATE_SSL_CODE);
+ if (pqPacketSend(conn, 0, &pv, sizeof(pv)) != STATUS_OK)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not send SSL negotiation packet: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+ /* Ok, wait for response */
+ conn->status = CONNECTION_SSL_STARTUP;
+ return PGRES_POLLING_READING;
+ }
+#endif /* USE_SSL */
+
+ /*
+ * Build the startup packet.
+ */
+ startpacket = pqBuildStartupPacket3(conn, &packetlen,
+ EnvironmentOptions);
+ if (!startpacket)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ goto error_return;
+ }
+
+ /*
+ * Send the startup packet.
+ *
+ * Theoretically, this could block, but it really shouldn't
+ * since we only got here if the socket is write-ready.
+ */
+ if (pqPacketSend(conn, 0, startpacket, packetlen) != STATUS_OK)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not send startup packet: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ free(startpacket);
+ goto error_return;
+ }
+
+ free(startpacket);
+
+ conn->status = CONNECTION_AWAITING_RESPONSE;
+ return PGRES_POLLING_READING;
+ }
+
+ /*
+ * Handle SSL negotiation: wait for postmaster messages and
+ * respond as necessary.
+ */
+ case CONNECTION_SSL_STARTUP:
+ {
+#ifdef USE_SSL
+ PostgresPollingStatusType pollres;
+
+ /*
+ * On first time through, get the postmaster's response to our
+ * SSL negotiation packet.
+ */
+ if (!conn->ssl_in_use)
+ {
+ /*
+ * We use pqReadData here since it has the logic to
+ * distinguish no-data-yet from connection closure. Since
+ * conn->ssl isn't set, a plain recv() will occur.
+ */
+ char SSLok;
+ int rdresult;
+
+ rdresult = pqReadData(conn);
+ if (rdresult < 0)
+ {
+ /* errorMessage is already filled in */
+ goto error_return;
+ }
+ if (rdresult == 0)
+ {
+ /* caller failed to wait for data */
+ return PGRES_POLLING_READING;
+ }
+ if (pqGetc(&SSLok, conn) < 0)
+ {
+ /* should not happen really */
+ return PGRES_POLLING_READING;
+ }
+ if (SSLok == 'S')
+ {
+ /* mark byte consumed */
+ conn->inStart = conn->inCursor;
+
+ /*
+ * Set up global SSL state if required. The crypto
+ * state has already been set if libpq took care of
+ * doing that, so there is no need to make that happen
+ * again.
+ */
+ if (pqsecure_initialize(conn, true, false) != 0)
+ goto error_return;
+ }
+ else if (SSLok == 'N')
+ {
+ /* mark byte consumed */
+ conn->inStart = conn->inCursor;
+ /* OK to do without SSL? */
+ if (conn->sslmode[0] == 'r' || /* "require" */
+ conn->sslmode[0] == 'v') /* "verify-ca" or
+ * "verify-full" */
+ {
+ /* Require SSL, but server does not want it */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server does not support SSL, but SSL was required\n"));
+ goto error_return;
+ }
+ /* Otherwise, proceed with normal startup */
+ conn->allow_ssl_try = false;
+ /* We can proceed using this connection */
+ conn->status = CONNECTION_MADE;
+ return PGRES_POLLING_WRITING;
+ }
+ else if (SSLok == 'E')
+ {
+ /*
+ * Server failure of some sort, such as failure to
+ * fork a backend process. We need to process and
+ * report the error message, which might be formatted
+ * according to either protocol 2 or protocol 3.
+ * Rather than duplicate the code for that, we flip
+ * into AWAITING_RESPONSE state and let the code there
+ * deal with it. Note we have *not* consumed the "E"
+ * byte here.
+ */
+ conn->status = CONNECTION_AWAITING_RESPONSE;
+ goto keep_going;
+ }
+ else
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("received invalid response to SSL negotiation: %c\n"),
+ SSLok);
+ goto error_return;
+ }
+ }
+
+ /*
+ * Begin or continue the SSL negotiation process.
+ */
+ pollres = pqsecure_open_client(conn);
+ if (pollres == PGRES_POLLING_OK)
+ {
+ /*
+ * At this point we should have no data already buffered.
+ * If we do, it was received before we performed the SSL
+ * handshake, so it wasn't encrypted and indeed may have
+ * been injected by a man-in-the-middle.
+ */
+ if (conn->inCursor != conn->inEnd)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("received unencrypted data after SSL response\n"));
+ goto error_return;
+ }
+
+ /* SSL handshake done, ready to send startup packet */
+ conn->status = CONNECTION_MADE;
+ return PGRES_POLLING_WRITING;
+ }
+ if (pollres == PGRES_POLLING_FAILED)
+ {
+ /*
+ * Failed ... if sslmode is "prefer" then do a non-SSL
+ * retry
+ */
+ if (conn->sslmode[0] == 'p' /* "prefer" */
+ && conn->allow_ssl_try /* redundant? */
+ && !conn->wait_ssl_try) /* redundant? */
+ {
+ /* only retry once */
+ conn->allow_ssl_try = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+ /* Else it's a hard failure */
+ goto error_return;
+ }
+ /* Else, return POLLING_READING or POLLING_WRITING status */
+ return pollres;
+#else /* !USE_SSL */
+ /* can't get here */
+ goto error_return;
+#endif /* USE_SSL */
+ }
+
+ case CONNECTION_GSS_STARTUP:
+ {
+#ifdef ENABLE_GSS
+ PostgresPollingStatusType pollres;
+
+ /*
+ * If we haven't yet, get the postmaster's response to our
+ * negotiation packet
+ */
+ if (conn->try_gss && !conn->gctx)
+ {
+ char gss_ok;
+ int rdresult = pqReadData(conn);
+
+ if (rdresult < 0)
+ /* pqReadData fills in error message */
+ goto error_return;
+ else if (rdresult == 0)
+ /* caller failed to wait for data */
+ return PGRES_POLLING_READING;
+ if (pqGetc(&gss_ok, conn) < 0)
+ /* shouldn't happen... */
+ return PGRES_POLLING_READING;
+
+ if (gss_ok == 'E')
+ {
+ /*
+ * Server failure of some sort. Assume it's a
+ * protocol version support failure, and let's see if
+ * we can't recover (if it's not, we'll get a better
+ * error message on retry). Server gets fussy if we
+ * don't hang up the socket, though.
+ */
+ conn->try_gss = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+
+ /* mark byte consumed */
+ conn->inStart = conn->inCursor;
+
+ if (gss_ok == 'N')
+ {
+ /* Server doesn't want GSSAPI; fall back if we can */
+ if (conn->gssencmode[0] == 'r')
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server doesn't support GSSAPI encryption, but it was required\n"));
+ goto error_return;
+ }
+
+ conn->try_gss = false;
+ /* We can proceed using this connection */
+ conn->status = CONNECTION_MADE;
+ return PGRES_POLLING_WRITING;
+ }
+ else if (gss_ok != 'G')
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("received invalid response to GSSAPI negotiation: %c\n"),
+ gss_ok);
+ goto error_return;
+ }
+ }
+
+ /* Begin or continue GSSAPI negotiation */
+ pollres = pqsecure_open_gss(conn);
+ if (pollres == PGRES_POLLING_OK)
+ {
+ /*
+ * At this point we should have no data already buffered.
+ * If we do, it was received before we performed the GSS
+ * handshake, so it wasn't encrypted and indeed may have
+ * been injected by a man-in-the-middle.
+ */
+ if (conn->inCursor != conn->inEnd)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("received unencrypted data after GSSAPI encryption response\n"));
+ goto error_return;
+ }
+
+ /* All set for startup packet */
+ conn->status = CONNECTION_MADE;
+ return PGRES_POLLING_WRITING;
+ }
+ else if (pollres == PGRES_POLLING_FAILED &&
+ conn->gssencmode[0] == 'p')
+ {
+ /*
+ * We failed, but we can retry on "prefer". Have to drop
+ * the current connection to do so, though.
+ */
+ conn->try_gss = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+ return pollres;
+#else /* !ENABLE_GSS */
+ /* unreachable */
+ goto error_return;
+#endif /* ENABLE_GSS */
+ }
+
+ /*
+ * Handle authentication exchange: wait for postmaster messages
+ * and respond as necessary.
+ */
+ case CONNECTION_AWAITING_RESPONSE:
+ {
+ char beresp;
+ int msgLength;
+ int avail;
+ AuthRequest areq;
+ int res;
+
+ /*
+ * Scan the message from current point (note that if we find
+ * the message is incomplete, we will return without advancing
+ * inStart, and resume here next time).
+ */
+ conn->inCursor = conn->inStart;
+
+ /* Read type byte */
+ if (pqGetc(&beresp, conn))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+
+ /*
+ * Validate message type: we expect only an authentication
+ * request or an error here. Anything else probably means
+ * it's not Postgres on the other end at all.
+ */
+ if (!(beresp == 'R' || beresp == 'E'))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("expected authentication request from server, but received %c\n"),
+ beresp);
+ goto error_return;
+ }
+
+ /* Read message length word */
+ if (pqGetInt(&msgLength, 4, conn))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+
+ /*
+ * Try to validate message length before using it.
+ * Authentication requests can't be very large, although GSS
+ * auth requests may not be that small. Errors can be a
+ * little larger, but not huge. If we see a large apparent
+ * length in an error, it means we're really talking to a
+ * pre-3.0-protocol server; cope. (Before version 14, the
+ * server also used the old protocol for errors that happened
+ * before processing the startup packet.)
+ */
+ if (beresp == 'R' && (msgLength < 8 || msgLength > 2000))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("expected authentication request from server, but received %c\n"),
+ beresp);
+ goto error_return;
+ }
+
+ if (beresp == 'E' && (msgLength < 8 || msgLength > 30000))
+ {
+ /* Handle error from a pre-3.0 server */
+ conn->inCursor = conn->inStart + 1; /* reread data */
+ if (pqGets_append(&conn->errorMessage, conn))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+ /* OK, we read the message; mark data consumed */
+ conn->inStart = conn->inCursor;
+
+ /*
+ * Before 7.2, the postmaster didn't always end its
+ * messages with a newline, so add one if needed to
+ * conform to libpq conventions.
+ */
+ if (conn->errorMessage.len == 0 ||
+ conn->errorMessage.data[conn->errorMessage.len - 1] != '\n')
+ {
+ appendPQExpBufferChar(&conn->errorMessage, '\n');
+ }
+
+ goto error_return;
+ }
+
+ /*
+ * Can't process if message body isn't all here yet.
+ */
+ msgLength -= 4;
+ avail = conn->inEnd - conn->inCursor;
+ if (avail < msgLength)
+ {
+ /*
+ * Before returning, try to enlarge the input buffer if
+ * needed to hold the whole message; see notes in
+ * pqParseInput3.
+ */
+ if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
+ conn))
+ goto error_return;
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+
+ /* Handle errors. */
+ if (beresp == 'E')
+ {
+ if (pqGetErrorNotice3(conn, true))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+ /* OK, we read the message; mark data consumed */
+ conn->inStart = conn->inCursor;
+
+ /*
+ * If error is "cannot connect now", try the next host if
+ * any (but we don't want to consider additional addresses
+ * for this host, nor is there much point in changing SSL
+ * or GSS mode). This is helpful when dealing with
+ * standby servers that might not be in hot-standby state.
+ */
+ if (strcmp(conn->last_sqlstate,
+ ERRCODE_CANNOT_CONNECT_NOW) == 0)
+ {
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+
+ /* Check to see if we should mention pgpassfile */
+ pgpassfileWarning(conn);
+
+#ifdef ENABLE_GSS
+
+ /*
+ * If gssencmode is "prefer" and we're using GSSAPI, retry
+ * without it.
+ */
+ if (conn->gssenc && conn->gssencmode[0] == 'p')
+ {
+ /* only retry once */
+ conn->try_gss = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+#endif
+
+#ifdef USE_SSL
+
+ /*
+ * if sslmode is "allow" and we haven't tried an SSL
+ * connection already, then retry with an SSL connection
+ */
+ if (conn->sslmode[0] == 'a' /* "allow" */
+ && !conn->ssl_in_use
+ && conn->allow_ssl_try
+ && conn->wait_ssl_try)
+ {
+ /* only retry once */
+ conn->wait_ssl_try = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+
+ /*
+ * if sslmode is "prefer" and we're in an SSL connection,
+ * then do a non-SSL retry
+ */
+ if (conn->sslmode[0] == 'p' /* "prefer" */
+ && conn->ssl_in_use
+ && conn->allow_ssl_try /* redundant? */
+ && !conn->wait_ssl_try) /* redundant? */
+ {
+ /* only retry once */
+ conn->allow_ssl_try = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+#endif
+
+ goto error_return;
+ }
+
+ /* It is an authentication request. */
+ conn->auth_req_received = true;
+
+ /* Get the type of request. */
+ if (pqGetInt((int *) &areq, 4, conn))
+ {
+ /* We'll come back when there are more data */
+ return PGRES_POLLING_READING;
+ }
+ msgLength -= 4;
+
+ /*
+ * Process the rest of the authentication request message, and
+ * respond to it if necessary.
+ *
+ * Note that conn->pghost must be non-NULL if we are going to
+ * avoid the Kerberos code doing a hostname look-up.
+ */
+ res = pg_fe_sendauth(areq, msgLength, conn);
+
+ /* OK, we have processed the message; mark data consumed */
+ conn->inStart = conn->inCursor;
+
+ if (res != STATUS_OK)
+ goto error_return;
+
+ /*
+ * Just make sure that any data sent by pg_fe_sendauth is
+ * flushed out. Although this theoretically could block, it
+ * really shouldn't since we don't send large auth responses.
+ */
+ if (pqFlush(conn))
+ goto error_return;
+
+ if (areq == AUTH_REQ_OK)
+ {
+ /* We are done with authentication exchange */
+ conn->status = CONNECTION_AUTH_OK;
+
+ /*
+ * Set asyncStatus so that PQgetResult will think that
+ * what comes back next is the result of a query. See
+ * below.
+ */
+ conn->asyncStatus = PGASYNC_BUSY;
+ }
+
+ /* Look to see if we have more data yet. */
+ goto keep_going;
+ }
+
+ case CONNECTION_AUTH_OK:
+ {
+ /*
+ * Now we expect to hear from the backend. A ReadyForQuery
+ * message indicates that startup is successful, but we might
+ * also get an Error message indicating failure. (Notice
+ * messages indicating nonfatal warnings are also allowed by
+ * the protocol, as are ParameterStatus and BackendKeyData
+ * messages.) Easiest way to handle this is to let
+ * PQgetResult() read the messages. We just have to fake it
+ * out about the state of the connection, by setting
+ * asyncStatus = PGASYNC_BUSY (done above).
+ */
+
+ if (PQisBusy(conn))
+ return PGRES_POLLING_READING;
+
+ res = PQgetResult(conn);
+
+ /*
+ * NULL return indicating we have gone to IDLE state is
+ * expected
+ */
+ if (res)
+ {
+ if (res->resultStatus != PGRES_FATAL_ERROR)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("unexpected message from server during startup\n"));
+ else if (conn->send_appname &&
+ (conn->appname || conn->fbappname))
+ {
+ /*
+ * If we tried to send application_name, check to see
+ * if the error is about that --- pre-9.0 servers will
+ * reject it at this stage of the process. If so,
+ * close the connection and retry without sending
+ * application_name. We could possibly get a false
+ * SQLSTATE match here and retry uselessly, but there
+ * seems no great harm in that; we'll just get the
+ * same error again if it's unrelated.
+ */
+ const char *sqlstate;
+
+ sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
+ if (sqlstate &&
+ strcmp(sqlstate, ERRCODE_APPNAME_UNKNOWN) == 0)
+ {
+ PQclear(res);
+ conn->send_appname = false;
+ need_new_connection = true;
+ goto keep_going;
+ }
+ }
+
+ /*
+ * if the resultStatus is FATAL, then conn->errorMessage
+ * already has a copy of the error; needn't copy it back.
+ * But add a newline if it's not there already, since
+ * postmaster error messages may not have one.
+ */
+ if (conn->errorMessage.len <= 0 ||
+ conn->errorMessage.data[conn->errorMessage.len - 1] != '\n')
+ appendPQExpBufferChar(&conn->errorMessage, '\n');
+ PQclear(res);
+ goto error_return;
+ }
+
+ /* Almost there now ... */
+ conn->status = CONNECTION_CHECK_TARGET;
+ goto keep_going;
+ }
+
+ case CONNECTION_CHECK_TARGET:
+ {
+ /*
+ * If a read-write, read-only, primary, or standby connection
+ * is required, see if we have one.
+ */
+ if (conn->target_server_type == SERVER_TYPE_READ_WRITE ||
+ conn->target_server_type == SERVER_TYPE_READ_ONLY)
+ {
+ bool read_only_server;
+
+ /*
+ * If the server didn't report
+ * "default_transaction_read_only" or "in_hot_standby" at
+ * startup, we must determine its state by sending the
+ * query "SHOW transaction_read_only". This GUC exists in
+ * all server versions that support 3.0 protocol.
+ */
+ if (conn->default_transaction_read_only == PG_BOOL_UNKNOWN ||
+ conn->in_hot_standby == PG_BOOL_UNKNOWN)
+ {
+ /*
+ * We use PQsendQueryContinue so that
+ * conn->errorMessage does not get cleared. We need
+ * to preserve any error messages related to previous
+ * hosts we have tried and failed to connect to.
+ */
+ conn->status = CONNECTION_OK;
+ if (!PQsendQueryContinue(conn,
+ "SHOW transaction_read_only"))
+ goto error_return;
+ /* We'll return to this state when we have the answer */
+ conn->status = CONNECTION_CHECK_WRITABLE;
+ return PGRES_POLLING_READING;
+ }
+
+ /* OK, we can make the test */
+ read_only_server =
+ (conn->default_transaction_read_only == PG_BOOL_YES ||
+ conn->in_hot_standby == PG_BOOL_YES);
+
+ if ((conn->target_server_type == SERVER_TYPE_READ_WRITE) ?
+ read_only_server : !read_only_server)
+ {
+ /* Wrong server state, reject and try the next host */
+ if (conn->target_server_type == SERVER_TYPE_READ_WRITE)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("session is read-only\n"));
+ else
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("session is not read-only\n"));
+
+ /* Close connection politely. */
+ conn->status = CONNECTION_OK;
+ sendTerminateConn(conn);
+
+ /*
+ * Try next host if any, but we don't want to consider
+ * additional addresses for this host.
+ */
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+ }
+ else if (conn->target_server_type == SERVER_TYPE_PRIMARY ||
+ conn->target_server_type == SERVER_TYPE_STANDBY ||
+ conn->target_server_type == SERVER_TYPE_PREFER_STANDBY)
+ {
+ /*
+ * If the server didn't report "in_hot_standby" at
+ * startup, we must determine its state by sending the
+ * query "SELECT pg_catalog.pg_is_in_recovery()". Servers
+ * before 9.0 don't have that function, but by the same
+ * token they don't have any standby mode, so we may just
+ * assume the result.
+ */
+ if (conn->sversion < 90000)
+ conn->in_hot_standby = PG_BOOL_NO;
+
+ if (conn->in_hot_standby == PG_BOOL_UNKNOWN)
+ {
+ /*
+ * We use PQsendQueryContinue so that
+ * conn->errorMessage does not get cleared. We need
+ * to preserve any error messages related to previous
+ * hosts we have tried and failed to connect to.
+ */
+ conn->status = CONNECTION_OK;
+ if (!PQsendQueryContinue(conn,
+ "SELECT pg_catalog.pg_is_in_recovery()"))
+ goto error_return;
+ /* We'll return to this state when we have the answer */
+ conn->status = CONNECTION_CHECK_STANDBY;
+ return PGRES_POLLING_READING;
+ }
+
+ /* OK, we can make the test */
+ if ((conn->target_server_type == SERVER_TYPE_PRIMARY) ?
+ (conn->in_hot_standby == PG_BOOL_YES) :
+ (conn->in_hot_standby == PG_BOOL_NO))
+ {
+ /* Wrong server state, reject and try the next host */
+ if (conn->target_server_type == SERVER_TYPE_PRIMARY)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server is in hot standby mode\n"));
+ else
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server is not in hot standby mode\n"));
+
+ /* Close connection politely. */
+ conn->status = CONNECTION_OK;
+ sendTerminateConn(conn);
+
+ /*
+ * Try next host if any, but we don't want to consider
+ * additional addresses for this host.
+ */
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+ }
+
+ /* We can release the address list now. */
+ release_conn_addrinfo(conn);
+
+ /*
+ * Contents of conn->errorMessage are no longer interesting
+ * (and it seems some clients expect it to be empty after a
+ * successful connection).
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* We are open for business! */
+ conn->status = CONNECTION_OK;
+ return PGRES_POLLING_OK;
+ }
+
+ case CONNECTION_CONSUME:
+ {
+ /*
+ * This state just makes sure the connection is idle after
+ * we've obtained the result of a SHOW or SELECT query. Once
+ * we're clear, return to CONNECTION_CHECK_TARGET state to
+ * decide what to do next. We must transiently set status =
+ * CONNECTION_OK in order to use the result-consuming
+ * subroutines.
+ */
+ conn->status = CONNECTION_OK;
+ if (!PQconsumeInput(conn))
+ goto error_return;
+
+ if (PQisBusy(conn))
+ {
+ conn->status = CONNECTION_CONSUME;
+ return PGRES_POLLING_READING;
+ }
+
+ /* Call PQgetResult() again until we get a NULL result */
+ res = PQgetResult(conn);
+ if (res != NULL)
+ {
+ PQclear(res);
+ conn->status = CONNECTION_CONSUME;
+ return PGRES_POLLING_READING;
+ }
+
+ conn->status = CONNECTION_CHECK_TARGET;
+ goto keep_going;
+ }
+
+ case CONNECTION_CHECK_WRITABLE:
+ {
+ /*
+ * Waiting for result of "SHOW transaction_read_only". We
+ * must transiently set status = CONNECTION_OK in order to use
+ * the result-consuming subroutines.
+ */
+ conn->status = CONNECTION_OK;
+ if (!PQconsumeInput(conn))
+ goto error_return;
+
+ if (PQisBusy(conn))
+ {
+ conn->status = CONNECTION_CHECK_WRITABLE;
+ return PGRES_POLLING_READING;
+ }
+
+ res = PQgetResult(conn);
+ if (res && PQresultStatus(res) == PGRES_TUPLES_OK &&
+ PQntuples(res) == 1)
+ {
+ char *val = PQgetvalue(res, 0, 0);
+
+ /*
+ * "transaction_read_only = on" proves that at least one
+ * of default_transaction_read_only and in_hot_standby is
+ * on, but we don't actually know which. We don't care
+ * though for the purpose of identifying a read-only
+ * session, so satisfy the CONNECTION_CHECK_TARGET code by
+ * claiming they are both on. On the other hand, if it's
+ * a read-write session, they are certainly both off.
+ */
+ if (strncmp(val, "on", 2) == 0)
+ {
+ conn->default_transaction_read_only = PG_BOOL_YES;
+ conn->in_hot_standby = PG_BOOL_YES;
+ }
+ else
+ {
+ conn->default_transaction_read_only = PG_BOOL_NO;
+ conn->in_hot_standby = PG_BOOL_NO;
+ }
+ PQclear(res);
+
+ /* Finish reading messages before continuing */
+ conn->status = CONNECTION_CONSUME;
+ goto keep_going;
+ }
+
+ /* Something went wrong with "SHOW transaction_read_only". */
+ if (res)
+ PQclear(res);
+
+ /* Append error report to conn->errorMessage. */
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("\"%s\" failed\n"),
+ "SHOW transaction_read_only");
+
+ /* Close connection politely. */
+ conn->status = CONNECTION_OK;
+ sendTerminateConn(conn);
+
+ /* Try next host. */
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+
+ case CONNECTION_CHECK_STANDBY:
+ {
+ /*
+ * Waiting for result of "SELECT pg_is_in_recovery()". We
+ * must transiently set status = CONNECTION_OK in order to use
+ * the result-consuming subroutines.
+ */
+ conn->status = CONNECTION_OK;
+ if (!PQconsumeInput(conn))
+ goto error_return;
+
+ if (PQisBusy(conn))
+ {
+ conn->status = CONNECTION_CHECK_STANDBY;
+ return PGRES_POLLING_READING;
+ }
+
+ res = PQgetResult(conn);
+ if (res && PQresultStatus(res) == PGRES_TUPLES_OK &&
+ PQntuples(res) == 1)
+ {
+ char *val = PQgetvalue(res, 0, 0);
+
+ if (strncmp(val, "t", 1) == 0)
+ conn->in_hot_standby = PG_BOOL_YES;
+ else
+ conn->in_hot_standby = PG_BOOL_NO;
+ PQclear(res);
+
+ /* Finish reading messages before continuing */
+ conn->status = CONNECTION_CONSUME;
+ goto keep_going;
+ }
+
+ /* Something went wrong with "SELECT pg_is_in_recovery()". */
+ if (res)
+ PQclear(res);
+
+ /* Append error report to conn->errorMessage. */
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("\"%s\" failed\n"),
+ "SELECT pg_is_in_recovery()");
+
+ /* Close connection politely. */
+ conn->status = CONNECTION_OK;
+ sendTerminateConn(conn);
+
+ /* Try next host. */
+ conn->try_next_host = true;
+ goto keep_going;
+ }
+
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid connection state %d, "
+ "probably indicative of memory corruption\n"),
+ conn->status);
+ goto error_return;
+ }
+
+ /* Unreachable */
+
+error_return:
+
+ /*
+ * We used to close the socket at this point, but that makes it awkward
+ * for those above us if they wish to remove this socket from their own
+ * records (an fd_set for example). We'll just have this socket closed
+ * when PQfinish is called (which is compulsory even after an error, since
+ * the connection structure must be freed).
+ */
+ conn->status = CONNECTION_BAD;
+ return PGRES_POLLING_FAILED;
+}
+
+
+/*
+ * internal_ping
+ * Determine if a server is running and if we can connect to it.
+ *
+ * The argument is a connection that's been started, but not completed.
+ */
+static PGPing
+internal_ping(PGconn *conn)
+{
+ /* Say "no attempt" if we never got to PQconnectPoll */
+ if (!conn || !conn->options_valid)
+ return PQPING_NO_ATTEMPT;
+
+ /* Attempt to complete the connection */
+ if (conn->status != CONNECTION_BAD)
+ (void) connectDBComplete(conn);
+
+ /* Definitely OK if we succeeded */
+ if (conn->status != CONNECTION_BAD)
+ return PQPING_OK;
+
+ /*
+ * Here begins the interesting part of "ping": determine the cause of the
+ * failure in sufficient detail to decide what to return. We do not want
+ * to report that the server is not up just because we didn't have a valid
+ * password, for example. In fact, any sort of authentication request
+ * implies the server is up. (We need this check since the libpq side of
+ * things might have pulled the plug on the connection before getting an
+ * error as such from the postmaster.)
+ */
+ if (conn->auth_req_received)
+ return PQPING_OK;
+
+ /*
+ * If we failed to get any ERROR response from the postmaster, report
+ * PQPING_NO_RESPONSE. This result could be somewhat misleading for a
+ * pre-7.4 server, since it won't send back a SQLSTATE, but those are long
+ * out of support. Another corner case where the server could return a
+ * failure without a SQLSTATE is fork failure, but PQPING_NO_RESPONSE
+ * isn't totally unreasonable for that anyway. We expect that every other
+ * failure case in a modern server will produce a report with a SQLSTATE.
+ *
+ * NOTE: whenever we get around to making libpq generate SQLSTATEs for
+ * client-side errors, we should either not store those into
+ * last_sqlstate, or add an extra flag so we can tell client-side errors
+ * apart from server-side ones.
+ */
+ if (strlen(conn->last_sqlstate) != 5)
+ return PQPING_NO_RESPONSE;
+
+ /*
+ * Report PQPING_REJECT if server says it's not accepting connections. (We
+ * distinguish this case mainly for the convenience of pg_ctl.)
+ */
+ if (strcmp(conn->last_sqlstate, ERRCODE_CANNOT_CONNECT_NOW) == 0)
+ return PQPING_REJECT;
+
+ /*
+ * Any other SQLSTATE can be taken to indicate that the server is up.
+ * Presumably it didn't like our username, password, or database name; or
+ * perhaps it had some transient failure, but that should not be taken as
+ * meaning "it's down".
+ */
+ return PQPING_OK;
+}
+
+
+/*
+ * makeEmptyPGconn
+ * - create a PGconn data structure with (as yet) no interesting data
+ */
+static PGconn *
+makeEmptyPGconn(void)
+{
+ PGconn *conn;
+
+#ifdef WIN32
+
+ /*
+ * Make sure socket support is up and running in this process.
+ *
+ * Note: the Windows documentation says that we should eventually do a
+ * matching WSACleanup() call, but experience suggests that that is at
+ * least as likely to cause problems as fix them. So we don't.
+ */
+ static bool wsastartup_done = false;
+
+ if (!wsastartup_done)
+ {
+ WSADATA wsaData;
+
+ if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)
+ return NULL;
+ wsastartup_done = true;
+ }
+
+ /* Forget any earlier error */
+ WSASetLastError(0);
+#endif /* WIN32 */
+
+ conn = (PGconn *) malloc(sizeof(PGconn));
+ if (conn == NULL)
+ return conn;
+
+ /* Zero all pointers and booleans */
+ MemSet(conn, 0, sizeof(PGconn));
+
+ /* install default notice hooks */
+ conn->noticeHooks.noticeRec = defaultNoticeReceiver;
+ conn->noticeHooks.noticeProc = defaultNoticeProcessor;
+
+ conn->status = CONNECTION_BAD;
+ conn->asyncStatus = PGASYNC_IDLE;
+ conn->pipelineStatus = PQ_PIPELINE_OFF;
+ conn->xactStatus = PQTRANS_IDLE;
+ conn->options_valid = false;
+ conn->nonblocking = false;
+ conn->client_encoding = PG_SQL_ASCII;
+ conn->std_strings = false; /* unless server says differently */
+ conn->default_transaction_read_only = PG_BOOL_UNKNOWN;
+ conn->in_hot_standby = PG_BOOL_UNKNOWN;
+ conn->verbosity = PQERRORS_DEFAULT;
+ conn->show_context = PQSHOW_CONTEXT_ERRORS;
+ conn->sock = PGINVALID_SOCKET;
+ conn->Pfdebug = NULL;
+
+ /*
+ * We try to send at least 8K at a time, which is the usual size of pipe
+ * buffers on Unix systems. That way, when we are sending a large amount
+ * of data, we avoid incurring extra kernel context swaps for partial
+ * bufferloads. The output buffer is initially made 16K in size, and we
+ * try to dump it after accumulating 8K.
+ *
+ * With the same goal of minimizing context swaps, the input buffer will
+ * be enlarged anytime it has less than 8K free, so we initially allocate
+ * twice that.
+ */
+ conn->inBufSize = 16 * 1024;
+ conn->inBuffer = (char *) malloc(conn->inBufSize);
+ conn->outBufSize = 16 * 1024;
+ conn->outBuffer = (char *) malloc(conn->outBufSize);
+ conn->rowBufLen = 32;
+ conn->rowBuf = (PGdataValue *) malloc(conn->rowBufLen * sizeof(PGdataValue));
+ initPQExpBuffer(&conn->errorMessage);
+ initPQExpBuffer(&conn->workBuffer);
+
+ if (conn->inBuffer == NULL ||
+ conn->outBuffer == NULL ||
+ conn->rowBuf == NULL ||
+ PQExpBufferBroken(&conn->errorMessage) ||
+ PQExpBufferBroken(&conn->workBuffer))
+ {
+ /* out of memory already :-( */
+ freePGconn(conn);
+ conn = NULL;
+ }
+
+ return conn;
+}
+
+/*
+ * freePGconn
+ * - free an idle (closed) PGconn data structure
+ *
+ * NOTE: this should not overlap any functionality with closePGconn().
+ * Clearing/resetting of transient state belongs there; what we do here is
+ * release data that is to be held for the life of the PGconn structure.
+ * If a value ought to be cleared/freed during PQreset(), do it there not here.
+ */
+static void
+freePGconn(PGconn *conn)
+{
+ int i;
+
+ /* let any event procs clean up their state data */
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ PGEventConnDestroy evt;
+
+ evt.conn = conn;
+ (void) conn->events[i].proc(PGEVT_CONNDESTROY, &evt,
+ conn->events[i].passThrough);
+ free(conn->events[i].name);
+ }
+
+ /* clean up pg_conn_host structures */
+ if (conn->connhost != NULL)
+ {
+ for (i = 0; i < conn->nconnhost; ++i)
+ {
+ if (conn->connhost[i].host != NULL)
+ free(conn->connhost[i].host);
+ if (conn->connhost[i].hostaddr != NULL)
+ free(conn->connhost[i].hostaddr);
+ if (conn->connhost[i].port != NULL)
+ free(conn->connhost[i].port);
+ if (conn->connhost[i].password != NULL)
+ {
+ explicit_bzero(conn->connhost[i].password, strlen(conn->connhost[i].password));
+ free(conn->connhost[i].password);
+ }
+ }
+ free(conn->connhost);
+ }
+
+ if (conn->client_encoding_initial)
+ free(conn->client_encoding_initial);
+ if (conn->events)
+ free(conn->events);
+ if (conn->pghost)
+ free(conn->pghost);
+ if (conn->pghostaddr)
+ free(conn->pghostaddr);
+ if (conn->pgport)
+ free(conn->pgport);
+ if (conn->connect_timeout)
+ free(conn->connect_timeout);
+ if (conn->pgtcp_user_timeout)
+ free(conn->pgtcp_user_timeout);
+ if (conn->pgoptions)
+ free(conn->pgoptions);
+ if (conn->appname)
+ free(conn->appname);
+ if (conn->fbappname)
+ free(conn->fbappname);
+ if (conn->dbName)
+ free(conn->dbName);
+ if (conn->replication)
+ free(conn->replication);
+ if (conn->pguser)
+ free(conn->pguser);
+ if (conn->pgpass)
+ {
+ explicit_bzero(conn->pgpass, strlen(conn->pgpass));
+ free(conn->pgpass);
+ }
+ if (conn->pgpassfile)
+ free(conn->pgpassfile);
+ if (conn->channel_binding)
+ free(conn->channel_binding);
+ if (conn->keepalives)
+ free(conn->keepalives);
+ if (conn->keepalives_idle)
+ free(conn->keepalives_idle);
+ if (conn->keepalives_interval)
+ free(conn->keepalives_interval);
+ if (conn->keepalives_count)
+ free(conn->keepalives_count);
+ if (conn->sslmode)
+ free(conn->sslmode);
+ if (conn->sslcert)
+ free(conn->sslcert);
+ if (conn->sslkey)
+ free(conn->sslkey);
+ if (conn->sslpassword)
+ {
+ explicit_bzero(conn->sslpassword, strlen(conn->sslpassword));
+ free(conn->sslpassword);
+ }
+ if (conn->sslrootcert)
+ free(conn->sslrootcert);
+ if (conn->sslcrl)
+ free(conn->sslcrl);
+ if (conn->sslcrldir)
+ free(conn->sslcrldir);
+ if (conn->sslcompression)
+ free(conn->sslcompression);
+ if (conn->sslsni)
+ free(conn->sslsni);
+ if (conn->requirepeer)
+ free(conn->requirepeer);
+ if (conn->ssl_min_protocol_version)
+ free(conn->ssl_min_protocol_version);
+ if (conn->ssl_max_protocol_version)
+ free(conn->ssl_max_protocol_version);
+ if (conn->gssencmode)
+ free(conn->gssencmode);
+ if (conn->krbsrvname)
+ free(conn->krbsrvname);
+ if (conn->gsslib)
+ free(conn->gsslib);
+ if (conn->connip)
+ free(conn->connip);
+ /* Note that conn->Pfdebug is not ours to close or free */
+ if (conn->write_err_msg)
+ free(conn->write_err_msg);
+ if (conn->inBuffer)
+ free(conn->inBuffer);
+ if (conn->outBuffer)
+ free(conn->outBuffer);
+ if (conn->rowBuf)
+ free(conn->rowBuf);
+ if (conn->target_session_attrs)
+ free(conn->target_session_attrs);
+ termPQExpBuffer(&conn->errorMessage);
+ termPQExpBuffer(&conn->workBuffer);
+
+ free(conn);
+}
+
+/*
+ * release_conn_addrinfo
+ * - Free any addrinfo list in the PGconn.
+ */
+static void
+release_conn_addrinfo(PGconn *conn)
+{
+ if (conn->addrlist)
+ {
+ pg_freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
+ conn->addrlist = NULL;
+ conn->addr_cur = NULL; /* for safety */
+ }
+}
+
+/*
+ * sendTerminateConn
+ * - Send a terminate message to backend.
+ */
+static void
+sendTerminateConn(PGconn *conn)
+{
+ /*
+ * Note that the protocol doesn't allow us to send Terminate messages
+ * during the startup phase.
+ */
+ if (conn->sock != PGINVALID_SOCKET && conn->status == CONNECTION_OK)
+ {
+ /*
+ * Try to send "close connection" message to backend. Ignore any
+ * error.
+ */
+ pqPutMsgStart('X', conn);
+ pqPutMsgEnd(conn);
+ (void) pqFlush(conn);
+ }
+}
+
+/*
+ * closePGconn
+ * - properly close a connection to the backend
+ *
+ * This should reset or release all transient state, but NOT the connection
+ * parameters. On exit, the PGconn should be in condition to start a fresh
+ * connection with the same parameters (see PQreset()).
+ */
+static void
+closePGconn(PGconn *conn)
+{
+ /*
+ * If possible, send Terminate message to close the connection politely.
+ */
+ sendTerminateConn(conn);
+
+ /*
+ * Must reset the blocking status so a possible reconnect will work.
+ *
+ * Don't call PQsetnonblocking() because it will fail if it's unable to
+ * flush the connection.
+ */
+ conn->nonblocking = false;
+
+ /*
+ * Close the connection, reset all transient state, flush I/O buffers.
+ * Note that this includes clearing conn->errorMessage; we're no longer
+ * interested in any failures associated with the old connection, and we
+ * want a clean slate for any new connection attempt.
+ */
+ pqDropConnection(conn, true);
+ conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just absent */
+ conn->asyncStatus = PGASYNC_IDLE;
+ conn->xactStatus = PQTRANS_IDLE;
+ conn->pipelineStatus = PQ_PIPELINE_OFF;
+ pqClearAsyncResult(conn); /* deallocate result */
+ resetPQExpBuffer(&conn->errorMessage);
+ release_conn_addrinfo(conn);
+
+ /* Reset all state obtained from server, too */
+ pqDropServerData(conn);
+}
+
+/*
+ * PQfinish: properly close a connection to the backend. Also frees
+ * the PGconn data structure so it shouldn't be re-used after this.
+ */
+void
+PQfinish(PGconn *conn)
+{
+ if (conn)
+ {
+ closePGconn(conn);
+ freePGconn(conn);
+ }
+}
+
+/*
+ * PQreset: resets the connection to the backend by closing the
+ * existing connection and creating a new one.
+ */
+void
+PQreset(PGconn *conn)
+{
+ if (conn)
+ {
+ closePGconn(conn);
+
+ if (connectDBStart(conn) && connectDBComplete(conn))
+ {
+ /*
+ * Notify event procs of successful reset. We treat an event proc
+ * failure as disabling the connection ... good idea?
+ */
+ int i;
+
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ PGEventConnReset evt;
+
+ evt.conn = conn;
+ if (!conn->events[i].proc(PGEVT_CONNRESET, &evt,
+ conn->events[i].passThrough))
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"),
+ conn->events[i].name);
+ break;
+ }
+ }
+ }
+ }
+}
+
+
+/*
+ * PQresetStart:
+ * resets the connection to the backend
+ * closes the existing connection and makes a new one
+ * Returns 1 on success, 0 on failure.
+ */
+int
+PQresetStart(PGconn *conn)
+{
+ if (conn)
+ {
+ closePGconn(conn);
+
+ return connectDBStart(conn);
+ }
+
+ return 0;
+}
+
+
+/*
+ * PQresetPoll:
+ * resets the connection to the backend
+ * closes the existing connection and makes a new one
+ */
+PostgresPollingStatusType
+PQresetPoll(PGconn *conn)
+{
+ if (conn)
+ {
+ PostgresPollingStatusType status = PQconnectPoll(conn);
+
+ if (status == PGRES_POLLING_OK)
+ {
+ /*
+ * Notify event procs of successful reset. We treat an event proc
+ * failure as disabling the connection ... good idea?
+ */
+ int i;
+
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ PGEventConnReset evt;
+
+ evt.conn = conn;
+ if (!conn->events[i].proc(PGEVT_CONNRESET, &evt,
+ conn->events[i].passThrough))
+ {
+ conn->status = CONNECTION_BAD;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"),
+ conn->events[i].name);
+ return PGRES_POLLING_FAILED;
+ }
+ }
+ }
+
+ return status;
+ }
+
+ return PGRES_POLLING_FAILED;
+}
+
+/*
+ * PQgetCancel: get a PGcancel structure corresponding to a connection.
+ *
+ * A copy is needed to be able to cancel a running query from a different
+ * thread. If the same structure is used all structure members would have
+ * to be individually locked (if the entire structure was locked, it would
+ * be impossible to cancel a synchronous query because the structure would
+ * have to stay locked for the duration of the query).
+ */
+PGcancel *
+PQgetCancel(PGconn *conn)
+{
+ PGcancel *cancel;
+
+ if (!conn)
+ return NULL;
+
+ if (conn->sock == PGINVALID_SOCKET)
+ return NULL;
+
+ cancel = malloc(sizeof(PGcancel));
+ if (cancel == NULL)
+ return NULL;
+
+ memcpy(&cancel->raddr, &conn->raddr, sizeof(SockAddr));
+ cancel->be_pid = conn->be_pid;
+ cancel->be_key = conn->be_key;
+
+ return cancel;
+}
+
+/* PQfreeCancel: free a cancel structure */
+void
+PQfreeCancel(PGcancel *cancel)
+{
+ if (cancel)
+ free(cancel);
+}
+
+
+/*
+ * PQcancel and PQrequestCancel: attempt to request cancellation of the
+ * current operation.
+ *
+ * The return value is true if the cancel request was successfully
+ * dispatched, false if not (in which case an error message is available).
+ * Note: successful dispatch is no guarantee that there will be any effect at
+ * the backend. The application must read the operation result as usual.
+ *
+ * CAUTION: we want this routine to be safely callable from a signal handler
+ * (for example, an application might want to call it in a SIGINT handler).
+ * This means we cannot use any C library routine that might be non-reentrant.
+ * malloc/free are often non-reentrant, and anything that might call them is
+ * just as dangerous. We avoid sprintf here for that reason. Building up
+ * error messages with strcpy/strcat is tedious but should be quite safe.
+ * We also save/restore errno in case the signal handler support doesn't.
+ *
+ * internal_cancel() is an internal helper function to make code-sharing
+ * between the two versions of the cancel function possible.
+ */
+static int
+internal_cancel(SockAddr *raddr, int be_pid, int be_key,
+ char *errbuf, int errbufsize)
+{
+ int save_errno = SOCK_ERRNO;
+ pgsocket tmpsock = PGINVALID_SOCKET;
+ int maxlen;
+ struct
+ {
+ uint32 packetlen;
+ CancelRequestPacket cp;
+ } crp;
+
+ /*
+ * We need to open a temporary connection to the postmaster. Do this with
+ * only kernel calls.
+ */
+ if ((tmpsock = socket(raddr->addr.ss_family, SOCK_STREAM, 0)) == PGINVALID_SOCKET)
+ {
+ strlcpy(errbuf, "PQcancel() -- socket() failed: ", errbufsize);
+ goto cancel_errReturn;
+ }
+retry3:
+ if (connect(tmpsock, (struct sockaddr *) &raddr->addr,
+ raddr->salen) < 0)
+ {
+ if (SOCK_ERRNO == EINTR)
+ /* Interrupted system call - we'll just try again */
+ goto retry3;
+ strlcpy(errbuf, "PQcancel() -- connect() failed: ", errbufsize);
+ goto cancel_errReturn;
+ }
+
+ /*
+ * We needn't set nonblocking I/O or NODELAY options here.
+ */
+
+ /* Create and send the cancel request packet. */
+
+ crp.packetlen = pg_hton32((uint32) sizeof(crp));
+ crp.cp.cancelRequestCode = (MsgType) pg_hton32(CANCEL_REQUEST_CODE);
+ crp.cp.backendPID = pg_hton32(be_pid);
+ crp.cp.cancelAuthCode = pg_hton32(be_key);
+
+retry4:
+ if (send(tmpsock, (char *) &crp, sizeof(crp), 0) != (int) sizeof(crp))
+ {
+ if (SOCK_ERRNO == EINTR)
+ /* Interrupted system call - we'll just try again */
+ goto retry4;
+ strlcpy(errbuf, "PQcancel() -- send() failed: ", errbufsize);
+ goto cancel_errReturn;
+ }
+
+ /*
+ * Wait for the postmaster to close the connection, which indicates that
+ * it's processed the request. Without this delay, we might issue another
+ * command only to find that our cancel zaps that command instead of the
+ * one we thought we were canceling. Note we don't actually expect this
+ * read to obtain any data, we are just waiting for EOF to be signaled.
+ */
+retry5:
+ if (recv(tmpsock, (char *) &crp, 1, 0) < 0)
+ {
+ if (SOCK_ERRNO == EINTR)
+ /* Interrupted system call - we'll just try again */
+ goto retry5;
+ /* we ignore other error conditions */
+ }
+
+ /* All done */
+ closesocket(tmpsock);
+ SOCK_ERRNO_SET(save_errno);
+ return true;
+
+cancel_errReturn:
+
+ /*
+ * Make sure we don't overflow the error buffer. Leave space for the \n at
+ * the end, and for the terminating zero.
+ */
+ maxlen = errbufsize - strlen(errbuf) - 2;
+ if (maxlen >= 0)
+ {
+ /*
+ * We can't invoke strerror here, since it's not signal-safe. Settle
+ * for printing the decimal value of errno. Even that has to be done
+ * the hard way.
+ */
+ int val = SOCK_ERRNO;
+ char buf[32];
+ char *bufp;
+
+ bufp = buf + sizeof(buf) - 1;
+ *bufp = '\0';
+ do
+ {
+ *(--bufp) = (val % 10) + '0';
+ val /= 10;
+ } while (val > 0);
+ bufp -= 6;
+ memcpy(bufp, "error ", 6);
+ strncat(errbuf, bufp, maxlen);
+ strcat(errbuf, "\n");
+ }
+ if (tmpsock != PGINVALID_SOCKET)
+ closesocket(tmpsock);
+ SOCK_ERRNO_SET(save_errno);
+ return false;
+}
+
+/*
+ * PQcancel: request query cancel
+ *
+ * Returns true if able to send the cancel request, false if not.
+ *
+ * On failure, an error message is stored in *errbuf, which must be of size
+ * errbufsize (recommended size is 256 bytes). *errbuf is not changed on
+ * success return.
+ */
+int
+PQcancel(PGcancel *cancel, char *errbuf, int errbufsize)
+{
+ if (!cancel)
+ {
+ strlcpy(errbuf, "PQcancel() -- no cancel object supplied", errbufsize);
+ return false;
+ }
+
+ return internal_cancel(&cancel->raddr, cancel->be_pid, cancel->be_key,
+ errbuf, errbufsize);
+}
+
+/*
+ * PQrequestCancel: old, not thread-safe function for requesting query cancel
+ *
+ * Returns true if able to send the cancel request, false if not.
+ *
+ * On failure, the error message is saved in conn->errorMessage; this means
+ * that this can't be used when there might be other active operations on
+ * the connection object.
+ *
+ * NOTE: error messages will be cut off at the current size of the
+ * error message buffer, since we dare not try to expand conn->errorMessage!
+ */
+int
+PQrequestCancel(PGconn *conn)
+{
+ int r;
+
+ /* Check we have an open connection */
+ if (!conn)
+ return false;
+
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ strlcpy(conn->errorMessage.data,
+ "PQrequestCancel() -- connection is not open\n",
+ conn->errorMessage.maxlen);
+ conn->errorMessage.len = strlen(conn->errorMessage.data);
+
+ return false;
+ }
+
+ r = internal_cancel(&conn->raddr, conn->be_pid, conn->be_key,
+ conn->errorMessage.data, conn->errorMessage.maxlen);
+
+ if (!r)
+ conn->errorMessage.len = strlen(conn->errorMessage.data);
+
+ return r;
+}
+
+
+/*
+ * pqPacketSend() -- convenience routine to send a message to server.
+ *
+ * pack_type: the single-byte message type code. (Pass zero for startup
+ * packets, which have no message type code.)
+ *
+ * buf, buf_len: contents of message. The given length includes only what
+ * is in buf; the message type and message length fields are added here.
+ *
+ * RETURNS: STATUS_ERROR if the write fails, STATUS_OK otherwise.
+ * SIDE_EFFECTS: may block.
+ */
+int
+pqPacketSend(PGconn *conn, char pack_type,
+ const void *buf, size_t buf_len)
+{
+ /* Start the message. */
+ if (pqPutMsgStart(pack_type, conn))
+ return STATUS_ERROR;
+
+ /* Send the message body. */
+ if (pqPutnchar(buf, buf_len, conn))
+ return STATUS_ERROR;
+
+ /* Finish the message. */
+ if (pqPutMsgEnd(conn))
+ return STATUS_ERROR;
+
+ /* Flush to ensure backend gets it. */
+ if (pqFlush(conn))
+ return STATUS_ERROR;
+
+ return STATUS_OK;
+}
+
+#ifdef USE_LDAP
+
+#define LDAP_URL "ldap://"
+#define LDAP_DEF_PORT 389
+#define PGLDAP_TIMEOUT 2
+
+#define ld_is_sp_tab(x) ((x) == ' ' || (x) == '\t')
+#define ld_is_nl_cr(x) ((x) == '\r' || (x) == '\n')
+
+
+/*
+ * ldapServiceLookup
+ *
+ * Search the LDAP URL passed as first argument, treat the result as a
+ * string of connection options that are parsed and added to the array of
+ * options passed as second argument.
+ *
+ * LDAP URLs must conform to RFC 1959 without escape sequences.
+ * ldap://host:port/dn?attributes?scope?filter?extensions
+ *
+ * Returns
+ * 0 if the lookup was successful,
+ * 1 if the connection to the LDAP server could be established but
+ * the search was unsuccessful,
+ * 2 if a connection could not be established, and
+ * 3 if a fatal error occurred.
+ *
+ * An error message is appended to *errorMessage for return codes 1 and 3.
+ */
+static int
+ldapServiceLookup(const char *purl, PQconninfoOption *options,
+ PQExpBuffer errorMessage)
+{
+ int port = LDAP_DEF_PORT,
+ scope,
+ rc,
+ size,
+ state,
+ oldstate,
+ i;
+#ifndef WIN32
+ int msgid;
+#endif
+ bool found_keyword;
+ char *url,
+ *hostname,
+ *portstr,
+ *endptr,
+ *dn,
+ *scopestr,
+ *filter,
+ *result,
+ *p,
+ *p1 = NULL,
+ *optname = NULL,
+ *optval = NULL;
+ char *attrs[2] = {NULL, NULL};
+ LDAP *ld = NULL;
+ LDAPMessage *res,
+ *entry;
+ struct berval **values;
+ LDAP_TIMEVAL time = {PGLDAP_TIMEOUT, 0};
+
+ if ((url = strdup(purl)) == NULL)
+ {
+ appendPQExpBufferStr(errorMessage, libpq_gettext("out of memory\n"));
+ return 3;
+ }
+
+ /*
+ * Parse URL components, check for correctness. Basically, url has '\0'
+ * placed at component boundaries and variables are pointed at each
+ * component.
+ */
+
+ if (pg_strncasecmp(url, LDAP_URL, strlen(LDAP_URL)) != 0)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": scheme must be ldap://\n"), purl);
+ free(url);
+ return 3;
+ }
+
+ /* hostname */
+ hostname = url + strlen(LDAP_URL);
+ if (*hostname == '/') /* no hostname? */
+ hostname = DefaultHost; /* the default */
+
+ /* dn, "distinguished name" */
+ p = strchr(url + strlen(LDAP_URL), '/');
+ if (p == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": missing distinguished name\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+ *p = '\0'; /* terminate hostname */
+ dn = p + 1;
+
+ /* attribute */
+ if ((p = strchr(dn, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+ *p = '\0';
+ attrs[0] = p + 1;
+
+ /* scope */
+ if ((p = strchr(attrs[0], '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+ *p = '\0';
+ scopestr = p + 1;
+
+ /* filter */
+ if ((p = strchr(scopestr, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": no filter\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+ *p = '\0';
+ filter = p + 1;
+ if ((p = strchr(filter, '?')) != NULL)
+ *p = '\0';
+
+ /* port number? */
+ if ((p1 = strchr(hostname, ':')) != NULL)
+ {
+ long lport;
+
+ *p1 = '\0';
+ portstr = p1 + 1;
+ errno = 0;
+ lport = strtol(portstr, &endptr, 10);
+ if (*portstr == '\0' || *endptr != '\0' || errno || lport < 0 || lport > 65535)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": invalid port number\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+ port = (int) lport;
+ }
+
+ /* Allow only one attribute */
+ if (strchr(attrs[0], ',') != NULL)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+
+ /* set scope */
+ if (pg_strcasecmp(scopestr, "base") == 0)
+ scope = LDAP_SCOPE_BASE;
+ else if (pg_strcasecmp(scopestr, "one") == 0)
+ scope = LDAP_SCOPE_ONELEVEL;
+ else if (pg_strcasecmp(scopestr, "sub") == 0)
+ scope = LDAP_SCOPE_SUBTREE;
+ else
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"),
+ purl);
+ free(url);
+ return 3;
+ }
+
+ /* initialize LDAP structure */
+ if ((ld = ldap_init(hostname, port)) == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("could not create LDAP structure\n"));
+ free(url);
+ return 3;
+ }
+
+ /*
+ * Perform an explicit anonymous bind.
+ *
+ * LDAP does not require that an anonymous bind is performed explicitly,
+ * but we want to distinguish between the case where LDAP bind does not
+ * succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing the
+ * service control file) and the case where querying the LDAP server fails
+ * (return 1 to end parsing).
+ *
+ * Unfortunately there is no way of setting a timeout that works for both
+ * Windows and OpenLDAP.
+ */
+#ifdef WIN32
+ /* the nonstandard ldap_connect function performs an anonymous bind */
+ if (ldap_connect(ld, &time) != LDAP_SUCCESS)
+ {
+ /* error or timeout in ldap_connect */
+ free(url);
+ ldap_unbind(ld);
+ return 2;
+ }
+#else /* !WIN32 */
+ /* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
+ if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
+ {
+ free(url);
+ ldap_unbind(ld);
+ return 3;
+ }
+
+ /* anonymous bind */
+ if ((msgid = ldap_simple_bind(ld, NULL, NULL)) == -1)
+ {
+ /* error or network timeout */
+ free(url);
+ ldap_unbind(ld);
+ return 2;
+ }
+
+ /* wait some time for the connection to succeed */
+ res = NULL;
+ if ((rc = ldap_result(ld, msgid, LDAP_MSG_ALL, &time, &res)) == -1 ||
+ res == NULL)
+ {
+ /* error or timeout */
+ if (res != NULL)
+ ldap_msgfree(res);
+ free(url);
+ ldap_unbind(ld);
+ return 2;
+ }
+ ldap_msgfree(res);
+
+ /* reset timeout */
+ time.tv_sec = -1;
+ if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
+ {
+ free(url);
+ ldap_unbind(ld);
+ return 3;
+ }
+#endif /* WIN32 */
+
+ /* search */
+ res = NULL;
+ if ((rc = ldap_search_st(ld, dn, scope, filter, attrs, 0, &time, &res))
+ != LDAP_SUCCESS)
+ {
+ if (res != NULL)
+ ldap_msgfree(res);
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("lookup on LDAP server failed: %s\n"),
+ ldap_err2string(rc));
+ ldap_unbind(ld);
+ free(url);
+ return 1;
+ }
+
+ /* complain if there was not exactly one result */
+ if ((rc = ldap_count_entries(ld, res)) != 1)
+ {
+ appendPQExpBufferStr(errorMessage,
+ rc ? libpq_gettext("more than one entry found on LDAP lookup\n")
+ : libpq_gettext("no entry found on LDAP lookup\n"));
+ ldap_msgfree(res);
+ ldap_unbind(ld);
+ free(url);
+ return 1;
+ }
+
+ /* get entry */
+ if ((entry = ldap_first_entry(ld, res)) == NULL)
+ {
+ /* should never happen */
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("no entry found on LDAP lookup\n"));
+ ldap_msgfree(res);
+ ldap_unbind(ld);
+ free(url);
+ return 1;
+ }
+
+ /* get values */
+ if ((values = ldap_get_values_len(ld, entry, attrs[0])) == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("attribute has no values on LDAP lookup\n"));
+ ldap_msgfree(res);
+ ldap_unbind(ld);
+ free(url);
+ return 1;
+ }
+
+ ldap_msgfree(res);
+ free(url);
+
+ if (values[0] == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("attribute has no values on LDAP lookup\n"));
+ ldap_value_free_len(values);
+ ldap_unbind(ld);
+ return 1;
+ }
+
+ /* concatenate values into a single string with newline terminators */
+ size = 1; /* for the trailing null */
+ for (i = 0; values[i] != NULL; i++)
+ size += values[i]->bv_len + 1;
+ if ((result = malloc(size)) == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ ldap_value_free_len(values);
+ ldap_unbind(ld);
+ return 3;
+ }
+ p = result;
+ for (i = 0; values[i] != NULL; i++)
+ {
+ memcpy(p, values[i]->bv_val, values[i]->bv_len);
+ p += values[i]->bv_len;
+ *(p++) = '\n';
+ }
+ *p = '\0';
+
+ ldap_value_free_len(values);
+ ldap_unbind(ld);
+
+ /* parse result string */
+ oldstate = state = 0;
+ for (p = result; *p != '\0'; ++p)
+ {
+ switch (state)
+ {
+ case 0: /* between entries */
+ if (!ld_is_sp_tab(*p) && !ld_is_nl_cr(*p))
+ {
+ optname = p;
+ state = 1;
+ }
+ break;
+ case 1: /* in option name */
+ if (ld_is_sp_tab(*p))
+ {
+ *p = '\0';
+ state = 2;
+ }
+ else if (ld_is_nl_cr(*p))
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"),
+ optname);
+ free(result);
+ return 3;
+ }
+ else if (*p == '=')
+ {
+ *p = '\0';
+ state = 3;
+ }
+ break;
+ case 2: /* after option name */
+ if (*p == '=')
+ {
+ state = 3;
+ }
+ else if (!ld_is_sp_tab(*p))
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"),
+ optname);
+ free(result);
+ return 3;
+ }
+ break;
+ case 3: /* before option value */
+ if (*p == '\'')
+ {
+ optval = p + 1;
+ p1 = p + 1;
+ state = 5;
+ }
+ else if (ld_is_nl_cr(*p))
+ {
+ optval = optname + strlen(optname); /* empty */
+ state = 0;
+ }
+ else if (!ld_is_sp_tab(*p))
+ {
+ optval = p;
+ state = 4;
+ }
+ break;
+ case 4: /* in unquoted option value */
+ if (ld_is_sp_tab(*p) || ld_is_nl_cr(*p))
+ {
+ *p = '\0';
+ state = 0;
+ }
+ break;
+ case 5: /* in quoted option value */
+ if (*p == '\'')
+ {
+ *p1 = '\0';
+ state = 0;
+ }
+ else if (*p == '\\')
+ state = 6;
+ else
+ *(p1++) = *p;
+ break;
+ case 6: /* in quoted option value after escape */
+ *(p1++) = *p;
+ state = 5;
+ break;
+ }
+
+ if (state == 0 && oldstate != 0)
+ {
+ found_keyword = false;
+ for (i = 0; options[i].keyword; i++)
+ {
+ if (strcmp(options[i].keyword, optname) == 0)
+ {
+ if (options[i].val == NULL)
+ {
+ options[i].val = strdup(optval);
+ if (!options[i].val)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ free(result);
+ return 3;
+ }
+ }
+ found_keyword = true;
+ break;
+ }
+ }
+ if (!found_keyword)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid connection option \"%s\"\n"),
+ optname);
+ free(result);
+ return 1;
+ }
+ optname = NULL;
+ optval = NULL;
+ }
+ oldstate = state;
+ }
+
+ free(result);
+
+ if (state == 5 || state == 6)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("unterminated quoted string in connection info string\n"));
+ return 3;
+ }
+
+ return 0;
+}
+
+#endif /* USE_LDAP */
+
+/*
+ * parseServiceInfo: if a service name has been given, look it up and absorb
+ * connection options from it into *options.
+ *
+ * Returns 0 on success, nonzero on failure. On failure, if errorMessage
+ * isn't null, also store an error message there. (Note: the only reason
+ * this function and related ones don't dump core on errorMessage == NULL
+ * is the undocumented fact that printfPQExpBuffer does nothing when passed
+ * a null PQExpBuffer pointer.)
+ */
+static int
+parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
+{
+ const char *service = conninfo_getval(options, "service");
+ char serviceFile[MAXPGPATH];
+ char *env;
+ bool group_found = false;
+ int status;
+ struct stat stat_buf;
+
+ /*
+ * We have to special-case the environment variable PGSERVICE here, since
+ * this is and should be called before inserting environment defaults for
+ * other connection options.
+ */
+ if (service == NULL)
+ service = getenv("PGSERVICE");
+
+ /* If no service name given, nothing to do */
+ if (service == NULL)
+ return 0;
+
+ /*
+ * Try PGSERVICEFILE if specified, else try ~/.pg_service.conf (if that
+ * exists).
+ */
+ if ((env = getenv("PGSERVICEFILE")) != NULL)
+ strlcpy(serviceFile, env, sizeof(serviceFile));
+ else
+ {
+ char homedir[MAXPGPATH];
+
+ if (!pqGetHomeDirectory(homedir, sizeof(homedir)))
+ goto next_file;
+ snprintf(serviceFile, MAXPGPATH, "%s/%s", homedir, ".pg_service.conf");
+ if (stat(serviceFile, &stat_buf) != 0)
+ goto next_file;
+ }
+
+ status = parseServiceFile(serviceFile, service, options, errorMessage, &group_found);
+ if (group_found || status != 0)
+ return status;
+
+next_file:
+
+ /*
+ * This could be used by any application so we can't use the binary
+ * location to find our config files.
+ */
+ snprintf(serviceFile, MAXPGPATH, "%s/pg_service.conf",
+ getenv("PGSYSCONFDIR") ? getenv("PGSYSCONFDIR") : SYSCONFDIR);
+ if (stat(serviceFile, &stat_buf) != 0)
+ goto last_file;
+
+ status = parseServiceFile(serviceFile, service, options, errorMessage, &group_found);
+ if (status != 0)
+ return status;
+
+last_file:
+ if (!group_found)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("definition of service \"%s\" not found\n"), service);
+ return 3;
+ }
+
+ return 0;
+}
+
+static int
+parseServiceFile(const char *serviceFile,
+ const char *service,
+ PQconninfoOption *options,
+ PQExpBuffer errorMessage,
+ bool *group_found)
+{
+ int result = 0,
+ linenr = 0,
+ i;
+ FILE *f;
+ char *line;
+ char buf[1024];
+
+ *group_found = false;
+
+ f = fopen(serviceFile, "r");
+ if (f == NULL)
+ {
+ appendPQExpBuffer(errorMessage, libpq_gettext("service file \"%s\" not found\n"),
+ serviceFile);
+ return 1;
+ }
+
+ while ((line = fgets(buf, sizeof(buf), f)) != NULL)
+ {
+ int len;
+
+ linenr++;
+
+ if (strlen(line) >= sizeof(buf) - 1)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("line %d too long in service file \"%s\"\n"),
+ linenr,
+ serviceFile);
+ result = 2;
+ goto exit;
+ }
+
+ /* ignore whitespace at end of line, especially the newline */
+ len = strlen(line);
+ while (len > 0 && isspace((unsigned char) line[len - 1]))
+ line[--len] = '\0';
+
+ /* ignore leading whitespace too */
+ while (*line && isspace((unsigned char) line[0]))
+ line++;
+
+ /* ignore comments and empty lines */
+ if (line[0] == '\0' || line[0] == '#')
+ continue;
+
+ /* Check for right groupname */
+ if (line[0] == '[')
+ {
+ if (*group_found)
+ {
+ /* end of desired group reached; return success */
+ goto exit;
+ }
+
+ if (strncmp(line + 1, service, strlen(service)) == 0 &&
+ line[strlen(service) + 1] == ']')
+ *group_found = true;
+ else
+ *group_found = false;
+ }
+ else
+ {
+ if (*group_found)
+ {
+ /*
+ * Finally, we are in the right group and can parse the line
+ */
+ char *key,
+ *val;
+ bool found_keyword;
+
+#ifdef USE_LDAP
+ if (strncmp(line, "ldap", 4) == 0)
+ {
+ int rc = ldapServiceLookup(line, options, errorMessage);
+
+ /* if rc = 2, go on reading for fallback */
+ switch (rc)
+ {
+ case 0:
+ goto exit;
+ case 1:
+ case 3:
+ result = 3;
+ goto exit;
+ case 2:
+ continue;
+ }
+ }
+#endif
+
+ key = line;
+ val = strchr(line, '=');
+ if (val == NULL)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("syntax error in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ result = 3;
+ goto exit;
+ }
+ *val++ = '\0';
+
+ if (strcmp(key, "service") == 0)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("nested service specifications not supported in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ result = 3;
+ goto exit;
+ }
+
+ /*
+ * Set the parameter --- but don't override any previous
+ * explicit setting.
+ */
+ found_keyword = false;
+ for (i = 0; options[i].keyword; i++)
+ {
+ if (strcmp(options[i].keyword, key) == 0)
+ {
+ if (options[i].val == NULL)
+ options[i].val = strdup(val);
+ if (!options[i].val)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ result = 3;
+ goto exit;
+ }
+ found_keyword = true;
+ break;
+ }
+ }
+
+ if (!found_keyword)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("syntax error in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ result = 3;
+ goto exit;
+ }
+ }
+ }
+ }
+
+exit:
+ fclose(f);
+
+ return result;
+}
+
+
+/*
+ * PQconninfoParse
+ *
+ * Parse a string like PQconnectdb() would do and return the
+ * resulting connection options array. NULL is returned on failure.
+ * The result contains only options specified directly in the string,
+ * not any possible default values.
+ *
+ * If errmsg isn't NULL, *errmsg is set to NULL on success, or a malloc'd
+ * string on failure (use PQfreemem to free it). In out-of-memory conditions
+ * both *errmsg and the result could be NULL.
+ *
+ * NOTE: the returned array is dynamically allocated and should
+ * be freed when no longer needed via PQconninfoFree().
+ */
+PQconninfoOption *
+PQconninfoParse(const char *conninfo, char **errmsg)
+{
+ PQExpBufferData errorBuf;
+ PQconninfoOption *connOptions;
+
+ if (errmsg)
+ *errmsg = NULL; /* default */
+ initPQExpBuffer(&errorBuf);
+ if (PQExpBufferDataBroken(errorBuf))
+ return NULL; /* out of memory already :-( */
+ connOptions = parse_connection_string(conninfo, &errorBuf, false);
+ if (connOptions == NULL && errmsg)
+ *errmsg = errorBuf.data;
+ else
+ termPQExpBuffer(&errorBuf);
+ return connOptions;
+}
+
+/*
+ * Build a working copy of the constant PQconninfoOptions array.
+ */
+static PQconninfoOption *
+conninfo_init(PQExpBuffer errorMessage)
+{
+ PQconninfoOption *options;
+ PQconninfoOption *opt_dest;
+ const internalPQconninfoOption *cur_opt;
+
+ /*
+ * Get enough memory for all options in PQconninfoOptions, even if some
+ * end up being filtered out.
+ */
+ options = (PQconninfoOption *) malloc(sizeof(PQconninfoOption) * sizeof(PQconninfoOptions) / sizeof(PQconninfoOptions[0]));
+ if (options == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ opt_dest = options;
+
+ for (cur_opt = PQconninfoOptions; cur_opt->keyword; cur_opt++)
+ {
+ /* Only copy the public part of the struct, not the full internal */
+ memcpy(opt_dest, cur_opt, sizeof(PQconninfoOption));
+ opt_dest++;
+ }
+ MemSet(opt_dest, 0, sizeof(PQconninfoOption));
+
+ return options;
+}
+
+/*
+ * Connection string parser
+ *
+ * Returns a malloc'd PQconninfoOption array, if parsing is successful.
+ * Otherwise, NULL is returned and an error message is added to errorMessage.
+ *
+ * If use_defaults is true, default values are filled in (from a service file,
+ * environment variables, etc).
+ */
+static PQconninfoOption *
+parse_connection_string(const char *connstr, PQExpBuffer errorMessage,
+ bool use_defaults)
+{
+ /* Parse as URI if connection string matches URI prefix */
+ if (uri_prefix_length(connstr) != 0)
+ return conninfo_uri_parse(connstr, errorMessage, use_defaults);
+
+ /* Parse as default otherwise */
+ return conninfo_parse(connstr, errorMessage, use_defaults);
+}
+
+/*
+ * Checks if connection string starts with either of the valid URI prefix
+ * designators.
+ *
+ * Returns the URI prefix length, 0 if the string doesn't contain a URI prefix.
+ *
+ * XXX this is duplicated in psql/common.c.
+ */
+static int
+uri_prefix_length(const char *connstr)
+{
+ if (strncmp(connstr, uri_designator,
+ sizeof(uri_designator) - 1) == 0)
+ return sizeof(uri_designator) - 1;
+
+ if (strncmp(connstr, short_uri_designator,
+ sizeof(short_uri_designator) - 1) == 0)
+ return sizeof(short_uri_designator) - 1;
+
+ return 0;
+}
+
+/*
+ * Recognized connection string either starts with a valid URI prefix or
+ * contains a "=" in it.
+ *
+ * Must be consistent with parse_connection_string: anything for which this
+ * returns true should at least look like it's parseable by that routine.
+ *
+ * XXX this is duplicated in psql/common.c
+ */
+static bool
+recognized_connection_string(const char *connstr)
+{
+ return uri_prefix_length(connstr) != 0 || strchr(connstr, '=') != NULL;
+}
+
+/*
+ * Subroutine for parse_connection_string
+ *
+ * Deal with a string containing key=value pairs.
+ */
+static PQconninfoOption *
+conninfo_parse(const char *conninfo, PQExpBuffer errorMessage,
+ bool use_defaults)
+{
+ char *pname;
+ char *pval;
+ char *buf;
+ char *cp;
+ char *cp2;
+ PQconninfoOption *options;
+
+ /* Make a working copy of PQconninfoOptions */
+ options = conninfo_init(errorMessage);
+ if (options == NULL)
+ return NULL;
+
+ /* Need a modifiable copy of the input string */
+ if ((buf = strdup(conninfo)) == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ PQconninfoFree(options);
+ return NULL;
+ }
+ cp = buf;
+
+ while (*cp)
+ {
+ /* Skip blanks before the parameter name */
+ if (isspace((unsigned char) *cp))
+ {
+ cp++;
+ continue;
+ }
+
+ /* Get the parameter name */
+ pname = cp;
+ while (*cp)
+ {
+ if (*cp == '=')
+ break;
+ if (isspace((unsigned char) *cp))
+ {
+ *cp++ = '\0';
+ while (*cp)
+ {
+ if (!isspace((unsigned char) *cp))
+ break;
+ cp++;
+ }
+ break;
+ }
+ cp++;
+ }
+
+ /* Check that there is a following '=' */
+ if (*cp != '=')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"),
+ pname);
+ PQconninfoFree(options);
+ free(buf);
+ return NULL;
+ }
+ *cp++ = '\0';
+
+ /* Skip blanks after the '=' */
+ while (*cp)
+ {
+ if (!isspace((unsigned char) *cp))
+ break;
+ cp++;
+ }
+
+ /* Get the parameter value */
+ pval = cp;
+
+ if (*cp != '\'')
+ {
+ cp2 = pval;
+ while (*cp)
+ {
+ if (isspace((unsigned char) *cp))
+ {
+ *cp++ = '\0';
+ break;
+ }
+ if (*cp == '\\')
+ {
+ cp++;
+ if (*cp != '\0')
+ *cp2++ = *cp++;
+ }
+ else
+ *cp2++ = *cp++;
+ }
+ *cp2 = '\0';
+ }
+ else
+ {
+ cp2 = pval;
+ cp++;
+ for (;;)
+ {
+ if (*cp == '\0')
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("unterminated quoted string in connection info string\n"));
+ PQconninfoFree(options);
+ free(buf);
+ return NULL;
+ }
+ if (*cp == '\\')
+ {
+ cp++;
+ if (*cp != '\0')
+ *cp2++ = *cp++;
+ continue;
+ }
+ if (*cp == '\'')
+ {
+ *cp2 = '\0';
+ cp++;
+ break;
+ }
+ *cp2++ = *cp++;
+ }
+ }
+
+ /*
+ * Now that we have the name and the value, store the record.
+ */
+ if (!conninfo_storeval(options, pname, pval, errorMessage, false, false))
+ {
+ PQconninfoFree(options);
+ free(buf);
+ return NULL;
+ }
+ }
+
+ /* Done with the modifiable input string */
+ free(buf);
+
+ /*
+ * Add in defaults if the caller wants that.
+ */
+ if (use_defaults)
+ {
+ if (!conninfo_add_defaults(options, errorMessage))
+ {
+ PQconninfoFree(options);
+ return NULL;
+ }
+ }
+
+ return options;
+}
+
+/*
+ * Conninfo array parser routine
+ *
+ * If successful, a malloc'd PQconninfoOption array is returned.
+ * If not successful, NULL is returned and an error message is
+ * appended to errorMessage.
+ * Defaults are supplied (from a service file, environment variables, etc)
+ * for unspecified options, but only if use_defaults is true.
+ *
+ * If expand_dbname is non-zero, and the value passed for the first occurrence
+ * of "dbname" keyword is a connection string (as indicated by
+ * recognized_connection_string) then parse and process it, overriding any
+ * previously processed conflicting keywords. Subsequent keywords will take
+ * precedence, however. In-tree programs generally specify expand_dbname=true,
+ * so command-line arguments naming a database can use a connection string.
+ * Some code acquires arbitrary database names from known-literal sources like
+ * PQdb(), PQconninfoParse() and pg_database.datname. When connecting to such
+ * a database, in-tree code first wraps the name in a connection string.
+ */
+static PQconninfoOption *
+conninfo_array_parse(const char *const *keywords, const char *const *values,
+ PQExpBuffer errorMessage, bool use_defaults,
+ int expand_dbname)
+{
+ PQconninfoOption *options;
+ PQconninfoOption *dbname_options = NULL;
+ PQconninfoOption *option;
+ int i = 0;
+
+ /*
+ * If expand_dbname is non-zero, check keyword "dbname" to see if val is
+ * actually a recognized connection string.
+ */
+ while (expand_dbname && keywords[i])
+ {
+ const char *pname = keywords[i];
+ const char *pvalue = values[i];
+
+ /* first find "dbname" if any */
+ if (strcmp(pname, "dbname") == 0 && pvalue)
+ {
+ /*
+ * If value is a connection string, parse it, but do not use
+ * defaults here -- those get picked up later. We only want to
+ * override for those parameters actually passed.
+ */
+ if (recognized_connection_string(pvalue))
+ {
+ dbname_options = parse_connection_string(pvalue, errorMessage, false);
+ if (dbname_options == NULL)
+ return NULL;
+ }
+ break;
+ }
+ ++i;
+ }
+
+ /* Make a working copy of PQconninfoOptions */
+ options = conninfo_init(errorMessage);
+ if (options == NULL)
+ {
+ PQconninfoFree(dbname_options);
+ return NULL;
+ }
+
+ /* Parse the keywords/values arrays */
+ i = 0;
+ while (keywords[i])
+ {
+ const char *pname = keywords[i];
+ const char *pvalue = values[i];
+
+ if (pvalue != NULL && pvalue[0] != '\0')
+ {
+ /* Search for the param record */
+ for (option = options; option->keyword != NULL; option++)
+ {
+ if (strcmp(option->keyword, pname) == 0)
+ break;
+ }
+
+ /* Check for invalid connection option */
+ if (option->keyword == NULL)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid connection option \"%s\"\n"),
+ pname);
+ PQconninfoFree(options);
+ PQconninfoFree(dbname_options);
+ return NULL;
+ }
+
+ /*
+ * If we are on the first dbname parameter, and we have a parsed
+ * connection string, copy those parameters across, overriding any
+ * existing previous settings.
+ */
+ if (strcmp(pname, "dbname") == 0 && dbname_options)
+ {
+ PQconninfoOption *str_option;
+
+ for (str_option = dbname_options; str_option->keyword != NULL; str_option++)
+ {
+ if (str_option->val != NULL)
+ {
+ int k;
+
+ for (k = 0; options[k].keyword; k++)
+ {
+ if (strcmp(options[k].keyword, str_option->keyword) == 0)
+ {
+ if (options[k].val)
+ free(options[k].val);
+ options[k].val = strdup(str_option->val);
+ if (!options[k].val)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ PQconninfoFree(options);
+ PQconninfoFree(dbname_options);
+ return NULL;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ /*
+ * Forget the parsed connection string, so that any subsequent
+ * dbname parameters will not be expanded.
+ */
+ PQconninfoFree(dbname_options);
+ dbname_options = NULL;
+ }
+ else
+ {
+ /*
+ * Store the value, overriding previous settings
+ */
+ if (option->val)
+ free(option->val);
+ option->val = strdup(pvalue);
+ if (!option->val)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ PQconninfoFree(options);
+ PQconninfoFree(dbname_options);
+ return NULL;
+ }
+ }
+ }
+ ++i;
+ }
+ PQconninfoFree(dbname_options);
+
+ /*
+ * Add in defaults if the caller wants that.
+ */
+ if (use_defaults)
+ {
+ if (!conninfo_add_defaults(options, errorMessage))
+ {
+ PQconninfoFree(options);
+ return NULL;
+ }
+ }
+
+ return options;
+}
+
+/*
+ * Add the default values for any unspecified options to the connection
+ * options array.
+ *
+ * Defaults are obtained from a service file, environment variables, etc.
+ *
+ * Returns true if successful, otherwise false; errorMessage, if supplied,
+ * is filled in upon failure. Note that failure to locate a default value
+ * is not an error condition here --- we just leave the option's value as
+ * NULL.
+ */
+static bool
+conninfo_add_defaults(PQconninfoOption *options, PQExpBuffer errorMessage)
+{
+ PQconninfoOption *option;
+ char *tmp;
+
+ /*
+ * If there's a service spec, use it to obtain any not-explicitly-given
+ * parameters. Ignore error if no error message buffer is passed because
+ * there is no way to pass back the failure message.
+ */
+ if (parseServiceInfo(options, errorMessage) != 0 && errorMessage)
+ return false;
+
+ /*
+ * Get the fallback resources for parameters not specified in the conninfo
+ * string nor the service.
+ */
+ for (option = options; option->keyword != NULL; option++)
+ {
+ if (option->val != NULL)
+ continue; /* Value was in conninfo or service */
+
+ /*
+ * Try to get the environment variable fallback
+ */
+ if (option->envvar != NULL)
+ {
+ if ((tmp = getenv(option->envvar)) != NULL)
+ {
+ option->val = strdup(tmp);
+ if (!option->val)
+ {
+ if (errorMessage)
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ continue;
+ }
+ }
+
+ /*
+ * Interpret the deprecated PGREQUIRESSL environment variable. Per
+ * tradition, translate values starting with "1" to sslmode=require,
+ * and ignore other values. Given both PGREQUIRESSL=1 and PGSSLMODE,
+ * PGSSLMODE takes precedence; the opposite was true before v9.3.
+ */
+ if (strcmp(option->keyword, "sslmode") == 0)
+ {
+ const char *requiresslenv = getenv("PGREQUIRESSL");
+
+ if (requiresslenv != NULL && requiresslenv[0] == '1')
+ {
+ option->val = strdup("require");
+ if (!option->val)
+ {
+ if (errorMessage)
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ continue;
+ }
+ }
+
+ /*
+ * No environment variable specified or the variable isn't set - try
+ * compiled-in default
+ */
+ if (option->compiled != NULL)
+ {
+ option->val = strdup(option->compiled);
+ if (!option->val)
+ {
+ if (errorMessage)
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ continue;
+ }
+
+ /*
+ * Special handling for "user" option. Note that if pg_fe_getauthname
+ * fails, we just leave the value as NULL; there's no need for this to
+ * be an error condition if the caller provides a user name. The only
+ * reason we do this now at all is so that callers of PQconndefaults
+ * will see a correct default (barring error, of course).
+ */
+ if (strcmp(option->keyword, "user") == 0)
+ {
+ option->val = pg_fe_getauthname(NULL);
+ continue;
+ }
+ }
+
+ return true;
+}
+
+/*
+ * Subroutine for parse_connection_string
+ *
+ * Deal with a URI connection string.
+ */
+static PQconninfoOption *
+conninfo_uri_parse(const char *uri, PQExpBuffer errorMessage,
+ bool use_defaults)
+{
+ PQconninfoOption *options;
+
+ /* Make a working copy of PQconninfoOptions */
+ options = conninfo_init(errorMessage);
+ if (options == NULL)
+ return NULL;
+
+ if (!conninfo_uri_parse_options(options, uri, errorMessage))
+ {
+ PQconninfoFree(options);
+ return NULL;
+ }
+
+ /*
+ * Add in defaults if the caller wants that.
+ */
+ if (use_defaults)
+ {
+ if (!conninfo_add_defaults(options, errorMessage))
+ {
+ PQconninfoFree(options);
+ return NULL;
+ }
+ }
+
+ return options;
+}
+
+/*
+ * conninfo_uri_parse_options
+ * Actual URI parser.
+ *
+ * If successful, returns true while the options array is filled with parsed
+ * options from the URI.
+ * If not successful, returns false and fills errorMessage accordingly.
+ *
+ * Parses the connection URI string in 'uri' according to the URI syntax (RFC
+ * 3986):
+ *
+ * postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
+ *
+ * where "netloc" is a hostname, an IPv4 address, or an IPv6 address surrounded
+ * by literal square brackets. As an extension, we also allow multiple
+ * netloc[:port] specifications, separated by commas:
+ *
+ * postgresql://[user[:password]@][netloc][:port][,...][/dbname][?param1=value1&...]
+ *
+ * Any of the URI parts might use percent-encoding (%xy).
+ */
+static bool
+conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
+ PQExpBuffer errorMessage)
+{
+ int prefix_len;
+ char *p;
+ char *buf = NULL;
+ char *start;
+ char prevchar = '\0';
+ char *user = NULL;
+ char *host = NULL;
+ bool retval = false;
+ PQExpBufferData hostbuf;
+ PQExpBufferData portbuf;
+
+ initPQExpBuffer(&hostbuf);
+ initPQExpBuffer(&portbuf);
+ if (PQExpBufferDataBroken(hostbuf) || PQExpBufferDataBroken(portbuf))
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ goto cleanup;
+ }
+
+ /* need a modifiable copy of the input URI */
+ buf = strdup(uri);
+ if (buf == NULL)
+ {
+ appendPQExpBufferStr(errorMessage,
+ libpq_gettext("out of memory\n"));
+ goto cleanup;
+ }
+ start = buf;
+
+ /* Skip the URI prefix */
+ prefix_len = uri_prefix_length(uri);
+ if (prefix_len == 0)
+ {
+ /* Should never happen */
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid URI propagated to internal parser routine: \"%s\"\n"),
+ uri);
+ goto cleanup;
+ }
+ start += prefix_len;
+ p = start;
+
+ /* Look ahead for possible user credentials designator */
+ while (*p && *p != '@' && *p != '/')
+ ++p;
+ if (*p == '@')
+ {
+ /*
+ * Found username/password designator, so URI should be of the form
+ * "scheme://user[:password]@[netloc]".
+ */
+ user = start;
+
+ p = user;
+ while (*p != ':' && *p != '@')
+ ++p;
+
+ /* Save last char and cut off at end of user name */
+ prevchar = *p;
+ *p = '\0';
+
+ if (*user &&
+ !conninfo_storeval(options, "user", user,
+ errorMessage, false, true))
+ goto cleanup;
+
+ if (prevchar == ':')
+ {
+ const char *password = p + 1;
+
+ while (*p != '@')
+ ++p;
+ *p = '\0';
+
+ if (*password &&
+ !conninfo_storeval(options, "password", password,
+ errorMessage, false, true))
+ goto cleanup;
+ }
+
+ /* Advance past end of parsed user name or password token */
+ ++p;
+ }
+ else
+ {
+ /*
+ * No username/password designator found. Reset to start of URI.
+ */
+ p = start;
+ }
+
+ /*
+ * There may be multiple netloc[:port] pairs, each separated from the next
+ * by a comma. When we initially enter this loop, "p" has been
+ * incremented past optional URI credential information at this point and
+ * now points at the "netloc" part of the URI. On subsequent loop
+ * iterations, "p" has been incremented past the comma separator and now
+ * points at the start of the next "netloc".
+ */
+ for (;;)
+ {
+ /*
+ * Look for IPv6 address.
+ */
+ if (*p == '[')
+ {
+ host = ++p;
+ while (*p && *p != ']')
+ ++p;
+ if (!*p)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"),
+ uri);
+ goto cleanup;
+ }
+ if (p == host)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("IPv6 host address may not be empty in URI: \"%s\"\n"),
+ uri);
+ goto cleanup;
+ }
+
+ /* Cut off the bracket and advance */
+ *(p++) = '\0';
+
+ /*
+ * The address may be followed by a port specifier or a slash or a
+ * query or a separator comma.
+ */
+ if (*p && *p != ':' && *p != '/' && *p != '?' && *p != ',')
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"),
+ *p, (int) (p - buf + 1), uri);
+ goto cleanup;
+ }
+ }
+ else
+ {
+ /* not an IPv6 address: DNS-named or IPv4 netloc */
+ host = p;
+
+ /*
+ * Look for port specifier (colon) or end of host specifier
+ * (slash) or query (question mark) or host separator (comma).
+ */
+ while (*p && *p != ':' && *p != '/' && *p != '?' && *p != ',')
+ ++p;
+ }
+
+ /* Save the hostname terminator before we null it */
+ prevchar = *p;
+ *p = '\0';
+
+ appendPQExpBufferStr(&hostbuf, host);
+
+ if (prevchar == ':')
+ {
+ const char *port = ++p; /* advance past host terminator */
+
+ while (*p && *p != '/' && *p != '?' && *p != ',')
+ ++p;
+
+ prevchar = *p;
+ *p = '\0';
+
+ appendPQExpBufferStr(&portbuf, port);
+ }
+
+ if (prevchar != ',')
+ break;
+ ++p; /* advance past comma separator */
+ appendPQExpBufferChar(&hostbuf, ',');
+ appendPQExpBufferChar(&portbuf, ',');
+ }
+
+ /* Save final values for host and port. */
+ if (PQExpBufferDataBroken(hostbuf) || PQExpBufferDataBroken(portbuf))
+ goto cleanup;
+ if (hostbuf.data[0] &&
+ !conninfo_storeval(options, "host", hostbuf.data,
+ errorMessage, false, true))
+ goto cleanup;
+ if (portbuf.data[0] &&
+ !conninfo_storeval(options, "port", portbuf.data,
+ errorMessage, false, true))
+ goto cleanup;
+
+ if (prevchar && prevchar != '?')
+ {
+ const char *dbname = ++p; /* advance past host terminator */
+
+ /* Look for query parameters */
+ while (*p && *p != '?')
+ ++p;
+
+ prevchar = *p;
+ *p = '\0';
+
+ /*
+ * Avoid setting dbname to an empty string, as it forces the default
+ * value (username) and ignores $PGDATABASE, as opposed to not setting
+ * it at all.
+ */
+ if (*dbname &&
+ !conninfo_storeval(options, "dbname", dbname,
+ errorMessage, false, true))
+ goto cleanup;
+ }
+
+ if (prevchar)
+ {
+ ++p; /* advance past terminator */
+
+ if (!conninfo_uri_parse_params(p, options, errorMessage))
+ goto cleanup;
+ }
+
+ /* everything parsed okay */
+ retval = true;
+
+cleanup:
+ termPQExpBuffer(&hostbuf);
+ termPQExpBuffer(&portbuf);
+ if (buf)
+ free(buf);
+ return retval;
+}
+
+/*
+ * Connection URI parameters parser routine
+ *
+ * If successful, returns true while connOptions is filled with parsed
+ * parameters. Otherwise, returns false and fills errorMessage appropriately.
+ *
+ * Destructively modifies 'params' buffer.
+ */
+static bool
+conninfo_uri_parse_params(char *params,
+ PQconninfoOption *connOptions,
+ PQExpBuffer errorMessage)
+{
+ while (*params)
+ {
+ char *keyword = params;
+ char *value = NULL;
+ char *p = params;
+ bool malloced = false;
+ int oldmsglen;
+
+ /*
+ * Scan the params string for '=' and '&', marking the end of keyword
+ * and value respectively.
+ */
+ for (;;)
+ {
+ if (*p == '=')
+ {
+ /* Was there '=' already? */
+ if (value != NULL)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("extra key/value separator \"=\" in URI query parameter: \"%s\"\n"),
+ keyword);
+ return false;
+ }
+ /* Cut off keyword, advance to value */
+ *p++ = '\0';
+ value = p;
+ }
+ else if (*p == '&' || *p == '\0')
+ {
+ /*
+ * If not at the end, cut off value and advance; leave p
+ * pointing to start of the next parameter, if any.
+ */
+ if (*p != '\0')
+ *p++ = '\0';
+ /* Was there '=' at all? */
+ if (value == NULL)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("missing key/value separator \"=\" in URI query parameter: \"%s\"\n"),
+ keyword);
+ return false;
+ }
+ /* Got keyword and value, go process them. */
+ break;
+ }
+ else
+ ++p; /* Advance over all other bytes. */
+ }
+
+ keyword = conninfo_uri_decode(keyword, errorMessage);
+ if (keyword == NULL)
+ {
+ /* conninfo_uri_decode already set an error message */
+ return false;
+ }
+ value = conninfo_uri_decode(value, errorMessage);
+ if (value == NULL)
+ {
+ /* conninfo_uri_decode already set an error message */
+ free(keyword);
+ return false;
+ }
+ malloced = true;
+
+ /*
+ * Special keyword handling for improved JDBC compatibility.
+ */
+ if (strcmp(keyword, "ssl") == 0 &&
+ strcmp(value, "true") == 0)
+ {
+ free(keyword);
+ free(value);
+ malloced = false;
+
+ keyword = "sslmode";
+ value = "require";
+ }
+
+ /*
+ * Store the value if the corresponding option exists; ignore
+ * otherwise. At this point both keyword and value are not
+ * URI-encoded.
+ */
+ oldmsglen = errorMessage->len;
+ if (!conninfo_storeval(connOptions, keyword, value,
+ errorMessage, true, false))
+ {
+ /* Insert generic message if conninfo_storeval didn't give one. */
+ if (errorMessage->len == oldmsglen)
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid URI query parameter: \"%s\"\n"),
+ keyword);
+ /* And fail. */
+ if (malloced)
+ {
+ free(keyword);
+ free(value);
+ }
+ return false;
+ }
+
+ if (malloced)
+ {
+ free(keyword);
+ free(value);
+ }
+
+ /* Proceed to next key=value pair, if any */
+ params = p;
+ }
+
+ return true;
+}
+
+/*
+ * Connection URI decoder routine
+ *
+ * If successful, returns the malloc'd decoded string.
+ * If not successful, returns NULL and fills errorMessage accordingly.
+ *
+ * The string is decoded by replacing any percent-encoded tokens with
+ * corresponding characters, while preserving any non-encoded characters. A
+ * percent-encoded token is a character triplet: a percent sign, followed by a
+ * pair of hexadecimal digits (0-9A-F), where lower- and upper-case letters are
+ * treated identically.
+ */
+static char *
+conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
+{
+ char *buf;
+ char *p;
+ const char *q = str;
+
+ buf = malloc(strlen(str) + 1);
+ if (buf == NULL)
+ {
+ appendPQExpBufferStr(errorMessage, libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ p = buf;
+
+ for (;;)
+ {
+ if (*q != '%')
+ {
+ /* copy and check for NUL terminator */
+ if (!(*(p++) = *(q++)))
+ break;
+ }
+ else
+ {
+ int hi;
+ int lo;
+ int c;
+
+ ++q; /* skip the percent sign itself */
+
+ /*
+ * Possible EOL will be caught by the first call to
+ * get_hexdigit(), so we never dereference an invalid q pointer.
+ */
+ if (!(get_hexdigit(*q++, &hi) && get_hexdigit(*q++, &lo)))
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid percent-encoded token: \"%s\"\n"),
+ str);
+ free(buf);
+ return NULL;
+ }
+
+ c = (hi << 4) | lo;
+ if (c == 0)
+ {
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("forbidden value %%00 in percent-encoded value: \"%s\"\n"),
+ str);
+ free(buf);
+ return NULL;
+ }
+ *(p++) = c;
+ }
+ }
+
+ return buf;
+}
+
+/*
+ * Convert hexadecimal digit character to its integer value.
+ *
+ * If successful, returns true and value is filled with digit's base 16 value.
+ * If not successful, returns false.
+ *
+ * Lower- and upper-case letters in the range A-F are treated identically.
+ */
+static bool
+get_hexdigit(char digit, int *value)
+{
+ if ('0' <= digit && digit <= '9')
+ *value = digit - '0';
+ else if ('A' <= digit && digit <= 'F')
+ *value = digit - 'A' + 10;
+ else if ('a' <= digit && digit <= 'f')
+ *value = digit - 'a' + 10;
+ else
+ return false;
+
+ return true;
+}
+
+/*
+ * Find an option value corresponding to the keyword in the connOptions array.
+ *
+ * If successful, returns a pointer to the corresponding option's value.
+ * If not successful, returns NULL.
+ */
+static const char *
+conninfo_getval(PQconninfoOption *connOptions,
+ const char *keyword)
+{
+ PQconninfoOption *option;
+
+ option = conninfo_find(connOptions, keyword);
+
+ return option ? option->val : NULL;
+}
+
+/*
+ * Store a (new) value for an option corresponding to the keyword in
+ * connOptions array.
+ *
+ * If uri_decode is true, the value is URI-decoded. The keyword is always
+ * assumed to be non URI-encoded.
+ *
+ * If successful, returns a pointer to the corresponding PQconninfoOption,
+ * which value is replaced with a strdup'd copy of the passed value string.
+ * The existing value for the option is free'd before replacing, if any.
+ *
+ * If not successful, returns NULL and fills errorMessage accordingly.
+ * However, if the reason of failure is an invalid keyword being passed and
+ * ignoreMissing is true, errorMessage will be left untouched.
+ */
+static PQconninfoOption *
+conninfo_storeval(PQconninfoOption *connOptions,
+ const char *keyword, const char *value,
+ PQExpBuffer errorMessage, bool ignoreMissing,
+ bool uri_decode)
+{
+ PQconninfoOption *option;
+ char *value_copy;
+
+ /*
+ * For backwards compatibility, requiressl=1 gets translated to
+ * sslmode=require, and requiressl=0 gets translated to sslmode=prefer
+ * (which is the default for sslmode).
+ */
+ if (strcmp(keyword, "requiressl") == 0)
+ {
+ keyword = "sslmode";
+ if (value[0] == '1')
+ value = "require";
+ else
+ value = "prefer";
+ }
+
+ option = conninfo_find(connOptions, keyword);
+ if (option == NULL)
+ {
+ if (!ignoreMissing)
+ appendPQExpBuffer(errorMessage,
+ libpq_gettext("invalid connection option \"%s\"\n"),
+ keyword);
+ return NULL;
+ }
+
+ if (uri_decode)
+ {
+ value_copy = conninfo_uri_decode(value, errorMessage);
+ if (value_copy == NULL)
+ /* conninfo_uri_decode already set an error message */
+ return NULL;
+ }
+ else
+ {
+ value_copy = strdup(value);
+ if (value_copy == NULL)
+ {
+ appendPQExpBufferStr(errorMessage, libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ }
+
+ if (option->val)
+ free(option->val);
+ option->val = value_copy;
+
+ return option;
+}
+
+/*
+ * Find a PQconninfoOption option corresponding to the keyword in the
+ * connOptions array.
+ *
+ * If successful, returns a pointer to the corresponding PQconninfoOption
+ * structure.
+ * If not successful, returns NULL.
+ */
+static PQconninfoOption *
+conninfo_find(PQconninfoOption *connOptions, const char *keyword)
+{
+ PQconninfoOption *option;
+
+ for (option = connOptions; option->keyword != NULL; option++)
+ {
+ if (strcmp(option->keyword, keyword) == 0)
+ return option;
+ }
+
+ return NULL;
+}
+
+
+/*
+ * Return the connection options used for the connection
+ */
+PQconninfoOption *
+PQconninfo(PGconn *conn)
+{
+ PQExpBufferData errorBuf;
+ PQconninfoOption *connOptions;
+
+ if (conn == NULL)
+ return NULL;
+
+ /*
+ * We don't actually report any errors here, but callees want a buffer,
+ * and we prefer not to trash the conn's errorMessage.
+ */
+ initPQExpBuffer(&errorBuf);
+ if (PQExpBufferDataBroken(errorBuf))
+ return NULL; /* out of memory already :-( */
+
+ connOptions = conninfo_init(&errorBuf);
+
+ if (connOptions != NULL)
+ {
+ const internalPQconninfoOption *option;
+
+ for (option = PQconninfoOptions; option->keyword; option++)
+ {
+ char **connmember;
+
+ if (option->connofs < 0)
+ continue;
+
+ connmember = (char **) ((char *) conn + option->connofs);
+
+ if (*connmember)
+ conninfo_storeval(connOptions, option->keyword, *connmember,
+ &errorBuf, true, false);
+ }
+ }
+
+ termPQExpBuffer(&errorBuf);
+
+ return connOptions;
+}
+
+
+void
+PQconninfoFree(PQconninfoOption *connOptions)
+{
+ PQconninfoOption *option;
+
+ if (connOptions == NULL)
+ return;
+
+ for (option = connOptions; option->keyword != NULL; option++)
+ {
+ if (option->val != NULL)
+ free(option->val);
+ }
+ free(connOptions);
+}
+
+
+/* =========== accessor functions for PGconn ========= */
+char *
+PQdb(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return conn->dbName;
+}
+
+char *
+PQuser(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return conn->pguser;
+}
+
+char *
+PQpass(const PGconn *conn)
+{
+ char *password = NULL;
+
+ if (!conn)
+ return NULL;
+ if (conn->connhost != NULL)
+ password = conn->connhost[conn->whichhost].password;
+ if (password == NULL)
+ password = conn->pgpass;
+ /* Historically we've returned "" not NULL for no password specified */
+ if (password == NULL)
+ password = "";
+ return password;
+}
+
+char *
+PQhost(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+
+ if (conn->connhost != NULL)
+ {
+ /*
+ * Return the verbatim host value provided by user, or hostaddr in its
+ * lack.
+ */
+ if (conn->connhost[conn->whichhost].host != NULL &&
+ conn->connhost[conn->whichhost].host[0] != '\0')
+ return conn->connhost[conn->whichhost].host;
+ else if (conn->connhost[conn->whichhost].hostaddr != NULL &&
+ conn->connhost[conn->whichhost].hostaddr[0] != '\0')
+ return conn->connhost[conn->whichhost].hostaddr;
+ }
+
+ return "";
+}
+
+char *
+PQhostaddr(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+
+ /* Return the parsed IP address */
+ if (conn->connhost != NULL && conn->connip != NULL)
+ return conn->connip;
+
+ return "";
+}
+
+char *
+PQport(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+
+ if (conn->connhost != NULL)
+ return conn->connhost[conn->whichhost].port;
+
+ return "";
+}
+
+/*
+ * No longer does anything, but the function remains for API backwards
+ * compatibility.
+ */
+char *
+PQtty(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return "";
+}
+
+char *
+PQoptions(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return conn->pgoptions;
+}
+
+ConnStatusType
+PQstatus(const PGconn *conn)
+{
+ if (!conn)
+ return CONNECTION_BAD;
+ return conn->status;
+}
+
+PGTransactionStatusType
+PQtransactionStatus(const PGconn *conn)
+{
+ if (!conn || conn->status != CONNECTION_OK)
+ return PQTRANS_UNKNOWN;
+ if (conn->asyncStatus != PGASYNC_IDLE)
+ return PQTRANS_ACTIVE;
+ return conn->xactStatus;
+}
+
+const char *
+PQparameterStatus(const PGconn *conn, const char *paramName)
+{
+ const pgParameterStatus *pstatus;
+
+ if (!conn || !paramName)
+ return NULL;
+ for (pstatus = conn->pstatus; pstatus != NULL; pstatus = pstatus->next)
+ {
+ if (strcmp(pstatus->name, paramName) == 0)
+ return pstatus->value;
+ }
+ return NULL;
+}
+
+int
+PQprotocolVersion(const PGconn *conn)
+{
+ if (!conn)
+ return 0;
+ if (conn->status == CONNECTION_BAD)
+ return 0;
+ return PG_PROTOCOL_MAJOR(conn->pversion);
+}
+
+int
+PQserverVersion(const PGconn *conn)
+{
+ if (!conn)
+ return 0;
+ if (conn->status == CONNECTION_BAD)
+ return 0;
+ return conn->sversion;
+}
+
+char *
+PQerrorMessage(const PGconn *conn)
+{
+ if (!conn)
+ return libpq_gettext("connection pointer is NULL\n");
+
+ /*
+ * The errorMessage buffer might be marked "broken" due to having
+ * previously failed to allocate enough memory for the message. In that
+ * case, tell the application we ran out of memory.
+ */
+ if (PQExpBufferBroken(&conn->errorMessage))
+ return libpq_gettext("out of memory\n");
+
+ return conn->errorMessage.data;
+}
+
+/*
+ * In Windows, socket values are unsigned, and an invalid socket value
+ * (INVALID_SOCKET) is ~0, which equals -1 in comparisons (with no compiler
+ * warning). Ideally we would return an unsigned value for PQsocket() on
+ * Windows, but that would cause the function's return value to differ from
+ * Unix, so we just return -1 for invalid sockets.
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/cc507522%28v=vs.85%29.aspx
+ * http://stackoverflow.com/questions/10817252/why-is-invalid-socket-defined-as-0-in-winsock2-h-c
+ */
+int
+PQsocket(const PGconn *conn)
+{
+ if (!conn)
+ return -1;
+ return (conn->sock != PGINVALID_SOCKET) ? conn->sock : -1;
+}
+
+int
+PQbackendPID(const PGconn *conn)
+{
+ if (!conn || conn->status != CONNECTION_OK)
+ return 0;
+ return conn->be_pid;
+}
+
+PGpipelineStatus
+PQpipelineStatus(const PGconn *conn)
+{
+ if (!conn)
+ return PQ_PIPELINE_OFF;
+
+ return conn->pipelineStatus;
+}
+
+int
+PQconnectionNeedsPassword(const PGconn *conn)
+{
+ char *password;
+
+ if (!conn)
+ return false;
+ password = PQpass(conn);
+ if (conn->password_needed &&
+ (password == NULL || password[0] == '\0'))
+ return true;
+ else
+ return false;
+}
+
+int
+PQconnectionUsedPassword(const PGconn *conn)
+{
+ if (!conn)
+ return false;
+ if (conn->password_needed)
+ return true;
+ else
+ return false;
+}
+
+int
+PQclientEncoding(const PGconn *conn)
+{
+ if (!conn || conn->status != CONNECTION_OK)
+ return -1;
+ return conn->client_encoding;
+}
+
+int
+PQsetClientEncoding(PGconn *conn, const char *encoding)
+{
+ char qbuf[128];
+ static const char query[] = "set client_encoding to '%s'";
+ PGresult *res;
+ int status;
+
+ if (!conn || conn->status != CONNECTION_OK)
+ return -1;
+
+ if (!encoding)
+ return -1;
+
+ /* Resolve special "auto" value from the locale */
+ if (strcmp(encoding, "auto") == 0)
+ encoding = pg_encoding_to_char(pg_get_encoding_from_locale(NULL, true));
+
+ /* check query buffer overflow */
+ if (sizeof(qbuf) < (sizeof(query) + strlen(encoding)))
+ return -1;
+
+ /* ok, now send a query */
+ sprintf(qbuf, query, encoding);
+ res = PQexec(conn, qbuf);
+
+ if (res == NULL)
+ return -1;
+ if (res->resultStatus != PGRES_COMMAND_OK)
+ status = -1;
+ else
+ {
+ /*
+ * We rely on the backend to report the parameter value, and we'll
+ * change state at that time.
+ */
+ status = 0; /* everything is ok */
+ }
+ PQclear(res);
+ return status;
+}
+
+PGVerbosity
+PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity)
+{
+ PGVerbosity old;
+
+ if (!conn)
+ return PQERRORS_DEFAULT;
+ old = conn->verbosity;
+ conn->verbosity = verbosity;
+ return old;
+}
+
+PGContextVisibility
+PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context)
+{
+ PGContextVisibility old;
+
+ if (!conn)
+ return PQSHOW_CONTEXT_ERRORS;
+ old = conn->show_context;
+ conn->show_context = show_context;
+ return old;
+}
+
+PQnoticeReceiver
+PQsetNoticeReceiver(PGconn *conn, PQnoticeReceiver proc, void *arg)
+{
+ PQnoticeReceiver old;
+
+ if (conn == NULL)
+ return NULL;
+
+ old = conn->noticeHooks.noticeRec;
+ if (proc)
+ {
+ conn->noticeHooks.noticeRec = proc;
+ conn->noticeHooks.noticeRecArg = arg;
+ }
+ return old;
+}
+
+PQnoticeProcessor
+PQsetNoticeProcessor(PGconn *conn, PQnoticeProcessor proc, void *arg)
+{
+ PQnoticeProcessor old;
+
+ if (conn == NULL)
+ return NULL;
+
+ old = conn->noticeHooks.noticeProc;
+ if (proc)
+ {
+ conn->noticeHooks.noticeProc = proc;
+ conn->noticeHooks.noticeProcArg = arg;
+ }
+ return old;
+}
+
+/*
+ * The default notice message receiver just gets the standard notice text
+ * and sends it to the notice processor. This two-level setup exists
+ * mostly for backwards compatibility; perhaps we should deprecate use of
+ * PQsetNoticeProcessor?
+ */
+static void
+defaultNoticeReceiver(void *arg, const PGresult *res)
+{
+ (void) arg; /* not used */
+ if (res->noticeHooks.noticeProc != NULL)
+ res->noticeHooks.noticeProc(res->noticeHooks.noticeProcArg,
+ PQresultErrorMessage(res));
+}
+
+/*
+ * The default notice message processor just prints the
+ * message on stderr. Applications can override this if they
+ * want the messages to go elsewhere (a window, for example).
+ * Note that simply discarding notices is probably a bad idea.
+ */
+static void
+defaultNoticeProcessor(void *arg, const char *message)
+{
+ (void) arg; /* not used */
+ /* Note: we expect the supplied string to end with a newline already. */
+ fprintf(stderr, "%s", message);
+}
+
+/*
+ * returns a pointer to the next token or NULL if the current
+ * token doesn't match
+ */
+static char *
+pwdfMatchesString(char *buf, const char *token)
+{
+ char *tbuf;
+ const char *ttok;
+ bool bslash = false;
+
+ if (buf == NULL || token == NULL)
+ return NULL;
+ tbuf = buf;
+ ttok = token;
+ if (tbuf[0] == '*' && tbuf[1] == ':')
+ return tbuf + 2;
+ while (*tbuf != 0)
+ {
+ if (*tbuf == '\\' && !bslash)
+ {
+ tbuf++;
+ bslash = true;
+ }
+ if (*tbuf == ':' && *ttok == 0 && !bslash)
+ return tbuf + 1;
+ bslash = false;
+ if (*ttok == 0)
+ return NULL;
+ if (*tbuf == *ttok)
+ {
+ tbuf++;
+ ttok++;
+ }
+ else
+ return NULL;
+ }
+ return NULL;
+}
+
+/* Get a password from the password file. Return value is malloc'd. */
+static char *
+passwordFromFile(const char *hostname, const char *port, const char *dbname,
+ const char *username, const char *pgpassfile)
+{
+ FILE *fp;
+ struct stat stat_buf;
+ PQExpBufferData buf;
+
+ if (dbname == NULL || dbname[0] == '\0')
+ return NULL;
+
+ if (username == NULL || username[0] == '\0')
+ return NULL;
+
+ /* 'localhost' matches pghost of '' or the default socket directory */
+ if (hostname == NULL || hostname[0] == '\0')
+ hostname = DefaultHost;
+ else if (is_unixsock_path(hostname))
+
+ /*
+ * We should probably use canonicalize_path(), but then we have to
+ * bring path.c into libpq, and it doesn't seem worth it.
+ */
+ if (strcmp(hostname, DEFAULT_PGSOCKET_DIR) == 0)
+ hostname = DefaultHost;
+
+ if (port == NULL || port[0] == '\0')
+ port = DEF_PGPORT_STR;
+
+ /* If password file cannot be opened, ignore it. */
+ if (stat(pgpassfile, &stat_buf) != 0)
+ return NULL;
+
+#ifndef WIN32
+ if (!S_ISREG(stat_buf.st_mode))
+ {
+ fprintf(stderr,
+ libpq_gettext("WARNING: password file \"%s\" is not a plain file\n"),
+ pgpassfile);
+ return NULL;
+ }
+
+ /* If password file is insecure, alert the user and ignore it. */
+ if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
+ {
+ fprintf(stderr,
+ libpq_gettext("WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"),
+ pgpassfile);
+ return NULL;
+ }
+#else
+
+ /*
+ * On Win32, the directory is protected, so we don't have to check the
+ * file.
+ */
+#endif
+
+ fp = fopen(pgpassfile, "r");
+ if (fp == NULL)
+ return NULL;
+
+ /* Use an expansible buffer to accommodate any reasonable line length */
+ initPQExpBuffer(&buf);
+
+ while (!feof(fp) && !ferror(fp))
+ {
+ /* Make sure there's a reasonable amount of room in the buffer */
+ if (!enlargePQExpBuffer(&buf, 128))
+ break;
+
+ /* Read some data, appending it to what we already have */
+ if (fgets(buf.data + buf.len, buf.maxlen - buf.len, fp) == NULL)
+ break;
+ buf.len += strlen(buf.data + buf.len);
+
+ /* If we don't yet have a whole line, loop around to read more */
+ if (!(buf.len > 0 && buf.data[buf.len - 1] == '\n') && !feof(fp))
+ continue;
+
+ /* ignore comments */
+ if (buf.data[0] != '#')
+ {
+ char *t = buf.data;
+ int len;
+
+ /* strip trailing newline and carriage return */
+ len = pg_strip_crlf(t);
+
+ if (len > 0 &&
+ (t = pwdfMatchesString(t, hostname)) != NULL &&
+ (t = pwdfMatchesString(t, port)) != NULL &&
+ (t = pwdfMatchesString(t, dbname)) != NULL &&
+ (t = pwdfMatchesString(t, username)) != NULL)
+ {
+ /* Found a match. */
+ char *ret,
+ *p1,
+ *p2;
+
+ ret = strdup(t);
+
+ fclose(fp);
+ explicit_bzero(buf.data, buf.maxlen);
+ termPQExpBuffer(&buf);
+
+ if (!ret)
+ {
+ /* Out of memory. XXX: an error message would be nice. */
+ return NULL;
+ }
+
+ /* De-escape password. */
+ for (p1 = p2 = ret; *p1 != ':' && *p1 != '\0'; ++p1, ++p2)
+ {
+ if (*p1 == '\\' && p1[1] != '\0')
+ ++p1;
+ *p2 = *p1;
+ }
+ *p2 = '\0';
+
+ return ret;
+ }
+ }
+
+ /* No match, reset buffer to prepare for next line. */
+ buf.len = 0;
+ }
+
+ fclose(fp);
+ explicit_bzero(buf.data, buf.maxlen);
+ termPQExpBuffer(&buf);
+ return NULL;
+}
+
+
+/*
+ * If the connection failed due to bad password, we should mention
+ * if we got the password from the pgpassfile.
+ */
+static void
+pgpassfileWarning(PGconn *conn)
+{
+ /* If it was 'invalid authorization', add pgpassfile mention */
+ /* only works with >= 9.0 servers */
+ if (conn->password_needed &&
+ conn->connhost[conn->whichhost].password != NULL &&
+ conn->result)
+ {
+ const char *sqlstate = PQresultErrorField(conn->result,
+ PG_DIAG_SQLSTATE);
+
+ if (sqlstate && strcmp(sqlstate, ERRCODE_INVALID_PASSWORD) == 0)
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("password retrieved from file \"%s\"\n"),
+ conn->pgpassfile);
+ }
+}
+
+/*
+ * Check if the SSL protocol value given in input is valid or not.
+ * This is used as a sanity check routine for the connection parameters
+ * ssl_min_protocol_version and ssl_max_protocol_version.
+ */
+static bool
+sslVerifyProtocolVersion(const char *version)
+{
+ /*
+ * An empty string and a NULL value are considered valid as it is
+ * equivalent to ignoring the parameter.
+ */
+ if (!version || strlen(version) == 0)
+ return true;
+
+ if (pg_strcasecmp(version, "TLSv1") == 0 ||
+ pg_strcasecmp(version, "TLSv1.1") == 0 ||
+ pg_strcasecmp(version, "TLSv1.2") == 0 ||
+ pg_strcasecmp(version, "TLSv1.3") == 0)
+ return true;
+
+ /* anything else is wrong */
+ return false;
+}
+
+
+/*
+ * Ensure that the SSL protocol range given in input is correct. The check
+ * is performed on the input string to keep it TLS backend agnostic. Input
+ * to this function is expected verified with sslVerifyProtocolVersion().
+ */
+static bool
+sslVerifyProtocolRange(const char *min, const char *max)
+{
+ Assert(sslVerifyProtocolVersion(min) &&
+ sslVerifyProtocolVersion(max));
+
+ /* If at least one of the bounds is not set, the range is valid */
+ if (min == NULL || max == NULL || strlen(min) == 0 || strlen(max) == 0)
+ return true;
+
+ /*
+ * If the minimum version is the lowest one we accept, then all options
+ * for the maximum are valid.
+ */
+ if (pg_strcasecmp(min, "TLSv1") == 0)
+ return true;
+
+ /*
+ * The minimum bound is valid, and cannot be TLSv1, so using TLSv1 for the
+ * maximum is incorrect.
+ */
+ if (pg_strcasecmp(max, "TLSv1") == 0)
+ return false;
+
+ /*
+ * At this point we know that we have a mix of TLSv1.1 through 1.3
+ * versions.
+ */
+ if (pg_strcasecmp(min, max) > 0)
+ return false;
+
+ return true;
+}
+
+
+/*
+ * Obtain user's home directory, return in given buffer
+ *
+ * On Unix, this actually returns the user's home directory. On Windows
+ * it returns the PostgreSQL-specific application data folder.
+ *
+ * This is essentially the same as get_home_path(), but we don't use that
+ * because we don't want to pull path.c into libpq (it pollutes application
+ * namespace).
+ *
+ * Returns true on success, false on failure to obtain the directory name.
+ *
+ * CAUTION: although in most situations failure is unexpected, there are users
+ * who like to run applications in a home-directory-less environment. On
+ * failure, you almost certainly DO NOT want to report an error. Just act as
+ * though whatever file you were hoping to find in the home directory isn't
+ * there (which it isn't).
+ */
+bool
+pqGetHomeDirectory(char *buf, int bufsize)
+{
+#ifndef WIN32
+ char pwdbuf[BUFSIZ];
+ struct passwd pwdstr;
+ struct passwd *pwd = NULL;
+
+ (void) pqGetpwuid(geteuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd);
+ if (pwd == NULL)
+ return false;
+ strlcpy(buf, pwd->pw_dir, bufsize);
+ return true;
+#else
+ char tmppath[MAX_PATH];
+
+ ZeroMemory(tmppath, sizeof(tmppath));
+ if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, tmppath) != S_OK)
+ return false;
+ snprintf(buf, bufsize, "%s/postgresql", tmppath);
+ return true;
+#endif
+}
+
+/*
+ * To keep the API consistent, the locking stubs are always provided, even
+ * if they are not required.
+ */
+
+static void
+default_threadlock(int acquire)
+{
+#ifdef ENABLE_THREAD_SAFETY
+#ifndef WIN32
+ static pthread_mutex_t singlethread_lock = PTHREAD_MUTEX_INITIALIZER;
+#else
+ static pthread_mutex_t singlethread_lock = NULL;
+ static long mutex_initlock = 0;
+
+ if (singlethread_lock == NULL)
+ {
+ while (InterlockedExchange(&mutex_initlock, 1) == 1)
+ /* loop, another thread own the lock */ ;
+ if (singlethread_lock == NULL)
+ {
+ if (pthread_mutex_init(&singlethread_lock, NULL))
+ PGTHREAD_ERROR("failed to initialize mutex");
+ }
+ InterlockedExchange(&mutex_initlock, 0);
+ }
+#endif
+ if (acquire)
+ {
+ if (pthread_mutex_lock(&singlethread_lock))
+ PGTHREAD_ERROR("failed to lock mutex");
+ }
+ else
+ {
+ if (pthread_mutex_unlock(&singlethread_lock))
+ PGTHREAD_ERROR("failed to unlock mutex");
+ }
+#endif
+}
+
+pgthreadlock_t
+PQregisterThreadLock(pgthreadlock_t newhandler)
+{
+ pgthreadlock_t prev = pg_g_threadlock;
+
+ if (newhandler)
+ pg_g_threadlock = newhandler;
+ else
+ pg_g_threadlock = default_threadlock;
+
+ return prev;
+}
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
new file mode 100644
index 0000000..0920370
--- /dev/null
+++ b/src/interfaces/libpq/fe-exec.c
@@ -0,0 +1,4451 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-exec.c
+ * functions related to sending a query down to the backend
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-exec.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <limits.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#endif
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "mb/pg_wchar.h"
+
+/* keep this in same order as ExecStatusType in libpq-fe.h */
+char *const pgresStatus[] = {
+ "PGRES_EMPTY_QUERY",
+ "PGRES_COMMAND_OK",
+ "PGRES_TUPLES_OK",
+ "PGRES_COPY_OUT",
+ "PGRES_COPY_IN",
+ "PGRES_BAD_RESPONSE",
+ "PGRES_NONFATAL_ERROR",
+ "PGRES_FATAL_ERROR",
+ "PGRES_COPY_BOTH",
+ "PGRES_SINGLE_TUPLE",
+ "PGRES_PIPELINE_SYNC",
+ "PGRES_PIPELINE_ABORTED"
+};
+
+/*
+ * static state needed by PQescapeString and PQescapeBytea; initialize to
+ * values that result in backward-compatible behavior
+ */
+static int static_client_encoding = PG_SQL_ASCII;
+static bool static_std_strings = false;
+
+
+static PGEvent *dupEvents(PGEvent *events, int count, size_t *memSize);
+static bool pqAddTuple(PGresult *res, PGresAttValue *tup,
+ const char **errmsgp);
+static int PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery);
+static bool PQsendQueryStart(PGconn *conn, bool newQuery);
+static int PQsendQueryGuts(PGconn *conn,
+ const char *command,
+ const char *stmtName,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat);
+static void parseInput(PGconn *conn);
+static PGresult *getCopyResult(PGconn *conn, ExecStatusType copytype);
+static bool PQexecStart(PGconn *conn);
+static PGresult *PQexecFinish(PGconn *conn);
+static int PQsendDescribe(PGconn *conn, char desc_type,
+ const char *desc_target);
+static int check_field_number(const PGresult *res, int field_num);
+static void pqPipelineProcessQueue(PGconn *conn);
+static int pqPipelineFlush(PGconn *conn);
+
+
+/* ----------------
+ * Space management for PGresult.
+ *
+ * Formerly, libpq did a separate malloc() for each field of each tuple
+ * returned by a query. This was remarkably expensive --- malloc/free
+ * consumed a sizable part of the application's runtime. And there is
+ * no real need to keep track of the fields separately, since they will
+ * all be freed together when the PGresult is released. So now, we grab
+ * large blocks of storage from malloc and allocate space for query data
+ * within these blocks, using a trivially simple allocator. This reduces
+ * the number of malloc/free calls dramatically, and it also avoids
+ * fragmentation of the malloc storage arena.
+ * The PGresult structure itself is still malloc'd separately. We could
+ * combine it with the first allocation block, but that would waste space
+ * for the common case that no extra storage is actually needed (that is,
+ * the SQL command did not return tuples).
+ *
+ * We also malloc the top-level array of tuple pointers separately, because
+ * we need to be able to enlarge it via realloc, and our trivial space
+ * allocator doesn't handle that effectively. (Too bad the FE/BE protocol
+ * doesn't tell us up front how many tuples will be returned.)
+ * All other subsidiary storage for a PGresult is kept in PGresult_data blocks
+ * of size PGRESULT_DATA_BLOCKSIZE. The overhead at the start of each block
+ * is just a link to the next one, if any. Free-space management info is
+ * kept in the owning PGresult.
+ * A query returning a small amount of data will thus require three malloc
+ * calls: one for the PGresult, one for the tuples pointer array, and one
+ * PGresult_data block.
+ *
+ * Only the most recently allocated PGresult_data block is a candidate to
+ * have more stuff added to it --- any extra space left over in older blocks
+ * is wasted. We could be smarter and search the whole chain, but the point
+ * here is to be simple and fast. Typical applications do not keep a PGresult
+ * around very long anyway, so some wasted space within one is not a problem.
+ *
+ * Tuning constants for the space allocator are:
+ * PGRESULT_DATA_BLOCKSIZE: size of a standard allocation block, in bytes
+ * PGRESULT_ALIGN_BOUNDARY: assumed alignment requirement for binary data
+ * PGRESULT_SEP_ALLOC_THRESHOLD: objects bigger than this are given separate
+ * blocks, instead of being crammed into a regular allocation block.
+ * Requirements for correct function are:
+ * PGRESULT_ALIGN_BOUNDARY must be a multiple of the alignment requirements
+ * of all machine data types. (Currently this is set from configure
+ * tests, so it should be OK automatically.)
+ * PGRESULT_SEP_ALLOC_THRESHOLD + PGRESULT_BLOCK_OVERHEAD <=
+ * PGRESULT_DATA_BLOCKSIZE
+ * pqResultAlloc assumes an object smaller than the threshold will fit
+ * in a new block.
+ * The amount of space wasted at the end of a block could be as much as
+ * PGRESULT_SEP_ALLOC_THRESHOLD, so it doesn't pay to make that too large.
+ * ----------------
+ */
+
+#define PGRESULT_DATA_BLOCKSIZE 2048
+#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */
+#define PGRESULT_BLOCK_OVERHEAD Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY)
+#define PGRESULT_SEP_ALLOC_THRESHOLD (PGRESULT_DATA_BLOCKSIZE / 2)
+
+
+/*
+ * PQmakeEmptyPGresult
+ * returns a newly allocated, initialized PGresult with given status.
+ * If conn is not NULL and status indicates an error, the conn's
+ * errorMessage is copied. Also, any PGEvents are copied from the conn.
+ */
+PGresult *
+PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status)
+{
+ PGresult *result;
+
+ result = (PGresult *) malloc(sizeof(PGresult));
+ if (!result)
+ return NULL;
+
+ result->ntups = 0;
+ result->numAttributes = 0;
+ result->attDescs = NULL;
+ result->tuples = NULL;
+ result->tupArrSize = 0;
+ result->numParameters = 0;
+ result->paramDescs = NULL;
+ result->resultStatus = status;
+ result->cmdStatus[0] = '\0';
+ result->binary = 0;
+ result->events = NULL;
+ result->nEvents = 0;
+ result->errMsg = NULL;
+ result->errFields = NULL;
+ result->errQuery = NULL;
+ result->null_field[0] = '\0';
+ result->curBlock = NULL;
+ result->curOffset = 0;
+ result->spaceLeft = 0;
+ result->memorySize = sizeof(PGresult);
+
+ if (conn)
+ {
+ /* copy connection data we might need for operations on PGresult */
+ result->noticeHooks = conn->noticeHooks;
+ result->client_encoding = conn->client_encoding;
+
+ /* consider copying conn's errorMessage */
+ switch (status)
+ {
+ case PGRES_EMPTY_QUERY:
+ case PGRES_COMMAND_OK:
+ case PGRES_TUPLES_OK:
+ case PGRES_COPY_OUT:
+ case PGRES_COPY_IN:
+ case PGRES_COPY_BOTH:
+ case PGRES_SINGLE_TUPLE:
+ /* non-error cases */
+ break;
+ default:
+ pqSetResultError(result, &conn->errorMessage);
+ break;
+ }
+
+ /* copy events last; result must be valid if we need to PQclear */
+ if (conn->nEvents > 0)
+ {
+ result->events = dupEvents(conn->events, conn->nEvents,
+ &result->memorySize);
+ if (!result->events)
+ {
+ PQclear(result);
+ return NULL;
+ }
+ result->nEvents = conn->nEvents;
+ }
+ }
+ else
+ {
+ /* defaults... */
+ result->noticeHooks.noticeRec = NULL;
+ result->noticeHooks.noticeRecArg = NULL;
+ result->noticeHooks.noticeProc = NULL;
+ result->noticeHooks.noticeProcArg = NULL;
+ result->client_encoding = PG_SQL_ASCII;
+ }
+
+ return result;
+}
+
+/*
+ * PQsetResultAttrs
+ *
+ * Set the attributes for a given result. This function fails if there are
+ * already attributes contained in the provided result. The call is
+ * ignored if numAttributes is zero or attDescs is NULL. If the
+ * function fails, it returns zero. If the function succeeds, it
+ * returns a non-zero value.
+ */
+int
+PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs)
+{
+ int i;
+
+ /* If attrs already exist, they cannot be overwritten. */
+ if (!res || res->numAttributes > 0)
+ return false;
+
+ /* ignore no-op request */
+ if (numAttributes <= 0 || !attDescs)
+ return true;
+
+ res->attDescs = (PGresAttDesc *)
+ PQresultAlloc(res, numAttributes * sizeof(PGresAttDesc));
+
+ if (!res->attDescs)
+ return false;
+
+ res->numAttributes = numAttributes;
+ memcpy(res->attDescs, attDescs, numAttributes * sizeof(PGresAttDesc));
+
+ /* deep-copy the attribute names, and determine format */
+ res->binary = 1;
+ for (i = 0; i < res->numAttributes; i++)
+ {
+ if (res->attDescs[i].name)
+ res->attDescs[i].name = pqResultStrdup(res, res->attDescs[i].name);
+ else
+ res->attDescs[i].name = res->null_field;
+
+ if (!res->attDescs[i].name)
+ return false;
+
+ if (res->attDescs[i].format == 0)
+ res->binary = 0;
+ }
+
+ return true;
+}
+
+/*
+ * PQcopyResult
+ *
+ * Returns a deep copy of the provided 'src' PGresult, which cannot be NULL.
+ * The 'flags' argument controls which portions of the result will or will
+ * NOT be copied. The created result is always put into the
+ * PGRES_TUPLES_OK status. The source result error message is not copied,
+ * although cmdStatus is.
+ *
+ * To set custom attributes, use PQsetResultAttrs. That function requires
+ * that there are no attrs contained in the result, so to use that
+ * function you cannot use the PG_COPYRES_ATTRS or PG_COPYRES_TUPLES
+ * options with this function.
+ *
+ * Options:
+ * PG_COPYRES_ATTRS - Copy the source result's attributes
+ *
+ * PG_COPYRES_TUPLES - Copy the source result's tuples. This implies
+ * copying the attrs, seeing how the attrs are needed by the tuples.
+ *
+ * PG_COPYRES_EVENTS - Copy the source result's events.
+ *
+ * PG_COPYRES_NOTICEHOOKS - Copy the source result's notice hooks.
+ */
+PGresult *
+PQcopyResult(const PGresult *src, int flags)
+{
+ PGresult *dest;
+ int i;
+
+ if (!src)
+ return NULL;
+
+ dest = PQmakeEmptyPGresult(NULL, PGRES_TUPLES_OK);
+ if (!dest)
+ return NULL;
+
+ /* Always copy these over. Is cmdStatus really useful here? */
+ dest->client_encoding = src->client_encoding;
+ strcpy(dest->cmdStatus, src->cmdStatus);
+
+ /* Wants attrs? */
+ if (flags & (PG_COPYRES_ATTRS | PG_COPYRES_TUPLES))
+ {
+ if (!PQsetResultAttrs(dest, src->numAttributes, src->attDescs))
+ {
+ PQclear(dest);
+ return NULL;
+ }
+ }
+
+ /* Wants to copy tuples? */
+ if (flags & PG_COPYRES_TUPLES)
+ {
+ int tup,
+ field;
+
+ for (tup = 0; tup < src->ntups; tup++)
+ {
+ for (field = 0; field < src->numAttributes; field++)
+ {
+ if (!PQsetvalue(dest, tup, field,
+ src->tuples[tup][field].value,
+ src->tuples[tup][field].len))
+ {
+ PQclear(dest);
+ return NULL;
+ }
+ }
+ }
+ }
+
+ /* Wants to copy notice hooks? */
+ if (flags & PG_COPYRES_NOTICEHOOKS)
+ dest->noticeHooks = src->noticeHooks;
+
+ /* Wants to copy PGEvents? */
+ if ((flags & PG_COPYRES_EVENTS) && src->nEvents > 0)
+ {
+ dest->events = dupEvents(src->events, src->nEvents,
+ &dest->memorySize);
+ if (!dest->events)
+ {
+ PQclear(dest);
+ return NULL;
+ }
+ dest->nEvents = src->nEvents;
+ }
+
+ /* Okay, trigger PGEVT_RESULTCOPY event */
+ for (i = 0; i < dest->nEvents; i++)
+ {
+ if (src->events[i].resultInitialized)
+ {
+ PGEventResultCopy evt;
+
+ evt.src = src;
+ evt.dest = dest;
+ if (!dest->events[i].proc(PGEVT_RESULTCOPY, &evt,
+ dest->events[i].passThrough))
+ {
+ PQclear(dest);
+ return NULL;
+ }
+ dest->events[i].resultInitialized = true;
+ }
+ }
+
+ return dest;
+}
+
+/*
+ * Copy an array of PGEvents (with no extra space for more).
+ * Does not duplicate the event instance data, sets this to NULL.
+ * Also, the resultInitialized flags are all cleared.
+ * The total space allocated is added to *memSize.
+ */
+static PGEvent *
+dupEvents(PGEvent *events, int count, size_t *memSize)
+{
+ PGEvent *newEvents;
+ size_t msize;
+ int i;
+
+ if (!events || count <= 0)
+ return NULL;
+
+ msize = count * sizeof(PGEvent);
+ newEvents = (PGEvent *) malloc(msize);
+ if (!newEvents)
+ return NULL;
+
+ for (i = 0; i < count; i++)
+ {
+ newEvents[i].proc = events[i].proc;
+ newEvents[i].passThrough = events[i].passThrough;
+ newEvents[i].data = NULL;
+ newEvents[i].resultInitialized = false;
+ newEvents[i].name = strdup(events[i].name);
+ if (!newEvents[i].name)
+ {
+ while (--i >= 0)
+ free(newEvents[i].name);
+ free(newEvents);
+ return NULL;
+ }
+ msize += strlen(events[i].name) + 1;
+ }
+
+ *memSize += msize;
+ return newEvents;
+}
+
+
+/*
+ * Sets the value for a tuple field. The tup_num must be less than or
+ * equal to PQntuples(res). If it is equal, a new tuple is created and
+ * added to the result.
+ * Returns a non-zero value for success and zero for failure.
+ * (On failure, we report the specific problem via pqInternalNotice.)
+ */
+int
+PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len)
+{
+ PGresAttValue *attval;
+ const char *errmsg = NULL;
+
+ /* Note that this check also protects us against null "res" */
+ if (!check_field_number(res, field_num))
+ return false;
+
+ /* Invalid tup_num, must be <= ntups */
+ if (tup_num < 0 || tup_num > res->ntups)
+ {
+ pqInternalNotice(&res->noticeHooks,
+ "row number %d is out of range 0..%d",
+ tup_num, res->ntups);
+ return false;
+ }
+
+ /* need to allocate a new tuple? */
+ if (tup_num == res->ntups)
+ {
+ PGresAttValue *tup;
+ int i;
+
+ tup = (PGresAttValue *)
+ pqResultAlloc(res, res->numAttributes * sizeof(PGresAttValue),
+ true);
+
+ if (!tup)
+ goto fail;
+
+ /* initialize each column to NULL */
+ for (i = 0; i < res->numAttributes; i++)
+ {
+ tup[i].len = NULL_LEN;
+ tup[i].value = res->null_field;
+ }
+
+ /* add it to the array */
+ if (!pqAddTuple(res, tup, &errmsg))
+ goto fail;
+ }
+
+ attval = &res->tuples[tup_num][field_num];
+
+ /* treat either NULL_LEN or NULL value pointer as a NULL field */
+ if (len == NULL_LEN || value == NULL)
+ {
+ attval->len = NULL_LEN;
+ attval->value = res->null_field;
+ }
+ else if (len <= 0)
+ {
+ attval->len = 0;
+ attval->value = res->null_field;
+ }
+ else
+ {
+ attval->value = (char *) pqResultAlloc(res, len + 1, true);
+ if (!attval->value)
+ goto fail;
+ attval->len = len;
+ memcpy(attval->value, value, len);
+ attval->value[len] = '\0';
+ }
+
+ return true;
+
+ /*
+ * Report failure via pqInternalNotice. If preceding code didn't provide
+ * an error message, assume "out of memory" was meant.
+ */
+fail:
+ if (!errmsg)
+ errmsg = libpq_gettext("out of memory");
+ pqInternalNotice(&res->noticeHooks, "%s", errmsg);
+
+ return false;
+}
+
+/*
+ * pqResultAlloc - exported routine to allocate local storage in a PGresult.
+ *
+ * We force all such allocations to be maxaligned, since we don't know
+ * whether the value might be binary.
+ */
+void *
+PQresultAlloc(PGresult *res, size_t nBytes)
+{
+ return pqResultAlloc(res, nBytes, true);
+}
+
+/*
+ * pqResultAlloc -
+ * Allocate subsidiary storage for a PGresult.
+ *
+ * nBytes is the amount of space needed for the object.
+ * If isBinary is true, we assume that we need to align the object on
+ * a machine allocation boundary.
+ * If isBinary is false, we assume the object is a char string and can
+ * be allocated on any byte boundary.
+ */
+void *
+pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary)
+{
+ char *space;
+ PGresult_data *block;
+
+ if (!res)
+ return NULL;
+
+ if (nBytes <= 0)
+ return res->null_field;
+
+ /*
+ * If alignment is needed, round up the current position to an alignment
+ * boundary.
+ */
+ if (isBinary)
+ {
+ int offset = res->curOffset % PGRESULT_ALIGN_BOUNDARY;
+
+ if (offset)
+ {
+ res->curOffset += PGRESULT_ALIGN_BOUNDARY - offset;
+ res->spaceLeft -= PGRESULT_ALIGN_BOUNDARY - offset;
+ }
+ }
+
+ /* If there's enough space in the current block, no problem. */
+ if (nBytes <= (size_t) res->spaceLeft)
+ {
+ space = res->curBlock->space + res->curOffset;
+ res->curOffset += nBytes;
+ res->spaceLeft -= nBytes;
+ return space;
+ }
+
+ /*
+ * If the requested object is very large, give it its own block; this
+ * avoids wasting what might be most of the current block to start a new
+ * block. (We'd have to special-case requests bigger than the block size
+ * anyway.) The object is always given binary alignment in this case.
+ */
+ if (nBytes >= PGRESULT_SEP_ALLOC_THRESHOLD)
+ {
+ size_t alloc_size = nBytes + PGRESULT_BLOCK_OVERHEAD;
+
+ block = (PGresult_data *) malloc(alloc_size);
+ if (!block)
+ return NULL;
+ res->memorySize += alloc_size;
+ space = block->space + PGRESULT_BLOCK_OVERHEAD;
+ if (res->curBlock)
+ {
+ /*
+ * Tuck special block below the active block, so that we don't
+ * have to waste the free space in the active block.
+ */
+ block->next = res->curBlock->next;
+ res->curBlock->next = block;
+ }
+ else
+ {
+ /* Must set up the new block as the first active block. */
+ block->next = NULL;
+ res->curBlock = block;
+ res->spaceLeft = 0; /* be sure it's marked full */
+ }
+ return space;
+ }
+
+ /* Otherwise, start a new block. */
+ block = (PGresult_data *) malloc(PGRESULT_DATA_BLOCKSIZE);
+ if (!block)
+ return NULL;
+ res->memorySize += PGRESULT_DATA_BLOCKSIZE;
+ block->next = res->curBlock;
+ res->curBlock = block;
+ if (isBinary)
+ {
+ /* object needs full alignment */
+ res->curOffset = PGRESULT_BLOCK_OVERHEAD;
+ res->spaceLeft = PGRESULT_DATA_BLOCKSIZE - PGRESULT_BLOCK_OVERHEAD;
+ }
+ else
+ {
+ /* we can cram it right after the overhead pointer */
+ res->curOffset = sizeof(PGresult_data);
+ res->spaceLeft = PGRESULT_DATA_BLOCKSIZE - sizeof(PGresult_data);
+ }
+
+ space = block->space + res->curOffset;
+ res->curOffset += nBytes;
+ res->spaceLeft -= nBytes;
+ return space;
+}
+
+/*
+ * PQresultMemorySize -
+ * Returns total space allocated for the PGresult.
+ */
+size_t
+PQresultMemorySize(const PGresult *res)
+{
+ if (!res)
+ return 0;
+ return res->memorySize;
+}
+
+/*
+ * pqResultStrdup -
+ * Like strdup, but the space is subsidiary PGresult space.
+ */
+char *
+pqResultStrdup(PGresult *res, const char *str)
+{
+ char *space = (char *) pqResultAlloc(res, strlen(str) + 1, false);
+
+ if (space)
+ strcpy(space, str);
+ return space;
+}
+
+/*
+ * pqSetResultError -
+ * assign a new error message to a PGresult
+ */
+void
+pqSetResultError(PGresult *res, PQExpBuffer errorMessage)
+{
+ char *msg;
+
+ if (!res)
+ return;
+
+ /*
+ * We handle two OOM scenarios here. The errorMessage buffer might be
+ * marked "broken" due to having previously failed to allocate enough
+ * memory for the message, or it might be fine but pqResultStrdup fails
+ * and returns NULL. In either case, just make res->errMsg point directly
+ * at a constant "out of memory" string.
+ */
+ if (!PQExpBufferBroken(errorMessage))
+ msg = pqResultStrdup(res, errorMessage->data);
+ else
+ msg = NULL;
+ if (msg)
+ res->errMsg = msg;
+ else
+ res->errMsg = libpq_gettext("out of memory\n");
+}
+
+/*
+ * PQclear -
+ * free's the memory associated with a PGresult
+ */
+void
+PQclear(PGresult *res)
+{
+ PGresult_data *block;
+ int i;
+
+ if (!res)
+ return;
+
+ for (i = 0; i < res->nEvents; i++)
+ {
+ /* only send DESTROY to successfully-initialized event procs */
+ if (res->events[i].resultInitialized)
+ {
+ PGEventResultDestroy evt;
+
+ evt.result = res;
+ (void) res->events[i].proc(PGEVT_RESULTDESTROY, &evt,
+ res->events[i].passThrough);
+ }
+ free(res->events[i].name);
+ }
+
+ if (res->events)
+ free(res->events);
+
+ /* Free all the subsidiary blocks */
+ while ((block = res->curBlock) != NULL)
+ {
+ res->curBlock = block->next;
+ free(block);
+ }
+
+ /* Free the top-level tuple pointer array */
+ if (res->tuples)
+ free(res->tuples);
+
+ /* zero out the pointer fields to catch programming errors */
+ res->attDescs = NULL;
+ res->tuples = NULL;
+ res->paramDescs = NULL;
+ res->errFields = NULL;
+ res->events = NULL;
+ res->nEvents = 0;
+ /* res->curBlock was zeroed out earlier */
+
+ /* Free the PGresult structure itself */
+ free(res);
+}
+
+/*
+ * Handy subroutine to deallocate any partially constructed async result.
+ *
+ * Any "next" result gets cleared too.
+ */
+void
+pqClearAsyncResult(PGconn *conn)
+{
+ if (conn->result)
+ PQclear(conn->result);
+ conn->result = NULL;
+ if (conn->next_result)
+ PQclear(conn->next_result);
+ conn->next_result = NULL;
+}
+
+/*
+ * This subroutine deletes any existing async result, sets conn->result
+ * to a PGresult with status PGRES_FATAL_ERROR, and stores the current
+ * contents of conn->errorMessage into that result.
+ */
+void
+pqSaveErrorResult(PGconn *conn)
+{
+ pqClearAsyncResult(conn);
+ conn->result = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+}
+
+/*
+ * As above, after appending conn->write_err_msg to whatever other error we
+ * have. This is used when we've detected a write failure and have exhausted
+ * our chances of reporting something else instead.
+ */
+static void
+pqSaveWriteError(PGconn *conn)
+{
+ /*
+ * If write_err_msg is null because of previous strdup failure, do what we
+ * can. (It's likely our machinations here will get OOM failures as well,
+ * but might as well try.)
+ */
+ if (conn->write_err_msg)
+ {
+ appendPQExpBufferStr(&conn->errorMessage, conn->write_err_msg);
+ /* Avoid possibly appending the same message twice */
+ conn->write_err_msg[0] = '\0';
+ }
+ else
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("write to server failed\n"));
+
+ pqSaveErrorResult(conn);
+}
+
+/*
+ * This subroutine prepares an async result object for return to the caller.
+ * If there is not already an async result object, build an error object
+ * using whatever is in conn->errorMessage. In any case, clear the async
+ * result storage.
+ */
+PGresult *
+pqPrepareAsyncResult(PGconn *conn)
+{
+ PGresult *res;
+
+ /*
+ * conn->result is the PGresult to return. If it is NULL (which probably
+ * shouldn't happen) we assume there is an appropriate error message in
+ * conn->errorMessage.
+ */
+ res = conn->result;
+ if (!res)
+ res = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+
+ /*
+ * Replace conn->result with next_result, if any. In the normal case
+ * there isn't a next result and we're just dropping ownership of the
+ * current result. In single-row mode this restores the situation to what
+ * it was before we created the current single-row result.
+ */
+ conn->result = conn->next_result;
+ conn->next_result = NULL;
+
+ return res;
+}
+
+/*
+ * pqInternalNotice - produce an internally-generated notice message
+ *
+ * A format string and optional arguments can be passed. Note that we do
+ * libpq_gettext() here, so callers need not.
+ *
+ * The supplied text is taken as primary message (ie., it should not include
+ * a trailing newline, and should not be more than one line).
+ */
+void
+pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...)
+{
+ char msgBuf[1024];
+ va_list args;
+ PGresult *res;
+
+ if (hooks->noticeRec == NULL)
+ return; /* nobody home to receive notice? */
+
+ /* Format the message */
+ va_start(args, fmt);
+ vsnprintf(msgBuf, sizeof(msgBuf), libpq_gettext(fmt), args);
+ va_end(args);
+ msgBuf[sizeof(msgBuf) - 1] = '\0'; /* make real sure it's terminated */
+
+ /* Make a PGresult to pass to the notice receiver */
+ res = PQmakeEmptyPGresult(NULL, PGRES_NONFATAL_ERROR);
+ if (!res)
+ return;
+ res->noticeHooks = *hooks;
+
+ /*
+ * Set up fields of notice.
+ */
+ pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, msgBuf);
+ pqSaveMessageField(res, PG_DIAG_SEVERITY, libpq_gettext("NOTICE"));
+ pqSaveMessageField(res, PG_DIAG_SEVERITY_NONLOCALIZED, "NOTICE");
+ /* XXX should provide a SQLSTATE too? */
+
+ /*
+ * Result text is always just the primary message + newline. If we can't
+ * allocate it, substitute "out of memory", as in pqSetResultError.
+ */
+ res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, false);
+ if (res->errMsg)
+ sprintf(res->errMsg, "%s\n", msgBuf);
+ else
+ res->errMsg = libpq_gettext("out of memory\n");
+
+ /*
+ * Pass to receiver, then free it.
+ */
+ res->noticeHooks.noticeRec(res->noticeHooks.noticeRecArg, res);
+ PQclear(res);
+}
+
+/*
+ * pqAddTuple
+ * add a row pointer to the PGresult structure, growing it if necessary
+ * Returns true if OK, false if an error prevented adding the row
+ *
+ * On error, *errmsgp can be set to an error string to be returned.
+ * If it is left NULL, the error is presumed to be "out of memory".
+ */
+static bool
+pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp)
+{
+ if (res->ntups >= res->tupArrSize)
+ {
+ /*
+ * Try to grow the array.
+ *
+ * We can use realloc because shallow copying of the structure is
+ * okay. Note that the first time through, res->tuples is NULL. While
+ * ANSI says that realloc() should act like malloc() in that case,
+ * some old C libraries (like SunOS 4.1.x) coredump instead. On
+ * failure realloc is supposed to return NULL without damaging the
+ * existing allocation. Note that the positions beyond res->ntups are
+ * garbage, not necessarily NULL.
+ */
+ int newSize;
+ PGresAttValue **newTuples;
+
+ /*
+ * Since we use integers for row numbers, we can't support more than
+ * INT_MAX rows. Make sure we allow that many, though.
+ */
+ if (res->tupArrSize <= INT_MAX / 2)
+ newSize = (res->tupArrSize > 0) ? res->tupArrSize * 2 : 128;
+ else if (res->tupArrSize < INT_MAX)
+ newSize = INT_MAX;
+ else
+ {
+ *errmsgp = libpq_gettext("PGresult cannot support more than INT_MAX tuples");
+ return false;
+ }
+
+ /*
+ * Also, on 32-bit platforms we could, in theory, overflow size_t even
+ * before newSize gets to INT_MAX. (In practice we'd doubtless hit
+ * OOM long before that, but let's check.)
+ */
+#if INT_MAX >= (SIZE_MAX / 2)
+ if (newSize > SIZE_MAX / sizeof(PGresAttValue *))
+ {
+ *errmsgp = libpq_gettext("size_t overflow");
+ return false;
+ }
+#endif
+
+ if (res->tuples == NULL)
+ newTuples = (PGresAttValue **)
+ malloc(newSize * sizeof(PGresAttValue *));
+ else
+ newTuples = (PGresAttValue **)
+ realloc(res->tuples, newSize * sizeof(PGresAttValue *));
+ if (!newTuples)
+ return false; /* malloc or realloc failed */
+ res->memorySize +=
+ (newSize - res->tupArrSize) * sizeof(PGresAttValue *);
+ res->tupArrSize = newSize;
+ res->tuples = newTuples;
+ }
+ res->tuples[res->ntups] = tup;
+ res->ntups++;
+ return true;
+}
+
+/*
+ * pqSaveMessageField - save one field of an error or notice message
+ */
+void
+pqSaveMessageField(PGresult *res, char code, const char *value)
+{
+ PGMessageField *pfield;
+
+ pfield = (PGMessageField *)
+ pqResultAlloc(res,
+ offsetof(PGMessageField, contents) +
+ strlen(value) + 1,
+ true);
+ if (!pfield)
+ return; /* out of memory? */
+ pfield->code = code;
+ strcpy(pfield->contents, value);
+ pfield->next = res->errFields;
+ res->errFields = pfield;
+}
+
+/*
+ * pqSaveParameterStatus - remember parameter status sent by backend
+ */
+void
+pqSaveParameterStatus(PGconn *conn, const char *name, const char *value)
+{
+ pgParameterStatus *pstatus;
+ pgParameterStatus *prev;
+
+ /*
+ * Forget any old information about the parameter
+ */
+ for (pstatus = conn->pstatus, prev = NULL;
+ pstatus != NULL;
+ prev = pstatus, pstatus = pstatus->next)
+ {
+ if (strcmp(pstatus->name, name) == 0)
+ {
+ if (prev)
+ prev->next = pstatus->next;
+ else
+ conn->pstatus = pstatus->next;
+ free(pstatus); /* frees name and value strings too */
+ break;
+ }
+ }
+
+ /*
+ * Store new info as a single malloc block
+ */
+ pstatus = (pgParameterStatus *) malloc(sizeof(pgParameterStatus) +
+ strlen(name) + strlen(value) + 2);
+ if (pstatus)
+ {
+ char *ptr;
+
+ ptr = ((char *) pstatus) + sizeof(pgParameterStatus);
+ pstatus->name = ptr;
+ strcpy(ptr, name);
+ ptr += strlen(name) + 1;
+ pstatus->value = ptr;
+ strcpy(ptr, value);
+ pstatus->next = conn->pstatus;
+ conn->pstatus = pstatus;
+ }
+
+ /*
+ * Save values of settings that are of interest to libpq in fields of the
+ * PGconn object. We keep client_encoding and standard_conforming_strings
+ * in static variables as well, so that PQescapeString and PQescapeBytea
+ * can behave somewhat sanely (at least in single-connection-using
+ * programs).
+ */
+ if (strcmp(name, "client_encoding") == 0)
+ {
+ conn->client_encoding = pg_char_to_encoding(value);
+ /* if we don't recognize the encoding name, fall back to SQL_ASCII */
+ if (conn->client_encoding < 0)
+ conn->client_encoding = PG_SQL_ASCII;
+ static_client_encoding = conn->client_encoding;
+ }
+ else if (strcmp(name, "standard_conforming_strings") == 0)
+ {
+ conn->std_strings = (strcmp(value, "on") == 0);
+ static_std_strings = conn->std_strings;
+ }
+ else if (strcmp(name, "server_version") == 0)
+ {
+ /* We convert the server version to numeric form. */
+ int cnt;
+ int vmaj,
+ vmin,
+ vrev;
+
+ cnt = sscanf(value, "%d.%d.%d", &vmaj, &vmin, &vrev);
+
+ if (cnt == 3)
+ {
+ /* old style, e.g. 9.6.1 */
+ conn->sversion = (100 * vmaj + vmin) * 100 + vrev;
+ }
+ else if (cnt == 2)
+ {
+ if (vmaj >= 10)
+ {
+ /* new style, e.g. 10.1 */
+ conn->sversion = 100 * 100 * vmaj + vmin;
+ }
+ else
+ {
+ /* old style without minor version, e.g. 9.6devel */
+ conn->sversion = (100 * vmaj + vmin) * 100;
+ }
+ }
+ else if (cnt == 1)
+ {
+ /* new style without minor version, e.g. 10devel */
+ conn->sversion = 100 * 100 * vmaj;
+ }
+ else
+ conn->sversion = 0; /* unknown */
+ }
+ else if (strcmp(name, "default_transaction_read_only") == 0)
+ {
+ conn->default_transaction_read_only =
+ (strcmp(value, "on") == 0) ? PG_BOOL_YES : PG_BOOL_NO;
+ }
+ else if (strcmp(name, "in_hot_standby") == 0)
+ {
+ conn->in_hot_standby =
+ (strcmp(value, "on") == 0) ? PG_BOOL_YES : PG_BOOL_NO;
+ }
+}
+
+
+/*
+ * pqRowProcessor
+ * Add the received row to the current async result (conn->result).
+ * Returns 1 if OK, 0 if error occurred.
+ *
+ * On error, *errmsgp can be set to an error string to be returned.
+ * If it is left NULL, the error is presumed to be "out of memory".
+ *
+ * In single-row mode, we create a new result holding just the current row,
+ * stashing the previous result in conn->next_result so that it becomes
+ * active again after pqPrepareAsyncResult(). This allows the result metadata
+ * (column descriptions) to be carried forward to each result row.
+ */
+int
+pqRowProcessor(PGconn *conn, const char **errmsgp)
+{
+ PGresult *res = conn->result;
+ int nfields = res->numAttributes;
+ const PGdataValue *columns = conn->rowBuf;
+ PGresAttValue *tup;
+ int i;
+
+ /*
+ * In single-row mode, make a new PGresult that will hold just this one
+ * row; the original conn->result is left unchanged so that it can be used
+ * again as the template for future rows.
+ */
+ if (conn->singleRowMode)
+ {
+ /* Copy everything that should be in the result at this point */
+ res = PQcopyResult(res,
+ PG_COPYRES_ATTRS | PG_COPYRES_EVENTS |
+ PG_COPYRES_NOTICEHOOKS);
+ if (!res)
+ return 0;
+ }
+
+ /*
+ * Basically we just allocate space in the PGresult for each field and
+ * copy the data over.
+ *
+ * Note: on malloc failure, we return 0 leaving *errmsgp still NULL, which
+ * caller will take to mean "out of memory". This is preferable to trying
+ * to set up such a message here, because evidently there's not enough
+ * memory for gettext() to do anything.
+ */
+ tup = (PGresAttValue *)
+ pqResultAlloc(res, nfields * sizeof(PGresAttValue), true);
+ if (tup == NULL)
+ goto fail;
+
+ for (i = 0; i < nfields; i++)
+ {
+ int clen = columns[i].len;
+
+ if (clen < 0)
+ {
+ /* null field */
+ tup[i].len = NULL_LEN;
+ tup[i].value = res->null_field;
+ }
+ else
+ {
+ bool isbinary = (res->attDescs[i].format != 0);
+ char *val;
+
+ val = (char *) pqResultAlloc(res, clen + 1, isbinary);
+ if (val == NULL)
+ goto fail;
+
+ /* copy and zero-terminate the data (even if it's binary) */
+ memcpy(val, columns[i].value, clen);
+ val[clen] = '\0';
+
+ tup[i].len = clen;
+ tup[i].value = val;
+ }
+ }
+
+ /* And add the tuple to the PGresult's tuple array */
+ if (!pqAddTuple(res, tup, errmsgp))
+ goto fail;
+
+ /*
+ * Success. In single-row mode, make the result available to the client
+ * immediately.
+ */
+ if (conn->singleRowMode)
+ {
+ /* Change result status to special single-row value */
+ res->resultStatus = PGRES_SINGLE_TUPLE;
+ /* Stash old result for re-use later */
+ conn->next_result = conn->result;
+ conn->result = res;
+ /* And mark the result ready to return */
+ conn->asyncStatus = PGASYNC_READY_MORE;
+ }
+
+ return 1;
+
+fail:
+ /* release locally allocated PGresult, if we made one */
+ if (res != conn->result)
+ PQclear(res);
+ return 0;
+}
+
+
+/*
+ * pqAllocCmdQueueEntry
+ * Get a command queue entry for caller to fill.
+ *
+ * If the recycle queue has a free element, that is returned; if not, a
+ * fresh one is allocated. Caller is responsible for adding it to the
+ * command queue (pqAppendCmdQueueEntry) once the struct is filled in, or
+ * releasing the memory (pqRecycleCmdQueueEntry) if an error occurs.
+ *
+ * If allocation fails, sets the error message and returns NULL.
+ */
+static PGcmdQueueEntry *
+pqAllocCmdQueueEntry(PGconn *conn)
+{
+ PGcmdQueueEntry *entry;
+
+ if (conn->cmd_queue_recycle == NULL)
+ {
+ entry = (PGcmdQueueEntry *) malloc(sizeof(PGcmdQueueEntry));
+ if (entry == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ }
+ else
+ {
+ entry = conn->cmd_queue_recycle;
+ conn->cmd_queue_recycle = entry->next;
+ }
+ entry->next = NULL;
+ entry->query = NULL;
+
+ return entry;
+}
+
+/*
+ * pqAppendCmdQueueEntry
+ * Append a caller-allocated entry to the command queue, and update
+ * conn->asyncStatus to account for it.
+ *
+ * The query itself must already have been put in the output buffer by the
+ * caller.
+ */
+static void
+pqAppendCmdQueueEntry(PGconn *conn, PGcmdQueueEntry *entry)
+{
+ Assert(entry->next == NULL);
+
+ if (conn->cmd_queue_head == NULL)
+ conn->cmd_queue_head = entry;
+ else
+ conn->cmd_queue_tail->next = entry;
+
+ conn->cmd_queue_tail = entry;
+
+ switch (conn->pipelineStatus)
+ {
+ case PQ_PIPELINE_OFF:
+ case PQ_PIPELINE_ON:
+
+ /*
+ * When not in pipeline aborted state, if there's a result ready
+ * to be consumed, let it be so (that is, don't change away from
+ * READY or READY_MORE); otherwise set us busy to wait for
+ * something to arrive from the server.
+ */
+ if (conn->asyncStatus == PGASYNC_IDLE)
+ conn->asyncStatus = PGASYNC_BUSY;
+ break;
+
+ case PQ_PIPELINE_ABORTED:
+
+ /*
+ * In aborted pipeline state, we don't expect anything from the
+ * server (since we don't send any queries that are queued).
+ * Therefore, if IDLE then do what PQgetResult would do to let
+ * itself consume commands from the queue; if we're in any other
+ * state, we don't have to do anything.
+ */
+ if (conn->asyncStatus == PGASYNC_IDLE ||
+ conn->asyncStatus == PGASYNC_PIPELINE_IDLE)
+ {
+ resetPQExpBuffer(&conn->errorMessage);
+ pqPipelineProcessQueue(conn);
+ }
+ break;
+ }
+}
+
+/*
+ * pqRecycleCmdQueueEntry
+ * Push a command queue entry onto the freelist.
+ */
+static void
+pqRecycleCmdQueueEntry(PGconn *conn, PGcmdQueueEntry *entry)
+{
+ if (entry == NULL)
+ return;
+
+ /* recyclable entries should not have a follow-on command */
+ Assert(entry->next == NULL);
+
+ if (entry->query)
+ {
+ free(entry->query);
+ entry->query = NULL;
+ }
+
+ entry->next = conn->cmd_queue_recycle;
+ conn->cmd_queue_recycle = entry;
+}
+
+
+/*
+ * PQsendQuery
+ * Submit a query, but don't wait for it to finish
+ *
+ * Returns: 1 if successfully submitted
+ * 0 if error (conn->errorMessage is set)
+ *
+ * PQsendQueryContinue is a non-exported version that behaves identically
+ * except that it doesn't reset conn->errorMessage.
+ */
+int
+PQsendQuery(PGconn *conn, const char *query)
+{
+ return PQsendQueryInternal(conn, query, true);
+}
+
+int
+PQsendQueryContinue(PGconn *conn, const char *query)
+{
+ return PQsendQueryInternal(conn, query, false);
+}
+
+static int
+PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
+{
+ PGcmdQueueEntry *entry = NULL;
+ PGcmdQueueEntry *entry2 = NULL;
+
+ if (!PQsendQueryStart(conn, newQuery))
+ return 0;
+
+ /* check the argument */
+ if (!query)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ entry2 = pqAllocCmdQueueEntry(conn);
+ if (entry2 == NULL)
+ goto sendFailed;
+ }
+
+ /* Send the query message(s) */
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ /* construct the outgoing Query message */
+ if (pqPutMsgStart('Q', conn) < 0 ||
+ pqPuts(query, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ {
+ /* error message should be set up already */
+ pqRecycleCmdQueueEntry(conn, entry);
+ return 0;
+ }
+
+ /* remember we are using simple query protocol */
+ entry->queryclass = PGQUERY_SIMPLE;
+ /* and remember the query text too, if possible */
+ entry->query = strdup(query);
+ }
+ else
+ {
+ /*
+ * In pipeline mode we cannot use the simple protocol, so we send
+ * Parse, Bind, Describe Portal, Execute, Close Portal (with the
+ * unnamed portal).
+ */
+ if (pqPutMsgStart('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPuts(query, conn) < 0 ||
+ pqPutInt(0, 2, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ if (pqPutMsgStart('B', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutInt(0, 2, conn) < 0 ||
+ pqPutInt(0, 2, conn) < 0 ||
+ pqPutInt(0, 2, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ if (pqPutMsgStart('D', conn) < 0 ||
+ pqPutc('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ if (pqPutMsgStart('E', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutInt(0, 4, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ if (pqPutMsgStart('C', conn) < 0 ||
+ pqPutc('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ entry->queryclass = PGQUERY_EXTENDED;
+ entry->query = strdup(query);
+ }
+
+ /*
+ * Give the data a push. In nonblock mode, don't complain if we're unable
+ * to send it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (pqPipelineFlush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ pqAppendCmdQueueEntry(conn, entry);
+
+ /*
+ * When pipeline mode is in use, we need a second entry in the command
+ * queue to represent Close Portal message. This allows us later to wait
+ * for the CloseComplete message to be received before getting in IDLE
+ * state.
+ */
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ entry2->queryclass = PGQUERY_CLOSE;
+ entry2->query = NULL;
+ pqAppendCmdQueueEntry(conn, entry2);
+ }
+
+ return 1;
+
+sendFailed:
+ pqRecycleCmdQueueEntry(conn, entry);
+ pqRecycleCmdQueueEntry(conn, entry2);
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * PQsendQueryParams
+ * Like PQsendQuery, but use extended query protocol so we can pass parameters
+ */
+int
+PQsendQueryParams(PGconn *conn,
+ const char *command,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat)
+{
+ if (!PQsendQueryStart(conn, true))
+ return 0;
+
+ /* check the arguments */
+ if (!command)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and %d\n"),
+ PQ_QUERY_PARAM_MAX_LIMIT);
+ return 0;
+ }
+
+ return PQsendQueryGuts(conn,
+ command,
+ "", /* use unnamed statement */
+ nParams,
+ paramTypes,
+ paramValues,
+ paramLengths,
+ paramFormats,
+ resultFormat);
+}
+
+/*
+ * PQsendPrepare
+ * Submit a Parse message, but don't wait for it to finish
+ *
+ * Returns: 1 if successfully submitted
+ * 0 if error (conn->errorMessage is set)
+ */
+int
+PQsendPrepare(PGconn *conn,
+ const char *stmtName, const char *query,
+ int nParams, const Oid *paramTypes)
+{
+ PGcmdQueueEntry *entry = NULL;
+
+ if (!PQsendQueryStart(conn, true))
+ return 0;
+
+ /* check the arguments */
+ if (!stmtName)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("statement name is a null pointer\n"));
+ return 0;
+ }
+ if (!query)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and %d\n"),
+ PQ_QUERY_PARAM_MAX_LIMIT);
+ return 0;
+ }
+
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+
+ /* construct the Parse message */
+ if (pqPutMsgStart('P', conn) < 0 ||
+ pqPuts(stmtName, conn) < 0 ||
+ pqPuts(query, conn) < 0)
+ goto sendFailed;
+
+ if (nParams > 0 && paramTypes)
+ {
+ int i;
+
+ if (pqPutInt(nParams, 2, conn) < 0)
+ goto sendFailed;
+ for (i = 0; i < nParams; i++)
+ {
+ if (pqPutInt(paramTypes[i], 4, conn) < 0)
+ goto sendFailed;
+ }
+ }
+ else
+ {
+ if (pqPutInt(0, 2, conn) < 0)
+ goto sendFailed;
+ }
+ if (pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* Add a Sync, unless in pipeline mode. */
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ }
+
+ /* remember we are doing just a Parse */
+ entry->queryclass = PGQUERY_PREPARE;
+
+ /* and remember the query text too, if possible */
+ /* if insufficient memory, query just winds up NULL */
+ entry->query = strdup(query);
+
+ /*
+ * Give the data a push (in pipeline mode, only if we're past the size
+ * threshold). In nonblock mode, don't complain if we're unable to send
+ * it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (pqPipelineFlush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ pqAppendCmdQueueEntry(conn, entry);
+
+ return 1;
+
+sendFailed:
+ pqRecycleCmdQueueEntry(conn, entry);
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * PQsendQueryPrepared
+ * Like PQsendQuery, but execute a previously prepared statement,
+ * using extended query protocol so we can pass parameters
+ */
+int
+PQsendQueryPrepared(PGconn *conn,
+ const char *stmtName,
+ int nParams,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat)
+{
+ if (!PQsendQueryStart(conn, true))
+ return 0;
+
+ /* check the arguments */
+ if (!stmtName)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("statement name is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and %d\n"),
+ PQ_QUERY_PARAM_MAX_LIMIT);
+ return 0;
+ }
+
+ return PQsendQueryGuts(conn,
+ NULL, /* no command to parse */
+ stmtName,
+ nParams,
+ NULL, /* no param types */
+ paramValues,
+ paramLengths,
+ paramFormats,
+ resultFormat);
+}
+
+/*
+ * PQsendQueryStart
+ * Common startup code for PQsendQuery and sibling routines
+ */
+static bool
+PQsendQueryStart(PGconn *conn, bool newQuery)
+{
+ if (!conn)
+ return false;
+
+ /*
+ * If this is the beginning of a query cycle, reset the error buffer.
+ */
+ if (newQuery)
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* Don't try to send if we know there's no live connection. */
+ if (conn->status != CONNECTION_OK)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no connection to the server\n"));
+ return false;
+ }
+
+ /* Can't send while already busy, either, unless enqueuing for later */
+ if (conn->asyncStatus != PGASYNC_IDLE &&
+ conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("another command is already in progress\n"));
+ return false;
+ }
+
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ /*
+ * When enqueuing commands we don't change much of the connection
+ * state since it's already in use for the current command. The
+ * connection state will get updated when pqPipelineProcessQueue()
+ * advances to start processing the queued message.
+ *
+ * Just make sure we can safely enqueue given the current connection
+ * state. We can enqueue behind another queue item, or behind a
+ * non-queue command (one that sends its own sync), but we can't
+ * enqueue if the connection is in a copy state.
+ */
+ switch (conn->asyncStatus)
+ {
+ case PGASYNC_IDLE:
+ case PGASYNC_PIPELINE_IDLE:
+ case PGASYNC_READY:
+ case PGASYNC_READY_MORE:
+ case PGASYNC_BUSY:
+ /* ok to queue */
+ break;
+
+ case PGASYNC_COPY_IN:
+ case PGASYNC_COPY_OUT:
+ case PGASYNC_COPY_BOTH:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot queue commands during COPY\n"));
+ return false;
+ }
+ }
+ else
+ {
+ /*
+ * This command's results will come in immediately. Initialize async
+ * result-accumulation state
+ */
+ pqClearAsyncResult(conn);
+
+ /* reset single-row processing mode */
+ conn->singleRowMode = false;
+
+ }
+ /* ready to send command message */
+ return true;
+}
+
+/*
+ * PQsendQueryGuts
+ * Common code for sending a query with extended query protocol
+ * PQsendQueryStart should be done already
+ *
+ * command may be NULL to indicate we use an already-prepared statement
+ */
+static int
+PQsendQueryGuts(PGconn *conn,
+ const char *command,
+ const char *stmtName,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat)
+{
+ int i;
+ PGcmdQueueEntry *entry;
+
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+
+ /*
+ * We will send Parse (if needed), Bind, Describe Portal, Execute, Sync
+ * (if not in pipeline mode), using specified statement name and the
+ * unnamed portal.
+ */
+
+ if (command)
+ {
+ /* construct the Parse message */
+ if (pqPutMsgStart('P', conn) < 0 ||
+ pqPuts(stmtName, conn) < 0 ||
+ pqPuts(command, conn) < 0)
+ goto sendFailed;
+ if (nParams > 0 && paramTypes)
+ {
+ if (pqPutInt(nParams, 2, conn) < 0)
+ goto sendFailed;
+ for (i = 0; i < nParams; i++)
+ {
+ if (pqPutInt(paramTypes[i], 4, conn) < 0)
+ goto sendFailed;
+ }
+ }
+ else
+ {
+ if (pqPutInt(0, 2, conn) < 0)
+ goto sendFailed;
+ }
+ if (pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ }
+
+ /* Construct the Bind message */
+ if (pqPutMsgStart('B', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPuts(stmtName, conn) < 0)
+ goto sendFailed;
+
+ /* Send parameter formats */
+ if (nParams > 0 && paramFormats)
+ {
+ if (pqPutInt(nParams, 2, conn) < 0)
+ goto sendFailed;
+ for (i = 0; i < nParams; i++)
+ {
+ if (pqPutInt(paramFormats[i], 2, conn) < 0)
+ goto sendFailed;
+ }
+ }
+ else
+ {
+ if (pqPutInt(0, 2, conn) < 0)
+ goto sendFailed;
+ }
+
+ if (pqPutInt(nParams, 2, conn) < 0)
+ goto sendFailed;
+
+ /* Send parameters */
+ for (i = 0; i < nParams; i++)
+ {
+ if (paramValues && paramValues[i])
+ {
+ int nbytes;
+
+ if (paramFormats && paramFormats[i] != 0)
+ {
+ /* binary parameter */
+ if (paramLengths)
+ nbytes = paramLengths[i];
+ else
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("length must be given for binary parameter\n"));
+ goto sendFailed;
+ }
+ }
+ else
+ {
+ /* text parameter, do not use paramLengths */
+ nbytes = strlen(paramValues[i]);
+ }
+ if (pqPutInt(nbytes, 4, conn) < 0 ||
+ pqPutnchar(paramValues[i], nbytes, conn) < 0)
+ goto sendFailed;
+ }
+ else
+ {
+ /* take the param as NULL */
+ if (pqPutInt(-1, 4, conn) < 0)
+ goto sendFailed;
+ }
+ }
+ if (pqPutInt(1, 2, conn) < 0 ||
+ pqPutInt(resultFormat, 2, conn))
+ goto sendFailed;
+ if (pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Describe Portal message */
+ if (pqPutMsgStart('D', conn) < 0 ||
+ pqPutc('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Execute message */
+ if (pqPutMsgStart('E', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutInt(0, 4, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Sync message if not in pipeline mode */
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ }
+
+ /* remember we are using extended query protocol */
+ entry->queryclass = PGQUERY_EXTENDED;
+
+ /* and remember the query text too, if possible */
+ /* if insufficient memory, query just winds up NULL */
+ if (command)
+ entry->query = strdup(command);
+
+ /*
+ * Give the data a push (in pipeline mode, only if we're past the size
+ * threshold). In nonblock mode, don't complain if we're unable to send
+ * it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (pqPipelineFlush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ pqAppendCmdQueueEntry(conn, entry);
+
+ return 1;
+
+sendFailed:
+ pqRecycleCmdQueueEntry(conn, entry);
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * Select row-by-row processing mode
+ */
+int
+PQsetSingleRowMode(PGconn *conn)
+{
+ /*
+ * Only allow setting the flag when we have launched a query and not yet
+ * received any results.
+ */
+ if (!conn)
+ return 0;
+ if (conn->asyncStatus != PGASYNC_BUSY)
+ return 0;
+ if (!conn->cmd_queue_head ||
+ (conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE &&
+ conn->cmd_queue_head->queryclass != PGQUERY_EXTENDED))
+ return 0;
+ if (conn->result)
+ return 0;
+
+ /* OK, set flag */
+ conn->singleRowMode = true;
+ return 1;
+}
+
+/*
+ * Consume any available input from the backend
+ * 0 return: some kind of trouble
+ * 1 return: no problem
+ */
+int
+PQconsumeInput(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ /*
+ * for non-blocking connections try to flush the send-queue, otherwise we
+ * may never get a response for something that may not have already been
+ * sent because it's in our write buffer!
+ */
+ if (pqIsnonblocking(conn))
+ {
+ if (pqFlush(conn) < 0)
+ return 0;
+ }
+
+ /*
+ * Load more data, if available. We do this no matter what state we are
+ * in, since we are probably getting called because the application wants
+ * to get rid of a read-select condition. Note that we will NOT block
+ * waiting for more input.
+ */
+ if (pqReadData(conn) < 0)
+ return 0;
+
+ /* Parsing of the data waits till later. */
+ return 1;
+}
+
+
+/*
+ * parseInput: if appropriate, parse input data from backend
+ * until input is exhausted or a stopping state is reached.
+ * Note that this function will NOT attempt to read more data from the backend.
+ */
+static void
+parseInput(PGconn *conn)
+{
+ pqParseInput3(conn);
+}
+
+/*
+ * PQisBusy
+ * Return true if PQgetResult would block waiting for input.
+ */
+
+int
+PQisBusy(PGconn *conn)
+{
+ if (!conn)
+ return false;
+
+ /* Parse any available data, if our state permits. */
+ parseInput(conn);
+
+ /*
+ * PQgetResult will return immediately in all states except BUSY. Also,
+ * if we've detected read EOF and dropped the connection, we can expect
+ * that PQgetResult will fail immediately. Note that we do *not* check
+ * conn->write_failed here --- once that's become set, we know we have
+ * trouble, but we need to keep trying to read until we have a complete
+ * server message or detect read EOF.
+ */
+ return conn->asyncStatus == PGASYNC_BUSY && conn->status != CONNECTION_BAD;
+}
+
+/*
+ * PQgetResult
+ * Get the next PGresult produced by a query. Returns NULL if no
+ * query work remains or an error has occurred (e.g. out of
+ * memory).
+ *
+ * In pipeline mode, once all the result of a query have been returned,
+ * PQgetResult returns NULL to let the user know that the next
+ * query is being processed. At the end of the pipeline, returns a
+ * result with PQresultStatus(result) == PGRES_PIPELINE_SYNC.
+ */
+PGresult *
+PQgetResult(PGconn *conn)
+{
+ PGresult *res;
+
+ if (!conn)
+ return NULL;
+
+ /* Parse any available data, if our state permits. */
+ parseInput(conn);
+
+ /* If not ready to return something, block until we are. */
+ while (conn->asyncStatus == PGASYNC_BUSY)
+ {
+ int flushResult;
+
+ /*
+ * If data remains unsent, send it. Else we might be waiting for the
+ * result of a command the backend hasn't even got yet.
+ */
+ while ((flushResult = pqFlush(conn)) > 0)
+ {
+ if (pqWait(false, true, conn))
+ {
+ flushResult = -1;
+ break;
+ }
+ }
+
+ /*
+ * Wait for some more data, and load it. (Note: if the connection has
+ * been lost, pqWait should return immediately because the socket
+ * should be read-ready, either with the last server data or with an
+ * EOF indication. We expect therefore that this won't result in any
+ * undue delay in reporting a previous write failure.)
+ */
+ if (flushResult ||
+ pqWait(true, false, conn) ||
+ pqReadData(conn) < 0)
+ {
+ /*
+ * conn->errorMessage has been set by pqWait or pqReadData. We
+ * want to append it to any already-received error message.
+ */
+ pqSaveErrorResult(conn);
+ conn->asyncStatus = PGASYNC_IDLE;
+ return pqPrepareAsyncResult(conn);
+ }
+
+ /* Parse it. */
+ parseInput(conn);
+
+ /*
+ * If we had a write error, but nothing above obtained a query result
+ * or detected a read error, report the write error.
+ */
+ if (conn->write_failed && conn->asyncStatus == PGASYNC_BUSY)
+ {
+ pqSaveWriteError(conn);
+ conn->asyncStatus = PGASYNC_IDLE;
+ return pqPrepareAsyncResult(conn);
+ }
+ }
+
+ /* Return the appropriate thing. */
+ switch (conn->asyncStatus)
+ {
+ case PGASYNC_IDLE:
+ res = NULL; /* query is complete */
+ break;
+ case PGASYNC_PIPELINE_IDLE:
+ Assert(conn->pipelineStatus != PQ_PIPELINE_OFF);
+
+ /*
+ * We're about to return the NULL that terminates the round of
+ * results from the current query; prepare to send the results
+ * of the next query, if any, when we're called next. If there's
+ * no next element in the command queue, this gets us in IDLE
+ * state.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+ pqPipelineProcessQueue(conn);
+ res = NULL; /* query is complete */
+ break;
+
+ case PGASYNC_READY:
+
+ /*
+ * For any query type other than simple query protocol, we advance
+ * the command queue here. This is because for simple query
+ * protocol we can get the READY state multiple times before the
+ * command is actually complete, since the command string can
+ * contain many queries. In simple query protocol, the queue
+ * advance is done by fe-protocol3 when it receives ReadyForQuery.
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE)
+ pqCommandQueueAdvance(conn);
+ res = pqPrepareAsyncResult(conn);
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ /*
+ * We're about to send the results of the current query. Set
+ * us idle now, and ...
+ */
+ conn->asyncStatus = PGASYNC_PIPELINE_IDLE;
+
+ /*
+ * ... in cases when we're sending a pipeline-sync result,
+ * move queue processing forwards immediately, so that next
+ * time we're called, we're prepared to return the next result
+ * received from the server. In all other cases, leave the
+ * queue state change for next time, so that a terminating
+ * NULL result is sent.
+ *
+ * (In other words: we don't return a NULL after a pipeline
+ * sync.)
+ */
+ if (res && res->resultStatus == PGRES_PIPELINE_SYNC)
+ pqPipelineProcessQueue(conn);
+ }
+ else
+ {
+ /* Set the state back to BUSY, allowing parsing to proceed. */
+ conn->asyncStatus = PGASYNC_BUSY;
+ }
+ break;
+ case PGASYNC_READY_MORE:
+ res = pqPrepareAsyncResult(conn);
+ /* Set the state back to BUSY, allowing parsing to proceed. */
+ conn->asyncStatus = PGASYNC_BUSY;
+ break;
+ case PGASYNC_COPY_IN:
+ res = getCopyResult(conn, PGRES_COPY_IN);
+ break;
+ case PGASYNC_COPY_OUT:
+ res = getCopyResult(conn, PGRES_COPY_OUT);
+ break;
+ case PGASYNC_COPY_BOTH:
+ res = getCopyResult(conn, PGRES_COPY_BOTH);
+ break;
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unexpected asyncStatus: %d\n"),
+ (int) conn->asyncStatus);
+ res = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+ break;
+ }
+
+ /* If the next command we expect is CLOSE, read and consume it */
+ if (conn->asyncStatus == PGASYNC_PIPELINE_IDLE &&
+ conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_CLOSE)
+ {
+ if (res && res->resultStatus != PGRES_FATAL_ERROR)
+ {
+ conn->asyncStatus = PGASYNC_BUSY;
+ parseInput(conn);
+ conn->asyncStatus = PGASYNC_PIPELINE_IDLE;
+ }
+ else
+ /* we won't ever see the Close */
+ pqCommandQueueAdvance(conn);
+ }
+
+ if (res)
+ {
+ int i;
+
+ for (i = 0; i < res->nEvents; i++)
+ {
+ PGEventResultCreate evt;
+
+ evt.conn = conn;
+ evt.result = res;
+ if (!res->events[i].proc(PGEVT_RESULTCREATE, &evt,
+ res->events[i].passThrough))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"),
+ res->events[i].name);
+ pqSetResultError(res, &conn->errorMessage);
+ res->resultStatus = PGRES_FATAL_ERROR;
+ break;
+ }
+ res->events[i].resultInitialized = true;
+ }
+ }
+
+ return res;
+}
+
+/*
+ * getCopyResult
+ * Helper for PQgetResult: generate result for COPY-in-progress cases
+ */
+static PGresult *
+getCopyResult(PGconn *conn, ExecStatusType copytype)
+{
+ /*
+ * If the server connection has been lost, don't pretend everything is
+ * hunky-dory; instead return a PGRES_FATAL_ERROR result, and reset the
+ * asyncStatus to idle (corresponding to what we'd do if we'd detected I/O
+ * error in the earlier steps in PQgetResult). The text returned in the
+ * result is whatever is in conn->errorMessage; we hope that was filled
+ * with something relevant when the lost connection was detected.
+ */
+ if (conn->status != CONNECTION_OK)
+ {
+ pqSaveErrorResult(conn);
+ conn->asyncStatus = PGASYNC_IDLE;
+ return pqPrepareAsyncResult(conn);
+ }
+
+ /* If we have an async result for the COPY, return that */
+ if (conn->result && conn->result->resultStatus == copytype)
+ return pqPrepareAsyncResult(conn);
+
+ /* Otherwise, invent a suitable PGresult */
+ return PQmakeEmptyPGresult(conn, copytype);
+}
+
+
+/*
+ * PQexec
+ * send a query to the backend and package up the result in a PGresult
+ *
+ * If the query was not even sent, return NULL; conn->errorMessage is set to
+ * a relevant message.
+ * If the query was sent, a new PGresult is returned (which could indicate
+ * either success or failure).
+ * The user is responsible for freeing the PGresult via PQclear()
+ * when done with it.
+ */
+PGresult *
+PQexec(PGconn *conn, const char *query)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendQuery(conn, query))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * PQexecParams
+ * Like PQexec, but use extended query protocol so we can pass parameters
+ */
+PGresult *
+PQexecParams(PGconn *conn,
+ const char *command,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendQueryParams(conn, command,
+ nParams, paramTypes, paramValues, paramLengths,
+ paramFormats, resultFormat))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * PQprepare
+ * Creates a prepared statement by issuing a Parse message.
+ *
+ * If the query was not even sent, return NULL; conn->errorMessage is set to
+ * a relevant message.
+ * If the query was sent, a new PGresult is returned (which could indicate
+ * either success or failure).
+ * The user is responsible for freeing the PGresult via PQclear()
+ * when done with it.
+ */
+PGresult *
+PQprepare(PGconn *conn,
+ const char *stmtName, const char *query,
+ int nParams, const Oid *paramTypes)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendPrepare(conn, stmtName, query, nParams, paramTypes))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * PQexecPrepared
+ * Like PQexec, but execute a previously prepared statement,
+ * using extended query protocol so we can pass parameters
+ */
+PGresult *
+PQexecPrepared(PGconn *conn,
+ const char *stmtName,
+ int nParams,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendQueryPrepared(conn, stmtName,
+ nParams, paramValues, paramLengths,
+ paramFormats, resultFormat))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * Common code for PQexec and sibling routines: prepare to send command
+ */
+static bool
+PQexecStart(PGconn *conn)
+{
+ PGresult *result;
+
+ if (!conn)
+ return false;
+
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("synchronous command execution functions are not allowed in pipeline mode\n"));
+ return false;
+ }
+
+ /*
+ * Since this is the beginning of a query cycle, reset the error buffer.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /*
+ * Silently discard any prior query result that application didn't eat.
+ * This is probably poor design, but it's here for backward compatibility.
+ */
+ while ((result = PQgetResult(conn)) != NULL)
+ {
+ ExecStatusType resultStatus = result->resultStatus;
+
+ PQclear(result); /* only need its status */
+ if (resultStatus == PGRES_COPY_IN)
+ {
+ /* get out of a COPY IN state */
+ if (PQputCopyEnd(conn,
+ libpq_gettext("COPY terminated by new PQexec")) < 0)
+ return false;
+ /* keep waiting to swallow the copy's failure message */
+ }
+ else if (resultStatus == PGRES_COPY_OUT)
+ {
+ /*
+ * Get out of a COPY OUT state: we just switch back to BUSY and
+ * allow the remaining COPY data to be dropped on the floor.
+ */
+ conn->asyncStatus = PGASYNC_BUSY;
+ /* keep waiting to swallow the copy's completion message */
+ }
+ else if (resultStatus == PGRES_COPY_BOTH)
+ {
+ /* We don't allow PQexec during COPY BOTH */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("PQexec not allowed during COPY BOTH\n"));
+ return false;
+ }
+ /* check for loss of connection, too */
+ if (conn->status == CONNECTION_BAD)
+ return false;
+ }
+
+ /* OK to send a command */
+ return true;
+}
+
+/*
+ * Common code for PQexec and sibling routines: wait for command result
+ */
+static PGresult *
+PQexecFinish(PGconn *conn)
+{
+ PGresult *result;
+ PGresult *lastResult;
+
+ /*
+ * For backwards compatibility, return the last result if there are more
+ * than one. (We used to have logic here to concatenate successive error
+ * messages, but now that happens automatically, since conn->errorMessage
+ * will continue to accumulate errors throughout this loop.)
+ *
+ * We have to stop if we see copy in/out/both, however. We will resume
+ * parsing after application performs the data transfer.
+ *
+ * Also stop if the connection is lost (else we'll loop infinitely).
+ */
+ lastResult = NULL;
+ while ((result = PQgetResult(conn)) != NULL)
+ {
+ if (lastResult)
+ PQclear(lastResult);
+ lastResult = result;
+ if (result->resultStatus == PGRES_COPY_IN ||
+ result->resultStatus == PGRES_COPY_OUT ||
+ result->resultStatus == PGRES_COPY_BOTH ||
+ conn->status == CONNECTION_BAD)
+ break;
+ }
+
+ return lastResult;
+}
+
+/*
+ * PQdescribePrepared
+ * Obtain information about a previously prepared statement
+ *
+ * If the query was not even sent, return NULL; conn->errorMessage is set to
+ * a relevant message.
+ * If the query was sent, a new PGresult is returned (which could indicate
+ * either success or failure). On success, the PGresult contains status
+ * PGRES_COMMAND_OK, and its parameter and column-heading fields describe
+ * the statement's inputs and outputs respectively.
+ * The user is responsible for freeing the PGresult via PQclear()
+ * when done with it.
+ */
+PGresult *
+PQdescribePrepared(PGconn *conn, const char *stmt)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendDescribe(conn, 'S', stmt))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * PQdescribePortal
+ * Obtain information about a previously created portal
+ *
+ * This is much like PQdescribePrepared, except that no parameter info is
+ * returned. Note that at the moment, libpq doesn't really expose portals
+ * to the client; but this can be used with a portal created by a SQL
+ * DECLARE CURSOR command.
+ */
+PGresult *
+PQdescribePortal(PGconn *conn, const char *portal)
+{
+ if (!PQexecStart(conn))
+ return NULL;
+ if (!PQsendDescribe(conn, 'P', portal))
+ return NULL;
+ return PQexecFinish(conn);
+}
+
+/*
+ * PQsendDescribePrepared
+ * Submit a Describe Statement command, but don't wait for it to finish
+ *
+ * Returns: 1 if successfully submitted
+ * 0 if error (conn->errorMessage is set)
+ */
+int
+PQsendDescribePrepared(PGconn *conn, const char *stmt)
+{
+ return PQsendDescribe(conn, 'S', stmt);
+}
+
+/*
+ * PQsendDescribePortal
+ * Submit a Describe Portal command, but don't wait for it to finish
+ *
+ * Returns: 1 if successfully submitted
+ * 0 if error (conn->errorMessage is set)
+ */
+int
+PQsendDescribePortal(PGconn *conn, const char *portal)
+{
+ return PQsendDescribe(conn, 'P', portal);
+}
+
+/*
+ * PQsendDescribe
+ * Common code to send a Describe command
+ *
+ * Available options for desc_type are
+ * 'S' to describe a prepared statement; or
+ * 'P' to describe a portal.
+ * Returns 1 on success and 0 on failure.
+ */
+static int
+PQsendDescribe(PGconn *conn, char desc_type, const char *desc_target)
+{
+ PGcmdQueueEntry *entry = NULL;
+
+ /* Treat null desc_target as empty string */
+ if (!desc_target)
+ desc_target = "";
+
+ if (!PQsendQueryStart(conn, true))
+ return 0;
+
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+
+ /* construct the Describe message */
+ if (pqPutMsgStart('D', conn) < 0 ||
+ pqPutc(desc_type, conn) < 0 ||
+ pqPuts(desc_target, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Sync message */
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+ }
+
+ /* remember we are doing a Describe */
+ entry->queryclass = PGQUERY_DESCRIBE;
+
+ /*
+ * Give the data a push (in pipeline mode, only if we're past the size
+ * threshold). In nonblock mode, don't complain if we're unable to send
+ * it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (pqPipelineFlush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ pqAppendCmdQueueEntry(conn, entry);
+
+ return 1;
+
+sendFailed:
+ pqRecycleCmdQueueEntry(conn, entry);
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * PQnotifies
+ * returns a PGnotify* structure of the latest async notification
+ * that has not yet been handled
+ *
+ * returns NULL, if there is currently
+ * no unhandled async notification from the backend
+ *
+ * the CALLER is responsible for FREE'ing the structure returned
+ *
+ * Note that this function does not read any new data from the socket;
+ * so usually, caller should call PQconsumeInput() first.
+ */
+PGnotify *
+PQnotifies(PGconn *conn)
+{
+ PGnotify *event;
+
+ if (!conn)
+ return NULL;
+
+ /* Parse any available data to see if we can extract NOTIFY messages. */
+ parseInput(conn);
+
+ event = conn->notifyHead;
+ if (event)
+ {
+ conn->notifyHead = event->next;
+ if (!conn->notifyHead)
+ conn->notifyTail = NULL;
+ event->next = NULL; /* don't let app see the internal state */
+ }
+ return event;
+}
+
+/*
+ * PQputCopyData - send some data to the backend during COPY IN or COPY BOTH
+ *
+ * Returns 1 if successful, 0 if data could not be sent (only possible
+ * in nonblock mode), or -1 if an error occurs.
+ */
+int
+PQputCopyData(PGconn *conn, const char *buffer, int nbytes)
+{
+ if (!conn)
+ return -1;
+ if (conn->asyncStatus != PGASYNC_COPY_IN &&
+ conn->asyncStatus != PGASYNC_COPY_BOTH)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ return -1;
+ }
+
+ /*
+ * Process any NOTICE or NOTIFY messages that might be pending in the
+ * input buffer. Since the server might generate many notices during the
+ * COPY, we want to clean those out reasonably promptly to prevent
+ * indefinite expansion of the input buffer. (Note: the actual read of
+ * input data into the input buffer happens down inside pqSendSome, but
+ * it's not authorized to get rid of the data again.)
+ */
+ parseInput(conn);
+
+ if (nbytes > 0)
+ {
+ /*
+ * Try to flush any previously sent data in preference to growing the
+ * output buffer. If we can't enlarge the buffer enough to hold the
+ * data, return 0 in the nonblock case, else hard error. (For
+ * simplicity, always assume 5 bytes of overhead.)
+ */
+ if ((conn->outBufSize - conn->outCount - 5) < nbytes)
+ {
+ if (pqFlush(conn) < 0)
+ return -1;
+ if (pqCheckOutBufferSpace(conn->outCount + 5 + (size_t) nbytes,
+ conn))
+ return pqIsnonblocking(conn) ? 0 : -1;
+ }
+ /* Send the data (too simple to delegate to fe-protocol files) */
+ if (pqPutMsgStart('d', conn) < 0 ||
+ pqPutnchar(buffer, nbytes, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+ return 1;
+}
+
+/*
+ * PQputCopyEnd - send EOF indication to the backend during COPY IN
+ *
+ * After calling this, use PQgetResult() to check command completion status.
+ *
+ * Returns 1 if successful, 0 if data could not be sent (only possible
+ * in nonblock mode), or -1 if an error occurs.
+ */
+int
+PQputCopyEnd(PGconn *conn, const char *errormsg)
+{
+ if (!conn)
+ return -1;
+ if (conn->asyncStatus != PGASYNC_COPY_IN &&
+ conn->asyncStatus != PGASYNC_COPY_BOTH)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ return -1;
+ }
+
+ /*
+ * Send the COPY END indicator. This is simple enough that we don't
+ * bother delegating it to the fe-protocol files.
+ */
+ if (errormsg)
+ {
+ /* Send COPY FAIL */
+ if (pqPutMsgStart('f', conn) < 0 ||
+ pqPuts(errormsg, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+ else
+ {
+ /* Send COPY DONE */
+ if (pqPutMsgStart('c', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+
+ /*
+ * If we sent the COPY command in extended-query mode, we must issue a
+ * Sync as well.
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE)
+ {
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+
+ /* Return to active duty */
+ if (conn->asyncStatus == PGASYNC_COPY_BOTH)
+ conn->asyncStatus = PGASYNC_COPY_OUT;
+ else
+ conn->asyncStatus = PGASYNC_BUSY;
+
+ /* Try to flush data */
+ if (pqFlush(conn) < 0)
+ return -1;
+
+ return 1;
+}
+
+/*
+ * PQgetCopyData - read a row of data from the backend during COPY OUT
+ * or COPY BOTH
+ *
+ * If successful, sets *buffer to point to a malloc'd row of data, and
+ * returns row length (always > 0) as result.
+ * Returns 0 if no row available yet (only possible if async is true),
+ * -1 if end of copy (consult PQgetResult), or -2 if error (consult
+ * PQerrorMessage).
+ */
+int
+PQgetCopyData(PGconn *conn, char **buffer, int async)
+{
+ *buffer = NULL; /* for all failure cases */
+ if (!conn)
+ return -2;
+ if (conn->asyncStatus != PGASYNC_COPY_OUT &&
+ conn->asyncStatus != PGASYNC_COPY_BOTH)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ return -2;
+ }
+ return pqGetCopyData3(conn, buffer, async);
+}
+
+/*
+ * PQgetline - gets a newline-terminated string from the backend.
+ *
+ * Chiefly here so that applications can use "COPY <rel> to stdout"
+ * and read the output string. Returns a null-terminated string in s.
+ *
+ * XXX this routine is now deprecated, because it can't handle binary data.
+ * If called during a COPY BINARY we return EOF.
+ *
+ * PQgetline reads up to maxlen-1 characters (like fgets(3)) but strips
+ * the terminating \n (like gets(3)).
+ *
+ * CAUTION: the caller is responsible for detecting the end-of-copy signal
+ * (a line containing just "\.") when using this routine.
+ *
+ * RETURNS:
+ * EOF if error (eg, invalid arguments are given)
+ * 0 if EOL is reached (i.e., \n has been read)
+ * (this is required for backward-compatibility -- this
+ * routine used to always return EOF or 0, assuming that
+ * the line ended within maxlen bytes.)
+ * 1 in other cases (i.e., the buffer was filled before \n is reached)
+ */
+int
+PQgetline(PGconn *conn, char *s, int maxlen)
+{
+ if (!s || maxlen <= 0)
+ return EOF;
+ *s = '\0';
+ /* maxlen must be at least 3 to hold the \. terminator! */
+ if (maxlen < 3)
+ return EOF;
+
+ if (!conn)
+ return EOF;
+
+ return pqGetline3(conn, s, maxlen);
+}
+
+/*
+ * PQgetlineAsync - gets a COPY data row without blocking.
+ *
+ * This routine is for applications that want to do "COPY <rel> to stdout"
+ * asynchronously, that is without blocking. Having issued the COPY command
+ * and gotten a PGRES_COPY_OUT response, the app should call PQconsumeInput
+ * and this routine until the end-of-data signal is detected. Unlike
+ * PQgetline, this routine takes responsibility for detecting end-of-data.
+ *
+ * On each call, PQgetlineAsync will return data if a complete data row
+ * is available in libpq's input buffer. Otherwise, no data is returned
+ * until the rest of the row arrives.
+ *
+ * If -1 is returned, the end-of-data signal has been recognized (and removed
+ * from libpq's input buffer). The caller *must* next call PQendcopy and
+ * then return to normal processing.
+ *
+ * RETURNS:
+ * -1 if the end-of-copy-data marker has been recognized
+ * 0 if no data is available
+ * >0 the number of bytes returned.
+ *
+ * The data returned will not extend beyond a data-row boundary. If possible
+ * a whole row will be returned at one time. But if the buffer offered by
+ * the caller is too small to hold a row sent by the backend, then a partial
+ * data row will be returned. In text mode this can be detected by testing
+ * whether the last returned byte is '\n' or not.
+ *
+ * The returned data is *not* null-terminated.
+ */
+
+int
+PQgetlineAsync(PGconn *conn, char *buffer, int bufsize)
+{
+ if (!conn)
+ return -1;
+
+ return pqGetlineAsync3(conn, buffer, bufsize);
+}
+
+/*
+ * PQputline -- sends a string to the backend during COPY IN.
+ * Returns 0 if OK, EOF if not.
+ *
+ * This is deprecated primarily because the return convention doesn't allow
+ * caller to tell the difference between a hard error and a nonblock-mode
+ * send failure.
+ */
+int
+PQputline(PGconn *conn, const char *s)
+{
+ return PQputnbytes(conn, s, strlen(s));
+}
+
+/*
+ * PQputnbytes -- like PQputline, but buffer need not be null-terminated.
+ * Returns 0 if OK, EOF if not.
+ */
+int
+PQputnbytes(PGconn *conn, const char *buffer, int nbytes)
+{
+ if (PQputCopyData(conn, buffer, nbytes) > 0)
+ return 0;
+ else
+ return EOF;
+}
+
+/*
+ * PQendcopy
+ * After completing the data transfer portion of a copy in/out,
+ * the application must call this routine to finish the command protocol.
+ *
+ * This is deprecated; it's cleaner to use PQgetResult to get the transfer
+ * status.
+ *
+ * RETURNS:
+ * 0 on success
+ * 1 on failure
+ */
+int
+PQendcopy(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ return pqEndcopy3(conn);
+}
+
+
+/* ----------------
+ * PQfn - Send a function call to the POSTGRES backend.
+ *
+ * conn : backend connection
+ * fnid : OID of function to be called
+ * result_buf : pointer to result buffer
+ * result_len : actual length of result is returned here
+ * result_is_int : If the result is an integer, this must be 1,
+ * otherwise this should be 0
+ * args : pointer to an array of function arguments
+ * (each has length, if integer, and value/pointer)
+ * nargs : # of arguments in args array.
+ *
+ * RETURNS
+ * PGresult with status = PGRES_COMMAND_OK if successful.
+ * *result_len is > 0 if there is a return value, 0 if not.
+ * PGresult with status = PGRES_FATAL_ERROR if backend returns an error.
+ * NULL on communications failure. conn->errorMessage will be set.
+ * ----------------
+ */
+
+PGresult *
+PQfn(PGconn *conn,
+ int fnid,
+ int *result_buf,
+ int *result_len,
+ int result_is_int,
+ const PQArgBlock *args,
+ int nargs)
+{
+ *result_len = 0;
+
+ if (!conn)
+ return NULL;
+
+ /*
+ * Since this is the beginning of a query cycle, reset the error buffer.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("PQfn not allowed in pipeline mode\n"));
+ return NULL;
+ }
+
+ if (conn->sock == PGINVALID_SOCKET || conn->asyncStatus != PGASYNC_IDLE ||
+ conn->result != NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("connection in wrong state\n"));
+ return NULL;
+ }
+
+ return pqFunctionCall3(conn, fnid,
+ result_buf, result_len,
+ result_is_int,
+ args, nargs);
+}
+
+/* ====== Pipeline mode support ======== */
+
+/*
+ * PQenterPipelineMode
+ * Put an idle connection in pipeline mode.
+ *
+ * Returns 1 on success. On failure, errorMessage is set and 0 is returned.
+ *
+ * Commands submitted after this can be pipelined on the connection;
+ * there's no requirement to wait for one to finish before the next is
+ * dispatched.
+ *
+ * Queuing of a new query or syncing during COPY is not allowed.
+ *
+ * A set of commands is terminated by a PQpipelineSync. Multiple sync
+ * points can be established while in pipeline mode. Pipeline mode can
+ * be exited by calling PQexitPipelineMode() once all results are processed.
+ *
+ * This doesn't actually send anything on the wire, it just puts libpq
+ * into a state where it can pipeline work.
+ */
+int
+PQenterPipelineMode(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ /* succeed with no action if already in pipeline mode */
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ return 1;
+
+ if (conn->asyncStatus != PGASYNC_IDLE)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot enter pipeline mode, connection not idle\n"));
+ return 0;
+ }
+
+ conn->pipelineStatus = PQ_PIPELINE_ON;
+
+ return 1;
+}
+
+/*
+ * PQexitPipelineMode
+ * End pipeline mode and return to normal command mode.
+ *
+ * Returns 1 in success (pipeline mode successfully ended, or not in pipeline
+ * mode).
+ *
+ * Returns 0 if in pipeline mode and cannot be ended yet. Error message will
+ * be set.
+ */
+int
+PQexitPipelineMode(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF &&
+ (conn->asyncStatus == PGASYNC_IDLE ||
+ conn->asyncStatus == PGASYNC_PIPELINE_IDLE) &&
+ conn->cmd_queue_head == NULL)
+ return 1;
+
+ switch (conn->asyncStatus)
+ {
+ case PGASYNC_READY:
+ case PGASYNC_READY_MORE:
+ /* there are some uncollected results */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot exit pipeline mode with uncollected results\n"));
+ return 0;
+
+ case PGASYNC_BUSY:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot exit pipeline mode while busy\n"));
+ return 0;
+
+ case PGASYNC_IDLE:
+ case PGASYNC_PIPELINE_IDLE:
+ /* OK */
+ break;
+
+ case PGASYNC_COPY_IN:
+ case PGASYNC_COPY_OUT:
+ case PGASYNC_COPY_BOTH:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot exit pipeline mode while in COPY\n"));
+ }
+
+ /* still work to process */
+ if (conn->cmd_queue_head != NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot exit pipeline mode with uncollected results\n"));
+ return 0;
+ }
+
+ conn->pipelineStatus = PQ_PIPELINE_OFF;
+ conn->asyncStatus = PGASYNC_IDLE;
+
+ /* Flush any pending data in out buffer */
+ if (pqFlush(conn) < 0)
+ return 0; /* error message is setup already */
+ return 1;
+}
+
+/*
+ * pqCommandQueueAdvance
+ * Remove one query from the command queue, when we receive
+ * all results from the server that pertain to it.
+ */
+void
+pqCommandQueueAdvance(PGconn *conn)
+{
+ PGcmdQueueEntry *prevquery;
+
+ if (conn->cmd_queue_head == NULL)
+ return;
+
+ /* delink from queue */
+ prevquery = conn->cmd_queue_head;
+ conn->cmd_queue_head = conn->cmd_queue_head->next;
+
+ /* If the queue is now empty, reset the tail too */
+ if (conn->cmd_queue_head == NULL)
+ conn->cmd_queue_tail = NULL;
+
+ /* and make it recyclable */
+ prevquery->next = NULL;
+ pqRecycleCmdQueueEntry(conn, prevquery);
+}
+
+/*
+ * pqPipelineProcessQueue: subroutine for PQgetResult
+ * In pipeline mode, start processing the results of the next query in the queue.
+ */
+static void
+pqPipelineProcessQueue(PGconn *conn)
+{
+ switch (conn->asyncStatus)
+ {
+ case PGASYNC_COPY_IN:
+ case PGASYNC_COPY_OUT:
+ case PGASYNC_COPY_BOTH:
+ case PGASYNC_READY:
+ case PGASYNC_READY_MORE:
+ case PGASYNC_BUSY:
+ /* client still has to process current query or results */
+ return;
+
+ case PGASYNC_IDLE:
+ /*
+ * If we're in IDLE mode and there's some command in the queue,
+ * get us into PIPELINE_IDLE mode and process normally. Otherwise
+ * there's nothing for us to do.
+ */
+ if (conn->cmd_queue_head != NULL)
+ {
+ conn->asyncStatus = PGASYNC_PIPELINE_IDLE;
+ break;
+ }
+ return;
+
+ case PGASYNC_PIPELINE_IDLE:
+ Assert(conn->pipelineStatus != PQ_PIPELINE_OFF);
+ /* next query please */
+ break;
+ }
+
+ /*
+ * If there are no further commands to process in the queue, get us in
+ * "real idle" mode now.
+ */
+ if (conn->cmd_queue_head == NULL)
+ {
+ conn->asyncStatus = PGASYNC_IDLE;
+ return;
+ }
+
+ /* Initialize async result-accumulation state */
+ pqClearAsyncResult(conn);
+
+ /*
+ * Reset single-row processing mode. (Client has to set it up for each
+ * query, if desired.)
+ */
+ conn->singleRowMode = false;
+
+ if (conn->pipelineStatus == PQ_PIPELINE_ABORTED &&
+ conn->cmd_queue_head->queryclass != PGQUERY_SYNC)
+ {
+ /*
+ * In an aborted pipeline we don't get anything from the server for
+ * each result; we're just discarding commands from the queue until we
+ * get to the next sync from the server.
+ *
+ * The PGRES_PIPELINE_ABORTED results tell the client that its queries
+ * got aborted.
+ */
+ conn->result = PQmakeEmptyPGresult(conn, PGRES_PIPELINE_ABORTED);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ pqSaveErrorResult(conn);
+ return;
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ }
+ else
+ {
+ /* allow parsing to continue */
+ conn->asyncStatus = PGASYNC_BUSY;
+ }
+}
+
+/*
+ * PQpipelineSync
+ * Send a Sync message as part of a pipeline, and flush to server
+ *
+ * It's legal to start submitting more commands in the pipeline immediately,
+ * without waiting for the results of the current pipeline. There's no need to
+ * end pipeline mode and start it again.
+ *
+ * If a command in a pipeline fails, every subsequent command up to and including
+ * the result to the Sync message sent by PQpipelineSync gets set to
+ * PGRES_PIPELINE_ABORTED state. If the whole pipeline is processed without
+ * error, a PGresult with PGRES_PIPELINE_SYNC is produced.
+ *
+ * Queries can already have been sent before PQpipelineSync is called, but
+ * PQpipelineSync need to be called before retrieving command results.
+ *
+ * The connection will remain in pipeline mode and unavailable for new
+ * synchronous command execution functions until all results from the pipeline
+ * are processed by the client.
+ */
+int
+PQpipelineSync(PGconn *conn)
+{
+ PGcmdQueueEntry *entry;
+
+ if (!conn)
+ return 0;
+
+ if (conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("cannot send pipeline when not in pipeline mode\n"));
+ return 0;
+ }
+
+ switch (conn->asyncStatus)
+ {
+ case PGASYNC_COPY_IN:
+ case PGASYNC_COPY_OUT:
+ case PGASYNC_COPY_BOTH:
+ /* should be unreachable */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "internal error: cannot send pipeline while in COPY\n");
+ return 0;
+ case PGASYNC_READY:
+ case PGASYNC_READY_MORE:
+ case PGASYNC_BUSY:
+ case PGASYNC_IDLE:
+ case PGASYNC_PIPELINE_IDLE:
+ /* OK to send sync */
+ break;
+ }
+
+ entry = pqAllocCmdQueueEntry(conn);
+ if (entry == NULL)
+ return 0; /* error msg already set */
+
+ entry->queryclass = PGQUERY_SYNC;
+ entry->query = NULL;
+
+ /* construct the Sync message */
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /*
+ * Give the data a push. In nonblock mode, don't complain if we're unable
+ * to send it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (PQflush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ pqAppendCmdQueueEntry(conn, entry);
+
+ return 1;
+
+sendFailed:
+ pqRecycleCmdQueueEntry(conn, entry);
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * PQsendFlushRequest
+ * Send request for server to flush its buffer. Useful in pipeline
+ * mode when a sync point is not desired.
+ */
+int
+PQsendFlushRequest(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ /* Don't try to send if we know there's no live connection. */
+ if (conn->status != CONNECTION_OK)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no connection to the server\n"));
+ return 0;
+ }
+
+ /* Can't send while already busy, either, unless enqueuing for later */
+ if (conn->asyncStatus != PGASYNC_IDLE &&
+ conn->pipelineStatus == PQ_PIPELINE_OFF)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("another command is already in progress\n"));
+ return 0;
+ }
+
+ if (pqPutMsgStart('H', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ {
+ return 0;
+ }
+
+ return 1;
+}
+
+/* ====== accessor funcs for PGresult ======== */
+
+ExecStatusType
+PQresultStatus(const PGresult *res)
+{
+ if (!res)
+ return PGRES_FATAL_ERROR;
+ return res->resultStatus;
+}
+
+char *
+PQresStatus(ExecStatusType status)
+{
+ if ((unsigned int) status >= lengthof(pgresStatus))
+ return libpq_gettext("invalid ExecStatusType code");
+ return pgresStatus[status];
+}
+
+char *
+PQresultErrorMessage(const PGresult *res)
+{
+ if (!res || !res->errMsg)
+ return "";
+ return res->errMsg;
+}
+
+char *
+PQresultVerboseErrorMessage(const PGresult *res,
+ PGVerbosity verbosity,
+ PGContextVisibility show_context)
+{
+ PQExpBufferData workBuf;
+
+ /*
+ * Because the caller is expected to free the result string, we must
+ * strdup any constant result. We use plain strdup and document that
+ * callers should expect NULL if out-of-memory.
+ */
+ if (!res ||
+ (res->resultStatus != PGRES_FATAL_ERROR &&
+ res->resultStatus != PGRES_NONFATAL_ERROR))
+ return strdup(libpq_gettext("PGresult is not an error result\n"));
+
+ initPQExpBuffer(&workBuf);
+
+ pqBuildErrorMessage3(&workBuf, res, verbosity, show_context);
+
+ /* If insufficient memory to format the message, fail cleanly */
+ if (PQExpBufferDataBroken(workBuf))
+ {
+ termPQExpBuffer(&workBuf);
+ return strdup(libpq_gettext("out of memory\n"));
+ }
+
+ return workBuf.data;
+}
+
+char *
+PQresultErrorField(const PGresult *res, int fieldcode)
+{
+ PGMessageField *pfield;
+
+ if (!res)
+ return NULL;
+ for (pfield = res->errFields; pfield != NULL; pfield = pfield->next)
+ {
+ if (pfield->code == fieldcode)
+ return pfield->contents;
+ }
+ return NULL;
+}
+
+int
+PQntuples(const PGresult *res)
+{
+ if (!res)
+ return 0;
+ return res->ntups;
+}
+
+int
+PQnfields(const PGresult *res)
+{
+ if (!res)
+ return 0;
+ return res->numAttributes;
+}
+
+int
+PQbinaryTuples(const PGresult *res)
+{
+ if (!res)
+ return 0;
+ return res->binary;
+}
+
+/*
+ * Helper routines to range-check field numbers and tuple numbers.
+ * Return true if OK, false if not
+ */
+
+static int
+check_field_number(const PGresult *res, int field_num)
+{
+ if (!res)
+ return false; /* no way to display error message... */
+ if (field_num < 0 || field_num >= res->numAttributes)
+ {
+ pqInternalNotice(&res->noticeHooks,
+ "column number %d is out of range 0..%d",
+ field_num, res->numAttributes - 1);
+ return false;
+ }
+ return true;
+}
+
+static int
+check_tuple_field_number(const PGresult *res,
+ int tup_num, int field_num)
+{
+ if (!res)
+ return false; /* no way to display error message... */
+ if (tup_num < 0 || tup_num >= res->ntups)
+ {
+ pqInternalNotice(&res->noticeHooks,
+ "row number %d is out of range 0..%d",
+ tup_num, res->ntups - 1);
+ return false;
+ }
+ if (field_num < 0 || field_num >= res->numAttributes)
+ {
+ pqInternalNotice(&res->noticeHooks,
+ "column number %d is out of range 0..%d",
+ field_num, res->numAttributes - 1);
+ return false;
+ }
+ return true;
+}
+
+static int
+check_param_number(const PGresult *res, int param_num)
+{
+ if (!res)
+ return false; /* no way to display error message... */
+ if (param_num < 0 || param_num >= res->numParameters)
+ {
+ pqInternalNotice(&res->noticeHooks,
+ "parameter number %d is out of range 0..%d",
+ param_num, res->numParameters - 1);
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * returns NULL if the field_num is invalid
+ */
+char *
+PQfname(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return NULL;
+ if (res->attDescs)
+ return res->attDescs[field_num].name;
+ else
+ return NULL;
+}
+
+/*
+ * PQfnumber: find column number given column name
+ *
+ * The column name is parsed as if it were in a SQL statement, including
+ * case-folding and double-quote processing. But note a possible gotcha:
+ * downcasing in the frontend might follow different locale rules than
+ * downcasing in the backend...
+ *
+ * Returns -1 if no match. In the present backend it is also possible
+ * to have multiple matches, in which case the first one is found.
+ */
+int
+PQfnumber(const PGresult *res, const char *field_name)
+{
+ char *field_case;
+ bool in_quotes;
+ bool all_lower = true;
+ const char *iptr;
+ char *optr;
+ int i;
+
+ if (!res)
+ return -1;
+
+ /*
+ * Note: it is correct to reject a zero-length input string; the proper
+ * input to match a zero-length field name would be "".
+ */
+ if (field_name == NULL ||
+ field_name[0] == '\0' ||
+ res->attDescs == NULL)
+ return -1;
+
+ /*
+ * Check if we can avoid the strdup() and related work because the
+ * passed-in string wouldn't be changed before we do the check anyway.
+ */
+ for (iptr = field_name; *iptr; iptr++)
+ {
+ char c = *iptr;
+
+ if (c == '"' || c != pg_tolower((unsigned char) c))
+ {
+ all_lower = false;
+ break;
+ }
+ }
+
+ if (all_lower)
+ for (i = 0; i < res->numAttributes; i++)
+ if (strcmp(field_name, res->attDescs[i].name) == 0)
+ return i;
+
+ /* Fall through to the normal check if that didn't work out. */
+
+ /*
+ * Note: this code will not reject partially quoted strings, eg
+ * foo"BAR"foo will become fooBARfoo when it probably ought to be an error
+ * condition.
+ */
+ field_case = strdup(field_name);
+ if (field_case == NULL)
+ return -1; /* grotty */
+
+ in_quotes = false;
+ optr = field_case;
+ for (iptr = field_case; *iptr; iptr++)
+ {
+ char c = *iptr;
+
+ if (in_quotes)
+ {
+ if (c == '"')
+ {
+ if (iptr[1] == '"')
+ {
+ /* doubled quotes become a single quote */
+ *optr++ = '"';
+ iptr++;
+ }
+ else
+ in_quotes = false;
+ }
+ else
+ *optr++ = c;
+ }
+ else if (c == '"')
+ in_quotes = true;
+ else
+ {
+ c = pg_tolower((unsigned char) c);
+ *optr++ = c;
+ }
+ }
+ *optr = '\0';
+
+ for (i = 0; i < res->numAttributes; i++)
+ {
+ if (strcmp(field_case, res->attDescs[i].name) == 0)
+ {
+ free(field_case);
+ return i;
+ }
+ }
+ free(field_case);
+ return -1;
+}
+
+Oid
+PQftable(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return InvalidOid;
+ if (res->attDescs)
+ return res->attDescs[field_num].tableid;
+ else
+ return InvalidOid;
+}
+
+int
+PQftablecol(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return 0;
+ if (res->attDescs)
+ return res->attDescs[field_num].columnid;
+ else
+ return 0;
+}
+
+int
+PQfformat(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return 0;
+ if (res->attDescs)
+ return res->attDescs[field_num].format;
+ else
+ return 0;
+}
+
+Oid
+PQftype(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return InvalidOid;
+ if (res->attDescs)
+ return res->attDescs[field_num].typid;
+ else
+ return InvalidOid;
+}
+
+int
+PQfsize(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return 0;
+ if (res->attDescs)
+ return res->attDescs[field_num].typlen;
+ else
+ return 0;
+}
+
+int
+PQfmod(const PGresult *res, int field_num)
+{
+ if (!check_field_number(res, field_num))
+ return 0;
+ if (res->attDescs)
+ return res->attDescs[field_num].atttypmod;
+ else
+ return 0;
+}
+
+char *
+PQcmdStatus(PGresult *res)
+{
+ if (!res)
+ return NULL;
+ return res->cmdStatus;
+}
+
+/*
+ * PQoidStatus -
+ * if the last command was an INSERT, return the oid string
+ * if not, return ""
+ */
+char *
+PQoidStatus(const PGresult *res)
+{
+ /*
+ * This must be enough to hold the result. Don't laugh, this is better
+ * than what this function used to do.
+ */
+ static char buf[24];
+
+ size_t len;
+
+ if (!res || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
+ return "";
+
+ len = strspn(res->cmdStatus + 7, "0123456789");
+ if (len > sizeof(buf) - 1)
+ len = sizeof(buf) - 1;
+ memcpy(buf, res->cmdStatus + 7, len);
+ buf[len] = '\0';
+
+ return buf;
+}
+
+/*
+ * PQoidValue -
+ * a perhaps preferable form of the above which just returns
+ * an Oid type
+ */
+Oid
+PQoidValue(const PGresult *res)
+{
+ char *endptr = NULL;
+ unsigned long result;
+
+ if (!res ||
+ strncmp(res->cmdStatus, "INSERT ", 7) != 0 ||
+ res->cmdStatus[7] < '0' ||
+ res->cmdStatus[7] > '9')
+ return InvalidOid;
+
+ result = strtoul(res->cmdStatus + 7, &endptr, 10);
+
+ if (!endptr || (*endptr != ' ' && *endptr != '\0'))
+ return InvalidOid;
+ else
+ return (Oid) result;
+}
+
+
+/*
+ * PQcmdTuples -
+ * If the last command was INSERT/UPDATE/DELETE/MOVE/FETCH/COPY, return
+ * a string containing the number of inserted/affected tuples. If not,
+ * return "".
+ *
+ * XXX: this should probably return an int
+ */
+char *
+PQcmdTuples(PGresult *res)
+{
+ char *p,
+ *c;
+
+ if (!res)
+ return "";
+
+ if (strncmp(res->cmdStatus, "INSERT ", 7) == 0)
+ {
+ p = res->cmdStatus + 7;
+ /* INSERT: skip oid and space */
+ while (*p && *p != ' ')
+ p++;
+ if (*p == 0)
+ goto interpret_error; /* no space? */
+ p++;
+ }
+ else if (strncmp(res->cmdStatus, "SELECT ", 7) == 0 ||
+ strncmp(res->cmdStatus, "DELETE ", 7) == 0 ||
+ strncmp(res->cmdStatus, "UPDATE ", 7) == 0)
+ p = res->cmdStatus + 7;
+ else if (strncmp(res->cmdStatus, "FETCH ", 6) == 0)
+ p = res->cmdStatus + 6;
+ else if (strncmp(res->cmdStatus, "MOVE ", 5) == 0 ||
+ strncmp(res->cmdStatus, "COPY ", 5) == 0)
+ p = res->cmdStatus + 5;
+ else
+ return "";
+
+ /* check that we have an integer (at least one digit, nothing else) */
+ for (c = p; *c; c++)
+ {
+ if (!isdigit((unsigned char) *c))
+ goto interpret_error;
+ }
+ if (c == p)
+ goto interpret_error;
+
+ return p;
+
+interpret_error:
+ pqInternalNotice(&res->noticeHooks,
+ "could not interpret result from server: %s",
+ res->cmdStatus);
+ return "";
+}
+
+/*
+ * PQgetvalue:
+ * return the value of field 'field_num' of row 'tup_num'
+ */
+char *
+PQgetvalue(const PGresult *res, int tup_num, int field_num)
+{
+ if (!check_tuple_field_number(res, tup_num, field_num))
+ return NULL;
+ return res->tuples[tup_num][field_num].value;
+}
+
+/* PQgetlength:
+ * returns the actual length of a field value in bytes.
+ */
+int
+PQgetlength(const PGresult *res, int tup_num, int field_num)
+{
+ if (!check_tuple_field_number(res, tup_num, field_num))
+ return 0;
+ if (res->tuples[tup_num][field_num].len != NULL_LEN)
+ return res->tuples[tup_num][field_num].len;
+ else
+ return 0;
+}
+
+/* PQgetisnull:
+ * returns the null status of a field value.
+ */
+int
+PQgetisnull(const PGresult *res, int tup_num, int field_num)
+{
+ if (!check_tuple_field_number(res, tup_num, field_num))
+ return 1; /* pretend it is null */
+ if (res->tuples[tup_num][field_num].len == NULL_LEN)
+ return 1;
+ else
+ return 0;
+}
+
+/* PQnparams:
+ * returns the number of input parameters of a prepared statement.
+ */
+int
+PQnparams(const PGresult *res)
+{
+ if (!res)
+ return 0;
+ return res->numParameters;
+}
+
+/* PQparamtype:
+ * returns type Oid of the specified statement parameter.
+ */
+Oid
+PQparamtype(const PGresult *res, int param_num)
+{
+ if (!check_param_number(res, param_num))
+ return InvalidOid;
+ if (res->paramDescs)
+ return res->paramDescs[param_num].typid;
+ else
+ return InvalidOid;
+}
+
+
+/* PQsetnonblocking:
+ * sets the PGconn's database connection non-blocking if the arg is true
+ * or makes it blocking if the arg is false, this will not protect
+ * you from PQexec(), you'll only be safe when using the non-blocking API.
+ * Needs to be called only on a connected database connection.
+ */
+int
+PQsetnonblocking(PGconn *conn, int arg)
+{
+ bool barg;
+
+ if (!conn || conn->status == CONNECTION_BAD)
+ return -1;
+
+ barg = (arg ? true : false);
+
+ /* early out if the socket is already in the state requested */
+ if (barg == conn->nonblocking)
+ return 0;
+
+ /*
+ * to guarantee constancy for flushing/query/result-polling behavior we
+ * need to flush the send queue at this point in order to guarantee proper
+ * behavior. this is ok because either they are making a transition _from_
+ * or _to_ blocking mode, either way we can block them.
+ *
+ * Clear errorMessage in case pqFlush adds to it.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* if we are going from blocking to non-blocking flush here */
+ if (pqFlush(conn))
+ return -1;
+
+ conn->nonblocking = barg;
+
+ return 0;
+}
+
+/*
+ * return the blocking status of the database connection
+ * true == nonblocking, false == blocking
+ */
+int
+PQisnonblocking(const PGconn *conn)
+{
+ return pqIsnonblocking(conn);
+}
+
+/* libpq is thread-safe? */
+int
+PQisthreadsafe(void)
+{
+#ifdef ENABLE_THREAD_SAFETY
+ return true;
+#else
+ return false;
+#endif
+}
+
+
+/* try to force data out, really only useful for non-blocking users */
+int
+PQflush(PGconn *conn)
+{
+ return pqFlush(conn);
+}
+
+/*
+ * pqPipelineFlush
+ *
+ * In pipeline mode, data will be flushed only when the out buffer reaches the
+ * threshold value. In non-pipeline mode, it behaves as stock pqFlush.
+ *
+ * Returns 0 on success.
+ */
+static int
+pqPipelineFlush(PGconn *conn)
+{
+ if ((conn->pipelineStatus != PQ_PIPELINE_ON) ||
+ (conn->outCount >= OUTBUFFER_THRESHOLD))
+ return pqFlush(conn);
+ return 0;
+}
+
+
+/*
+ * PQfreemem - safely frees memory allocated
+ *
+ * Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
+ * Used for freeing memory from PQescapeBytea()/PQunescapeBytea()
+ */
+void
+PQfreemem(void *ptr)
+{
+ free(ptr);
+}
+
+/*
+ * PQfreeNotify - free's the memory associated with a PGnotify
+ *
+ * This function is here only for binary backward compatibility.
+ * New code should use PQfreemem(). A macro will automatically map
+ * calls to PQfreemem. It should be removed in the future. bjm 2003-03-24
+ */
+
+#undef PQfreeNotify
+void PQfreeNotify(PGnotify *notify);
+
+void
+PQfreeNotify(PGnotify *notify)
+{
+ PQfreemem(notify);
+}
+
+
+/*
+ * Escaping arbitrary strings to get valid SQL literal strings.
+ *
+ * Replaces "'" with "''", and if not std_strings, replaces "\" with "\\".
+ *
+ * length is the length of the source string. (Note: if a terminating NUL
+ * is encountered sooner, PQescapeString stops short of "length"; the behavior
+ * is thus rather like strncpy.)
+ *
+ * For safety the buffer at "to" must be at least 2*length + 1 bytes long.
+ * A terminating NUL character is added to the output string, whether the
+ * input is NUL-terminated or not.
+ *
+ * Returns the actual length of the output (not counting the terminating NUL).
+ */
+static size_t
+PQescapeStringInternal(PGconn *conn,
+ char *to, const char *from, size_t length,
+ int *error,
+ int encoding, bool std_strings)
+{
+ const char *source = from;
+ char *target = to;
+ size_t remaining = length;
+
+ if (error)
+ *error = 0;
+
+ while (remaining > 0 && *source != '\0')
+ {
+ char c = *source;
+ int len;
+ int i;
+
+ /* Fast path for plain ASCII */
+ if (!IS_HIGHBIT_SET(c))
+ {
+ /* Apply quoting if needed */
+ if (SQL_STR_DOUBLE(c, !std_strings))
+ *target++ = c;
+ /* Copy the character */
+ *target++ = c;
+ source++;
+ remaining--;
+ continue;
+ }
+
+ /* Slow path for possible multibyte characters */
+ len = pg_encoding_mblen(encoding, source);
+
+ /* Copy the character */
+ for (i = 0; i < len; i++)
+ {
+ if (remaining == 0 || *source == '\0')
+ break;
+ *target++ = *source++;
+ remaining--;
+ }
+
+ /*
+ * If we hit premature end of string (ie, incomplete multibyte
+ * character), try to pad out to the correct length with spaces. We
+ * may not be able to pad completely, but we will always be able to
+ * insert at least one pad space (since we'd not have quoted a
+ * multibyte character). This should be enough to make a string that
+ * the server will error out on.
+ */
+ if (i < len)
+ {
+ if (error)
+ *error = 1;
+ if (conn)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("incomplete multibyte character\n"));
+ for (; i < len; i++)
+ {
+ if (((size_t) (target - to)) / 2 >= length)
+ break;
+ *target++ = ' ';
+ }
+ break;
+ }
+ }
+
+ /* Write the terminating NUL character. */
+ *target = '\0';
+
+ return target - to;
+}
+
+size_t
+PQescapeStringConn(PGconn *conn,
+ char *to, const char *from, size_t length,
+ int *error)
+{
+ if (!conn)
+ {
+ /* force empty-string result */
+ *to = '\0';
+ if (error)
+ *error = 1;
+ return 0;
+ }
+
+ resetPQExpBuffer(&conn->errorMessage);
+
+ return PQescapeStringInternal(conn, to, from, length, error,
+ conn->client_encoding,
+ conn->std_strings);
+}
+
+size_t
+PQescapeString(char *to, const char *from, size_t length)
+{
+ return PQescapeStringInternal(NULL, to, from, length, NULL,
+ static_client_encoding,
+ static_std_strings);
+}
+
+
+/*
+ * Escape arbitrary strings. If as_ident is true, we escape the result
+ * as an identifier; if false, as a literal. The result is returned in
+ * a newly allocated buffer. If we fail due to an encoding violation or out
+ * of memory condition, we return NULL, storing an error message into conn.
+ */
+static char *
+PQescapeInternal(PGconn *conn, const char *str, size_t len, bool as_ident)
+{
+ const char *s;
+ char *result;
+ char *rp;
+ int num_quotes = 0; /* single or double, depending on as_ident */
+ int num_backslashes = 0;
+ int input_len;
+ int result_size;
+ char quote_char = as_ident ? '"' : '\'';
+
+ /* We must have a connection, else fail immediately. */
+ if (!conn)
+ return NULL;
+
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* Scan the string for characters that must be escaped. */
+ for (s = str; (s - str) < len && *s != '\0'; ++s)
+ {
+ if (*s == quote_char)
+ ++num_quotes;
+ else if (*s == '\\')
+ ++num_backslashes;
+ else if (IS_HIGHBIT_SET(*s))
+ {
+ int charlen;
+
+ /* Slow path for possible multibyte characters */
+ charlen = pg_encoding_mblen(conn->client_encoding, s);
+
+ /* Multibyte character overruns allowable length. */
+ if ((s - str) + charlen > len || memchr(s, 0, charlen) != NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("incomplete multibyte character\n"));
+ return NULL;
+ }
+
+ /* Adjust s, bearing in mind that for loop will increment it. */
+ s += charlen - 1;
+ }
+ }
+
+ /* Allocate output buffer. */
+ input_len = s - str;
+ result_size = input_len + num_quotes + 3; /* two quotes, plus a NUL */
+ if (!as_ident && num_backslashes > 0)
+ result_size += num_backslashes + 2;
+ result = rp = (char *) malloc(result_size);
+ if (rp == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+
+ /*
+ * If we are escaping a literal that contains backslashes, we use the
+ * escape string syntax so that the result is correct under either value
+ * of standard_conforming_strings. We also emit a leading space in this
+ * case, to guard against the possibility that the result might be
+ * interpolated immediately following an identifier.
+ */
+ if (!as_ident && num_backslashes > 0)
+ {
+ *rp++ = ' ';
+ *rp++ = 'E';
+ }
+
+ /* Opening quote. */
+ *rp++ = quote_char;
+
+ /*
+ * Use fast path if possible.
+ *
+ * We've already verified that the input string is well-formed in the
+ * current encoding. If it contains no quotes and, in the case of
+ * literal-escaping, no backslashes, then we can just copy it directly to
+ * the output buffer, adding the necessary quotes.
+ *
+ * If not, we must rescan the input and process each character
+ * individually.
+ */
+ if (num_quotes == 0 && (num_backslashes == 0 || as_ident))
+ {
+ memcpy(rp, str, input_len);
+ rp += input_len;
+ }
+ else
+ {
+ for (s = str; s - str < input_len; ++s)
+ {
+ if (*s == quote_char || (!as_ident && *s == '\\'))
+ {
+ *rp++ = *s;
+ *rp++ = *s;
+ }
+ else if (!IS_HIGHBIT_SET(*s))
+ *rp++ = *s;
+ else
+ {
+ int i = pg_encoding_mblen(conn->client_encoding, s);
+
+ while (1)
+ {
+ *rp++ = *s;
+ if (--i == 0)
+ break;
+ ++s; /* for loop will provide the final increment */
+ }
+ }
+ }
+ }
+
+ /* Closing quote and terminating NUL. */
+ *rp++ = quote_char;
+ *rp = '\0';
+
+ return result;
+}
+
+char *
+PQescapeLiteral(PGconn *conn, const char *str, size_t len)
+{
+ return PQescapeInternal(conn, str, len, false);
+}
+
+char *
+PQescapeIdentifier(PGconn *conn, const char *str, size_t len)
+{
+ return PQescapeInternal(conn, str, len, true);
+}
+
+/* HEX encoding support for bytea */
+static const char hextbl[] = "0123456789abcdef";
+
+static const int8 hexlookup[128] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+static inline char
+get_hex(char c)
+{
+ int res = -1;
+
+ if (c > 0 && c < 127)
+ res = hexlookup[(unsigned char) c];
+
+ return (char) res;
+}
+
+
+/*
+ * PQescapeBytea - converts from binary string to the
+ * minimal encoding necessary to include the string in an SQL
+ * INSERT statement with a bytea type column as the target.
+ *
+ * We can use either hex or escape (traditional) encoding.
+ * In escape mode, the following transformations are applied:
+ * '\0' == ASCII 0 == \000
+ * '\'' == ASCII 39 == ''
+ * '\\' == ASCII 92 == \\
+ * anything < 0x20, or > 0x7e ---> \ooo
+ * (where ooo is an octal expression)
+ *
+ * If not std_strings, all backslashes sent to the output are doubled.
+ */
+static unsigned char *
+PQescapeByteaInternal(PGconn *conn,
+ const unsigned char *from, size_t from_length,
+ size_t *to_length, bool std_strings, bool use_hex)
+{
+ const unsigned char *vp;
+ unsigned char *rp;
+ unsigned char *result;
+ size_t i;
+ size_t len;
+ size_t bslash_len = (std_strings ? 1 : 2);
+
+ /*
+ * empty string has 1 char ('\0')
+ */
+ len = 1;
+
+ if (use_hex)
+ {
+ len += bslash_len + 1 + 2 * from_length;
+ }
+ else
+ {
+ vp = from;
+ for (i = from_length; i > 0; i--, vp++)
+ {
+ if (*vp < 0x20 || *vp > 0x7e)
+ len += bslash_len + 3;
+ else if (*vp == '\'')
+ len += 2;
+ else if (*vp == '\\')
+ len += bslash_len + bslash_len;
+ else
+ len++;
+ }
+ }
+
+ *to_length = len;
+ rp = result = (unsigned char *) malloc(len);
+ if (rp == NULL)
+ {
+ if (conn)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+
+ if (use_hex)
+ {
+ if (!std_strings)
+ *rp++ = '\\';
+ *rp++ = '\\';
+ *rp++ = 'x';
+ }
+
+ vp = from;
+ for (i = from_length; i > 0; i--, vp++)
+ {
+ unsigned char c = *vp;
+
+ if (use_hex)
+ {
+ *rp++ = hextbl[(c >> 4) & 0xF];
+ *rp++ = hextbl[c & 0xF];
+ }
+ else if (c < 0x20 || c > 0x7e)
+ {
+ if (!std_strings)
+ *rp++ = '\\';
+ *rp++ = '\\';
+ *rp++ = (c >> 6) + '0';
+ *rp++ = ((c >> 3) & 07) + '0';
+ *rp++ = (c & 07) + '0';
+ }
+ else if (c == '\'')
+ {
+ *rp++ = '\'';
+ *rp++ = '\'';
+ }
+ else if (c == '\\')
+ {
+ if (!std_strings)
+ {
+ *rp++ = '\\';
+ *rp++ = '\\';
+ }
+ *rp++ = '\\';
+ *rp++ = '\\';
+ }
+ else
+ *rp++ = c;
+ }
+ *rp = '\0';
+
+ return result;
+}
+
+unsigned char *
+PQescapeByteaConn(PGconn *conn,
+ const unsigned char *from, size_t from_length,
+ size_t *to_length)
+{
+ if (!conn)
+ return NULL;
+
+ resetPQExpBuffer(&conn->errorMessage);
+
+ return PQescapeByteaInternal(conn, from, from_length, to_length,
+ conn->std_strings,
+ (conn->sversion >= 90000));
+}
+
+unsigned char *
+PQescapeBytea(const unsigned char *from, size_t from_length, size_t *to_length)
+{
+ return PQescapeByteaInternal(NULL, from, from_length, to_length,
+ static_std_strings,
+ false /* can't use hex */ );
+}
+
+
+#define ISFIRSTOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '3')
+#define ISOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '7')
+#define OCTVAL(CH) ((CH) - '0')
+
+/*
+ * PQunescapeBytea - converts the null terminated string representation
+ * of a bytea, strtext, into binary, filling a buffer. It returns a
+ * pointer to the buffer (or NULL on error), and the size of the
+ * buffer in retbuflen. The pointer may subsequently be used as an
+ * argument to the function PQfreemem.
+ *
+ * The following transformations are made:
+ * \\ == ASCII 92 == \
+ * \ooo == a byte whose value = ooo (ooo is an octal number)
+ * \x == x (x is any character not matched by the above transformations)
+ */
+unsigned char *
+PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
+{
+ size_t strtextlen,
+ buflen;
+ unsigned char *buffer,
+ *tmpbuf;
+ size_t i,
+ j;
+
+ if (strtext == NULL)
+ return NULL;
+
+ strtextlen = strlen((const char *) strtext);
+
+ if (strtext[0] == '\\' && strtext[1] == 'x')
+ {
+ const unsigned char *s;
+ unsigned char *p;
+
+ buflen = (strtextlen - 2) / 2;
+ /* Avoid unportable malloc(0) */
+ buffer = (unsigned char *) malloc(buflen > 0 ? buflen : 1);
+ if (buffer == NULL)
+ return NULL;
+
+ s = strtext + 2;
+ p = buffer;
+ while (*s)
+ {
+ char v1,
+ v2;
+
+ /*
+ * Bad input is silently ignored. Note that this includes
+ * whitespace between hex pairs, which is allowed by byteain.
+ */
+ v1 = get_hex(*s++);
+ if (!*s || v1 == (char) -1)
+ continue;
+ v2 = get_hex(*s++);
+ if (v2 != (char) -1)
+ *p++ = (v1 << 4) | v2;
+ }
+
+ buflen = p - buffer;
+ }
+ else
+ {
+ /*
+ * Length of input is max length of output, but add one to avoid
+ * unportable malloc(0) if input is zero-length.
+ */
+ buffer = (unsigned char *) malloc(strtextlen + 1);
+ if (buffer == NULL)
+ return NULL;
+
+ for (i = j = 0; i < strtextlen;)
+ {
+ switch (strtext[i])
+ {
+ case '\\':
+ i++;
+ if (strtext[i] == '\\')
+ buffer[j++] = strtext[i++];
+ else
+ {
+ if ((ISFIRSTOCTDIGIT(strtext[i])) &&
+ (ISOCTDIGIT(strtext[i + 1])) &&
+ (ISOCTDIGIT(strtext[i + 2])))
+ {
+ int byte;
+
+ byte = OCTVAL(strtext[i++]);
+ byte = (byte << 3) + OCTVAL(strtext[i++]);
+ byte = (byte << 3) + OCTVAL(strtext[i++]);
+ buffer[j++] = byte;
+ }
+ }
+
+ /*
+ * Note: if we see '\' followed by something that isn't a
+ * recognized escape sequence, we loop around having done
+ * nothing except advance i. Therefore the something will
+ * be emitted as ordinary data on the next cycle. Corner
+ * case: '\' at end of string will just be discarded.
+ */
+ break;
+
+ default:
+ buffer[j++] = strtext[i++];
+ break;
+ }
+ }
+ buflen = j; /* buflen is the length of the dequoted data */
+ }
+
+ /* Shrink the buffer to be no larger than necessary */
+ /* +1 avoids unportable behavior when buflen==0 */
+ tmpbuf = realloc(buffer, buflen + 1);
+
+ /* It would only be a very brain-dead realloc that could fail, but... */
+ if (!tmpbuf)
+ {
+ free(buffer);
+ return NULL;
+ }
+
+ *retbuflen = buflen;
+ return tmpbuf;
+}
diff --git a/src/interfaces/libpq/fe-gssapi-common.c b/src/interfaces/libpq/fe-gssapi-common.c
new file mode 100644
index 0000000..9e8aeae
--- /dev/null
+++ b/src/interfaces/libpq/fe-gssapi-common.c
@@ -0,0 +1,130 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-gssapi-common.c
+ * The front-end (client) GSSAPI common code
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-gssapi-common.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "fe-gssapi-common.h"
+
+#include "libpq-int.h"
+#include "pqexpbuffer.h"
+
+/*
+ * Fetch all errors of a specific type and append to "str".
+ * Each error string is preceded by a space.
+ */
+static void
+pg_GSS_error_int(PQExpBuffer str, OM_uint32 stat, int type)
+{
+ OM_uint32 lmin_s;
+ gss_buffer_desc lmsg;
+ OM_uint32 msg_ctx = 0;
+
+ do
+ {
+ if (gss_display_status(&lmin_s, stat, type, GSS_C_NO_OID,
+ &msg_ctx, &lmsg) != GSS_S_COMPLETE)
+ break;
+ appendPQExpBufferChar(str, ' ');
+ appendBinaryPQExpBuffer(str, lmsg.value, lmsg.length);
+ gss_release_buffer(&lmin_s, &lmsg);
+ } while (msg_ctx);
+}
+
+/*
+ * GSSAPI errors contain two parts; put both into conn->errorMessage.
+ */
+void
+pg_GSS_error(const char *mprefix, PGconn *conn,
+ OM_uint32 maj_stat, OM_uint32 min_stat)
+{
+ appendPQExpBuffer(&conn->errorMessage, "%s:", mprefix);
+ pg_GSS_error_int(&conn->errorMessage, maj_stat, GSS_C_GSS_CODE);
+ appendPQExpBufferChar(&conn->errorMessage, ':');
+ pg_GSS_error_int(&conn->errorMessage, min_stat, GSS_C_MECH_CODE);
+ appendPQExpBufferChar(&conn->errorMessage, '\n');
+}
+
+/*
+ * Check if we can acquire credentials at all (and yield them if so).
+ */
+bool
+pg_GSS_have_cred_cache(gss_cred_id_t *cred_out)
+{
+ OM_uint32 major,
+ minor;
+ gss_cred_id_t cred = GSS_C_NO_CREDENTIAL;
+
+ major = gss_acquire_cred(&minor, GSS_C_NO_NAME, 0, GSS_C_NO_OID_SET,
+ GSS_C_INITIATE, &cred, NULL, NULL);
+ if (major != GSS_S_COMPLETE)
+ {
+ *cred_out = NULL;
+ return false;
+ }
+ *cred_out = cred;
+ return true;
+}
+
+/*
+ * Try to load service name for a connection
+ */
+int
+pg_GSS_load_servicename(PGconn *conn)
+{
+ OM_uint32 maj_stat,
+ min_stat;
+ int maxlen;
+ gss_buffer_desc temp_gbuf;
+ char *host;
+
+ if (conn->gtarg_nam != NULL)
+ /* Already taken care of - move along */
+ return STATUS_OK;
+
+ host = PQhost(conn);
+ if (!(host && host[0] != '\0'))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("host name must be specified\n"));
+ return STATUS_ERROR;
+ }
+
+ /*
+ * Import service principal name so the proper ticket can be acquired by
+ * the GSSAPI system.
+ */
+ maxlen = strlen(conn->krbsrvname) + strlen(host) + 2;
+ temp_gbuf.value = (char *) malloc(maxlen);
+ if (!temp_gbuf.value)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return STATUS_ERROR;
+ }
+ snprintf(temp_gbuf.value, maxlen, "%s@%s",
+ conn->krbsrvname, host);
+ temp_gbuf.length = strlen(temp_gbuf.value);
+
+ maj_stat = gss_import_name(&min_stat, &temp_gbuf,
+ GSS_C_NT_HOSTBASED_SERVICE, &conn->gtarg_nam);
+ free(temp_gbuf.value);
+
+ if (maj_stat != GSS_S_COMPLETE)
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI name import error"),
+ conn,
+ maj_stat, min_stat);
+ return STATUS_ERROR;
+ }
+ return STATUS_OK;
+}
diff --git a/src/interfaces/libpq/fe-gssapi-common.h b/src/interfaces/libpq/fe-gssapi-common.h
new file mode 100644
index 0000000..4776606
--- /dev/null
+++ b/src/interfaces/libpq/fe-gssapi-common.h
@@ -0,0 +1,28 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-gssapi-common.h
+ *
+ * Definitions for GSSAPI common routines
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/fe-gssapi-common.h
+ */
+
+#ifndef FE_GSSAPI_COMMON_H
+#define FE_GSSAPI_COMMON_H
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+
+#ifdef ENABLE_GSS
+
+void pg_GSS_error(const char *mprefix, PGconn *conn,
+ OM_uint32 maj_stat, OM_uint32 min_stat);
+bool pg_GSS_have_cred_cache(gss_cred_id_t *cred_out);
+int pg_GSS_load_servicename(PGconn *conn);
+
+#endif
+
+#endif /* FE_GSSAPI_COMMON_H */
diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c
new file mode 100644
index 0000000..ffd9926
--- /dev/null
+++ b/src/interfaces/libpq/fe-lobj.c
@@ -0,0 +1,1084 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-lobj.c
+ * Front-end large object interface
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-lobj.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifdef WIN32
+/*
+ * As unlink/rename are #define'd in port.h (via postgres_fe.h), io.h
+ * must be included first on MS C. Might as well do it for all WIN32's
+ * here.
+ */
+#include <io.h>
+#endif
+
+#include "postgres_fe.h"
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <limits.h>
+#include <sys/stat.h>
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "libpq/libpq-fs.h" /* must come after sys/stat.h */
+#include "port/pg_bswap.h"
+
+#define LO_BUFSIZE 8192
+
+static int lo_initialize(PGconn *conn);
+static Oid lo_import_internal(PGconn *conn, const char *filename, Oid oid);
+static pg_int64 lo_hton64(pg_int64 host64);
+static pg_int64 lo_ntoh64(pg_int64 net64);
+
+/*
+ * lo_open
+ * opens an existing large object
+ *
+ * returns the file descriptor for use in later lo_* calls
+ * return -1 upon failure.
+ */
+int
+lo_open(PGconn *conn, Oid lobjId, int mode)
+{
+ int fd;
+ int result_len;
+ PQArgBlock argv[2];
+ PGresult *res;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = lobjId;
+
+ argv[1].isint = 1;
+ argv[1].len = 4;
+ argv[1].u.integer = mode;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_open, &fd, &result_len, 1, argv, 2);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return fd;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_close
+ * closes an existing large object
+ *
+ * returns 0 upon success
+ * returns -1 upon failure.
+ */
+int
+lo_close(PGconn *conn, int fd)
+{
+ PQArgBlock argv[1];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_close,
+ &retval, &result_len, 1, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_truncate
+ * truncates an existing large object to the given size
+ *
+ * returns 0 upon success
+ * returns -1 upon failure
+ */
+int
+lo_truncate(PGconn *conn, int fd, size_t len)
+{
+ PQArgBlock argv[2];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ /* Must check this on-the-fly because it's not there pre-8.3 */
+ if (conn->lobjfuncs->fn_lo_truncate == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_truncate");
+ return -1;
+ }
+
+ /*
+ * Long ago, somebody thought it'd be a good idea to declare this function
+ * as taking size_t ... but the underlying backend function only accepts a
+ * signed int32 length. So throw error if the given value overflows
+ * int32. (A possible alternative is to automatically redirect the call
+ * to lo_truncate64; but if the caller wanted to rely on that backend
+ * function being available, he could have called lo_truncate64 for
+ * himself.)
+ */
+ if (len > (size_t) INT_MAX)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("argument of lo_truncate exceeds integer range\n"));
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ argv[1].isint = 1;
+ argv[1].len = 4;
+ argv[1].u.integer = (int) len;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_truncate,
+ &retval, &result_len, 1, argv, 2);
+
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_truncate64
+ * truncates an existing large object to the given size
+ *
+ * returns 0 upon success
+ * returns -1 upon failure
+ */
+int
+lo_truncate64(PGconn *conn, int fd, pg_int64 len)
+{
+ PQArgBlock argv[2];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ if (conn->lobjfuncs->fn_lo_truncate64 == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_truncate64");
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ len = lo_hton64(len);
+ argv[1].isint = 0;
+ argv[1].len = 8;
+ argv[1].u.ptr = (int *) &len;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_truncate64,
+ &retval, &result_len, 1, argv, 2);
+
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_read
+ * read len bytes of the large object into buf
+ *
+ * returns the number of bytes read, or -1 on failure.
+ * the CALLER must have allocated enough space to hold the result returned
+ */
+
+int
+lo_read(PGconn *conn, int fd, char *buf, size_t len)
+{
+ PQArgBlock argv[2];
+ PGresult *res;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ /*
+ * Long ago, somebody thought it'd be a good idea to declare this function
+ * as taking size_t ... but the underlying backend function only accepts a
+ * signed int32 length. So throw error if the given value overflows
+ * int32.
+ */
+ if (len > (size_t) INT_MAX)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("argument of lo_read exceeds integer range\n"));
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ argv[1].isint = 1;
+ argv[1].len = 4;
+ argv[1].u.integer = (int) len;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_read,
+ (void *) buf, &result_len, 0, argv, 2);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return result_len;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_write
+ * write len bytes of buf into the large object fd
+ *
+ * returns the number of bytes written, or -1 on failure.
+ */
+int
+lo_write(PGconn *conn, int fd, const char *buf, size_t len)
+{
+ PQArgBlock argv[2];
+ PGresult *res;
+ int result_len;
+ int retval;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ /*
+ * Long ago, somebody thought it'd be a good idea to declare this function
+ * as taking size_t ... but the underlying backend function only accepts a
+ * signed int32 length. So throw error if the given value overflows
+ * int32.
+ */
+ if (len > (size_t) INT_MAX)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("argument of lo_write exceeds integer range\n"));
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ argv[1].isint = 0;
+ argv[1].len = (int) len;
+ argv[1].u.ptr = (int *) unconstify(char *, buf);
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_write,
+ &retval, &result_len, 1, argv, 2);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_lseek
+ * change the current read or write location on a large object
+ */
+int
+lo_lseek(PGconn *conn, int fd, int offset, int whence)
+{
+ PQArgBlock argv[3];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ argv[1].isint = 1;
+ argv[1].len = 4;
+ argv[1].u.integer = offset;
+
+ argv[2].isint = 1;
+ argv[2].len = 4;
+ argv[2].u.integer = whence;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_lseek,
+ &retval, &result_len, 1, argv, 3);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_lseek64
+ * change the current read or write location on a large object
+ */
+pg_int64
+lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence)
+{
+ PQArgBlock argv[3];
+ PGresult *res;
+ pg_int64 retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ if (conn->lobjfuncs->fn_lo_lseek64 == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_lseek64");
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ offset = lo_hton64(offset);
+ argv[1].isint = 0;
+ argv[1].len = 8;
+ argv[1].u.ptr = (int *) &offset;
+
+ argv[2].isint = 1;
+ argv[2].len = 4;
+ argv[2].u.integer = whence;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_lseek64,
+ (void *) &retval, &result_len, 0, argv, 3);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK && result_len == 8)
+ {
+ PQclear(res);
+ return lo_ntoh64(retval);
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_creat
+ * create a new large object
+ * the mode is ignored (once upon a time it had a use)
+ *
+ * returns the oid of the large object created or
+ * InvalidOid upon failure
+ */
+Oid
+lo_creat(PGconn *conn, int mode)
+{
+ PQArgBlock argv[1];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return InvalidOid;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = mode;
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_creat,
+ &retval, &result_len, 1, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return (Oid) retval;
+ }
+ else
+ {
+ PQclear(res);
+ return InvalidOid;
+ }
+}
+
+/*
+ * lo_create
+ * create a new large object
+ * if lobjId isn't InvalidOid, it specifies the OID to (attempt to) create
+ *
+ * returns the oid of the large object created or
+ * InvalidOid upon failure
+ */
+Oid
+lo_create(PGconn *conn, Oid lobjId)
+{
+ PQArgBlock argv[1];
+ PGresult *res;
+ int retval;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return InvalidOid;
+
+ /* Must check this on-the-fly because it's not there pre-8.1 */
+ if (conn->lobjfuncs->fn_lo_create == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_create");
+ return InvalidOid;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = lobjId;
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_create,
+ &retval, &result_len, 1, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return (Oid) retval;
+ }
+ else
+ {
+ PQclear(res);
+ return InvalidOid;
+ }
+}
+
+
+/*
+ * lo_tell
+ * returns the current seek location of the large object
+ */
+int
+lo_tell(PGconn *conn, int fd)
+{
+ int retval;
+ PQArgBlock argv[1];
+ PGresult *res;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_tell,
+ &retval, &result_len, 1, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_tell64
+ * returns the current seek location of the large object
+ */
+pg_int64
+lo_tell64(PGconn *conn, int fd)
+{
+ pg_int64 retval;
+ PQArgBlock argv[1];
+ PGresult *res;
+ int result_len;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ if (conn->lobjfuncs->fn_lo_tell64 == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_tell64");
+ return -1;
+ }
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = fd;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_tell64,
+ (void *) &retval, &result_len, 0, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK && result_len == 8)
+ {
+ PQclear(res);
+ return lo_ntoh64(retval);
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_unlink
+ * delete a file
+ */
+
+int
+lo_unlink(PGconn *conn, Oid lobjId)
+{
+ PQArgBlock argv[1];
+ PGresult *res;
+ int result_len;
+ int retval;
+
+ if (lo_initialize(conn) < 0)
+ return -1;
+
+ argv[0].isint = 1;
+ argv[0].len = 4;
+ argv[0].u.integer = lobjId;
+
+ res = PQfn(conn, conn->lobjfuncs->fn_lo_unlink,
+ &retval, &result_len, 1, argv, 1);
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ return retval;
+ }
+ else
+ {
+ PQclear(res);
+ return -1;
+ }
+}
+
+/*
+ * lo_import -
+ * imports a file as an (inversion) large object.
+ *
+ * returns the oid of that object upon success,
+ * returns InvalidOid upon failure
+ */
+
+Oid
+lo_import(PGconn *conn, const char *filename)
+{
+ return lo_import_internal(conn, filename, InvalidOid);
+}
+
+/*
+ * lo_import_with_oid -
+ * imports a file as an (inversion) large object.
+ * large object id can be specified.
+ *
+ * returns the oid of that object upon success,
+ * returns InvalidOid upon failure
+ */
+
+Oid
+lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId)
+{
+ return lo_import_internal(conn, filename, lobjId);
+}
+
+static Oid
+lo_import_internal(PGconn *conn, const char *filename, Oid oid)
+{
+ int fd;
+ int nbytes,
+ tmp;
+ char buf[LO_BUFSIZE];
+ Oid lobjOid;
+ int lobj;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ if (conn == NULL)
+ return InvalidOid;
+
+ /* Since this is the beginning of a query cycle, reset the error buffer */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /*
+ * open the file to be read in
+ */
+ fd = open(filename, O_RDONLY | PG_BINARY, 0666);
+ if (fd < 0)
+ { /* error */
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not open file \"%s\": %s\n"),
+ filename, strerror_r(errno, sebuf, sizeof(sebuf)));
+ return InvalidOid;
+ }
+
+ /*
+ * create an inversion object
+ */
+ if (oid == InvalidOid)
+ lobjOid = lo_creat(conn, INV_READ | INV_WRITE);
+ else
+ lobjOid = lo_create(conn, oid);
+
+ if (lobjOid == InvalidOid)
+ {
+ /* we assume lo_create() already set a suitable error message */
+ (void) close(fd);
+ return InvalidOid;
+ }
+
+ lobj = lo_open(conn, lobjOid, INV_WRITE);
+ if (lobj == -1)
+ {
+ /* we assume lo_open() already set a suitable error message */
+ (void) close(fd);
+ return InvalidOid;
+ }
+
+ /*
+ * read in from the file and write to the large object
+ */
+ while ((nbytes = read(fd, buf, LO_BUFSIZE)) > 0)
+ {
+ tmp = lo_write(conn, lobj, buf, nbytes);
+ if (tmp != nbytes)
+ {
+ /*
+ * If lo_write() failed, we are now in an aborted transaction so
+ * there's no need for lo_close(); furthermore, if we tried it
+ * we'd overwrite the useful error result with a useless one. So
+ * just nail the doors shut and get out of town.
+ */
+ (void) close(fd);
+ return InvalidOid;
+ }
+ }
+
+ if (nbytes < 0)
+ {
+ /* We must do lo_close before setting the errorMessage */
+ int save_errno = errno;
+
+ (void) lo_close(conn, lobj);
+ (void) close(fd);
+ /* deliberately overwrite any error from lo_close */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not read from file \"%s\": %s\n"),
+ filename,
+ strerror_r(save_errno, sebuf, sizeof(sebuf)));
+ return InvalidOid;
+ }
+
+ (void) close(fd);
+
+ if (lo_close(conn, lobj) != 0)
+ {
+ /* we assume lo_close() already set a suitable error message */
+ return InvalidOid;
+ }
+
+ return lobjOid;
+}
+
+/*
+ * lo_export -
+ * exports an (inversion) large object.
+ * returns -1 upon failure, 1 if OK
+ */
+int
+lo_export(PGconn *conn, Oid lobjId, const char *filename)
+{
+ int result = 1;
+ int fd;
+ int nbytes,
+ tmp;
+ char buf[LO_BUFSIZE];
+ int lobj;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ /*
+ * open the large object.
+ */
+ lobj = lo_open(conn, lobjId, INV_READ);
+ if (lobj == -1)
+ {
+ /* we assume lo_open() already set a suitable error message */
+ return -1;
+ }
+
+ /*
+ * create the file to be written to
+ */
+ fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | PG_BINARY, 0666);
+ if (fd < 0)
+ {
+ /* We must do lo_close before setting the errorMessage */
+ int save_errno = errno;
+
+ (void) lo_close(conn, lobj);
+ /* deliberately overwrite any error from lo_close */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not open file \"%s\": %s\n"),
+ filename,
+ strerror_r(save_errno, sebuf, sizeof(sebuf)));
+ return -1;
+ }
+
+ /*
+ * read in from the large object and write to the file
+ */
+ while ((nbytes = lo_read(conn, lobj, buf, LO_BUFSIZE)) > 0)
+ {
+ tmp = write(fd, buf, nbytes);
+ if (tmp != nbytes)
+ {
+ /* We must do lo_close before setting the errorMessage */
+ int save_errno = errno;
+
+ (void) lo_close(conn, lobj);
+ (void) close(fd);
+ /* deliberately overwrite any error from lo_close */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not write to file \"%s\": %s\n"),
+ filename,
+ strerror_r(save_errno, sebuf, sizeof(sebuf)));
+ return -1;
+ }
+ }
+
+ /*
+ * If lo_read() failed, we are now in an aborted transaction so there's no
+ * need for lo_close(); furthermore, if we tried it we'd overwrite the
+ * useful error result with a useless one. So skip lo_close() if we got a
+ * failure result.
+ */
+ if (nbytes < 0 ||
+ lo_close(conn, lobj) != 0)
+ {
+ /* assume lo_read() or lo_close() left a suitable error message */
+ result = -1;
+ }
+
+ /* if we already failed, don't overwrite that msg with a close error */
+ if (close(fd) != 0 && result >= 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not write to file \"%s\": %s\n"),
+ filename, strerror_r(errno, sebuf, sizeof(sebuf)));
+ result = -1;
+ }
+
+ return result;
+}
+
+
+/*
+ * lo_initialize
+ *
+ * Initialize for a new large-object operation on an existing connection.
+ * Return 0 if OK, -1 on failure.
+ *
+ * If we haven't previously done so, we collect the function OIDs from
+ * pg_proc for all functions that are required for large object operations.
+ */
+static int
+lo_initialize(PGconn *conn)
+{
+ PGresult *res;
+ PGlobjfuncs *lobjfuncs;
+ int n;
+ const char *query;
+ const char *fname;
+ Oid foid;
+
+ /* Nothing we can do with no connection */
+ if (conn == NULL)
+ return -1;
+
+ /* Since this is the beginning of a query cycle, reset the error buffer */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* Nothing else to do if we already collected info */
+ if (conn->lobjfuncs != NULL)
+ return 0;
+
+ /*
+ * Allocate the structure to hold the function OIDs. We don't store it
+ * into the PGconn until it's successfully filled.
+ */
+ lobjfuncs = (PGlobjfuncs *) malloc(sizeof(PGlobjfuncs));
+ if (lobjfuncs == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return -1;
+ }
+ MemSet((char *) lobjfuncs, 0, sizeof(PGlobjfuncs));
+
+ /*
+ * Execute the query to get all the functions at once. (Not all of them
+ * may exist in older server versions.)
+ */
+ query = "select proname, oid from pg_catalog.pg_proc "
+ "where proname in ("
+ "'lo_open', "
+ "'lo_close', "
+ "'lo_creat', "
+ "'lo_create', "
+ "'lo_unlink', "
+ "'lo_lseek', "
+ "'lo_lseek64', "
+ "'lo_tell', "
+ "'lo_tell64', "
+ "'lo_truncate', "
+ "'lo_truncate64', "
+ "'loread', "
+ "'lowrite') "
+ "and pronamespace = (select oid from pg_catalog.pg_namespace "
+ "where nspname = 'pg_catalog')";
+
+ res = PQexec(conn, query);
+ if (res == NULL)
+ {
+ free(lobjfuncs);
+ return -1;
+ }
+
+ if (res->resultStatus != PGRES_TUPLES_OK)
+ {
+ free(lobjfuncs);
+ PQclear(res);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("query to initialize large object functions did not return data\n"));
+ return -1;
+ }
+
+ /*
+ * Examine the result and put the OID's into the struct
+ */
+ for (n = 0; n < PQntuples(res); n++)
+ {
+ fname = PQgetvalue(res, n, 0);
+ foid = (Oid) atoi(PQgetvalue(res, n, 1));
+ if (strcmp(fname, "lo_open") == 0)
+ lobjfuncs->fn_lo_open = foid;
+ else if (strcmp(fname, "lo_close") == 0)
+ lobjfuncs->fn_lo_close = foid;
+ else if (strcmp(fname, "lo_creat") == 0)
+ lobjfuncs->fn_lo_creat = foid;
+ else if (strcmp(fname, "lo_create") == 0)
+ lobjfuncs->fn_lo_create = foid;
+ else if (strcmp(fname, "lo_unlink") == 0)
+ lobjfuncs->fn_lo_unlink = foid;
+ else if (strcmp(fname, "lo_lseek") == 0)
+ lobjfuncs->fn_lo_lseek = foid;
+ else if (strcmp(fname, "lo_lseek64") == 0)
+ lobjfuncs->fn_lo_lseek64 = foid;
+ else if (strcmp(fname, "lo_tell") == 0)
+ lobjfuncs->fn_lo_tell = foid;
+ else if (strcmp(fname, "lo_tell64") == 0)
+ lobjfuncs->fn_lo_tell64 = foid;
+ else if (strcmp(fname, "lo_truncate") == 0)
+ lobjfuncs->fn_lo_truncate = foid;
+ else if (strcmp(fname, "lo_truncate64") == 0)
+ lobjfuncs->fn_lo_truncate64 = foid;
+ else if (strcmp(fname, "loread") == 0)
+ lobjfuncs->fn_lo_read = foid;
+ else if (strcmp(fname, "lowrite") == 0)
+ lobjfuncs->fn_lo_write = foid;
+ }
+
+ PQclear(res);
+
+ /*
+ * Finally check that we got all required large object interface functions
+ * (ones that have been added later than the stone age are instead checked
+ * only if used)
+ */
+ if (lobjfuncs->fn_lo_open == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_open");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_close == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_close");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_creat == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_creat");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_unlink == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_unlink");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_lseek == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_lseek");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_tell == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lo_tell");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_read == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "loread");
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_write == 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function %s\n"),
+ "lowrite");
+ free(lobjfuncs);
+ return -1;
+ }
+
+ /*
+ * Put the structure into the connection control
+ */
+ conn->lobjfuncs = lobjfuncs;
+ return 0;
+}
+
+/*
+ * lo_hton64
+ * converts a 64-bit integer from host byte order to network byte order
+ */
+static pg_int64
+lo_hton64(pg_int64 host64)
+{
+ union
+ {
+ pg_int64 i64;
+ uint32 i32[2];
+ } swap;
+ uint32 t;
+
+ /* High order half first, since we're doing MSB-first */
+ t = (uint32) (host64 >> 32);
+ swap.i32[0] = pg_hton32(t);
+
+ /* Now the low order half */
+ t = (uint32) host64;
+ swap.i32[1] = pg_hton32(t);
+
+ return swap.i64;
+}
+
+/*
+ * lo_ntoh64
+ * converts a 64-bit integer from network byte order to host byte order
+ */
+static pg_int64
+lo_ntoh64(pg_int64 net64)
+{
+ union
+ {
+ pg_int64 i64;
+ uint32 i32[2];
+ } swap;
+ pg_int64 result;
+
+ swap.i64 = net64;
+
+ result = (uint32) pg_ntoh32(swap.i32[0]);
+ result <<= 32;
+ result |= (uint32) pg_ntoh32(swap.i32[1]);
+
+ return result;
+}
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
new file mode 100644
index 0000000..fc0ec03
--- /dev/null
+++ b/src/interfaces/libpq/fe-misc.c
@@ -0,0 +1,1289 @@
+/*-------------------------------------------------------------------------
+ *
+ * FILE
+ * fe-misc.c
+ *
+ * DESCRIPTION
+ * miscellaneous useful functions
+ *
+ * The communication routines here are analogous to the ones in
+ * backend/libpq/pqcomm.c and backend/libpq/pqformat.c, but operate
+ * in the considerably different environment of the frontend libpq.
+ * In particular, we work with a bare nonblock-mode socket, rather than
+ * a stdio stream, so that we can avoid unwanted blocking of the application.
+ *
+ * XXX: MOVE DEBUG PRINTOUT TO HIGHER LEVEL. As is, block and restart
+ * will cause repeat printouts.
+ *
+ * We must speak the same transmitted data representations as the backend
+ * routines.
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-misc.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <signal.h>
+#include <time.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "mb/pg_wchar.h"
+#include "pg_config_paths.h"
+#include "port/pg_bswap.h"
+
+static int pqPutMsgBytes(const void *buf, size_t len, PGconn *conn);
+static int pqSendSome(PGconn *conn, int len);
+static int pqSocketCheck(PGconn *conn, int forRead, int forWrite,
+ time_t end_time);
+static int pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time);
+
+/*
+ * PQlibVersion: return the libpq version number
+ */
+int
+PQlibVersion(void)
+{
+ return PG_VERSION_NUM;
+}
+
+
+/*
+ * pqGetc: get 1 character from the connection
+ *
+ * All these routines return 0 on success, EOF on error.
+ * Note that for the Get routines, EOF only means there is not enough
+ * data in the buffer, not that there is necessarily a hard error.
+ */
+int
+pqGetc(char *result, PGconn *conn)
+{
+ if (conn->inCursor >= conn->inEnd)
+ return EOF;
+
+ *result = conn->inBuffer[conn->inCursor++];
+
+ return 0;
+}
+
+
+/*
+ * pqPutc: write 1 char to the current message
+ */
+int
+pqPutc(char c, PGconn *conn)
+{
+ if (pqPutMsgBytes(&c, 1, conn))
+ return EOF;
+
+ return 0;
+}
+
+
+/*
+ * pqGets[_append]:
+ * get a null-terminated string from the connection,
+ * and store it in an expansible PQExpBuffer.
+ * If we run out of memory, all of the string is still read,
+ * but the excess characters are silently discarded.
+ */
+static int
+pqGets_internal(PQExpBuffer buf, PGconn *conn, bool resetbuffer)
+{
+ /* Copy conn data to locals for faster search loop */
+ char *inBuffer = conn->inBuffer;
+ int inCursor = conn->inCursor;
+ int inEnd = conn->inEnd;
+ int slen;
+
+ while (inCursor < inEnd && inBuffer[inCursor])
+ inCursor++;
+
+ if (inCursor >= inEnd)
+ return EOF;
+
+ slen = inCursor - conn->inCursor;
+
+ if (resetbuffer)
+ resetPQExpBuffer(buf);
+
+ appendBinaryPQExpBuffer(buf, inBuffer + conn->inCursor, slen);
+
+ conn->inCursor = ++inCursor;
+
+ return 0;
+}
+
+int
+pqGets(PQExpBuffer buf, PGconn *conn)
+{
+ return pqGets_internal(buf, conn, true);
+}
+
+int
+pqGets_append(PQExpBuffer buf, PGconn *conn)
+{
+ return pqGets_internal(buf, conn, false);
+}
+
+
+/*
+ * pqPuts: write a null-terminated string to the current message
+ */
+int
+pqPuts(const char *s, PGconn *conn)
+{
+ if (pqPutMsgBytes(s, strlen(s) + 1, conn))
+ return EOF;
+
+ return 0;
+}
+
+/*
+ * pqGetnchar:
+ * get a string of exactly len bytes in buffer s, no null termination
+ */
+int
+pqGetnchar(char *s, size_t len, PGconn *conn)
+{
+ if (len > (size_t) (conn->inEnd - conn->inCursor))
+ return EOF;
+
+ memcpy(s, conn->inBuffer + conn->inCursor, len);
+ /* no terminating null */
+
+ conn->inCursor += len;
+
+ return 0;
+}
+
+/*
+ * pqSkipnchar:
+ * skip over len bytes in input buffer.
+ *
+ * Note: this is primarily useful for its debug output, which should
+ * be exactly the same as for pqGetnchar. We assume the data in question
+ * will actually be used, but just isn't getting copied anywhere as yet.
+ */
+int
+pqSkipnchar(size_t len, PGconn *conn)
+{
+ if (len > (size_t) (conn->inEnd - conn->inCursor))
+ return EOF;
+
+ conn->inCursor += len;
+
+ return 0;
+}
+
+/*
+ * pqPutnchar:
+ * write exactly len bytes to the current message
+ */
+int
+pqPutnchar(const char *s, size_t len, PGconn *conn)
+{
+ if (pqPutMsgBytes(s, len, conn))
+ return EOF;
+
+ return 0;
+}
+
+/*
+ * pqGetInt
+ * read a 2 or 4 byte integer and convert from network byte order
+ * to local byte order
+ */
+int
+pqGetInt(int *result, size_t bytes, PGconn *conn)
+{
+ uint16 tmp2;
+ uint32 tmp4;
+
+ switch (bytes)
+ {
+ case 2:
+ if (conn->inCursor + 2 > conn->inEnd)
+ return EOF;
+ memcpy(&tmp2, conn->inBuffer + conn->inCursor, 2);
+ conn->inCursor += 2;
+ *result = (int) pg_ntoh16(tmp2);
+ break;
+ case 4:
+ if (conn->inCursor + 4 > conn->inEnd)
+ return EOF;
+ memcpy(&tmp4, conn->inBuffer + conn->inCursor, 4);
+ conn->inCursor += 4;
+ *result = (int) pg_ntoh32(tmp4);
+ break;
+ default:
+ pqInternalNotice(&conn->noticeHooks,
+ "integer of size %lu not supported by pqGetInt",
+ (unsigned long) bytes);
+ return EOF;
+ }
+
+ return 0;
+}
+
+/*
+ * pqPutInt
+ * write an integer of 2 or 4 bytes, converting from host byte order
+ * to network byte order.
+ */
+int
+pqPutInt(int value, size_t bytes, PGconn *conn)
+{
+ uint16 tmp2;
+ uint32 tmp4;
+
+ switch (bytes)
+ {
+ case 2:
+ tmp2 = pg_hton16((uint16) value);
+ if (pqPutMsgBytes((const char *) &tmp2, 2, conn))
+ return EOF;
+ break;
+ case 4:
+ tmp4 = pg_hton32((uint32) value);
+ if (pqPutMsgBytes((const char *) &tmp4, 4, conn))
+ return EOF;
+ break;
+ default:
+ pqInternalNotice(&conn->noticeHooks,
+ "integer of size %lu not supported by pqPutInt",
+ (unsigned long) bytes);
+ return EOF;
+ }
+
+ return 0;
+}
+
+/*
+ * Make sure conn's output buffer can hold bytes_needed bytes (caller must
+ * include already-stored data into the value!)
+ *
+ * Returns 0 on success, EOF if failed to enlarge buffer
+ */
+int
+pqCheckOutBufferSpace(size_t bytes_needed, PGconn *conn)
+{
+ int newsize = conn->outBufSize;
+ char *newbuf;
+
+ /* Quick exit if we have enough space */
+ if (bytes_needed <= (size_t) newsize)
+ return 0;
+
+ /*
+ * If we need to enlarge the buffer, we first try to double it in size; if
+ * that doesn't work, enlarge in multiples of 8K. This avoids thrashing
+ * the malloc pool by repeated small enlargements.
+ *
+ * Note: tests for newsize > 0 are to catch integer overflow.
+ */
+ do
+ {
+ newsize *= 2;
+ } while (newsize > 0 && bytes_needed > (size_t) newsize);
+
+ if (newsize > 0 && bytes_needed <= (size_t) newsize)
+ {
+ newbuf = realloc(conn->outBuffer, newsize);
+ if (newbuf)
+ {
+ /* realloc succeeded */
+ conn->outBuffer = newbuf;
+ conn->outBufSize = newsize;
+ return 0;
+ }
+ }
+
+ newsize = conn->outBufSize;
+ do
+ {
+ newsize += 8192;
+ } while (newsize > 0 && bytes_needed > (size_t) newsize);
+
+ if (newsize > 0 && bytes_needed <= (size_t) newsize)
+ {
+ newbuf = realloc(conn->outBuffer, newsize);
+ if (newbuf)
+ {
+ /* realloc succeeded */
+ conn->outBuffer = newbuf;
+ conn->outBufSize = newsize;
+ return 0;
+ }
+ }
+
+ /* realloc failed. Probably out of memory */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "cannot allocate memory for output buffer\n");
+ return EOF;
+}
+
+/*
+ * Make sure conn's input buffer can hold bytes_needed bytes (caller must
+ * include already-stored data into the value!)
+ *
+ * Returns 0 on success, EOF if failed to enlarge buffer
+ */
+int
+pqCheckInBufferSpace(size_t bytes_needed, PGconn *conn)
+{
+ int newsize = conn->inBufSize;
+ char *newbuf;
+
+ /* Quick exit if we have enough space */
+ if (bytes_needed <= (size_t) newsize)
+ return 0;
+
+ /*
+ * Before concluding that we need to enlarge the buffer, left-justify
+ * whatever is in it and recheck. The caller's value of bytes_needed
+ * includes any data to the left of inStart, but we can delete that in
+ * preference to enlarging the buffer. It's slightly ugly to have this
+ * function do this, but it's better than making callers worry about it.
+ */
+ bytes_needed -= conn->inStart;
+
+ if (conn->inStart < conn->inEnd)
+ {
+ if (conn->inStart > 0)
+ {
+ memmove(conn->inBuffer, conn->inBuffer + conn->inStart,
+ conn->inEnd - conn->inStart);
+ conn->inEnd -= conn->inStart;
+ conn->inCursor -= conn->inStart;
+ conn->inStart = 0;
+ }
+ }
+ else
+ {
+ /* buffer is logically empty, reset it */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ }
+
+ /* Recheck whether we have enough space */
+ if (bytes_needed <= (size_t) newsize)
+ return 0;
+
+ /*
+ * If we need to enlarge the buffer, we first try to double it in size; if
+ * that doesn't work, enlarge in multiples of 8K. This avoids thrashing
+ * the malloc pool by repeated small enlargements.
+ *
+ * Note: tests for newsize > 0 are to catch integer overflow.
+ */
+ do
+ {
+ newsize *= 2;
+ } while (newsize > 0 && bytes_needed > (size_t) newsize);
+
+ if (newsize > 0 && bytes_needed <= (size_t) newsize)
+ {
+ newbuf = realloc(conn->inBuffer, newsize);
+ if (newbuf)
+ {
+ /* realloc succeeded */
+ conn->inBuffer = newbuf;
+ conn->inBufSize = newsize;
+ return 0;
+ }
+ }
+
+ newsize = conn->inBufSize;
+ do
+ {
+ newsize += 8192;
+ } while (newsize > 0 && bytes_needed > (size_t) newsize);
+
+ if (newsize > 0 && bytes_needed <= (size_t) newsize)
+ {
+ newbuf = realloc(conn->inBuffer, newsize);
+ if (newbuf)
+ {
+ /* realloc succeeded */
+ conn->inBuffer = newbuf;
+ conn->inBufSize = newsize;
+ return 0;
+ }
+ }
+
+ /* realloc failed. Probably out of memory */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "cannot allocate memory for input buffer\n");
+ return EOF;
+}
+
+/*
+ * pqPutMsgStart: begin construction of a message to the server
+ *
+ * msg_type is the message type byte, or 0 for a message without type byte
+ * (only startup messages have no type byte)
+ *
+ * Returns 0 on success, EOF on error
+ *
+ * The idea here is that we construct the message in conn->outBuffer,
+ * beginning just past any data already in outBuffer (ie, at
+ * outBuffer+outCount). We enlarge the buffer as needed to hold the message.
+ * When the message is complete, we fill in the length word (if needed) and
+ * then advance outCount past the message, making it eligible to send.
+ *
+ * The state variable conn->outMsgStart points to the incomplete message's
+ * length word: it is either outCount or outCount+1 depending on whether
+ * there is a type byte. The state variable conn->outMsgEnd is the end of
+ * the data collected so far.
+ */
+int
+pqPutMsgStart(char msg_type, PGconn *conn)
+{
+ int lenPos;
+ int endPos;
+
+ /* allow room for message type byte */
+ if (msg_type)
+ endPos = conn->outCount + 1;
+ else
+ endPos = conn->outCount;
+
+ /* do we want a length word? */
+ lenPos = endPos;
+ /* allow room for message length */
+ endPos += 4;
+
+ /* make sure there is room for message header */
+ if (pqCheckOutBufferSpace(endPos, conn))
+ return EOF;
+ /* okay, save the message type byte if any */
+ if (msg_type)
+ conn->outBuffer[conn->outCount] = msg_type;
+ /* set up the message pointers */
+ conn->outMsgStart = lenPos;
+ conn->outMsgEnd = endPos;
+ /* length word, if needed, will be filled in by pqPutMsgEnd */
+
+ return 0;
+}
+
+/*
+ * pqPutMsgBytes: add bytes to a partially-constructed message
+ *
+ * Returns 0 on success, EOF on error
+ */
+static int
+pqPutMsgBytes(const void *buf, size_t len, PGconn *conn)
+{
+ /* make sure there is room for it */
+ if (pqCheckOutBufferSpace(conn->outMsgEnd + len, conn))
+ return EOF;
+ /* okay, save the data */
+ memcpy(conn->outBuffer + conn->outMsgEnd, buf, len);
+ conn->outMsgEnd += len;
+ /* no Pfdebug call here, caller should do it */
+ return 0;
+}
+
+/*
+ * pqPutMsgEnd: finish constructing a message and possibly send it
+ *
+ * Returns 0 on success, EOF on error
+ *
+ * We don't actually send anything here unless we've accumulated at least
+ * 8K worth of data (the typical size of a pipe buffer on Unix systems).
+ * This avoids sending small partial packets. The caller must use pqFlush
+ * when it's important to flush all the data out to the server.
+ */
+int
+pqPutMsgEnd(PGconn *conn)
+{
+ /* Fill in length word if needed */
+ if (conn->outMsgStart >= 0)
+ {
+ uint32 msgLen = conn->outMsgEnd - conn->outMsgStart;
+
+ msgLen = pg_hton32(msgLen);
+ memcpy(conn->outBuffer + conn->outMsgStart, &msgLen, 4);
+ }
+
+ /* trace client-to-server message */
+ if (conn->Pfdebug)
+ {
+ if (conn->outCount < conn->outMsgStart)
+ pqTraceOutputMessage(conn, conn->outBuffer + conn->outCount, true);
+ else
+ pqTraceOutputNoTypeByteMessage(conn,
+ conn->outBuffer + conn->outMsgStart);
+ }
+
+ /* Make message eligible to send */
+ conn->outCount = conn->outMsgEnd;
+
+ if (conn->outCount >= 8192)
+ {
+ int toSend = conn->outCount - (conn->outCount % 8192);
+
+ if (pqSendSome(conn, toSend) < 0)
+ return EOF;
+ /* in nonblock mode, don't complain if unable to send it all */
+ }
+
+ return 0;
+}
+
+/* ----------
+ * pqReadData: read more data, if any is available
+ * Possible return values:
+ * 1: successfully loaded at least one more byte
+ * 0: no data is presently available, but no error detected
+ * -1: error detected (including EOF = connection closure);
+ * conn->errorMessage set
+ * NOTE: callers must not assume that pointers or indexes into conn->inBuffer
+ * remain valid across this call!
+ * ----------
+ */
+int
+pqReadData(PGconn *conn)
+{
+ int someread = 0;
+ int nread;
+
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("connection not open\n"));
+ return -1;
+ }
+
+ /* Left-justify any data in the buffer to make room */
+ if (conn->inStart < conn->inEnd)
+ {
+ if (conn->inStart > 0)
+ {
+ memmove(conn->inBuffer, conn->inBuffer + conn->inStart,
+ conn->inEnd - conn->inStart);
+ conn->inEnd -= conn->inStart;
+ conn->inCursor -= conn->inStart;
+ conn->inStart = 0;
+ }
+ }
+ else
+ {
+ /* buffer is logically empty, reset it */
+ conn->inStart = conn->inCursor = conn->inEnd = 0;
+ }
+
+ /*
+ * If the buffer is fairly full, enlarge it. We need to be able to enlarge
+ * the buffer in case a single message exceeds the initial buffer size. We
+ * enlarge before filling the buffer entirely so as to avoid asking the
+ * kernel for a partial packet. The magic constant here should be large
+ * enough for a TCP packet or Unix pipe bufferload. 8K is the usual pipe
+ * buffer size, so...
+ */
+ if (conn->inBufSize - conn->inEnd < 8192)
+ {
+ if (pqCheckInBufferSpace(conn->inEnd + (size_t) 8192, conn))
+ {
+ /*
+ * We don't insist that the enlarge worked, but we need some room
+ */
+ if (conn->inBufSize - conn->inEnd < 100)
+ return -1; /* errorMessage already set */
+ }
+ }
+
+ /* OK, try to read some data */
+retry3:
+ nread = pqsecure_read(conn, conn->inBuffer + conn->inEnd,
+ conn->inBufSize - conn->inEnd);
+ if (nread < 0)
+ {
+ switch (SOCK_ERRNO)
+ {
+ case EINTR:
+ goto retry3;
+
+ /* Some systems return EAGAIN/EWOULDBLOCK for no data */
+#ifdef EAGAIN
+ case EAGAIN:
+ return someread;
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+ return someread;
+#endif
+
+ /* We might get ECONNRESET etc here if connection failed */
+ case ALL_CONNECTION_FAILURE_ERRNOS:
+ goto definitelyFailed;
+
+ default:
+ /* pqsecure_read set the error message for us */
+ return -1;
+ }
+ }
+ if (nread > 0)
+ {
+ conn->inEnd += nread;
+
+ /*
+ * Hack to deal with the fact that some kernels will only give us back
+ * 1 packet per recv() call, even if we asked for more and there is
+ * more available. If it looks like we are reading a long message,
+ * loop back to recv() again immediately, until we run out of data or
+ * buffer space. Without this, the block-and-restart behavior of
+ * libpq's higher levels leads to O(N^2) performance on long messages.
+ *
+ * Since we left-justified the data above, conn->inEnd gives the
+ * amount of data already read in the current message. We consider
+ * the message "long" once we have acquired 32k ...
+ */
+ if (conn->inEnd > 32768 &&
+ (conn->inBufSize - conn->inEnd) >= 8192)
+ {
+ someread = 1;
+ goto retry3;
+ }
+ return 1;
+ }
+
+ if (someread)
+ return 1; /* got a zero read after successful tries */
+
+ /*
+ * A return value of 0 could mean just that no data is now available, or
+ * it could mean EOF --- that is, the server has closed the connection.
+ * Since we have the socket in nonblock mode, the only way to tell the
+ * difference is to see if select() is saying that the file is ready.
+ * Grumble. Fortunately, we don't expect this path to be taken much,
+ * since in normal practice we should not be trying to read data unless
+ * the file selected for reading already.
+ *
+ * In SSL mode it's even worse: SSL_read() could say WANT_READ and then
+ * data could arrive before we make the pqReadReady() test, but the second
+ * SSL_read() could still say WANT_READ because the data received was not
+ * a complete SSL record. So we must play dumb and assume there is more
+ * data, relying on the SSL layer to detect true EOF.
+ */
+
+#ifdef USE_SSL
+ if (conn->ssl_in_use)
+ return 0;
+#endif
+
+ switch (pqReadReady(conn))
+ {
+ case 0:
+ /* definitely no data available */
+ return 0;
+ case 1:
+ /* ready for read */
+ break;
+ default:
+ /* we override pqReadReady's message with something more useful */
+ goto definitelyEOF;
+ }
+
+ /*
+ * Still not sure that it's EOF, because some data could have just
+ * arrived.
+ */
+retry4:
+ nread = pqsecure_read(conn, conn->inBuffer + conn->inEnd,
+ conn->inBufSize - conn->inEnd);
+ if (nread < 0)
+ {
+ switch (SOCK_ERRNO)
+ {
+ case EINTR:
+ goto retry4;
+
+ /* Some systems return EAGAIN/EWOULDBLOCK for no data */
+#ifdef EAGAIN
+ case EAGAIN:
+ return 0;
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+ return 0;
+#endif
+
+ /* We might get ECONNRESET etc here if connection failed */
+ case ALL_CONNECTION_FAILURE_ERRNOS:
+ goto definitelyFailed;
+
+ default:
+ /* pqsecure_read set the error message for us */
+ return -1;
+ }
+ }
+ if (nread > 0)
+ {
+ conn->inEnd += nread;
+ return 1;
+ }
+
+ /*
+ * OK, we are getting a zero read even though select() says ready. This
+ * means the connection has been closed. Cope.
+ */
+definitelyEOF:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server closed the connection unexpectedly\n"
+ "\tThis probably means the server terminated abnormally\n"
+ "\tbefore or while processing the request.\n"));
+
+ /* Come here if lower-level code already set a suitable errorMessage */
+definitelyFailed:
+ /* Do *not* drop any already-read data; caller still wants it */
+ pqDropConnection(conn, false);
+ conn->status = CONNECTION_BAD; /* No more connection to backend */
+ return -1;
+}
+
+/*
+ * pqSendSome: send data waiting in the output buffer.
+ *
+ * len is how much to try to send (typically equal to outCount, but may
+ * be less).
+ *
+ * Return 0 on success, -1 on failure and 1 when not all data could be sent
+ * because the socket would block and the connection is non-blocking.
+ *
+ * Note that this is also responsible for consuming data from the socket
+ * (putting it in conn->inBuffer) in any situation where we can't send
+ * all the specified data immediately.
+ *
+ * Upon write failure, conn->write_failed is set and the error message is
+ * saved in conn->write_err_msg, but we clear the output buffer and return
+ * zero anyway; this is because callers should soldier on until it's possible
+ * to read from the server and check for an error message. write_err_msg
+ * should be reported only when we are unable to obtain a server error first.
+ * (Thus, a -1 result is returned only for an internal *read* failure.)
+ */
+static int
+pqSendSome(PGconn *conn, int len)
+{
+ char *ptr = conn->outBuffer;
+ int remaining = conn->outCount;
+ int oldmsglen = conn->errorMessage.len;
+ int result = 0;
+
+ /*
+ * If we already had a write failure, we will never again try to send data
+ * on that connection. Even if the kernel would let us, we've probably
+ * lost message boundary sync with the server. conn->write_failed
+ * therefore persists until the connection is reset, and we just discard
+ * all data presented to be written. However, as long as we still have a
+ * valid socket, we should continue to absorb data from the backend, so
+ * that we can collect any final error messages.
+ */
+ if (conn->write_failed)
+ {
+ /* conn->write_err_msg should be set up already */
+ conn->outCount = 0;
+ /* Absorb input data if any, and detect socket closure */
+ if (conn->sock != PGINVALID_SOCKET)
+ {
+ if (pqReadData(conn) < 0)
+ return -1;
+ }
+ return 0;
+ }
+
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ conn->write_failed = true;
+ /* Insert error message into conn->write_err_msg, if possible */
+ /* (strdup failure is OK, we'll cope later) */
+ conn->write_err_msg = strdup(libpq_gettext("connection not open\n"));
+ /* Discard queued data; no chance it'll ever be sent */
+ conn->outCount = 0;
+ return 0;
+ }
+
+ /* while there's still data to send */
+ while (len > 0)
+ {
+ int sent;
+
+#ifndef WIN32
+ sent = pqsecure_write(conn, ptr, len);
+#else
+
+ /*
+ * Windows can fail on large sends, per KB article Q201213. The
+ * failure-point appears to be different in different versions of
+ * Windows, but 64k should always be safe.
+ */
+ sent = pqsecure_write(conn, ptr, Min(len, 65536));
+#endif
+
+ if (sent < 0)
+ {
+ /* Anything except EAGAIN/EWOULDBLOCK/EINTR is trouble */
+ switch (SOCK_ERRNO)
+ {
+#ifdef EAGAIN
+ case EAGAIN:
+ break;
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+ break;
+#endif
+ case EINTR:
+ continue;
+
+ default:
+ /* pqsecure_write set the error message for us */
+ conn->write_failed = true;
+
+ /*
+ * Transfer error message to conn->write_err_msg, if
+ * possible (strdup failure is OK, we'll cope later).
+ *
+ * We only want to transfer whatever has been appended to
+ * conn->errorMessage since we entered this routine.
+ */
+ if (!PQExpBufferBroken(&conn->errorMessage))
+ {
+ conn->write_err_msg = strdup(conn->errorMessage.data +
+ oldmsglen);
+ conn->errorMessage.len = oldmsglen;
+ conn->errorMessage.data[oldmsglen] = '\0';
+ }
+
+ /* Discard queued data; no chance it'll ever be sent */
+ conn->outCount = 0;
+
+ /* Absorb input data if any, and detect socket closure */
+ if (conn->sock != PGINVALID_SOCKET)
+ {
+ if (pqReadData(conn) < 0)
+ return -1;
+ }
+ return 0;
+ }
+ }
+ else
+ {
+ ptr += sent;
+ len -= sent;
+ remaining -= sent;
+ }
+
+ if (len > 0)
+ {
+ /*
+ * We didn't send it all, wait till we can send more.
+ *
+ * There are scenarios in which we can't send data because the
+ * communications channel is full, but we cannot expect the server
+ * to clear the channel eventually because it's blocked trying to
+ * send data to us. (This can happen when we are sending a large
+ * amount of COPY data, and the server has generated lots of
+ * NOTICE responses.) To avoid a deadlock situation, we must be
+ * prepared to accept and buffer incoming data before we try
+ * again. Furthermore, it is possible that such incoming data
+ * might not arrive until after we've gone to sleep. Therefore,
+ * we wait for either read ready or write ready.
+ *
+ * In non-blocking mode, we don't wait here directly, but return 1
+ * to indicate that data is still pending. The caller should wait
+ * for both read and write ready conditions, and call
+ * PQconsumeInput() on read ready, but just in case it doesn't, we
+ * call pqReadData() ourselves before returning. That's not
+ * enough if the data has not arrived yet, but it's the best we
+ * can do, and works pretty well in practice. (The documentation
+ * used to say that you only need to wait for write-ready, so
+ * there are still plenty of applications like that out there.)
+ *
+ * Note that errors here don't result in write_failed becoming
+ * set.
+ */
+ if (pqReadData(conn) < 0)
+ {
+ result = -1; /* error message already set up */
+ break;
+ }
+
+ if (pqIsnonblocking(conn))
+ {
+ result = 1;
+ break;
+ }
+
+ if (pqWait(true, true, conn))
+ {
+ result = -1;
+ break;
+ }
+ }
+ }
+
+ /* shift the remaining contents of the buffer */
+ if (remaining > 0)
+ memmove(conn->outBuffer, ptr, remaining);
+ conn->outCount = remaining;
+
+ return result;
+}
+
+
+/*
+ * pqFlush: send any data waiting in the output buffer
+ *
+ * Return 0 on success, -1 on failure and 1 when not all data could be sent
+ * because the socket would block and the connection is non-blocking.
+ * (See pqSendSome comments about how failure should be handled.)
+ */
+int
+pqFlush(PGconn *conn)
+{
+ if (conn->outCount > 0)
+ {
+ if (conn->Pfdebug)
+ fflush(conn->Pfdebug);
+
+ return pqSendSome(conn, conn->outCount);
+ }
+
+ return 0;
+}
+
+
+/*
+ * pqWait: wait until we can read or write the connection socket
+ *
+ * JAB: If SSL enabled and used and forRead, buffered bytes short-circuit the
+ * call to select().
+ *
+ * We also stop waiting and return if the kernel flags an exception condition
+ * on the socket. The actual error condition will be detected and reported
+ * when the caller tries to read or write the socket.
+ */
+int
+pqWait(int forRead, int forWrite, PGconn *conn)
+{
+ return pqWaitTimed(forRead, forWrite, conn, (time_t) -1);
+}
+
+/*
+ * pqWaitTimed: wait, but not past finish_time.
+ *
+ * finish_time = ((time_t) -1) disables the wait limit.
+ *
+ * Returns -1 on failure, 0 if the socket is readable/writable, 1 if it timed out.
+ */
+int
+pqWaitTimed(int forRead, int forWrite, PGconn *conn, time_t finish_time)
+{
+ int result;
+
+ result = pqSocketCheck(conn, forRead, forWrite, finish_time);
+
+ if (result < 0)
+ return -1; /* errorMessage is already set */
+
+ if (result == 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("timeout expired\n"));
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * pqReadReady: is select() saying the file is ready to read?
+ * Returns -1 on failure, 0 if not ready, 1 if ready.
+ */
+int
+pqReadReady(PGconn *conn)
+{
+ return pqSocketCheck(conn, 1, 0, (time_t) 0);
+}
+
+/*
+ * pqWriteReady: is select() saying the file is ready to write?
+ * Returns -1 on failure, 0 if not ready, 1 if ready.
+ */
+int
+pqWriteReady(PGconn *conn)
+{
+ return pqSocketCheck(conn, 0, 1, (time_t) 0);
+}
+
+/*
+ * Checks a socket, using poll or select, for data to be read, written,
+ * or both. Returns >0 if one or more conditions are met, 0 if it timed
+ * out, -1 if an error occurred.
+ *
+ * If SSL is in use, the SSL buffer is checked prior to checking the socket
+ * for read data directly.
+ */
+static int
+pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
+{
+ int result;
+
+ if (!conn)
+ return -1;
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("invalid socket\n"));
+ return -1;
+ }
+
+#ifdef USE_SSL
+ /* Check for SSL library buffering read bytes */
+ if (forRead && conn->ssl_in_use && pgtls_read_pending(conn))
+ {
+ /* short-circuit the select */
+ return 1;
+ }
+#endif
+
+ /* We will retry as long as we get EINTR */
+ do
+ result = pqSocketPoll(conn->sock, forRead, forWrite, end_time);
+ while (result < 0 && SOCK_ERRNO == EINTR);
+
+ if (result < 0)
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("%s() failed: %s\n"),
+ "select",
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ }
+
+ return result;
+}
+
+
+/*
+ * Check a file descriptor for read and/or write data, possibly waiting.
+ * If neither forRead nor forWrite are set, immediately return a timeout
+ * condition (without waiting). Return >0 if condition is met, 0
+ * if a timeout occurred, -1 if an error or interrupt occurred.
+ *
+ * Timeout is infinite if end_time is -1. Timeout is immediate (no blocking)
+ * if end_time is 0 (or indeed, any time before now).
+ */
+static int
+pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time)
+{
+ /* We use poll(2) if available, otherwise select(2) */
+#ifdef HAVE_POLL
+ struct pollfd input_fd;
+ int timeout_ms;
+
+ if (!forRead && !forWrite)
+ return 0;
+
+ input_fd.fd = sock;
+ input_fd.events = POLLERR;
+ input_fd.revents = 0;
+
+ if (forRead)
+ input_fd.events |= POLLIN;
+ if (forWrite)
+ input_fd.events |= POLLOUT;
+
+ /* Compute appropriate timeout interval */
+ if (end_time == ((time_t) -1))
+ timeout_ms = -1;
+ else
+ {
+ time_t now = time(NULL);
+
+ if (end_time > now)
+ timeout_ms = (end_time - now) * 1000;
+ else
+ timeout_ms = 0;
+ }
+
+ return poll(&input_fd, 1, timeout_ms);
+#else /* !HAVE_POLL */
+
+ fd_set input_mask;
+ fd_set output_mask;
+ fd_set except_mask;
+ struct timeval timeout;
+ struct timeval *ptr_timeout;
+
+ if (!forRead && !forWrite)
+ return 0;
+
+ FD_ZERO(&input_mask);
+ FD_ZERO(&output_mask);
+ FD_ZERO(&except_mask);
+ if (forRead)
+ FD_SET(sock, &input_mask);
+
+ if (forWrite)
+ FD_SET(sock, &output_mask);
+ FD_SET(sock, &except_mask);
+
+ /* Compute appropriate timeout interval */
+ if (end_time == ((time_t) -1))
+ ptr_timeout = NULL;
+ else
+ {
+ time_t now = time(NULL);
+
+ if (end_time > now)
+ timeout.tv_sec = end_time - now;
+ else
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ ptr_timeout = &timeout;
+ }
+
+ return select(sock + 1, &input_mask, &output_mask,
+ &except_mask, ptr_timeout);
+#endif /* HAVE_POLL */
+}
+
+
+/*
+ * A couple of "miscellaneous" multibyte related functions. They used
+ * to be in fe-print.c but that file is doomed.
+ */
+
+/*
+ * Returns the byte length of the character beginning at s, using the
+ * specified encoding.
+ *
+ * Caution: when dealing with text that is not certainly valid in the
+ * specified encoding, the result may exceed the actual remaining
+ * string length. Callers that are not prepared to deal with that
+ * should use PQmblenBounded() instead.
+ */
+int
+PQmblen(const char *s, int encoding)
+{
+ return pg_encoding_mblen(encoding, s);
+}
+
+/*
+ * Returns the byte length of the character beginning at s, using the
+ * specified encoding; but not more than the distance to end of string.
+ */
+int
+PQmblenBounded(const char *s, int encoding)
+{
+ return strnlen(s, pg_encoding_mblen(encoding, s));
+}
+
+/*
+ * Returns the display length of the character beginning at s, using the
+ * specified encoding.
+ */
+int
+PQdsplen(const char *s, int encoding)
+{
+ return pg_encoding_dsplen(encoding, s);
+}
+
+/*
+ * Get encoding id from environment variable PGCLIENTENCODING.
+ */
+int
+PQenv2encoding(void)
+{
+ char *str;
+ int encoding = PG_SQL_ASCII;
+
+ str = getenv("PGCLIENTENCODING");
+ if (str && *str != '\0')
+ {
+ encoding = pg_char_to_encoding(str);
+ if (encoding < 0)
+ encoding = PG_SQL_ASCII;
+ }
+ return encoding;
+}
+
+
+#ifdef ENABLE_NLS
+
+static void
+libpq_binddomain(void)
+{
+ /*
+ * If multiple threads come through here at about the same time, it's okay
+ * for more than one of them to call bindtextdomain(). But it's not okay
+ * for any of them to return to caller before bindtextdomain() is
+ * complete, so don't set the flag till that's done. Use "volatile" just
+ * to be sure the compiler doesn't try to get cute.
+ */
+ static volatile bool already_bound = false;
+
+ if (!already_bound)
+ {
+ /* bindtextdomain() does not preserve errno */
+#ifdef WIN32
+ int save_errno = GetLastError();
+#else
+ int save_errno = errno;
+#endif
+ const char *ldir;
+
+ /* No relocatable lookup here because the binary could be anywhere */
+ ldir = getenv("PGLOCALEDIR");
+ if (!ldir)
+ ldir = LOCALEDIR;
+ bindtextdomain(PG_TEXTDOMAIN("libpq"), ldir);
+ already_bound = true;
+#ifdef WIN32
+ SetLastError(save_errno);
+#else
+ errno = save_errno;
+#endif
+ }
+}
+
+char *
+libpq_gettext(const char *msgid)
+{
+ libpq_binddomain();
+ return dgettext(PG_TEXTDOMAIN("libpq"), msgid);
+}
+
+char *
+libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n)
+{
+ libpq_binddomain();
+ return dngettext(PG_TEXTDOMAIN("libpq"), msgid, msgid_plural, n);
+}
+
+#endif /* ENABLE_NLS */
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
new file mode 100644
index 0000000..09bbc66
--- /dev/null
+++ b/src/interfaces/libpq/fe-print.c
@@ -0,0 +1,781 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-print.c
+ * functions for pretty-printing query results
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * These functions were formerly part of fe-exec.c, but they
+ * didn't really belong there.
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-print.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <signal.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#include <sys/ioctl.h>
+#endif
+
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#else
+#ifndef WIN32
+#include <sys/termios.h>
+#endif
+#endif
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+
+
+static bool do_field(const PQprintOpt *po, const PGresult *res,
+ const int i, const int j, const int fs_len,
+ char **fields,
+ const int nFields, const char **fieldNames,
+ unsigned char *fieldNotNum, int *fieldMax,
+ const int fieldMaxLen, FILE *fout);
+static char *do_header(FILE *fout, const PQprintOpt *po, const int nFields,
+ int *fieldMax, const char **fieldNames, unsigned char *fieldNotNum,
+ const int fs_len, const PGresult *res);
+static void output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
+ unsigned char *fieldNotNum, int *fieldMax, char *border,
+ const int row_index);
+static void fill(int length, int max, char filler, FILE *fp);
+
+/*
+ * PQprint()
+ *
+ * Format results of a query for printing.
+ *
+ * PQprintOpt is a typedef (structure) that contains
+ * various flags and options. consult libpq-fe.h for
+ * details
+ *
+ * This function should probably be removed sometime since psql
+ * doesn't use it anymore. It is unclear to what extent this is used
+ * by external clients, however.
+ */
+void
+PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
+{
+ int nFields;
+
+ nFields = PQnfields(res);
+
+ if (nFields > 0)
+ { /* only print rows with at least 1 field. */
+ int i,
+ j;
+ int nTups;
+ int *fieldMax = NULL; /* in case we don't use them */
+ unsigned char *fieldNotNum = NULL;
+ char *border = NULL;
+ char **fields = NULL;
+ const char **fieldNames = NULL;
+ int fieldMaxLen = 0;
+ int numFieldName;
+ int fs_len = strlen(po->fieldSep);
+ int total_line_length = 0;
+ bool usePipe = false;
+ char *pagerenv;
+
+#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
+ sigset_t osigset;
+ bool sigpipe_masked = false;
+ bool sigpipe_pending;
+#endif
+#if !defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
+ pqsigfunc oldsigpipehandler = NULL;
+#endif
+
+#ifdef TIOCGWINSZ
+ struct winsize screen_size;
+#else
+ struct winsize
+ {
+ int ws_row;
+ int ws_col;
+ } screen_size;
+#endif
+
+ nTups = PQntuples(res);
+ fieldNames = (const char **) calloc(nFields, sizeof(char *));
+ fieldNotNum = (unsigned char *) calloc(nFields, 1);
+ fieldMax = (int *) calloc(nFields, sizeof(int));
+ if (!fieldNames || !fieldNotNum || !fieldMax)
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ goto exit;
+ }
+ for (numFieldName = 0;
+ po->fieldName && po->fieldName[numFieldName];
+ numFieldName++)
+ ;
+ for (j = 0; j < nFields; j++)
+ {
+ int len;
+ const char *s = (j < numFieldName && po->fieldName[j][0]) ?
+ po->fieldName[j] : PQfname(res, j);
+
+ fieldNames[j] = s;
+ len = s ? strlen(s) : 0;
+ fieldMax[j] = len;
+ len += fs_len;
+ if (len > fieldMaxLen)
+ fieldMaxLen = len;
+ total_line_length += len;
+ }
+
+ total_line_length += nFields * strlen(po->fieldSep) + 1;
+
+ if (fout == NULL)
+ fout = stdout;
+ if (po->pager && fout == stdout && isatty(fileno(stdin)) &&
+ isatty(fileno(stdout)))
+ {
+ /*
+ * If we think there'll be more than one screen of output, try to
+ * pipe to the pager program.
+ */
+#ifdef TIOCGWINSZ
+ if (ioctl(fileno(stdout), TIOCGWINSZ, &screen_size) == -1 ||
+ screen_size.ws_col == 0 ||
+ screen_size.ws_row == 0)
+ {
+ screen_size.ws_row = 24;
+ screen_size.ws_col = 80;
+ }
+#else
+ screen_size.ws_row = 24;
+ screen_size.ws_col = 80;
+#endif
+
+ /*
+ * Since this function is no longer used by psql, we don't examine
+ * PSQL_PAGER. It's possible that the hypothetical external users
+ * of the function would like that to happen, but in the name of
+ * backwards compatibility, we'll stick to just examining PAGER.
+ */
+ pagerenv = getenv("PAGER");
+ /* if PAGER is unset, empty or all-white-space, don't use pager */
+ if (pagerenv != NULL &&
+ strspn(pagerenv, " \t\r\n") != strlen(pagerenv) &&
+ !po->html3 &&
+ ((po->expanded &&
+ nTups * (nFields + 1) >= screen_size.ws_row) ||
+ (!po->expanded &&
+ nTups * (total_line_length / screen_size.ws_col + 1) *
+ (1 + (po->standard != 0)) >= screen_size.ws_row -
+ (po->header != 0) *
+ (total_line_length / screen_size.ws_col + 1) * 2
+ - (po->header != 0) * 2 /* row count and newline */
+ )))
+ {
+ fout = popen(pagerenv, "w");
+ if (fout)
+ {
+ usePipe = true;
+#ifndef WIN32
+#ifdef ENABLE_THREAD_SAFETY
+ if (pq_block_sigpipe(&osigset, &sigpipe_pending) == 0)
+ sigpipe_masked = true;
+#else
+ oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN);
+#endif /* ENABLE_THREAD_SAFETY */
+#endif /* WIN32 */
+ }
+ else
+ fout = stdout;
+ }
+ }
+
+ if (!po->expanded && (po->align || po->html3))
+ {
+ fields = (char **) calloc((size_t) nTups + 1,
+ nFields * sizeof(char *));
+ if (!fields)
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ goto exit;
+ }
+ }
+ else if (po->header && !po->html3)
+ {
+ if (po->expanded)
+ {
+ if (po->align)
+ fprintf(fout, libpq_gettext("%-*s%s Value\n"),
+ fieldMaxLen - fs_len, libpq_gettext("Field"), po->fieldSep);
+ else
+ fprintf(fout, libpq_gettext("%s%sValue\n"), libpq_gettext("Field"), po->fieldSep);
+ }
+ else
+ {
+ int len = 0;
+
+ for (j = 0; j < nFields; j++)
+ {
+ const char *s = fieldNames[j];
+
+ fputs(s, fout);
+ len += strlen(s) + fs_len;
+ if ((j + 1) < nFields)
+ fputs(po->fieldSep, fout);
+ }
+ fputc('\n', fout);
+ for (len -= fs_len; len--; fputc('-', fout));
+ fputc('\n', fout);
+ }
+ }
+ if (po->expanded && po->html3)
+ {
+ if (po->caption)
+ fprintf(fout, "<center><h2>%s</h2></center>\n", po->caption);
+ else
+ fprintf(fout,
+ "<center><h2>"
+ "Query retrieved %d rows * %d fields"
+ "</h2></center>\n",
+ nTups, nFields);
+ }
+ for (i = 0; i < nTups; i++)
+ {
+ if (po->expanded)
+ {
+ if (po->html3)
+ fprintf(fout,
+ "<table %s><caption align=\"top\">%d</caption>\n",
+ po->tableOpt ? po->tableOpt : "", i);
+ else
+ fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i);
+ }
+ for (j = 0; j < nFields; j++)
+ {
+ if (!do_field(po, res, i, j, fs_len, fields, nFields,
+ fieldNames, fieldNotNum,
+ fieldMax, fieldMaxLen, fout))
+ goto exit;
+ }
+ if (po->html3 && po->expanded)
+ fputs("</table>\n", fout);
+ }
+ if (!po->expanded && (po->align || po->html3))
+ {
+ if (po->html3)
+ {
+ if (po->header)
+ {
+ if (po->caption)
+ fprintf(fout,
+ "<table %s><caption align=\"top\">%s</caption>\n",
+ po->tableOpt ? po->tableOpt : "",
+ po->caption);
+ else
+ fprintf(fout,
+ "<table %s><caption align=\"top\">"
+ "Retrieved %d rows * %d fields"
+ "</caption>\n",
+ po->tableOpt ? po->tableOpt : "", nTups, nFields);
+ }
+ else
+ fprintf(fout, "<table %s>", po->tableOpt ? po->tableOpt : "");
+ }
+ if (po->header)
+ border = do_header(fout, po, nFields, fieldMax, fieldNames,
+ fieldNotNum, fs_len, res);
+ for (i = 0; i < nTups; i++)
+ output_row(fout, po, nFields, fields,
+ fieldNotNum, fieldMax, border, i);
+ }
+ if (po->header && !po->html3)
+ fprintf(fout, "(%d row%s)\n\n", PQntuples(res),
+ (PQntuples(res) == 1) ? "" : "s");
+ if (po->html3 && !po->expanded)
+ fputs("</table>\n", fout);
+
+exit:
+ if (fieldMax)
+ free(fieldMax);
+ if (fieldNotNum)
+ free(fieldNotNum);
+ if (border)
+ free(border);
+ if (fields)
+ {
+ /* if calloc succeeded, this shouldn't overflow size_t */
+ size_t numfields = ((size_t) nTups + 1) * (size_t) nFields;
+
+ while (numfields-- > 0)
+ {
+ if (fields[numfields])
+ free(fields[numfields]);
+ }
+ free(fields);
+ }
+ if (fieldNames)
+ free((void *) fieldNames);
+ if (usePipe)
+ {
+#ifdef WIN32
+ _pclose(fout);
+#else
+ pclose(fout);
+
+#ifdef ENABLE_THREAD_SAFETY
+ /* we can't easily verify if EPIPE occurred, so say it did */
+ if (sigpipe_masked)
+ pq_reset_sigpipe(&osigset, sigpipe_pending, true);
+#else
+ pqsignal(SIGPIPE, oldsigpipehandler);
+#endif /* ENABLE_THREAD_SAFETY */
+#endif /* WIN32 */
+ }
+ }
+}
+
+
+static bool
+do_field(const PQprintOpt *po, const PGresult *res,
+ const int i, const int j, const int fs_len,
+ char **fields,
+ const int nFields, char const **fieldNames,
+ unsigned char *fieldNotNum, int *fieldMax,
+ const int fieldMaxLen, FILE *fout)
+{
+ const char *pval,
+ *p;
+ int plen;
+ bool skipit;
+
+ plen = PQgetlength(res, i, j);
+ pval = PQgetvalue(res, i, j);
+
+ if (plen < 1 || !pval || !*pval)
+ {
+ if (po->align || po->expanded)
+ skipit = true;
+ else
+ {
+ skipit = false;
+ goto efield;
+ }
+ }
+ else
+ skipit = false;
+
+ if (!skipit)
+ {
+ if (po->align && !fieldNotNum[j])
+ {
+ /* Detect whether field contains non-numeric data */
+ char ch = '0';
+
+ for (p = pval; *p; p += PQmblenBounded(p, res->client_encoding))
+ {
+ ch = *p;
+ if (!((ch >= '0' && ch <= '9') ||
+ ch == '.' ||
+ ch == 'E' ||
+ ch == 'e' ||
+ ch == ' ' ||
+ ch == '-'))
+ {
+ fieldNotNum[j] = 1;
+ break;
+ }
+ }
+
+ /*
+ * Above loop will believe E in first column is numeric; also, we
+ * insist on a digit in the last column for a numeric. This test
+ * is still not bulletproof but it handles most cases.
+ */
+ if (*pval == 'E' || *pval == 'e' ||
+ !(ch >= '0' && ch <= '9'))
+ fieldNotNum[j] = 1;
+ }
+
+ if (!po->expanded && (po->align || po->html3))
+ {
+ if (plen > fieldMax[j])
+ fieldMax[j] = plen;
+ if (!(fields[i * nFields + j] = (char *) malloc(plen + 1)))
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ return false;
+ }
+ strcpy(fields[i * nFields + j], pval);
+ }
+ else
+ {
+ if (po->expanded)
+ {
+ if (po->html3)
+ fprintf(fout,
+ "<tr><td align=\"left\"><b>%s</b></td>"
+ "<td align=\"%s\">%s</td></tr>\n",
+ fieldNames[j],
+ fieldNotNum[j] ? "left" : "right",
+ pval);
+ else
+ {
+ if (po->align)
+ fprintf(fout,
+ "%-*s%s %s\n",
+ fieldMaxLen - fs_len, fieldNames[j],
+ po->fieldSep,
+ pval);
+ else
+ fprintf(fout,
+ "%s%s%s\n",
+ fieldNames[j], po->fieldSep, pval);
+ }
+ }
+ else
+ {
+ if (!po->html3)
+ {
+ fputs(pval, fout);
+ efield:
+ if ((j + 1) < nFields)
+ fputs(po->fieldSep, fout);
+ else
+ fputc('\n', fout);
+ }
+ }
+ }
+ }
+ return true;
+}
+
+
+static char *
+do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
+ const char **fieldNames, unsigned char *fieldNotNum,
+ const int fs_len, const PGresult *res)
+{
+ int j; /* for loop index */
+ char *border = NULL;
+
+ if (po->html3)
+ fputs("<tr>", fout);
+ else
+ {
+ int tot = 0;
+ int n = 0;
+ char *p = NULL;
+
+ for (; n < nFields; n++)
+ tot += fieldMax[n] + fs_len + (po->standard ? 2 : 0);
+ if (po->standard)
+ tot += fs_len * 2 + 2;
+ border = malloc(tot + 1);
+ if (!border)
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ p = border;
+ if (po->standard)
+ {
+ char *fs = po->fieldSep;
+
+ while (*fs++)
+ *p++ = '+';
+ }
+ for (j = 0; j < nFields; j++)
+ {
+ int len;
+
+ for (len = fieldMax[j] + (po->standard ? 2 : 0); len--; *p++ = '-');
+ if (po->standard || (j + 1) < nFields)
+ {
+ char *fs = po->fieldSep;
+
+ while (*fs++)
+ *p++ = '+';
+ }
+ }
+ *p = '\0';
+ if (po->standard)
+ fprintf(fout, "%s\n", border);
+ }
+ if (po->standard)
+ fputs(po->fieldSep, fout);
+ for (j = 0; j < nFields; j++)
+ {
+ const char *s = PQfname(res, j);
+
+ if (po->html3)
+ {
+ fprintf(fout, "<th align=\"%s\">%s</th>",
+ fieldNotNum[j] ? "left" : "right", fieldNames[j]);
+ }
+ else
+ {
+ int n = strlen(s);
+
+ if (n > fieldMax[j])
+ fieldMax[j] = n;
+ if (po->standard)
+ fprintf(fout,
+ fieldNotNum[j] ? " %-*s " : " %*s ",
+ fieldMax[j], s);
+ else
+ fprintf(fout, fieldNotNum[j] ? "%-*s" : "%*s", fieldMax[j], s);
+ if (po->standard || (j + 1) < nFields)
+ fputs(po->fieldSep, fout);
+ }
+ }
+ if (po->html3)
+ fputs("</tr>\n", fout);
+ else
+ fprintf(fout, "\n%s\n", border);
+ return border;
+}
+
+
+static void
+output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
+ unsigned char *fieldNotNum, int *fieldMax, char *border,
+ const int row_index)
+{
+ int field_index; /* for loop index */
+
+ if (po->html3)
+ fputs("<tr>", fout);
+ else if (po->standard)
+ fputs(po->fieldSep, fout);
+ for (field_index = 0; field_index < nFields; field_index++)
+ {
+ char *p = fields[row_index * nFields + field_index];
+
+ if (po->html3)
+ fprintf(fout, "<td align=\"%s\">%s</td>",
+ fieldNotNum[field_index] ? "left" : "right", p ? p : "");
+ else
+ {
+ fprintf(fout,
+ fieldNotNum[field_index] ?
+ (po->standard ? " %-*s " : "%-*s") :
+ (po->standard ? " %*s " : "%*s"),
+ fieldMax[field_index],
+ p ? p : "");
+ if (po->standard || field_index + 1 < nFields)
+ fputs(po->fieldSep, fout);
+ }
+ }
+ if (po->html3)
+ fputs("</tr>", fout);
+ else if (po->standard)
+ fprintf(fout, "\n%s", border);
+ fputc('\n', fout);
+}
+
+
+
+/*
+ * really old printing routines
+ */
+
+void
+PQdisplayTuples(const PGresult *res,
+ FILE *fp, /* where to send the output */
+ int fillAlign, /* pad the fields with spaces */
+ const char *fieldSep, /* field separator */
+ int printHeader, /* display headers? */
+ int quiet
+)
+{
+#define DEFAULT_FIELD_SEP " "
+
+ int i,
+ j;
+ int nFields;
+ int nTuples;
+ int *fLength = NULL;
+
+ if (fieldSep == NULL)
+ fieldSep = DEFAULT_FIELD_SEP;
+
+ /* Get some useful info about the results */
+ nFields = PQnfields(res);
+ nTuples = PQntuples(res);
+
+ if (fp == NULL)
+ fp = stdout;
+
+ /* Figure the field lengths to align to */
+ /* will be somewhat time consuming for very large results */
+ if (fillAlign)
+ {
+ fLength = (int *) malloc(nFields * sizeof(int));
+ if (!fLength)
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ return;
+ }
+
+ for (j = 0; j < nFields; j++)
+ {
+ fLength[j] = strlen(PQfname(res, j));
+ for (i = 0; i < nTuples; i++)
+ {
+ int flen = PQgetlength(res, i, j);
+
+ if (flen > fLength[j])
+ fLength[j] = flen;
+ }
+ }
+ }
+
+ if (printHeader)
+ {
+ /* first, print out the attribute names */
+ for (i = 0; i < nFields; i++)
+ {
+ fputs(PQfname(res, i), fp);
+ if (fillAlign)
+ fill(strlen(PQfname(res, i)), fLength[i], ' ', fp);
+ fputs(fieldSep, fp);
+ }
+ fprintf(fp, "\n");
+
+ /* Underline the attribute names */
+ for (i = 0; i < nFields; i++)
+ {
+ if (fillAlign)
+ fill(0, fLength[i], '-', fp);
+ fputs(fieldSep, fp);
+ }
+ fprintf(fp, "\n");
+ }
+
+ /* next, print out the instances */
+ for (i = 0; i < nTuples; i++)
+ {
+ for (j = 0; j < nFields; j++)
+ {
+ fprintf(fp, "%s", PQgetvalue(res, i, j));
+ if (fillAlign)
+ fill(strlen(PQgetvalue(res, i, j)), fLength[j], ' ', fp);
+ fputs(fieldSep, fp);
+ }
+ fprintf(fp, "\n");
+ }
+
+ if (!quiet)
+ fprintf(fp, "\nQuery returned %d row%s.\n", PQntuples(res),
+ (PQntuples(res) == 1) ? "" : "s");
+
+ fflush(fp);
+
+ if (fLength)
+ free(fLength);
+}
+
+
+
+void
+PQprintTuples(const PGresult *res,
+ FILE *fout, /* output stream */
+ int PrintAttNames, /* print attribute names or not */
+ int TerseOutput, /* delimiter bars or not? */
+ int colWidth /* width of column, if 0, use variable width */
+)
+{
+ int nFields;
+ int nTups;
+ int i,
+ j;
+ char formatString[80];
+ char *tborder = NULL;
+
+ nFields = PQnfields(res);
+ nTups = PQntuples(res);
+
+ if (colWidth > 0)
+ sprintf(formatString, "%%s %%-%ds", colWidth);
+ else
+ sprintf(formatString, "%%s %%s");
+
+ if (nFields > 0)
+ { /* only print rows with at least 1 field. */
+
+ if (!TerseOutput)
+ {
+ int width;
+
+ width = nFields * 14;
+ tborder = (char *) malloc(width + 1);
+ if (!tborder)
+ {
+ fprintf(stderr, libpq_gettext("out of memory\n"));
+ return;
+ }
+ for (i = 0; i < width; i++)
+ tborder[i] = '-';
+ tborder[width] = '\0';
+ fprintf(fout, "%s\n", tborder);
+ }
+
+ for (i = 0; i < nFields; i++)
+ {
+ if (PrintAttNames)
+ {
+ fprintf(fout, formatString,
+ TerseOutput ? "" : "|",
+ PQfname(res, i));
+ }
+ }
+
+ if (PrintAttNames)
+ {
+ if (TerseOutput)
+ fprintf(fout, "\n");
+ else
+ fprintf(fout, "|\n%s\n", tborder);
+ }
+
+ for (i = 0; i < nTups; i++)
+ {
+ for (j = 0; j < nFields; j++)
+ {
+ const char *pval = PQgetvalue(res, i, j);
+
+ fprintf(fout, formatString,
+ TerseOutput ? "" : "|",
+ pval ? pval : "");
+ }
+ if (TerseOutput)
+ fprintf(fout, "\n");
+ else
+ fprintf(fout, "|\n%s\n", tborder);
+ }
+ }
+
+ if (tborder)
+ free(tborder);
+}
+
+
+/* simply send out max-length number of filler characters to fp */
+
+static void
+fill(int length, int max, char filler, FILE *fp)
+{
+ int count;
+
+ count = max - length;
+ while (count-- >= 0)
+ putc(filler, fp);
+}
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
new file mode 100644
index 0000000..c33f904
--- /dev/null
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -0,0 +1,2254 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-protocol3.c
+ * functions that are specific to frontend/backend protocol version 3
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-protocol3.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <fcntl.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+#endif
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "mb/pg_wchar.h"
+#include "port/pg_bswap.h"
+
+/*
+ * This macro lists the backend message types that could be "long" (more
+ * than a couple of kilobytes).
+ */
+#define VALID_LONG_MESSAGE_TYPE(id) \
+ ((id) == 'T' || (id) == 'D' || (id) == 'd' || (id) == 'V' || \
+ (id) == 'E' || (id) == 'N' || (id) == 'A')
+
+
+static void handleSyncLoss(PGconn *conn, char id, int msgLength);
+static int getRowDescriptions(PGconn *conn, int msgLength);
+static int getParamDescriptions(PGconn *conn, int msgLength);
+static int getAnotherTuple(PGconn *conn, int msgLength);
+static int getParameterStatus(PGconn *conn);
+static int getNotify(PGconn *conn);
+static int getCopyStart(PGconn *conn, ExecStatusType copytype);
+static int getReadyForQuery(PGconn *conn);
+static void reportErrorPosition(PQExpBuffer msg, const char *query,
+ int loc, int encoding);
+static int build_startup_packet(const PGconn *conn, char *packet,
+ const PQEnvironmentOption *options);
+
+
+/*
+ * parseInput: if appropriate, parse input data from backend
+ * until input is exhausted or a stopping state is reached.
+ * Note that this function will NOT attempt to read more data from the backend.
+ */
+void
+pqParseInput3(PGconn *conn)
+{
+ char id;
+ int msgLength;
+ int avail;
+
+ /*
+ * Loop to parse successive complete messages available in the buffer.
+ */
+ for (;;)
+ {
+ /*
+ * Try to read a message. First get the type code and length. Return
+ * if not enough data.
+ */
+ conn->inCursor = conn->inStart;
+ if (pqGetc(&id, conn))
+ return;
+ if (pqGetInt(&msgLength, 4, conn))
+ return;
+
+ /*
+ * Try to validate message type/length here. A length less than 4 is
+ * definitely broken. Large lengths should only be believed for a few
+ * message types.
+ */
+ if (msgLength < 4)
+ {
+ handleSyncLoss(conn, id, msgLength);
+ return;
+ }
+ if (msgLength > 30000 && !VALID_LONG_MESSAGE_TYPE(id))
+ {
+ handleSyncLoss(conn, id, msgLength);
+ return;
+ }
+
+ /*
+ * Can't process if message body isn't all here yet.
+ */
+ msgLength -= 4;
+ avail = conn->inEnd - conn->inCursor;
+ if (avail < msgLength)
+ {
+ /*
+ * Before returning, enlarge the input buffer if needed to hold
+ * the whole message. This is better than leaving it to
+ * pqReadData because we can avoid multiple cycles of realloc()
+ * when the message is large; also, we can implement a reasonable
+ * recovery strategy if we are unable to make the buffer big
+ * enough.
+ */
+ if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
+ conn))
+ {
+ /*
+ * XXX add some better recovery code... plan is to skip over
+ * the message using its length, then report an error. For the
+ * moment, just treat this like loss of sync (which indeed it
+ * might be!)
+ */
+ handleSyncLoss(conn, id, msgLength);
+ }
+ return;
+ }
+
+ /*
+ * NOTIFY and NOTICE messages can happen in any state; always process
+ * them right away.
+ *
+ * Most other messages should only be processed while in BUSY state.
+ * (In particular, in READY state we hold off further parsing until
+ * the application collects the current PGresult.)
+ *
+ * However, if the state is IDLE then we got trouble; we need to deal
+ * with the unexpected message somehow.
+ *
+ * ParameterStatus ('S') messages are a special case: in IDLE state we
+ * must process 'em (this case could happen if a new value was adopted
+ * from config file due to SIGHUP), but otherwise we hold off until
+ * BUSY state.
+ */
+ if (id == 'A')
+ {
+ if (getNotify(conn))
+ return;
+ }
+ else if (id == 'N')
+ {
+ if (pqGetErrorNotice3(conn, false))
+ return;
+ }
+ else if (conn->asyncStatus != PGASYNC_BUSY)
+ {
+ /* If not IDLE state, just wait ... */
+ if (conn->asyncStatus != PGASYNC_IDLE)
+ return;
+
+ /*
+ * Unexpected message in IDLE state; need to recover somehow.
+ * ERROR messages are handled using the notice processor;
+ * ParameterStatus is handled normally; anything else is just
+ * dropped on the floor after displaying a suitable warning
+ * notice. (An ERROR is very possibly the backend telling us why
+ * it is about to close the connection, so we don't want to just
+ * discard it...)
+ */
+ if (id == 'E')
+ {
+ if (pqGetErrorNotice3(conn, false /* treat as notice */ ))
+ return;
+ }
+ else if (id == 'S')
+ {
+ if (getParameterStatus(conn))
+ return;
+ }
+ else
+ {
+ /* Any other case is unexpected and we summarily skip it */
+ pqInternalNotice(&conn->noticeHooks,
+ "message type 0x%02x arrived from server while idle",
+ id);
+ /* Discard the unexpected message */
+ conn->inCursor += msgLength;
+ }
+ }
+ else
+ {
+ /*
+ * In BUSY state, we can process everything.
+ */
+ switch (id)
+ {
+ case 'C': /* command complete */
+ if (pqGets(&conn->workBuffer, conn))
+ return;
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_COMMAND_OK);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ if (conn->result)
+ strlcpy(conn->result->cmdStatus, conn->workBuffer.data,
+ CMDSTATUS_LEN);
+ conn->asyncStatus = PGASYNC_READY;
+ break;
+ case 'E': /* error return */
+ if (pqGetErrorNotice3(conn, true))
+ return;
+ conn->asyncStatus = PGASYNC_READY;
+ break;
+ case 'Z': /* sync response, backend is ready for new
+ * query */
+ if (getReadyForQuery(conn))
+ return;
+ if (conn->pipelineStatus != PQ_PIPELINE_OFF)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_PIPELINE_SYNC);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ else
+ {
+ conn->pipelineStatus = PQ_PIPELINE_ON;
+ conn->asyncStatus = PGASYNC_READY;
+ }
+ }
+ else
+ {
+ /*
+ * In simple query protocol, advance the command queue
+ * (see PQgetResult).
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_SIMPLE)
+ pqCommandQueueAdvance(conn);
+ conn->asyncStatus = PGASYNC_IDLE;
+ }
+ break;
+ case 'I': /* empty query */
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_EMPTY_QUERY);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ break;
+ case '1': /* Parse Complete */
+ /* If we're doing PQprepare, we're done; else ignore */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_PREPARE)
+ {
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_COMMAND_OK);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ }
+ break;
+ case '2': /* Bind Complete */
+ /* Nothing to do for this message type */
+ break;
+ case '3': /* Close Complete */
+ /*
+ * If we get CloseComplete when waiting for it, consume
+ * the queue element and keep going. A result is not
+ * expected from this message; it is just there so that
+ * we know to wait for it when PQsendQuery is used in
+ * pipeline mode, before going in IDLE state. Failing to
+ * do this makes us receive CloseComplete when IDLE, which
+ * creates problems.
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_CLOSE)
+ {
+ pqCommandQueueAdvance(conn);
+ }
+
+ break;
+ case 'S': /* parameter status */
+ if (getParameterStatus(conn))
+ return;
+ break;
+ case 'K': /* secret key data from the backend */
+
+ /*
+ * This is expected only during backend startup, but it's
+ * just as easy to handle it as part of the main loop.
+ * Save the data and continue processing.
+ */
+ if (pqGetInt(&(conn->be_pid), 4, conn))
+ return;
+ if (pqGetInt(&(conn->be_key), 4, conn))
+ return;
+ break;
+ case 'T': /* Row Description */
+ if (conn->result != NULL &&
+ conn->result->resultStatus == PGRES_FATAL_ERROR)
+ {
+ /*
+ * We've already choked for some reason. Just discard
+ * the data till we get to the end of the query.
+ */
+ conn->inCursor += msgLength;
+ }
+ else if (conn->result == NULL ||
+ (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
+ {
+ /* First 'T' in a query sequence */
+ if (getRowDescriptions(conn, msgLength))
+ return;
+ }
+ else
+ {
+ /*
+ * A new 'T' message is treated as the start of
+ * another PGresult. (It is not clear that this is
+ * really possible with the current backend.) We stop
+ * parsing until the application accepts the current
+ * result.
+ */
+ conn->asyncStatus = PGASYNC_READY;
+ return;
+ }
+ break;
+ case 'n': /* No Data */
+
+ /*
+ * NoData indicates that we will not be seeing a
+ * RowDescription message because the statement or portal
+ * inquired about doesn't return rows.
+ *
+ * If we're doing a Describe, we have to pass something
+ * back to the client, so set up a COMMAND_OK result,
+ * instead of PGRES_TUPLES_OK. Otherwise we can just
+ * ignore this message.
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE)
+ {
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_COMMAND_OK);
+ if (!conn->result)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ }
+ break;
+ case 't': /* Parameter Description */
+ if (getParamDescriptions(conn, msgLength))
+ return;
+ break;
+ case 'D': /* Data Row */
+ if (conn->result != NULL &&
+ conn->result->resultStatus == PGRES_TUPLES_OK)
+ {
+ /* Read another tuple of a normal query response */
+ if (getAnotherTuple(conn, msgLength))
+ return;
+ }
+ else if (conn->result != NULL &&
+ conn->result->resultStatus == PGRES_FATAL_ERROR)
+ {
+ /*
+ * We've already choked for some reason. Just discard
+ * tuples till we get to the end of the query.
+ */
+ conn->inCursor += msgLength;
+ }
+ else
+ {
+ /* Set up to report error at end of query */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server sent data (\"D\" message) without prior row description (\"T\" message)\n"));
+ pqSaveErrorResult(conn);
+ /* Discard the unexpected message */
+ conn->inCursor += msgLength;
+ }
+ break;
+ case 'G': /* Start Copy In */
+ if (getCopyStart(conn, PGRES_COPY_IN))
+ return;
+ conn->asyncStatus = PGASYNC_COPY_IN;
+ break;
+ case 'H': /* Start Copy Out */
+ if (getCopyStart(conn, PGRES_COPY_OUT))
+ return;
+ conn->asyncStatus = PGASYNC_COPY_OUT;
+ conn->copy_already_done = 0;
+ break;
+ case 'W': /* Start Copy Both */
+ if (getCopyStart(conn, PGRES_COPY_BOTH))
+ return;
+ conn->asyncStatus = PGASYNC_COPY_BOTH;
+ conn->copy_already_done = 0;
+ break;
+ case 'd': /* Copy Data */
+
+ /*
+ * If we see Copy Data, just silently drop it. This would
+ * only occur if application exits COPY OUT mode too
+ * early.
+ */
+ conn->inCursor += msgLength;
+ break;
+ case 'c': /* Copy Done */
+
+ /*
+ * If we see Copy Done, just silently drop it. This is
+ * the normal case during PQendcopy. We will keep
+ * swallowing data, expecting to see command-complete for
+ * the COPY command.
+ */
+ break;
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unexpected response from server; first received character was \"%c\"\n"),
+ id);
+ /* build an error result holding the error message */
+ pqSaveErrorResult(conn);
+ /* not sure if we will see more, so go to ready state */
+ conn->asyncStatus = PGASYNC_READY;
+ /* Discard the unexpected message */
+ conn->inCursor += msgLength;
+ break;
+ } /* switch on protocol character */
+ }
+ /* Successfully consumed this message */
+ if (conn->inCursor == conn->inStart + 5 + msgLength)
+ {
+ /* trace server-to-client message */
+ if (conn->Pfdebug)
+ pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
+
+ /* Normal case: parsing agrees with specified length */
+ conn->inStart = conn->inCursor;
+ }
+ else
+ {
+ /* Trouble --- report it */
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("message contents do not agree with length in message type \"%c\"\n"),
+ id);
+ /* build an error result holding the error message */
+ pqSaveErrorResult(conn);
+ conn->asyncStatus = PGASYNC_READY;
+ /* trust the specified message length as what to skip */
+ conn->inStart += 5 + msgLength;
+ }
+ }
+}
+
+/*
+ * handleSyncLoss: clean up after loss of message-boundary sync
+ *
+ * There isn't really a lot we can do here except abandon the connection.
+ */
+static void
+handleSyncLoss(PGconn *conn, char id, int msgLength)
+{
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("lost synchronization with server: got message type \"%c\", length %d\n"),
+ id, msgLength);
+ /* build an error result holding the error message */
+ pqSaveErrorResult(conn);
+ conn->asyncStatus = PGASYNC_READY; /* drop out of PQgetResult wait loop */
+ /* flush input data since we're giving up on processing it */
+ pqDropConnection(conn, true);
+ conn->status = CONNECTION_BAD; /* No more connection to backend */
+}
+
+/*
+ * parseInput subroutine to read a 'T' (row descriptions) message.
+ * We'll build a new PGresult structure (unless called for a Describe
+ * command for a prepared statement) containing the attribute data.
+ * Returns: 0 if processed message successfully, EOF to suspend parsing
+ * (the latter case is not actually used currently).
+ */
+static int
+getRowDescriptions(PGconn *conn, int msgLength)
+{
+ PGresult *result;
+ int nfields;
+ const char *errmsg;
+ int i;
+
+ /*
+ * When doing Describe for a prepared statement, there'll already be a
+ * PGresult created by getParamDescriptions, and we should fill data into
+ * that. Otherwise, create a new, empty PGresult.
+ */
+ if (!conn->cmd_queue_head ||
+ (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
+ {
+ if (conn->result)
+ result = conn->result;
+ else
+ result = PQmakeEmptyPGresult(conn, PGRES_COMMAND_OK);
+ }
+ else
+ result = PQmakeEmptyPGresult(conn, PGRES_TUPLES_OK);
+ if (!result)
+ {
+ errmsg = NULL; /* means "out of memory", see below */
+ goto advance_and_error;
+ }
+
+ /* parseInput already read the 'T' label and message length. */
+ /* the next two bytes are the number of fields */
+ if (pqGetInt(&(result->numAttributes), 2, conn))
+ {
+ /* We should not run out of data here, so complain */
+ errmsg = libpq_gettext("insufficient data in \"T\" message");
+ goto advance_and_error;
+ }
+ nfields = result->numAttributes;
+
+ /* allocate space for the attribute descriptors */
+ if (nfields > 0)
+ {
+ result->attDescs = (PGresAttDesc *)
+ pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true);
+ if (!result->attDescs)
+ {
+ errmsg = NULL; /* means "out of memory", see below */
+ goto advance_and_error;
+ }
+ MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc));
+ }
+
+ /* result->binary is true only if ALL columns are binary */
+ result->binary = (nfields > 0) ? 1 : 0;
+
+ /* get type info */
+ for (i = 0; i < nfields; i++)
+ {
+ int tableid;
+ int columnid;
+ int typid;
+ int typlen;
+ int atttypmod;
+ int format;
+
+ if (pqGets(&conn->workBuffer, conn) ||
+ pqGetInt(&tableid, 4, conn) ||
+ pqGetInt(&columnid, 2, conn) ||
+ pqGetInt(&typid, 4, conn) ||
+ pqGetInt(&typlen, 2, conn) ||
+ pqGetInt(&atttypmod, 4, conn) ||
+ pqGetInt(&format, 2, conn))
+ {
+ /* We should not run out of data here, so complain */
+ errmsg = libpq_gettext("insufficient data in \"T\" message");
+ goto advance_and_error;
+ }
+
+ /*
+ * Since pqGetInt treats 2-byte integers as unsigned, we need to
+ * coerce these results to signed form.
+ */
+ columnid = (int) ((int16) columnid);
+ typlen = (int) ((int16) typlen);
+ format = (int) ((int16) format);
+
+ result->attDescs[i].name = pqResultStrdup(result,
+ conn->workBuffer.data);
+ if (!result->attDescs[i].name)
+ {
+ errmsg = NULL; /* means "out of memory", see below */
+ goto advance_and_error;
+ }
+ result->attDescs[i].tableid = tableid;
+ result->attDescs[i].columnid = columnid;
+ result->attDescs[i].format = format;
+ result->attDescs[i].typid = typid;
+ result->attDescs[i].typlen = typlen;
+ result->attDescs[i].atttypmod = atttypmod;
+
+ if (format != 1)
+ result->binary = 0;
+ }
+
+ /* Success! */
+ conn->result = result;
+
+ /*
+ * If we're doing a Describe, we're done, and ready to pass the result
+ * back to the client.
+ */
+ if ((!conn->cmd_queue_head) ||
+ (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
+ {
+ conn->asyncStatus = PGASYNC_READY;
+ return 0;
+ }
+
+ /*
+ * We could perform additional setup for the new result set here, but for
+ * now there's nothing else to do.
+ */
+
+ /* And we're done. */
+ return 0;
+
+advance_and_error:
+ /* Discard unsaved result, if any */
+ if (result && result != conn->result)
+ PQclear(result);
+
+ /*
+ * Replace partially constructed result with an error result. First
+ * discard the old result to try to win back some memory.
+ */
+ pqClearAsyncResult(conn);
+
+ /*
+ * If preceding code didn't provide an error message, assume "out of
+ * memory" was meant. The advantage of having this special case is that
+ * freeing the old result first greatly improves the odds that gettext()
+ * will succeed in providing a translation.
+ */
+ if (!errmsg)
+ errmsg = libpq_gettext("out of memory for query result");
+
+ appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
+ pqSaveErrorResult(conn);
+
+ /*
+ * Show the message as fully consumed, else pqParseInput3 will overwrite
+ * our error with a complaint about that.
+ */
+ conn->inCursor = conn->inStart + 5 + msgLength;
+
+ /*
+ * Return zero to allow input parsing to continue. Subsequent "D"
+ * messages will be ignored until we get to end of data, since an error
+ * result is already set up.
+ */
+ return 0;
+}
+
+/*
+ * parseInput subroutine to read a 't' (ParameterDescription) message.
+ * We'll build a new PGresult structure containing the parameter data.
+ * Returns: 0 if processed message successfully, EOF to suspend parsing
+ * (the latter case is not actually used currently).
+ */
+static int
+getParamDescriptions(PGconn *conn, int msgLength)
+{
+ PGresult *result;
+ const char *errmsg = NULL; /* means "out of memory", see below */
+ int nparams;
+ int i;
+
+ result = PQmakeEmptyPGresult(conn, PGRES_COMMAND_OK);
+ if (!result)
+ goto advance_and_error;
+
+ /* parseInput already read the 't' label and message length. */
+ /* the next two bytes are the number of parameters */
+ if (pqGetInt(&(result->numParameters), 2, conn))
+ goto not_enough_data;
+ nparams = result->numParameters;
+
+ /* allocate space for the parameter descriptors */
+ if (nparams > 0)
+ {
+ result->paramDescs = (PGresParamDesc *)
+ pqResultAlloc(result, nparams * sizeof(PGresParamDesc), true);
+ if (!result->paramDescs)
+ goto advance_and_error;
+ MemSet(result->paramDescs, 0, nparams * sizeof(PGresParamDesc));
+ }
+
+ /* get parameter info */
+ for (i = 0; i < nparams; i++)
+ {
+ int typid;
+
+ if (pqGetInt(&typid, 4, conn))
+ goto not_enough_data;
+ result->paramDescs[i].typid = typid;
+ }
+
+ /* Success! */
+ conn->result = result;
+
+ return 0;
+
+not_enough_data:
+ errmsg = libpq_gettext("insufficient data in \"t\" message");
+
+advance_and_error:
+ /* Discard unsaved result, if any */
+ if (result && result != conn->result)
+ PQclear(result);
+
+ /*
+ * Replace partially constructed result with an error result. First
+ * discard the old result to try to win back some memory.
+ */
+ pqClearAsyncResult(conn);
+
+ /*
+ * If preceding code didn't provide an error message, assume "out of
+ * memory" was meant. The advantage of having this special case is that
+ * freeing the old result first greatly improves the odds that gettext()
+ * will succeed in providing a translation.
+ */
+ if (!errmsg)
+ errmsg = libpq_gettext("out of memory");
+ appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
+ pqSaveErrorResult(conn);
+
+ /*
+ * Show the message as fully consumed, else pqParseInput3 will overwrite
+ * our error with a complaint about that.
+ */
+ conn->inCursor = conn->inStart + 5 + msgLength;
+
+ /*
+ * Return zero to allow input parsing to continue. Essentially, we've
+ * replaced the COMMAND_OK result with an error result, but since this
+ * doesn't affect the protocol state, it's fine.
+ */
+ return 0;
+}
+
+/*
+ * parseInput subroutine to read a 'D' (row data) message.
+ * We fill rowbuf with column pointers and then call the row processor.
+ * Returns: 0 if processed message successfully, EOF to suspend parsing
+ * (the latter case is not actually used currently).
+ */
+static int
+getAnotherTuple(PGconn *conn, int msgLength)
+{
+ PGresult *result = conn->result;
+ int nfields = result->numAttributes;
+ const char *errmsg;
+ PGdataValue *rowbuf;
+ int tupnfields; /* # fields from tuple */
+ int vlen; /* length of the current field value */
+ int i;
+
+ /* Get the field count and make sure it's what we expect */
+ if (pqGetInt(&tupnfields, 2, conn))
+ {
+ /* We should not run out of data here, so complain */
+ errmsg = libpq_gettext("insufficient data in \"D\" message");
+ goto advance_and_error;
+ }
+
+ if (tupnfields != nfields)
+ {
+ errmsg = libpq_gettext("unexpected field count in \"D\" message");
+ goto advance_and_error;
+ }
+
+ /* Resize row buffer if needed */
+ rowbuf = conn->rowBuf;
+ if (nfields > conn->rowBufLen)
+ {
+ rowbuf = (PGdataValue *) realloc(rowbuf,
+ nfields * sizeof(PGdataValue));
+ if (!rowbuf)
+ {
+ errmsg = NULL; /* means "out of memory", see below */
+ goto advance_and_error;
+ }
+ conn->rowBuf = rowbuf;
+ conn->rowBufLen = nfields;
+ }
+
+ /* Scan the fields */
+ for (i = 0; i < nfields; i++)
+ {
+ /* get the value length */
+ if (pqGetInt(&vlen, 4, conn))
+ {
+ /* We should not run out of data here, so complain */
+ errmsg = libpq_gettext("insufficient data in \"D\" message");
+ goto advance_and_error;
+ }
+ rowbuf[i].len = vlen;
+
+ /*
+ * rowbuf[i].value always points to the next address in the data
+ * buffer even if the value is NULL. This allows row processors to
+ * estimate data sizes more easily.
+ */
+ rowbuf[i].value = conn->inBuffer + conn->inCursor;
+
+ /* Skip over the data value */
+ if (vlen > 0)
+ {
+ if (pqSkipnchar(vlen, conn))
+ {
+ /* We should not run out of data here, so complain */
+ errmsg = libpq_gettext("insufficient data in \"D\" message");
+ goto advance_and_error;
+ }
+ }
+ }
+
+ /* Process the collected row */
+ errmsg = NULL;
+ if (pqRowProcessor(conn, &errmsg))
+ return 0; /* normal, successful exit */
+
+ /* pqRowProcessor failed, fall through to report it */
+
+advance_and_error:
+
+ /*
+ * Replace partially constructed result with an error result. First
+ * discard the old result to try to win back some memory.
+ */
+ pqClearAsyncResult(conn);
+
+ /*
+ * If preceding code didn't provide an error message, assume "out of
+ * memory" was meant. The advantage of having this special case is that
+ * freeing the old result first greatly improves the odds that gettext()
+ * will succeed in providing a translation.
+ */
+ if (!errmsg)
+ errmsg = libpq_gettext("out of memory for query result");
+
+ appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
+ pqSaveErrorResult(conn);
+
+ /*
+ * Show the message as fully consumed, else pqParseInput3 will overwrite
+ * our error with a complaint about that.
+ */
+ conn->inCursor = conn->inStart + 5 + msgLength;
+
+ /*
+ * Return zero to allow input parsing to continue. Subsequent "D"
+ * messages will be ignored until we get to end of data, since an error
+ * result is already set up.
+ */
+ return 0;
+}
+
+
+/*
+ * Attempt to read an Error or Notice response message.
+ * This is possible in several places, so we break it out as a subroutine.
+ * Entry: 'E' or 'N' message type and length have already been consumed.
+ * Exit: returns 0 if successfully consumed message.
+ * returns EOF if not enough data.
+ */
+int
+pqGetErrorNotice3(PGconn *conn, bool isError)
+{
+ PGresult *res = NULL;
+ bool have_position = false;
+ PQExpBufferData workBuf;
+ char id;
+
+ /* If in pipeline mode, set error indicator for it */
+ if (isError && conn->pipelineStatus != PQ_PIPELINE_OFF)
+ conn->pipelineStatus = PQ_PIPELINE_ABORTED;
+
+ /*
+ * If this is an error message, pre-emptively clear any incomplete query
+ * result we may have. We'd just throw it away below anyway, and
+ * releasing it before collecting the error might avoid out-of-memory.
+ */
+ if (isError)
+ pqClearAsyncResult(conn);
+
+ /*
+ * Since the fields might be pretty long, we create a temporary
+ * PQExpBuffer rather than using conn->workBuffer. workBuffer is intended
+ * for stuff that is expected to be short. We shouldn't use
+ * conn->errorMessage either, since this might be only a notice.
+ */
+ initPQExpBuffer(&workBuf);
+
+ /*
+ * Make a PGresult to hold the accumulated fields. We temporarily lie
+ * about the result status, so that PQmakeEmptyPGresult doesn't uselessly
+ * copy conn->errorMessage.
+ *
+ * NB: This allocation can fail, if you run out of memory. The rest of the
+ * function handles that gracefully, and we still try to set the error
+ * message as the connection's error message.
+ */
+ res = PQmakeEmptyPGresult(conn, PGRES_EMPTY_QUERY);
+ if (res)
+ res->resultStatus = isError ? PGRES_FATAL_ERROR : PGRES_NONFATAL_ERROR;
+
+ /*
+ * Read the fields and save into res.
+ *
+ * While at it, save the SQLSTATE in conn->last_sqlstate, and note whether
+ * we saw a PG_DIAG_STATEMENT_POSITION field.
+ */
+ for (;;)
+ {
+ if (pqGetc(&id, conn))
+ goto fail;
+ if (id == '\0')
+ break; /* terminator found */
+ if (pqGets(&workBuf, conn))
+ goto fail;
+ pqSaveMessageField(res, id, workBuf.data);
+ if (id == PG_DIAG_SQLSTATE)
+ strlcpy(conn->last_sqlstate, workBuf.data,
+ sizeof(conn->last_sqlstate));
+ else if (id == PG_DIAG_STATEMENT_POSITION)
+ have_position = true;
+ }
+
+ /*
+ * Save the active query text, if any, into res as well; but only if we
+ * might need it for an error cursor display, which is only true if there
+ * is a PG_DIAG_STATEMENT_POSITION field.
+ */
+ if (have_position && res && conn->cmd_queue_head && conn->cmd_queue_head->query)
+ res->errQuery = pqResultStrdup(res, conn->cmd_queue_head->query);
+
+ /*
+ * Now build the "overall" error message for PQresultErrorMessage.
+ */
+ resetPQExpBuffer(&workBuf);
+ pqBuildErrorMessage3(&workBuf, res, conn->verbosity, conn->show_context);
+
+ /*
+ * Either save error as current async result, or just emit the notice.
+ */
+ if (isError)
+ {
+ if (res)
+ pqSetResultError(res, &workBuf);
+ pqClearAsyncResult(conn); /* redundant, but be safe */
+ conn->result = res;
+ if (PQExpBufferDataBroken(workBuf))
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ else
+ appendPQExpBufferStr(&conn->errorMessage, workBuf.data);
+ }
+ else
+ {
+ /* if we couldn't allocate the result set, just discard the NOTICE */
+ if (res)
+ {
+ /*
+ * We can cheat a little here and not copy the message. But if we
+ * were unlucky enough to run out of memory while filling workBuf,
+ * insert "out of memory", as in pqSetResultError.
+ */
+ if (PQExpBufferDataBroken(workBuf))
+ res->errMsg = libpq_gettext("out of memory\n");
+ else
+ res->errMsg = workBuf.data;
+ if (res->noticeHooks.noticeRec != NULL)
+ res->noticeHooks.noticeRec(res->noticeHooks.noticeRecArg, res);
+ PQclear(res);
+ }
+ }
+
+ termPQExpBuffer(&workBuf);
+ return 0;
+
+fail:
+ PQclear(res);
+ termPQExpBuffer(&workBuf);
+ return EOF;
+}
+
+/*
+ * Construct an error message from the fields in the given PGresult,
+ * appending it to the contents of "msg".
+ */
+void
+pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
+ PGVerbosity verbosity, PGContextVisibility show_context)
+{
+ const char *val;
+ const char *querytext = NULL;
+ int querypos = 0;
+
+ /* If we couldn't allocate a PGresult, just say "out of memory" */
+ if (res == NULL)
+ {
+ appendPQExpBufferStr(msg, libpq_gettext("out of memory\n"));
+ return;
+ }
+
+ /*
+ * If we don't have any broken-down fields, just return the base message.
+ * This mainly applies if we're given a libpq-generated error result.
+ */
+ if (res->errFields == NULL)
+ {
+ if (res->errMsg && res->errMsg[0])
+ appendPQExpBufferStr(msg, res->errMsg);
+ else
+ appendPQExpBufferStr(msg, libpq_gettext("no error message available\n"));
+ return;
+ }
+
+ /* Else build error message from relevant fields */
+ val = PQresultErrorField(res, PG_DIAG_SEVERITY);
+ if (val)
+ appendPQExpBuffer(msg, "%s: ", val);
+
+ if (verbosity == PQERRORS_SQLSTATE)
+ {
+ /*
+ * If we have a SQLSTATE, print that and nothing else. If not (which
+ * shouldn't happen for server-generated errors, but might possibly
+ * happen for libpq-generated ones), fall back to TERSE format, as
+ * that seems better than printing nothing at all.
+ */
+ val = PQresultErrorField(res, PG_DIAG_SQLSTATE);
+ if (val)
+ {
+ appendPQExpBuffer(msg, "%s\n", val);
+ return;
+ }
+ verbosity = PQERRORS_TERSE;
+ }
+
+ if (verbosity == PQERRORS_VERBOSE)
+ {
+ val = PQresultErrorField(res, PG_DIAG_SQLSTATE);
+ if (val)
+ appendPQExpBuffer(msg, "%s: ", val);
+ }
+ val = PQresultErrorField(res, PG_DIAG_MESSAGE_PRIMARY);
+ if (val)
+ appendPQExpBufferStr(msg, val);
+ val = PQresultErrorField(res, PG_DIAG_STATEMENT_POSITION);
+ if (val)
+ {
+ if (verbosity != PQERRORS_TERSE && res->errQuery != NULL)
+ {
+ /* emit position as a syntax cursor display */
+ querytext = res->errQuery;
+ querypos = atoi(val);
+ }
+ else
+ {
+ /* emit position as text addition to primary message */
+ /* translator: %s represents a digit string */
+ appendPQExpBuffer(msg, libpq_gettext(" at character %s"),
+ val);
+ }
+ }
+ else
+ {
+ val = PQresultErrorField(res, PG_DIAG_INTERNAL_POSITION);
+ if (val)
+ {
+ querytext = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
+ if (verbosity != PQERRORS_TERSE && querytext != NULL)
+ {
+ /* emit position as a syntax cursor display */
+ querypos = atoi(val);
+ }
+ else
+ {
+ /* emit position as text addition to primary message */
+ /* translator: %s represents a digit string */
+ appendPQExpBuffer(msg, libpq_gettext(" at character %s"),
+ val);
+ }
+ }
+ }
+ appendPQExpBufferChar(msg, '\n');
+ if (verbosity != PQERRORS_TERSE)
+ {
+ if (querytext && querypos > 0)
+ reportErrorPosition(msg, querytext, querypos,
+ res->client_encoding);
+ val = PQresultErrorField(res, PG_DIAG_MESSAGE_DETAIL);
+ if (val)
+ appendPQExpBuffer(msg, libpq_gettext("DETAIL: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_MESSAGE_HINT);
+ if (val)
+ appendPQExpBuffer(msg, libpq_gettext("HINT: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
+ if (val)
+ appendPQExpBuffer(msg, libpq_gettext("QUERY: %s\n"), val);
+ if (show_context == PQSHOW_CONTEXT_ALWAYS ||
+ (show_context == PQSHOW_CONTEXT_ERRORS &&
+ res->resultStatus == PGRES_FATAL_ERROR))
+ {
+ val = PQresultErrorField(res, PG_DIAG_CONTEXT);
+ if (val)
+ appendPQExpBuffer(msg, libpq_gettext("CONTEXT: %s\n"),
+ val);
+ }
+ }
+ if (verbosity == PQERRORS_VERBOSE)
+ {
+ val = PQresultErrorField(res, PG_DIAG_SCHEMA_NAME);
+ if (val)
+ appendPQExpBuffer(msg,
+ libpq_gettext("SCHEMA NAME: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_TABLE_NAME);
+ if (val)
+ appendPQExpBuffer(msg,
+ libpq_gettext("TABLE NAME: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_COLUMN_NAME);
+ if (val)
+ appendPQExpBuffer(msg,
+ libpq_gettext("COLUMN NAME: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_DATATYPE_NAME);
+ if (val)
+ appendPQExpBuffer(msg,
+ libpq_gettext("DATATYPE NAME: %s\n"), val);
+ val = PQresultErrorField(res, PG_DIAG_CONSTRAINT_NAME);
+ if (val)
+ appendPQExpBuffer(msg,
+ libpq_gettext("CONSTRAINT NAME: %s\n"), val);
+ }
+ if (verbosity == PQERRORS_VERBOSE)
+ {
+ const char *valf;
+ const char *vall;
+
+ valf = PQresultErrorField(res, PG_DIAG_SOURCE_FILE);
+ vall = PQresultErrorField(res, PG_DIAG_SOURCE_LINE);
+ val = PQresultErrorField(res, PG_DIAG_SOURCE_FUNCTION);
+ if (val || valf || vall)
+ {
+ appendPQExpBufferStr(msg, libpq_gettext("LOCATION: "));
+ if (val)
+ appendPQExpBuffer(msg, libpq_gettext("%s, "), val);
+ if (valf && vall) /* unlikely we'd have just one */
+ appendPQExpBuffer(msg, libpq_gettext("%s:%s"),
+ valf, vall);
+ appendPQExpBufferChar(msg, '\n');
+ }
+ }
+}
+
+/*
+ * Add an error-location display to the error message under construction.
+ *
+ * The cursor location is measured in logical characters; the query string
+ * is presumed to be in the specified encoding.
+ */
+static void
+reportErrorPosition(PQExpBuffer msg, const char *query, int loc, int encoding)
+{
+#define DISPLAY_SIZE 60 /* screen width limit, in screen cols */
+#define MIN_RIGHT_CUT 10 /* try to keep this far away from EOL */
+
+ char *wquery;
+ int slen,
+ cno,
+ i,
+ *qidx,
+ *scridx,
+ qoffset,
+ scroffset,
+ ibeg,
+ iend,
+ loc_line;
+ bool mb_encoding,
+ beg_trunc,
+ end_trunc;
+
+ /* Convert loc from 1-based to 0-based; no-op if out of range */
+ loc--;
+ if (loc < 0)
+ return;
+
+ /* Need a writable copy of the query */
+ wquery = strdup(query);
+ if (wquery == NULL)
+ return; /* fail silently if out of memory */
+
+ /*
+ * Each character might occupy multiple physical bytes in the string, and
+ * in some Far Eastern character sets it might take more than one screen
+ * column as well. We compute the starting byte offset and starting
+ * screen column of each logical character, and store these in qidx[] and
+ * scridx[] respectively.
+ */
+
+ /* we need a safe allocation size... */
+ slen = strlen(wquery) + 1;
+
+ qidx = (int *) malloc(slen * sizeof(int));
+ if (qidx == NULL)
+ {
+ free(wquery);
+ return;
+ }
+ scridx = (int *) malloc(slen * sizeof(int));
+ if (scridx == NULL)
+ {
+ free(qidx);
+ free(wquery);
+ return;
+ }
+
+ /* We can optimize a bit if it's a single-byte encoding */
+ mb_encoding = (pg_encoding_max_length(encoding) != 1);
+
+ /*
+ * Within the scanning loop, cno is the current character's logical
+ * number, qoffset is its offset in wquery, and scroffset is its starting
+ * logical screen column (all indexed from 0). "loc" is the logical
+ * character number of the error location. We scan to determine loc_line
+ * (the 1-based line number containing loc) and ibeg/iend (first character
+ * number and last+1 character number of the line containing loc). Note
+ * that qidx[] and scridx[] are filled only as far as iend.
+ */
+ qoffset = 0;
+ scroffset = 0;
+ loc_line = 1;
+ ibeg = 0;
+ iend = -1; /* -1 means not set yet */
+
+ for (cno = 0; wquery[qoffset] != '\0'; cno++)
+ {
+ char ch = wquery[qoffset];
+
+ qidx[cno] = qoffset;
+ scridx[cno] = scroffset;
+
+ /*
+ * Replace tabs with spaces in the writable copy. (Later we might
+ * want to think about coping with their variable screen width, but
+ * not today.)
+ */
+ if (ch == '\t')
+ wquery[qoffset] = ' ';
+
+ /*
+ * If end-of-line, count lines and mark positions. Each \r or \n
+ * counts as a line except when \r \n appear together.
+ */
+ else if (ch == '\r' || ch == '\n')
+ {
+ if (cno < loc)
+ {
+ if (ch == '\r' ||
+ cno == 0 ||
+ wquery[qidx[cno - 1]] != '\r')
+ loc_line++;
+ /* extract beginning = last line start before loc. */
+ ibeg = cno + 1;
+ }
+ else
+ {
+ /* set extract end. */
+ iend = cno;
+ /* done scanning. */
+ break;
+ }
+ }
+
+ /* Advance */
+ if (mb_encoding)
+ {
+ int w;
+
+ w = pg_encoding_dsplen(encoding, &wquery[qoffset]);
+ /* treat any non-tab control chars as width 1 */
+ if (w <= 0)
+ w = 1;
+ scroffset += w;
+ qoffset += PQmblenBounded(&wquery[qoffset], encoding);
+ }
+ else
+ {
+ /* We assume wide chars only exist in multibyte encodings */
+ scroffset++;
+ qoffset++;
+ }
+ }
+ /* Fix up if we didn't find an end-of-line after loc */
+ if (iend < 0)
+ {
+ iend = cno; /* query length in chars, +1 */
+ qidx[iend] = qoffset;
+ scridx[iend] = scroffset;
+ }
+
+ /* Print only if loc is within computed query length */
+ if (loc <= cno)
+ {
+ /* If the line extracted is too long, we truncate it. */
+ beg_trunc = false;
+ end_trunc = false;
+ if (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
+ {
+ /*
+ * We first truncate right if it is enough. This code might be
+ * off a space or so on enforcing MIN_RIGHT_CUT if there's a wide
+ * character right there, but that should be okay.
+ */
+ if (scridx[ibeg] + DISPLAY_SIZE >= scridx[loc] + MIN_RIGHT_CUT)
+ {
+ while (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
+ iend--;
+ end_trunc = true;
+ }
+ else
+ {
+ /* Truncate right if not too close to loc. */
+ while (scridx[loc] + MIN_RIGHT_CUT < scridx[iend])
+ {
+ iend--;
+ end_trunc = true;
+ }
+
+ /* Truncate left if still too long. */
+ while (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
+ {
+ ibeg++;
+ beg_trunc = true;
+ }
+ }
+ }
+
+ /* truncate working copy at desired endpoint */
+ wquery[qidx[iend]] = '\0';
+
+ /* Begin building the finished message. */
+ i = msg->len;
+ appendPQExpBuffer(msg, libpq_gettext("LINE %d: "), loc_line);
+ if (beg_trunc)
+ appendPQExpBufferStr(msg, "...");
+
+ /*
+ * While we have the prefix in the msg buffer, compute its screen
+ * width.
+ */
+ scroffset = 0;
+ for (; i < msg->len; i += PQmblenBounded(&msg->data[i], encoding))
+ {
+ int w = pg_encoding_dsplen(encoding, &msg->data[i]);
+
+ if (w <= 0)
+ w = 1;
+ scroffset += w;
+ }
+
+ /* Finish up the LINE message line. */
+ appendPQExpBufferStr(msg, &wquery[qidx[ibeg]]);
+ if (end_trunc)
+ appendPQExpBufferStr(msg, "...");
+ appendPQExpBufferChar(msg, '\n');
+
+ /* Now emit the cursor marker line. */
+ scroffset += scridx[loc] - scridx[ibeg];
+ for (i = 0; i < scroffset; i++)
+ appendPQExpBufferChar(msg, ' ');
+ appendPQExpBufferChar(msg, '^');
+ appendPQExpBufferChar(msg, '\n');
+ }
+
+ /* Clean up. */
+ free(scridx);
+ free(qidx);
+ free(wquery);
+}
+
+
+/*
+ * Attempt to read a ParameterStatus message.
+ * This is possible in several places, so we break it out as a subroutine.
+ * Entry: 'S' message type and length have already been consumed.
+ * Exit: returns 0 if successfully consumed message.
+ * returns EOF if not enough data.
+ */
+static int
+getParameterStatus(PGconn *conn)
+{
+ PQExpBufferData valueBuf;
+
+ /* Get the parameter name */
+ if (pqGets(&conn->workBuffer, conn))
+ return EOF;
+ /* Get the parameter value (could be large) */
+ initPQExpBuffer(&valueBuf);
+ if (pqGets(&valueBuf, conn))
+ {
+ termPQExpBuffer(&valueBuf);
+ return EOF;
+ }
+ /* And save it */
+ pqSaveParameterStatus(conn, conn->workBuffer.data, valueBuf.data);
+ termPQExpBuffer(&valueBuf);
+ return 0;
+}
+
+
+/*
+ * Attempt to read a Notify response message.
+ * This is possible in several places, so we break it out as a subroutine.
+ * Entry: 'A' message type and length have already been consumed.
+ * Exit: returns 0 if successfully consumed Notify message.
+ * returns EOF if not enough data.
+ */
+static int
+getNotify(PGconn *conn)
+{
+ int be_pid;
+ char *svname;
+ int nmlen;
+ int extralen;
+ PGnotify *newNotify;
+
+ if (pqGetInt(&be_pid, 4, conn))
+ return EOF;
+ if (pqGets(&conn->workBuffer, conn))
+ return EOF;
+ /* must save name while getting extra string */
+ svname = strdup(conn->workBuffer.data);
+ if (!svname)
+ return EOF;
+ if (pqGets(&conn->workBuffer, conn))
+ {
+ free(svname);
+ return EOF;
+ }
+
+ /*
+ * Store the strings right after the PQnotify structure so it can all be
+ * freed at once. We don't use NAMEDATALEN because we don't want to tie
+ * this interface to a specific server name length.
+ */
+ nmlen = strlen(svname);
+ extralen = strlen(conn->workBuffer.data);
+ newNotify = (PGnotify *) malloc(sizeof(PGnotify) + nmlen + extralen + 2);
+ if (newNotify)
+ {
+ newNotify->relname = (char *) newNotify + sizeof(PGnotify);
+ strcpy(newNotify->relname, svname);
+ newNotify->extra = newNotify->relname + nmlen + 1;
+ strcpy(newNotify->extra, conn->workBuffer.data);
+ newNotify->be_pid = be_pid;
+ newNotify->next = NULL;
+ if (conn->notifyTail)
+ conn->notifyTail->next = newNotify;
+ else
+ conn->notifyHead = newNotify;
+ conn->notifyTail = newNotify;
+ }
+
+ free(svname);
+ return 0;
+}
+
+/*
+ * getCopyStart - process CopyInResponse, CopyOutResponse or
+ * CopyBothResponse message
+ *
+ * parseInput already read the message type and length.
+ */
+static int
+getCopyStart(PGconn *conn, ExecStatusType copytype)
+{
+ PGresult *result;
+ int nfields;
+ int i;
+
+ result = PQmakeEmptyPGresult(conn, copytype);
+ if (!result)
+ goto failure;
+
+ if (pqGetc(&conn->copy_is_binary, conn))
+ goto failure;
+ result->binary = conn->copy_is_binary;
+ /* the next two bytes are the number of fields */
+ if (pqGetInt(&(result->numAttributes), 2, conn))
+ goto failure;
+ nfields = result->numAttributes;
+
+ /* allocate space for the attribute descriptors */
+ if (nfields > 0)
+ {
+ result->attDescs = (PGresAttDesc *)
+ pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true);
+ if (!result->attDescs)
+ goto failure;
+ MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc));
+ }
+
+ for (i = 0; i < nfields; i++)
+ {
+ int format;
+
+ if (pqGetInt(&format, 2, conn))
+ goto failure;
+
+ /*
+ * Since pqGetInt treats 2-byte integers as unsigned, we need to
+ * coerce these results to signed form.
+ */
+ format = (int) ((int16) format);
+ result->attDescs[i].format = format;
+ }
+
+ /* Success! */
+ conn->result = result;
+ return 0;
+
+failure:
+ PQclear(result);
+ return EOF;
+}
+
+/*
+ * getReadyForQuery - process ReadyForQuery message
+ */
+static int
+getReadyForQuery(PGconn *conn)
+{
+ char xact_status;
+
+ if (pqGetc(&xact_status, conn))
+ return EOF;
+ switch (xact_status)
+ {
+ case 'I':
+ conn->xactStatus = PQTRANS_IDLE;
+ break;
+ case 'T':
+ conn->xactStatus = PQTRANS_INTRANS;
+ break;
+ case 'E':
+ conn->xactStatus = PQTRANS_INERROR;
+ break;
+ default:
+ conn->xactStatus = PQTRANS_UNKNOWN;
+ break;
+ }
+
+ return 0;
+}
+
+/*
+ * getCopyDataMessage - fetch next CopyData message, process async messages
+ *
+ * Returns length word of CopyData message (> 0), or 0 if no complete
+ * message available, -1 if end of copy, -2 if error.
+ */
+static int
+getCopyDataMessage(PGconn *conn)
+{
+ char id;
+ int msgLength;
+ int avail;
+
+ for (;;)
+ {
+ /*
+ * Do we have the next input message? To make life simpler for async
+ * callers, we keep returning 0 until the next message is fully
+ * available, even if it is not Copy Data.
+ */
+ conn->inCursor = conn->inStart;
+ if (pqGetc(&id, conn))
+ return 0;
+ if (pqGetInt(&msgLength, 4, conn))
+ return 0;
+ if (msgLength < 4)
+ {
+ handleSyncLoss(conn, id, msgLength);
+ return -2;
+ }
+ avail = conn->inEnd - conn->inCursor;
+ if (avail < msgLength - 4)
+ {
+ /*
+ * Before returning, enlarge the input buffer if needed to hold
+ * the whole message. See notes in parseInput.
+ */
+ if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength - 4,
+ conn))
+ {
+ /*
+ * XXX add some better recovery code... plan is to skip over
+ * the message using its length, then report an error. For the
+ * moment, just treat this like loss of sync (which indeed it
+ * might be!)
+ */
+ handleSyncLoss(conn, id, msgLength);
+ return -2;
+ }
+ return 0;
+ }
+
+ /*
+ * If it's a legitimate async message type, process it. (NOTIFY
+ * messages are not currently possible here, but we handle them for
+ * completeness.) Otherwise, if it's anything except Copy Data,
+ * report end-of-copy.
+ */
+ switch (id)
+ {
+ case 'A': /* NOTIFY */
+ if (getNotify(conn))
+ return 0;
+ break;
+ case 'N': /* NOTICE */
+ if (pqGetErrorNotice3(conn, false))
+ return 0;
+ break;
+ case 'S': /* ParameterStatus */
+ if (getParameterStatus(conn))
+ return 0;
+ break;
+ case 'd': /* Copy Data, pass it back to caller */
+ return msgLength;
+ case 'c':
+
+ /*
+ * If this is a CopyDone message, exit COPY_OUT mode and let
+ * caller read status with PQgetResult(). If we're in
+ * COPY_BOTH mode, return to COPY_IN mode.
+ */
+ if (conn->asyncStatus == PGASYNC_COPY_BOTH)
+ conn->asyncStatus = PGASYNC_COPY_IN;
+ else
+ conn->asyncStatus = PGASYNC_BUSY;
+ return -1;
+ default: /* treat as end of copy */
+
+ /*
+ * Any other message terminates either COPY_IN or COPY_BOTH
+ * mode.
+ */
+ conn->asyncStatus = PGASYNC_BUSY;
+ return -1;
+ }
+
+ /* trace server-to-client message */
+ if (conn->Pfdebug)
+ pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
+
+ /* Drop the processed message and loop around for another */
+ conn->inStart = conn->inCursor;
+ }
+}
+
+/*
+ * PQgetCopyData - read a row of data from the backend during COPY OUT
+ * or COPY BOTH
+ *
+ * If successful, sets *buffer to point to a malloc'd row of data, and
+ * returns row length (always > 0) as result.
+ * Returns 0 if no row available yet (only possible if async is true),
+ * -1 if end of copy (consult PQgetResult), or -2 if error (consult
+ * PQerrorMessage).
+ */
+int
+pqGetCopyData3(PGconn *conn, char **buffer, int async)
+{
+ int msgLength;
+
+ for (;;)
+ {
+ /*
+ * Collect the next input message. To make life simpler for async
+ * callers, we keep returning 0 until the next message is fully
+ * available, even if it is not Copy Data.
+ */
+ msgLength = getCopyDataMessage(conn);
+ if (msgLength < 0)
+ return msgLength; /* end-of-copy or error */
+ if (msgLength == 0)
+ {
+ /* Don't block if async read requested */
+ if (async)
+ return 0;
+ /* Need to load more data */
+ if (pqWait(true, false, conn) ||
+ pqReadData(conn) < 0)
+ return -2;
+ continue;
+ }
+
+ /*
+ * Drop zero-length messages (shouldn't happen anyway). Otherwise
+ * pass the data back to the caller.
+ */
+ msgLength -= 4;
+ if (msgLength > 0)
+ {
+ *buffer = (char *) malloc(msgLength + 1);
+ if (*buffer == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return -2;
+ }
+ memcpy(*buffer, &conn->inBuffer[conn->inCursor], msgLength);
+ (*buffer)[msgLength] = '\0'; /* Add terminating null */
+
+ /* Mark message consumed */
+ conn->inStart = conn->inCursor + msgLength;
+
+ return msgLength;
+ }
+
+ /* Empty, so drop it and loop around for another */
+ conn->inStart = conn->inCursor;
+ }
+}
+
+/*
+ * PQgetline - gets a newline-terminated string from the backend.
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqGetline3(PGconn *conn, char *s, int maxlen)
+{
+ int status;
+
+ if (conn->sock == PGINVALID_SOCKET ||
+ (conn->asyncStatus != PGASYNC_COPY_OUT &&
+ conn->asyncStatus != PGASYNC_COPY_BOTH) ||
+ conn->copy_is_binary)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("PQgetline: not doing text COPY OUT\n"));
+ *s = '\0';
+ return EOF;
+ }
+
+ while ((status = PQgetlineAsync(conn, s, maxlen - 1)) == 0)
+ {
+ /* need to load more data */
+ if (pqWait(true, false, conn) ||
+ pqReadData(conn) < 0)
+ {
+ *s = '\0';
+ return EOF;
+ }
+ }
+
+ if (status < 0)
+ {
+ /* End of copy detected; gin up old-style terminator */
+ strcpy(s, "\\.");
+ return 0;
+ }
+
+ /* Add null terminator, and strip trailing \n if present */
+ if (s[status - 1] == '\n')
+ {
+ s[status - 1] = '\0';
+ return 0;
+ }
+ else
+ {
+ s[status] = '\0';
+ return 1;
+ }
+}
+
+/*
+ * PQgetlineAsync - gets a COPY data row without blocking.
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize)
+{
+ int msgLength;
+ int avail;
+
+ if (conn->asyncStatus != PGASYNC_COPY_OUT
+ && conn->asyncStatus != PGASYNC_COPY_BOTH)
+ return -1; /* we are not doing a copy... */
+
+ /*
+ * Recognize the next input message. To make life simpler for async
+ * callers, we keep returning 0 until the next message is fully available
+ * even if it is not Copy Data. This should keep PQendcopy from blocking.
+ * (Note: unlike pqGetCopyData3, we do not change asyncStatus here.)
+ */
+ msgLength = getCopyDataMessage(conn);
+ if (msgLength < 0)
+ return -1; /* end-of-copy or error */
+ if (msgLength == 0)
+ return 0; /* no data yet */
+
+ /*
+ * Move data from libpq's buffer to the caller's. In the case where a
+ * prior call found the caller's buffer too small, we use
+ * conn->copy_already_done to remember how much of the row was already
+ * returned to the caller.
+ */
+ conn->inCursor += conn->copy_already_done;
+ avail = msgLength - 4 - conn->copy_already_done;
+ if (avail <= bufsize)
+ {
+ /* Able to consume the whole message */
+ memcpy(buffer, &conn->inBuffer[conn->inCursor], avail);
+ /* Mark message consumed */
+ conn->inStart = conn->inCursor + avail;
+ /* Reset state for next time */
+ conn->copy_already_done = 0;
+ return avail;
+ }
+ else
+ {
+ /* We must return a partial message */
+ memcpy(buffer, &conn->inBuffer[conn->inCursor], bufsize);
+ /* The message is NOT consumed from libpq's buffer */
+ conn->copy_already_done += bufsize;
+ return bufsize;
+ }
+}
+
+/*
+ * PQendcopy
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqEndcopy3(PGconn *conn)
+{
+ PGresult *result;
+
+ if (conn->asyncStatus != PGASYNC_COPY_IN &&
+ conn->asyncStatus != PGASYNC_COPY_OUT &&
+ conn->asyncStatus != PGASYNC_COPY_BOTH)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ return 1;
+ }
+
+ /* Send the CopyDone message if needed */
+ if (conn->asyncStatus == PGASYNC_COPY_IN ||
+ conn->asyncStatus == PGASYNC_COPY_BOTH)
+ {
+ if (pqPutMsgStart('c', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return 1;
+
+ /*
+ * If we sent the COPY command in extended-query mode, we must issue a
+ * Sync as well.
+ */
+ if (conn->cmd_queue_head &&
+ conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE)
+ {
+ if (pqPutMsgStart('S', conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return 1;
+ }
+ }
+
+ /*
+ * make sure no data is waiting to be sent, abort if we are non-blocking
+ * and the flush fails
+ */
+ if (pqFlush(conn) && pqIsnonblocking(conn))
+ return 1;
+
+ /* Return to active duty */
+ conn->asyncStatus = PGASYNC_BUSY;
+
+ /*
+ * Non blocking connections may have to abort at this point. If everyone
+ * played the game there should be no problem, but in error scenarios the
+ * expected messages may not have arrived yet. (We are assuming that the
+ * backend's packetizing will ensure that CommandComplete arrives along
+ * with the CopyDone; are there corner cases where that doesn't happen?)
+ */
+ if (pqIsnonblocking(conn) && PQisBusy(conn))
+ return 1;
+
+ /* Wait for the completion response */
+ result = PQgetResult(conn);
+
+ /* Expecting a successful result */
+ if (result && result->resultStatus == PGRES_COMMAND_OK)
+ {
+ PQclear(result);
+ return 0;
+ }
+
+ /*
+ * Trouble. For backwards-compatibility reasons, we issue the error
+ * message as if it were a notice (would be nice to get rid of this
+ * silliness, but too many apps probably don't handle errors from
+ * PQendcopy reasonably). Note that the app can still obtain the error
+ * status from the PGconn object.
+ */
+ if (conn->errorMessage.len > 0)
+ {
+ /* We have to strip the trailing newline ... pain in neck... */
+ char svLast = conn->errorMessage.data[conn->errorMessage.len - 1];
+
+ if (svLast == '\n')
+ conn->errorMessage.data[conn->errorMessage.len - 1] = '\0';
+ pqInternalNotice(&conn->noticeHooks, "%s", conn->errorMessage.data);
+ conn->errorMessage.data[conn->errorMessage.len - 1] = svLast;
+ }
+
+ PQclear(result);
+
+ return 1;
+}
+
+
+/*
+ * PQfn - Send a function call to the POSTGRES backend.
+ *
+ * See fe-exec.c for documentation.
+ */
+PGresult *
+pqFunctionCall3(PGconn *conn, Oid fnid,
+ int *result_buf, int *actual_result_len,
+ int result_is_int,
+ const PQArgBlock *args, int nargs)
+{
+ bool needInput = false;
+ ExecStatusType status = PGRES_FATAL_ERROR;
+ char id;
+ int msgLength;
+ int avail;
+ int i;
+
+ /* already validated by PQfn */
+ Assert(conn->pipelineStatus == PQ_PIPELINE_OFF);
+
+ /* PQfn already validated connection state */
+
+ if (pqPutMsgStart('F', conn) < 0 || /* function call msg */
+ pqPutInt(fnid, 4, conn) < 0 || /* function id */
+ pqPutInt(1, 2, conn) < 0 || /* # of format codes */
+ pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */
+ pqPutInt(nargs, 2, conn) < 0) /* # of args */
+ {
+ /* error message should be set up already */
+ return NULL;
+ }
+
+ for (i = 0; i < nargs; ++i)
+ { /* len.int4 + contents */
+ if (pqPutInt(args[i].len, 4, conn))
+ return NULL;
+ if (args[i].len == -1)
+ continue; /* it's NULL */
+
+ if (args[i].isint)
+ {
+ if (pqPutInt(args[i].u.integer, args[i].len, conn))
+ return NULL;
+ }
+ else
+ {
+ if (pqPutnchar((char *) args[i].u.ptr, args[i].len, conn))
+ return NULL;
+ }
+ }
+
+ if (pqPutInt(1, 2, conn) < 0) /* result format code: BINARY */
+ return NULL;
+
+ if (pqPutMsgEnd(conn) < 0 ||
+ pqFlush(conn))
+ return NULL;
+
+ for (;;)
+ {
+ if (needInput)
+ {
+ /* Wait for some data to arrive (or for the channel to close) */
+ if (pqWait(true, false, conn) ||
+ pqReadData(conn) < 0)
+ break;
+ }
+
+ /*
+ * Scan the message. If we run out of data, loop around to try again.
+ */
+ needInput = true;
+
+ conn->inCursor = conn->inStart;
+ if (pqGetc(&id, conn))
+ continue;
+ if (pqGetInt(&msgLength, 4, conn))
+ continue;
+
+ /*
+ * Try to validate message type/length here. A length less than 4 is
+ * definitely broken. Large lengths should only be believed for a few
+ * message types.
+ */
+ if (msgLength < 4)
+ {
+ handleSyncLoss(conn, id, msgLength);
+ break;
+ }
+ if (msgLength > 30000 && !VALID_LONG_MESSAGE_TYPE(id))
+ {
+ handleSyncLoss(conn, id, msgLength);
+ break;
+ }
+
+ /*
+ * Can't process if message body isn't all here yet.
+ */
+ msgLength -= 4;
+ avail = conn->inEnd - conn->inCursor;
+ if (avail < msgLength)
+ {
+ /*
+ * Before looping, enlarge the input buffer if needed to hold the
+ * whole message. See notes in parseInput.
+ */
+ if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
+ conn))
+ {
+ /*
+ * XXX add some better recovery code... plan is to skip over
+ * the message using its length, then report an error. For the
+ * moment, just treat this like loss of sync (which indeed it
+ * might be!)
+ */
+ handleSyncLoss(conn, id, msgLength);
+ break;
+ }
+ continue;
+ }
+
+ /*
+ * We should see V or E response to the command, but might get N
+ * and/or A notices first. We also need to swallow the final Z before
+ * returning.
+ */
+ switch (id)
+ {
+ case 'V': /* function result */
+ if (pqGetInt(actual_result_len, 4, conn))
+ continue;
+ if (*actual_result_len != -1)
+ {
+ if (result_is_int)
+ {
+ if (pqGetInt(result_buf, *actual_result_len, conn))
+ continue;
+ }
+ else
+ {
+ if (pqGetnchar((char *) result_buf,
+ *actual_result_len,
+ conn))
+ continue;
+ }
+ }
+ /* correctly finished function result message */
+ status = PGRES_COMMAND_OK;
+ break;
+ case 'E': /* error return */
+ if (pqGetErrorNotice3(conn, true))
+ continue;
+ status = PGRES_FATAL_ERROR;
+ break;
+ case 'A': /* notify message */
+ /* handle notify and go back to processing return values */
+ if (getNotify(conn))
+ continue;
+ break;
+ case 'N': /* notice */
+ /* handle notice and go back to processing return values */
+ if (pqGetErrorNotice3(conn, false))
+ continue;
+ break;
+ case 'Z': /* backend is ready for new query */
+ if (getReadyForQuery(conn))
+ continue;
+ /* consume the message and exit */
+ conn->inStart += 5 + msgLength;
+ /* if we saved a result object (probably an error), use it */
+ if (conn->result)
+ return pqPrepareAsyncResult(conn);
+ return PQmakeEmptyPGresult(conn, status);
+ case 'S': /* parameter status */
+ if (getParameterStatus(conn))
+ continue;
+ break;
+ default:
+ /* The backend violates the protocol. */
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("protocol error: id=0x%x\n"),
+ id);
+ pqSaveErrorResult(conn);
+ /* trust the specified message length as what to skip */
+ conn->inStart += 5 + msgLength;
+ return pqPrepareAsyncResult(conn);
+ }
+
+ /* trace server-to-client message */
+ if (conn->Pfdebug)
+ pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
+
+ /* Completed this message, keep going */
+ /* trust the specified message length as what to skip */
+ conn->inStart += 5 + msgLength;
+ needInput = false;
+ }
+
+ /*
+ * We fall out of the loop only upon failing to read data.
+ * conn->errorMessage has been set by pqWait or pqReadData. We want to
+ * append it to any already-received error message.
+ */
+ pqSaveErrorResult(conn);
+ return pqPrepareAsyncResult(conn);
+}
+
+
+/*
+ * Construct startup packet
+ *
+ * Returns a malloc'd packet buffer, or NULL if out of memory
+ */
+char *
+pqBuildStartupPacket3(PGconn *conn, int *packetlen,
+ const PQEnvironmentOption *options)
+{
+ char *startpacket;
+
+ *packetlen = build_startup_packet(conn, NULL, options);
+ startpacket = (char *) malloc(*packetlen);
+ if (!startpacket)
+ return NULL;
+ *packetlen = build_startup_packet(conn, startpacket, options);
+ return startpacket;
+}
+
+/*
+ * Build a startup packet given a filled-in PGconn structure.
+ *
+ * We need to figure out how much space is needed, then fill it in.
+ * To avoid duplicate logic, this routine is called twice: the first time
+ * (with packet == NULL) just counts the space needed, the second time
+ * (with packet == allocated space) fills it in. Return value is the number
+ * of bytes used.
+ */
+static int
+build_startup_packet(const PGconn *conn, char *packet,
+ const PQEnvironmentOption *options)
+{
+ int packet_len = 0;
+ const PQEnvironmentOption *next_eo;
+ const char *val;
+
+ /* Protocol version comes first. */
+ if (packet)
+ {
+ ProtocolVersion pv = pg_hton32(conn->pversion);
+
+ memcpy(packet + packet_len, &pv, sizeof(ProtocolVersion));
+ }
+ packet_len += sizeof(ProtocolVersion);
+
+ /* Add user name, database name, options */
+
+#define ADD_STARTUP_OPTION(optname, optval) \
+ do { \
+ if (packet) \
+ strcpy(packet + packet_len, optname); \
+ packet_len += strlen(optname) + 1; \
+ if (packet) \
+ strcpy(packet + packet_len, optval); \
+ packet_len += strlen(optval) + 1; \
+ } while(0)
+
+ if (conn->pguser && conn->pguser[0])
+ ADD_STARTUP_OPTION("user", conn->pguser);
+ if (conn->dbName && conn->dbName[0])
+ ADD_STARTUP_OPTION("database", conn->dbName);
+ if (conn->replication && conn->replication[0])
+ ADD_STARTUP_OPTION("replication", conn->replication);
+ if (conn->pgoptions && conn->pgoptions[0])
+ ADD_STARTUP_OPTION("options", conn->pgoptions);
+ if (conn->send_appname)
+ {
+ /* Use appname if present, otherwise use fallback */
+ val = conn->appname ? conn->appname : conn->fbappname;
+ if (val && val[0])
+ ADD_STARTUP_OPTION("application_name", val);
+ }
+
+ if (conn->client_encoding_initial && conn->client_encoding_initial[0])
+ ADD_STARTUP_OPTION("client_encoding", conn->client_encoding_initial);
+
+ /* Add any environment-driven GUC settings needed */
+ for (next_eo = options; next_eo->envName; next_eo++)
+ {
+ if ((val = getenv(next_eo->envName)) != NULL)
+ {
+ if (pg_strcasecmp(val, "default") != 0)
+ ADD_STARTUP_OPTION(next_eo->pgName, val);
+ }
+ }
+
+ /* Add trailing terminator */
+ if (packet)
+ packet[packet_len] = '\0';
+ packet_len++;
+
+ return packet_len;
+}
diff --git a/src/interfaces/libpq/fe-secure-common.c b/src/interfaces/libpq/fe-secure-common.c
new file mode 100644
index 0000000..afa5d13
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure-common.c
@@ -0,0 +1,211 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure-common.c
+ *
+ * common implementation-independent SSL support code
+ *
+ * While fe-secure.c contains the interfaces that the rest of libpq call, this
+ * file contains support routines that are used by the library-specific
+ * implementations such as fe-secure-openssl.c.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure-common.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "fe-secure-common.h"
+
+#include "libpq-int.h"
+#include "pqexpbuffer.h"
+
+/*
+ * Check if a wildcard certificate matches the server hostname.
+ *
+ * The rule for this is:
+ * 1. We only match the '*' character as wildcard
+ * 2. We match only wildcards at the start of the string
+ * 3. The '*' character does *not* match '.', meaning that we match only
+ * a single pathname component.
+ * 4. We don't support more than one '*' in a single pattern.
+ *
+ * This is roughly in line with RFC2818, but contrary to what most browsers
+ * appear to be implementing (point 3 being the difference)
+ *
+ * Matching is always case-insensitive, since DNS is case insensitive.
+ */
+static bool
+wildcard_certificate_match(const char *pattern, const char *string)
+{
+ int lenpat = strlen(pattern);
+ int lenstr = strlen(string);
+
+ /* If we don't start with a wildcard, it's not a match (rule 1 & 2) */
+ if (lenpat < 3 ||
+ pattern[0] != '*' ||
+ pattern[1] != '.')
+ return false;
+
+ /* If pattern is longer than the string, we can never match */
+ if (lenpat > lenstr)
+ return false;
+
+ /*
+ * If string does not end in pattern (minus the wildcard), we don't match
+ */
+ if (pg_strcasecmp(pattern + 1, string + lenstr - lenpat + 1) != 0)
+ return false;
+
+ /*
+ * If there is a dot left of where the pattern started to match, we don't
+ * match (rule 3)
+ */
+ if (strchr(string, '.') < string + lenstr - lenpat)
+ return false;
+
+ /* String ended with pattern, and didn't have a dot before, so we match */
+ return true;
+}
+
+/*
+ * Check if a name from a server's certificate matches the peer's hostname.
+ *
+ * Returns 1 if the name matches, and 0 if it does not. On error, returns
+ * -1, and sets the libpq error message.
+ *
+ * The name extracted from the certificate is returned in *store_name. The
+ * caller is responsible for freeing it.
+ */
+int
+pq_verify_peer_name_matches_certificate_name(PGconn *conn,
+ const char *namedata, size_t namelen,
+ char **store_name)
+{
+ char *name;
+ int result;
+ char *host = conn->connhost[conn->whichhost].host;
+
+ *store_name = NULL;
+
+ if (!(host && host[0] != '\0'))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("host name must be specified\n"));
+ return -1;
+ }
+
+ /*
+ * There is no guarantee the string returned from the certificate is
+ * NULL-terminated, so make a copy that is.
+ */
+ name = malloc(namelen + 1);
+ if (name == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return -1;
+ }
+ memcpy(name, namedata, namelen);
+ name[namelen] = '\0';
+
+ /*
+ * Reject embedded NULLs in certificate common or alternative name to
+ * prevent attacks like CVE-2009-4034.
+ */
+ if (namelen != strlen(name))
+ {
+ free(name);
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL certificate's name contains embedded null\n"));
+ return -1;
+ }
+
+ if (pg_strcasecmp(name, host) == 0)
+ {
+ /* Exact name match */
+ result = 1;
+ }
+ else if (wildcard_certificate_match(name, host))
+ {
+ /* Matched wildcard name */
+ result = 1;
+ }
+ else
+ {
+ result = 0;
+ }
+
+ *store_name = name;
+ return result;
+}
+
+/*
+ * Verify that the server certificate matches the hostname we connected to.
+ *
+ * The certificate's Common Name and Subject Alternative Names are considered.
+ */
+bool
+pq_verify_peer_name_matches_certificate(PGconn *conn)
+{
+ char *host = conn->connhost[conn->whichhost].host;
+ int rc;
+ int names_examined = 0;
+ char *first_name = NULL;
+
+ /*
+ * If told not to verify the peer name, don't do it. Return true
+ * indicating that the verification was successful.
+ */
+ if (strcmp(conn->sslmode, "verify-full") != 0)
+ return true;
+
+ /* Check that we have a hostname to compare with. */
+ if (!(host && host[0] != '\0'))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("host name must be specified for a verified SSL connection\n"));
+ return false;
+ }
+
+ rc = pgtls_verify_peer_name_matches_certificate_guts(conn, &names_examined, &first_name);
+
+ if (rc == 0)
+ {
+ /*
+ * No match. Include the name from the server certificate in the error
+ * message, to aid debugging broken configurations. If there are
+ * multiple names, only print the first one to avoid an overly long
+ * error message.
+ */
+ if (names_examined > 1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_ngettext("server certificate for \"%s\" (and %d other name) does not match host name \"%s\"\n",
+ "server certificate for \"%s\" (and %d other names) does not match host name \"%s\"\n",
+ names_examined - 1),
+ first_name, names_examined - 1, host);
+ }
+ else if (names_examined == 1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("server certificate for \"%s\" does not match host name \"%s\"\n"),
+ first_name, host);
+ }
+ else
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not get server's host name from server certificate\n"));
+ }
+ }
+
+ /* clean up */
+ if (first_name)
+ free(first_name);
+
+ return (rc == 1);
+}
diff --git a/src/interfaces/libpq/fe-secure-common.h b/src/interfaces/libpq/fe-secure-common.h
new file mode 100644
index 0000000..2389f67
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure-common.h
@@ -0,0 +1,26 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure-common.h
+ *
+ * common implementation-independent SSL support code
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure-common.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef FE_SECURE_COMMON_H
+#define FE_SECURE_COMMON_H
+
+#include "libpq-fe.h"
+
+extern int pq_verify_peer_name_matches_certificate_name(PGconn *conn,
+ const char *namedata, size_t namelen,
+ char **store_name);
+extern bool pq_verify_peer_name_matches_certificate(PGconn *conn);
+
+#endif /* FE_SECURE_COMMON_H */
diff --git a/src/interfaces/libpq/fe-secure-gssapi.c b/src/interfaces/libpq/fe-secure-gssapi.c
new file mode 100644
index 0000000..c783a53
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure-gssapi.c
@@ -0,0 +1,731 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure-gssapi.c
+ * The front-end (client) encryption support for GSSAPI
+ *
+ * Portions Copyright (c) 2016-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure-gssapi.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include "fe-gssapi-common.h"
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "port/pg_bswap.h"
+
+
+/*
+ * Require encryption support, as well as mutual authentication and
+ * tamperproofing measures.
+ */
+#define GSS_REQUIRED_FLAGS GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | \
+ GSS_C_SEQUENCE_FLAG | GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG
+
+/*
+ * Handle the encryption/decryption of data using GSSAPI.
+ *
+ * In the encrypted data stream on the wire, we break up the data
+ * into packets where each packet starts with a uint32-size length
+ * word (in network byte order), then encrypted data of that length
+ * immediately following. Decryption yields the same data stream
+ * that would appear when not using encryption.
+ *
+ * Encrypted data typically ends up being larger than the same data
+ * unencrypted, so we use fixed-size buffers for handling the
+ * encryption/decryption which are larger than PQComm's buffer will
+ * typically be to minimize the times where we have to make multiple
+ * packets (and therefore multiple recv/send calls for a single
+ * read/write call to us).
+ *
+ * NOTE: The client and server have to agree on the max packet size,
+ * because we have to pass an entire packet to GSSAPI at a time and we
+ * don't want the other side to send arbitrarily huge packets as we
+ * would have to allocate memory for them to then pass them to GSSAPI.
+ *
+ * Therefore, these two #define's are effectively part of the protocol
+ * spec and can't ever be changed.
+ */
+#define PQ_GSS_SEND_BUFFER_SIZE 16384
+#define PQ_GSS_RECV_BUFFER_SIZE 16384
+
+/*
+ * We need these state variables per-connection. To allow the functions
+ * in this file to look mostly like those in be-secure-gssapi.c, set up
+ * these macros.
+ */
+#define PqGSSSendBuffer (conn->gss_SendBuffer)
+#define PqGSSSendLength (conn->gss_SendLength)
+#define PqGSSSendNext (conn->gss_SendNext)
+#define PqGSSSendConsumed (conn->gss_SendConsumed)
+#define PqGSSRecvBuffer (conn->gss_RecvBuffer)
+#define PqGSSRecvLength (conn->gss_RecvLength)
+#define PqGSSResultBuffer (conn->gss_ResultBuffer)
+#define PqGSSResultLength (conn->gss_ResultLength)
+#define PqGSSResultNext (conn->gss_ResultNext)
+#define PqGSSMaxPktSize (conn->gss_MaxPktSize)
+
+
+/*
+ * Attempt to write len bytes of data from ptr to a GSSAPI-encrypted connection.
+ *
+ * The connection must be already set up for GSSAPI encryption (i.e., GSSAPI
+ * transport negotiation is complete).
+ *
+ * On success, returns the number of data bytes consumed (possibly less than
+ * len). On failure, returns -1 with errno set appropriately. If the errno
+ * indicates a non-retryable error, a message is added to conn->errorMessage.
+ * For retryable errors, caller should call again (passing the same data)
+ * once the socket is ready.
+ */
+ssize_t
+pg_GSS_write(PGconn *conn, const void *ptr, size_t len)
+{
+ OM_uint32 major,
+ minor;
+ gss_buffer_desc input,
+ output = GSS_C_EMPTY_BUFFER;
+ ssize_t ret = -1;
+ size_t bytes_sent = 0;
+ size_t bytes_to_encrypt;
+ size_t bytes_encrypted;
+ gss_ctx_id_t gctx = conn->gctx;
+
+ /*
+ * When we get a failure, we must not tell the caller we have successfully
+ * transmitted everything, else it won't retry. Hence a "success"
+ * (positive) return value must only count source bytes corresponding to
+ * fully-transmitted encrypted packets. The amount of source data
+ * corresponding to the current partly-transmitted packet is remembered in
+ * PqGSSSendConsumed. On a retry, the caller *must* be sending that data
+ * again, so if it offers a len less than that, something is wrong.
+ */
+ if (len < PqGSSSendConsumed)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ "GSSAPI caller failed to retransmit all data needing to be retried\n");
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* Discount whatever source data we already encrypted. */
+ bytes_to_encrypt = len - PqGSSSendConsumed;
+ bytes_encrypted = PqGSSSendConsumed;
+
+ /*
+ * Loop through encrypting data and sending it out until it's all done or
+ * pqsecure_raw_write() complains (which would likely mean that the socket
+ * is non-blocking and the requested send() would block, or there was some
+ * kind of actual error).
+ */
+ while (bytes_to_encrypt || PqGSSSendLength)
+ {
+ int conf_state = 0;
+ uint32 netlen;
+
+ /*
+ * Check if we have data in the encrypted output buffer that needs to
+ * be sent (possibly left over from a previous call), and if so, try
+ * to send it. If we aren't able to, return that fact back up to the
+ * caller.
+ */
+ if (PqGSSSendLength)
+ {
+ ssize_t ret;
+ ssize_t amount = PqGSSSendLength - PqGSSSendNext;
+
+ ret = pqsecure_raw_write(conn, PqGSSSendBuffer + PqGSSSendNext, amount);
+ if (ret <= 0)
+ {
+ /*
+ * Report any previously-sent data; if there was none, reflect
+ * the pqsecure_raw_write result up to our caller. When there
+ * was some, we're effectively assuming that any interesting
+ * failure condition will recur on the next try.
+ */
+ if (bytes_sent)
+ return bytes_sent;
+ return ret;
+ }
+
+ /*
+ * Check if this was a partial write, and if so, move forward that
+ * far in our buffer and try again.
+ */
+ if (ret != amount)
+ {
+ PqGSSSendNext += ret;
+ continue;
+ }
+
+ /* We've successfully sent whatever data was in that packet. */
+ bytes_sent += PqGSSSendConsumed;
+
+ /* All encrypted data was sent, our buffer is empty now. */
+ PqGSSSendLength = PqGSSSendNext = PqGSSSendConsumed = 0;
+ }
+
+ /*
+ * Check if there are any bytes left to encrypt. If not, we're done.
+ */
+ if (!bytes_to_encrypt)
+ break;
+
+ /*
+ * Check how much we are being asked to send, if it's too much, then
+ * we will have to loop and possibly be called multiple times to get
+ * through all the data.
+ */
+ if (bytes_to_encrypt > PqGSSMaxPktSize)
+ input.length = PqGSSMaxPktSize;
+ else
+ input.length = bytes_to_encrypt;
+
+ input.value = (char *) ptr + bytes_encrypted;
+
+ output.value = NULL;
+ output.length = 0;
+
+ /*
+ * Create the next encrypted packet. Any failure here is considered a
+ * hard failure, so we return -1 even if bytes_sent > 0.
+ */
+ major = gss_wrap(&minor, gctx, 1, GSS_C_QOP_DEFAULT,
+ &input, &conf_state, &output);
+ if (major != GSS_S_COMPLETE)
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI wrap error"), conn, major, minor);
+ errno = EIO; /* for lack of a better idea */
+ goto cleanup;
+ }
+
+ if (conf_state == 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("outgoing GSSAPI message would not use confidentiality\n"));
+ errno = EIO; /* for lack of a better idea */
+ goto cleanup;
+ }
+
+ if (output.length > PQ_GSS_SEND_BUFFER_SIZE - sizeof(uint32))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("client tried to send oversize GSSAPI packet (%zu > %zu)\n"),
+ (size_t) output.length,
+ PQ_GSS_SEND_BUFFER_SIZE - sizeof(uint32));
+ errno = EIO; /* for lack of a better idea */
+ goto cleanup;
+ }
+
+ bytes_encrypted += input.length;
+ bytes_to_encrypt -= input.length;
+ PqGSSSendConsumed += input.length;
+
+ /* 4 network-order bytes of length, then payload */
+ netlen = pg_hton32(output.length);
+ memcpy(PqGSSSendBuffer + PqGSSSendLength, &netlen, sizeof(uint32));
+ PqGSSSendLength += sizeof(uint32);
+
+ memcpy(PqGSSSendBuffer + PqGSSSendLength, output.value, output.length);
+ PqGSSSendLength += output.length;
+
+ /* Release buffer storage allocated by GSSAPI */
+ gss_release_buffer(&minor, &output);
+ }
+
+ /* If we get here, our counters should all match up. */
+ Assert(bytes_sent == len);
+ Assert(bytes_sent == bytes_encrypted);
+
+ ret = bytes_sent;
+
+cleanup:
+ /* Release GSSAPI buffer storage, if we didn't already */
+ if (output.value != NULL)
+ gss_release_buffer(&minor, &output);
+ return ret;
+}
+
+/*
+ * Read up to len bytes of data into ptr from a GSSAPI-encrypted connection.
+ *
+ * The connection must be already set up for GSSAPI encryption (i.e., GSSAPI
+ * transport negotiation is complete).
+ *
+ * Returns the number of data bytes read, or on failure, returns -1
+ * with errno set appropriately. If the errno indicates a non-retryable
+ * error, a message is added to conn->errorMessage. For retryable errors,
+ * caller should call again once the socket is ready.
+ */
+ssize_t
+pg_GSS_read(PGconn *conn, void *ptr, size_t len)
+{
+ OM_uint32 major,
+ minor;
+ gss_buffer_desc input = GSS_C_EMPTY_BUFFER,
+ output = GSS_C_EMPTY_BUFFER;
+ ssize_t ret;
+ size_t bytes_returned = 0;
+ gss_ctx_id_t gctx = conn->gctx;
+
+ /*
+ * The plan here is to read one incoming encrypted packet into
+ * PqGSSRecvBuffer, decrypt it into PqGSSResultBuffer, and then dole out
+ * data from there to the caller. When we exhaust the current input
+ * packet, read another.
+ */
+ while (bytes_returned < len)
+ {
+ int conf_state = 0;
+
+ /* Check if we have data in our buffer that we can return immediately */
+ if (PqGSSResultNext < PqGSSResultLength)
+ {
+ size_t bytes_in_buffer = PqGSSResultLength - PqGSSResultNext;
+ size_t bytes_to_copy = Min(bytes_in_buffer, len - bytes_returned);
+
+ /*
+ * Copy the data from our result buffer into the caller's buffer,
+ * at the point where we last left off filling their buffer.
+ */
+ memcpy((char *) ptr + bytes_returned, PqGSSResultBuffer + PqGSSResultNext, bytes_to_copy);
+ PqGSSResultNext += bytes_to_copy;
+ bytes_returned += bytes_to_copy;
+
+ /*
+ * At this point, we've either filled the caller's buffer or
+ * emptied our result buffer. Either way, return to caller. In
+ * the second case, we could try to read another encrypted packet,
+ * but the odds are good that there isn't one available. (If this
+ * isn't true, we chose too small a max packet size.) In any
+ * case, there's no harm letting the caller process the data we've
+ * already returned.
+ */
+ break;
+ }
+
+ /* Result buffer is empty, so reset buffer pointers */
+ PqGSSResultLength = PqGSSResultNext = 0;
+
+ /*
+ * Because we chose above to return immediately as soon as we emit
+ * some data, bytes_returned must be zero at this point. Therefore
+ * the failure exits below can just return -1 without worrying about
+ * whether we already emitted some data.
+ */
+ Assert(bytes_returned == 0);
+
+ /*
+ * At this point, our result buffer is empty with more bytes being
+ * requested to be read. We are now ready to load the next packet and
+ * decrypt it (entirely) into our result buffer.
+ */
+
+ /* Collect the length if we haven't already */
+ if (PqGSSRecvLength < sizeof(uint32))
+ {
+ ret = pqsecure_raw_read(conn, PqGSSRecvBuffer + PqGSSRecvLength,
+ sizeof(uint32) - PqGSSRecvLength);
+
+ /* If ret <= 0, pqsecure_raw_read already set the correct errno */
+ if (ret <= 0)
+ return ret;
+
+ PqGSSRecvLength += ret;
+
+ /* If we still haven't got the length, return to the caller */
+ if (PqGSSRecvLength < sizeof(uint32))
+ {
+ errno = EWOULDBLOCK;
+ return -1;
+ }
+ }
+
+ /* Decode the packet length and check for overlength packet */
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
+
+ if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("oversize GSSAPI packet sent by the server (%zu > %zu)\n"),
+ (size_t) input.length,
+ PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32));
+ errno = EIO; /* for lack of a better idea */
+ return -1;
+ }
+
+ /*
+ * Read as much of the packet as we are able to on this call into
+ * wherever we left off from the last time we were called.
+ */
+ ret = pqsecure_raw_read(conn, PqGSSRecvBuffer + PqGSSRecvLength,
+ input.length - (PqGSSRecvLength - sizeof(uint32)));
+ /* If ret <= 0, pqsecure_raw_read already set the correct errno */
+ if (ret <= 0)
+ return ret;
+
+ PqGSSRecvLength += ret;
+
+ /* If we don't yet have the whole packet, return to the caller */
+ if (PqGSSRecvLength - sizeof(uint32) < input.length)
+ {
+ errno = EWOULDBLOCK;
+ return -1;
+ }
+
+ /*
+ * We now have the full packet and we can perform the decryption and
+ * refill our result buffer, then loop back up to pass data back to
+ * the caller. Note that error exits below here must take care of
+ * releasing the gss output buffer.
+ */
+ output.value = NULL;
+ output.length = 0;
+ input.value = PqGSSRecvBuffer + sizeof(uint32);
+
+ major = gss_unwrap(&minor, gctx, &input, &output, &conf_state, NULL);
+ if (major != GSS_S_COMPLETE)
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI unwrap error"), conn,
+ major, minor);
+ ret = -1;
+ errno = EIO; /* for lack of a better idea */
+ goto cleanup;
+ }
+
+ if (conf_state == 0)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("incoming GSSAPI message did not use confidentiality\n"));
+ ret = -1;
+ errno = EIO; /* for lack of a better idea */
+ goto cleanup;
+ }
+
+ memcpy(PqGSSResultBuffer, output.value, output.length);
+ PqGSSResultLength = output.length;
+
+ /* Our receive buffer is now empty, reset it */
+ PqGSSRecvLength = 0;
+
+ /* Release buffer storage allocated by GSSAPI */
+ gss_release_buffer(&minor, &output);
+ }
+
+ ret = bytes_returned;
+
+cleanup:
+ /* Release GSSAPI buffer storage, if we didn't already */
+ if (output.value != NULL)
+ gss_release_buffer(&minor, &output);
+ return ret;
+}
+
+/*
+ * Simple wrapper for reading from pqsecure_raw_read.
+ *
+ * This takes the same arguments as pqsecure_raw_read, plus an output parameter
+ * to return the number of bytes read. This handles if blocking would occur and
+ * if we detect EOF on the connection.
+ */
+static PostgresPollingStatusType
+gss_read(PGconn *conn, void *recv_buffer, size_t length, ssize_t *ret)
+{
+ *ret = pqsecure_raw_read(conn, recv_buffer, length);
+ if (*ret < 0)
+ {
+ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
+ return PGRES_POLLING_READING;
+ else
+ return PGRES_POLLING_FAILED;
+ }
+
+ /* Check for EOF */
+ if (*ret == 0)
+ {
+ int result = pqReadReady(conn);
+
+ if (result < 0)
+ return PGRES_POLLING_FAILED;
+
+ if (!result)
+ return PGRES_POLLING_READING;
+
+ *ret = pqsecure_raw_read(conn, recv_buffer, length);
+ if (*ret < 0)
+ {
+ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
+ return PGRES_POLLING_READING;
+ else
+ return PGRES_POLLING_FAILED;
+ }
+ if (*ret == 0)
+ return PGRES_POLLING_FAILED;
+ }
+
+ return PGRES_POLLING_OK;
+}
+
+/*
+ * Negotiate GSSAPI transport for a connection. When complete, returns
+ * PGRES_POLLING_OK. Will return PGRES_POLLING_READING or
+ * PGRES_POLLING_WRITING as appropriate whenever it would block, and
+ * PGRES_POLLING_FAILED if transport could not be negotiated.
+ */
+PostgresPollingStatusType
+pqsecure_open_gss(PGconn *conn)
+{
+ ssize_t ret;
+ OM_uint32 major,
+ minor;
+ uint32 netlen;
+ PostgresPollingStatusType result;
+ gss_buffer_desc input = GSS_C_EMPTY_BUFFER,
+ output = GSS_C_EMPTY_BUFFER;
+
+ /*
+ * If first time through for this connection, allocate buffers and
+ * initialize state variables. By malloc'ing the buffers separately, we
+ * ensure that they are sufficiently aligned for the length-word accesses
+ * that we do in some places in this file.
+ */
+ if (PqGSSSendBuffer == NULL)
+ {
+ PqGSSSendBuffer = malloc(PQ_GSS_SEND_BUFFER_SIZE);
+ PqGSSRecvBuffer = malloc(PQ_GSS_RECV_BUFFER_SIZE);
+ PqGSSResultBuffer = malloc(PQ_GSS_RECV_BUFFER_SIZE);
+ if (!PqGSSSendBuffer || !PqGSSRecvBuffer || !PqGSSResultBuffer)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return PGRES_POLLING_FAILED;
+ }
+ PqGSSSendLength = PqGSSSendNext = PqGSSSendConsumed = 0;
+ PqGSSRecvLength = PqGSSResultLength = PqGSSResultNext = 0;
+ }
+
+ /*
+ * Check if we have anything to send from a prior call and if so, send it.
+ */
+ if (PqGSSSendLength)
+ {
+ ssize_t amount = PqGSSSendLength - PqGSSSendNext;
+
+ ret = pqsecure_raw_write(conn, PqGSSSendBuffer + PqGSSSendNext, amount);
+ if (ret < 0)
+ {
+ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
+ return PGRES_POLLING_WRITING;
+ else
+ return PGRES_POLLING_FAILED;
+ }
+
+ if (ret < amount)
+ {
+ PqGSSSendNext += ret;
+ return PGRES_POLLING_WRITING;
+ }
+
+ PqGSSSendLength = PqGSSSendNext = 0;
+ }
+
+ /*
+ * Client sends first, and sending creates a context, therefore this will
+ * be false the first time through, and then when we get called again we
+ * will check for incoming data.
+ */
+ if (conn->gctx)
+ {
+ /* Process any incoming data we might have */
+
+ /* See if we are still trying to get the length */
+ if (PqGSSRecvLength < sizeof(uint32))
+ {
+ /* Attempt to get the length first */
+ result = gss_read(conn, PqGSSRecvBuffer + PqGSSRecvLength, sizeof(uint32) - PqGSSRecvLength, &ret);
+ if (result != PGRES_POLLING_OK)
+ return result;
+
+ PqGSSRecvLength += ret;
+
+ if (PqGSSRecvLength < sizeof(uint32))
+ return PGRES_POLLING_READING;
+ }
+
+ /*
+ * Check if we got an error packet
+ *
+ * This is safe to do because we shouldn't ever get a packet over 8192
+ * and therefore the actual length bytes, being that they are in
+ * network byte order, for any real packet will start with two zero
+ * bytes.
+ */
+ if (PqGSSRecvBuffer[0] == 'E')
+ {
+ /*
+ * For an error packet during startup, we don't get a length, so
+ * simply read as much as we can fit into our buffer (as a string,
+ * so leave a spot at the end for a NULL byte too) and report that
+ * back to the caller.
+ */
+ result = gss_read(conn, PqGSSRecvBuffer + PqGSSRecvLength, PQ_GSS_RECV_BUFFER_SIZE - PqGSSRecvLength - 1, &ret);
+ if (result != PGRES_POLLING_OK)
+ return result;
+
+ PqGSSRecvLength += ret;
+
+ appendPQExpBuffer(&conn->errorMessage, "%s\n", PqGSSRecvBuffer + 1);
+
+ return PGRES_POLLING_FAILED;
+ }
+
+ /*
+ * We should have the whole length at this point, so pull it out and
+ * then read whatever we have left of the packet
+ */
+
+ /* Get the length and check for over-length packet */
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
+ if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("oversize GSSAPI packet sent by the server (%zu > %zu)\n"),
+ (size_t) input.length,
+ PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32));
+ return PGRES_POLLING_FAILED;
+ }
+
+ /*
+ * Read as much of the packet as we are able to on this call into
+ * wherever we left off from the last time we were called.
+ */
+ result = gss_read(conn, PqGSSRecvBuffer + PqGSSRecvLength,
+ input.length - (PqGSSRecvLength - sizeof(uint32)), &ret);
+ if (result != PGRES_POLLING_OK)
+ return result;
+
+ PqGSSRecvLength += ret;
+
+ /*
+ * If we got less than the rest of the packet then we need to return
+ * and be called again.
+ */
+ if (PqGSSRecvLength - sizeof(uint32) < input.length)
+ return PGRES_POLLING_READING;
+
+ input.value = PqGSSRecvBuffer + sizeof(uint32);
+ }
+
+ /* Load the service name (no-op if already done */
+ ret = pg_GSS_load_servicename(conn);
+ if (ret != STATUS_OK)
+ return PGRES_POLLING_FAILED;
+
+ /*
+ * Call GSS init context, either with an empty input, or with a complete
+ * packet from the server.
+ */
+ major = gss_init_sec_context(&minor, conn->gcred, &conn->gctx,
+ conn->gtarg_nam, GSS_C_NO_OID,
+ GSS_REQUIRED_FLAGS, 0, 0, &input, NULL,
+ &output, NULL, NULL);
+
+ /* GSS Init Sec Context uses the whole packet, so clear it */
+ PqGSSRecvLength = 0;
+
+ if (GSS_ERROR(major))
+ {
+ pg_GSS_error(libpq_gettext("could not initiate GSSAPI security context"),
+ conn, major, minor);
+ return PGRES_POLLING_FAILED;
+ }
+
+ if (output.length == 0)
+ {
+ /*
+ * We're done - hooray! Set flag to tell the low-level I/O routines
+ * to do GSS wrapping/unwrapping.
+ */
+ conn->gssenc = true;
+
+ /* Clean up */
+ gss_release_cred(&minor, &conn->gcred);
+ conn->gcred = GSS_C_NO_CREDENTIAL;
+ gss_release_buffer(&minor, &output);
+
+ /*
+ * Determine the max packet size which will fit in our buffer, after
+ * accounting for the length. pg_GSS_write will need this.
+ */
+ major = gss_wrap_size_limit(&minor, conn->gctx, 1, GSS_C_QOP_DEFAULT,
+ PQ_GSS_SEND_BUFFER_SIZE - sizeof(uint32),
+ &PqGSSMaxPktSize);
+
+ if (GSS_ERROR(major))
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI size check error"), conn,
+ major, minor);
+ return PGRES_POLLING_FAILED;
+ }
+
+ return PGRES_POLLING_OK;
+ }
+
+ /* Must have output.length > 0 */
+ if (output.length > PQ_GSS_SEND_BUFFER_SIZE - sizeof(uint32))
+ {
+ pg_GSS_error(libpq_gettext("GSSAPI context establishment error"),
+ conn, major, minor);
+ gss_release_buffer(&minor, &output);
+ return PGRES_POLLING_FAILED;
+ }
+
+ /* Queue the token for writing */
+ netlen = pg_hton32(output.length);
+
+ memcpy(PqGSSSendBuffer, (char *) &netlen, sizeof(uint32));
+ PqGSSSendLength += sizeof(uint32);
+
+ memcpy(PqGSSSendBuffer + PqGSSSendLength, output.value, output.length);
+ PqGSSSendLength += output.length;
+
+ /* We don't bother with PqGSSSendConsumed here */
+
+ /* Release buffer storage allocated by GSSAPI */
+ gss_release_buffer(&minor, &output);
+
+ /* Ask to be called again to write data */
+ return PGRES_POLLING_WRITING;
+}
+
+/*
+ * GSSAPI Information functions.
+ */
+
+/*
+ * Return the GSSAPI Context itself.
+ */
+void *
+PQgetgssctx(PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+
+ return conn->gctx;
+}
+
+/*
+ * Return true if GSSAPI encryption is in use.
+ */
+int
+PQgssEncInUse(PGconn *conn)
+{
+ if (!conn || !conn->gctx)
+ return 0;
+
+ return conn->gssenc;
+}
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
new file mode 100644
index 0000000..3725bf4
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -0,0 +1,1884 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure-openssl.c
+ * OpenSSL support
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure-openssl.c
+ *
+ * NOTES
+ *
+ * We don't provide informational callbacks here (like
+ * info_cb() in be-secure-openssl.c), since there's no good mechanism to
+ * display such information to the user.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <signal.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#include "libpq-fe.h"
+#include "fe-auth.h"
+#include "fe-secure-common.h"
+#include "libpq-int.h"
+#include "common/openssl.h"
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <sys/socket.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+#include <arpa/inet.h>
+#endif
+
+#include <sys/stat.h>
+
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#include "pthread-win32.h"
+#else
+#include <pthread.h>
+#endif
+#endif
+
+#include <openssl/ssl.h>
+#include <openssl/conf.h>
+#ifdef USE_SSL_ENGINE
+#include <openssl/engine.h>
+#endif
+#include <openssl/x509v3.h>
+
+static int verify_cb(int ok, X509_STORE_CTX *ctx);
+static int openssl_verify_peer_name_matches_certificate_name(PGconn *conn,
+ ASN1_STRING *name,
+ char **store_name);
+static void destroy_ssl_system(void);
+static int initialize_SSL(PGconn *conn);
+static PostgresPollingStatusType open_client_SSL(PGconn *);
+static char *SSLerrmessage(unsigned long ecode);
+static void SSLerrfree(char *buf);
+static int PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata);
+
+static int my_sock_read(BIO *h, char *buf, int size);
+static int my_sock_write(BIO *h, const char *buf, int size);
+static BIO_METHOD *my_BIO_s_socket(void);
+static int my_SSL_set_fd(PGconn *conn, int fd);
+
+
+static bool pq_init_ssl_lib = true;
+static bool pq_init_crypto_lib = true;
+
+static bool ssl_lib_initialized = false;
+
+#ifdef ENABLE_THREAD_SAFETY
+static long crypto_open_connections = 0;
+
+#ifndef WIN32
+static pthread_mutex_t ssl_config_mutex = PTHREAD_MUTEX_INITIALIZER;
+#else
+static pthread_mutex_t ssl_config_mutex = NULL;
+static long win32_ssl_create_mutex = 0;
+#endif
+#endif /* ENABLE_THREAD_SAFETY */
+
+static PQsslKeyPassHook_OpenSSL_type PQsslKeyPassHook = NULL;
+static int ssl_protocol_version_to_openssl(const char *protocol);
+
+/* ------------------------------------------------------------ */
+/* Procedures common to all secure sessions */
+/* ------------------------------------------------------------ */
+
+void
+pgtls_init_library(bool do_ssl, int do_crypto)
+{
+#ifdef ENABLE_THREAD_SAFETY
+
+ /*
+ * Disallow changing the flags while we have open connections, else we'd
+ * get completely confused.
+ */
+ if (crypto_open_connections != 0)
+ return;
+#endif
+
+ pq_init_ssl_lib = do_ssl;
+ pq_init_crypto_lib = do_crypto;
+}
+
+PostgresPollingStatusType
+pgtls_open_client(PGconn *conn)
+{
+ /* First time through? */
+ if (conn->ssl == NULL)
+ {
+ /*
+ * Create a connection-specific SSL object, and load client
+ * certificate, private key, and trusted CA certs.
+ */
+ if (initialize_SSL(conn) != 0)
+ {
+ /* initialize_SSL already put a message in conn->errorMessage */
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+ }
+
+ /* Begin or continue the actual handshake */
+ return open_client_SSL(conn);
+}
+
+ssize_t
+pgtls_read(PGconn *conn, void *ptr, size_t len)
+{
+ ssize_t n;
+ int result_errno = 0;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+ int err;
+ unsigned long ecode;
+
+rloop:
+
+ /*
+ * Prepare to call SSL_get_error() by clearing thread's OpenSSL error
+ * queue. In general, the current thread's error queue must be empty
+ * before the TLS/SSL I/O operation is attempted, or SSL_get_error() will
+ * not work reliably. Since the possibility exists that other OpenSSL
+ * clients running in the same thread but not under our control will fail
+ * to call ERR_get_error() themselves (after their own I/O operations),
+ * pro-actively clear the per-thread error queue now.
+ */
+ SOCK_ERRNO_SET(0);
+ ERR_clear_error();
+ n = SSL_read(conn->ssl, ptr, len);
+ err = SSL_get_error(conn->ssl, n);
+
+ /*
+ * Other clients of OpenSSL may fail to call ERR_get_error(), but we
+ * always do, so as to not cause problems for OpenSSL clients that don't
+ * call ERR_clear_error() defensively. Be sure that this happens by
+ * calling now. SSL_get_error() relies on the OpenSSL per-thread error
+ * queue being intact, so this is the earliest possible point
+ * ERR_get_error() may be called.
+ */
+ ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
+ switch (err)
+ {
+ case SSL_ERROR_NONE:
+ if (n < 0)
+ {
+ /* Not supposed to happen, so we don't translate the msg */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "SSL_read failed but did not provide error information\n");
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ }
+ break;
+ case SSL_ERROR_WANT_READ:
+ n = 0;
+ break;
+ case SSL_ERROR_WANT_WRITE:
+
+ /*
+ * Returning 0 here would cause caller to wait for read-ready,
+ * which is not correct since what SSL wants is wait for
+ * write-ready. The former could get us stuck in an infinite
+ * wait, so don't risk it; busy-loop instead.
+ */
+ goto rloop;
+ case SSL_ERROR_SYSCALL:
+ if (n < 0)
+ {
+ result_errno = SOCK_ERRNO;
+ if (result_errno == EPIPE ||
+ result_errno == ECONNRESET)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server closed the connection unexpectedly\n"
+ "\tThis probably means the server terminated abnormally\n"
+ "\tbefore or while processing the request.\n"));
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ }
+ else
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: EOF detected\n"));
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ }
+ break;
+ case SSL_ERROR_SSL:
+ {
+ char *errm = SSLerrmessage(ecode);
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL error: %s\n"), errm);
+ SSLerrfree(errm);
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ }
+ case SSL_ERROR_ZERO_RETURN:
+
+ /*
+ * Per OpenSSL documentation, this error code is only returned for
+ * a clean connection closure, so we should not report it as a
+ * server crash.
+ */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL connection has been closed unexpectedly\n"));
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unrecognized SSL error code: %d\n"),
+ err);
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ }
+
+ /* ensure we return the intended errno to caller */
+ SOCK_ERRNO_SET(result_errno);
+
+ return n;
+}
+
+bool
+pgtls_read_pending(PGconn *conn)
+{
+ return SSL_pending(conn->ssl) > 0;
+}
+
+ssize_t
+pgtls_write(PGconn *conn, const void *ptr, size_t len)
+{
+ ssize_t n;
+ int result_errno = 0;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+ int err;
+ unsigned long ecode;
+
+ SOCK_ERRNO_SET(0);
+ ERR_clear_error();
+ n = SSL_write(conn->ssl, ptr, len);
+ err = SSL_get_error(conn->ssl, n);
+ ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
+ switch (err)
+ {
+ case SSL_ERROR_NONE:
+ if (n < 0)
+ {
+ /* Not supposed to happen, so we don't translate the msg */
+ appendPQExpBufferStr(&conn->errorMessage,
+ "SSL_write failed but did not provide error information\n");
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ }
+ break;
+ case SSL_ERROR_WANT_READ:
+
+ /*
+ * Returning 0 here causes caller to wait for write-ready, which
+ * is not really the right thing, but it's the best we can do.
+ */
+ n = 0;
+ break;
+ case SSL_ERROR_WANT_WRITE:
+ n = 0;
+ break;
+ case SSL_ERROR_SYSCALL:
+ if (n < 0)
+ {
+ result_errno = SOCK_ERRNO;
+ if (result_errno == EPIPE || result_errno == ECONNRESET)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server closed the connection unexpectedly\n"
+ "\tThis probably means the server terminated abnormally\n"
+ "\tbefore or while processing the request.\n"));
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ }
+ else
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: EOF detected\n"));
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ }
+ break;
+ case SSL_ERROR_SSL:
+ {
+ char *errm = SSLerrmessage(ecode);
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL error: %s\n"), errm);
+ SSLerrfree(errm);
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ }
+ case SSL_ERROR_ZERO_RETURN:
+
+ /*
+ * Per OpenSSL documentation, this error code is only returned for
+ * a clean connection closure, so we should not report it as a
+ * server crash.
+ */
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL connection has been closed unexpectedly\n"));
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unrecognized SSL error code: %d\n"),
+ err);
+ /* assume the connection is broken */
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ }
+
+ /* ensure we return the intended errno to caller */
+ SOCK_ERRNO_SET(result_errno);
+
+ return n;
+}
+
+#ifdef HAVE_X509_GET_SIGNATURE_NID
+char *
+pgtls_get_peer_certificate_hash(PGconn *conn, size_t *len)
+{
+ X509 *peer_cert;
+ const EVP_MD *algo_type;
+ unsigned char hash[EVP_MAX_MD_SIZE]; /* size for SHA-512 */
+ unsigned int hash_size;
+ int algo_nid;
+ char *cert_hash;
+
+ *len = 0;
+
+ if (!conn->peer)
+ return NULL;
+
+ peer_cert = conn->peer;
+
+ /*
+ * Get the signature algorithm of the certificate to determine the hash
+ * algorithm to use for the result.
+ */
+ if (!OBJ_find_sigid_algs(X509_get_signature_nid(peer_cert),
+ &algo_nid, NULL))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not determine server certificate signature algorithm\n"));
+ return NULL;
+ }
+
+ /*
+ * The TLS server's certificate bytes need to be hashed with SHA-256 if
+ * its signature algorithm is MD5 or SHA-1 as per RFC 5929
+ * (https://tools.ietf.org/html/rfc5929#section-4.1). If something else
+ * is used, the same hash as the signature algorithm is used.
+ */
+ switch (algo_nid)
+ {
+ case NID_md5:
+ case NID_sha1:
+ algo_type = EVP_sha256();
+ break;
+ default:
+ algo_type = EVP_get_digestbynid(algo_nid);
+ if (algo_type == NULL)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not find digest for NID %s\n"),
+ OBJ_nid2sn(algo_nid));
+ return NULL;
+ }
+ break;
+ }
+
+ if (!X509_digest(peer_cert, algo_type, hash, &hash_size))
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("could not generate peer certificate hash\n"));
+ return NULL;
+ }
+
+ /* save result */
+ cert_hash = malloc(hash_size);
+ if (cert_hash == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return NULL;
+ }
+ memcpy(cert_hash, hash, hash_size);
+ *len = hash_size;
+
+ return cert_hash;
+}
+#endif /* HAVE_X509_GET_SIGNATURE_NID */
+
+/* ------------------------------------------------------------ */
+/* OpenSSL specific code */
+/* ------------------------------------------------------------ */
+
+/*
+ * Certificate verification callback
+ *
+ * This callback allows us to log intermediate problems during
+ * verification, but there doesn't seem to be a clean way to get
+ * our PGconn * structure. So we can't log anything!
+ *
+ * This callback also allows us to override the default acceptance
+ * criteria (e.g., accepting self-signed or expired certs), but
+ * for now we accept the default checks.
+ */
+static int
+verify_cb(int ok, X509_STORE_CTX *ctx)
+{
+ return ok;
+}
+
+
+/*
+ * OpenSSL-specific wrapper around
+ * pq_verify_peer_name_matches_certificate_name(), converting the ASN1_STRING
+ * into a plain C string.
+ */
+static int
+openssl_verify_peer_name_matches_certificate_name(PGconn *conn, ASN1_STRING *name_entry,
+ char **store_name)
+{
+ int len;
+ const unsigned char *namedata;
+
+ /* Should not happen... */
+ if (name_entry == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL certificate's name entry is missing\n"));
+ return -1;
+ }
+
+ /*
+ * GEN_DNS can be only IA5String, equivalent to US ASCII.
+ */
+#ifdef HAVE_ASN1_STRING_GET0_DATA
+ namedata = ASN1_STRING_get0_data(name_entry);
+#else
+ namedata = ASN1_STRING_data(name_entry);
+#endif
+ len = ASN1_STRING_length(name_entry);
+
+ /* OK to cast from unsigned to plain char, since it's all ASCII. */
+ return pq_verify_peer_name_matches_certificate_name(conn, (const char *) namedata, len, store_name);
+}
+
+/*
+ * Verify that the server certificate matches the hostname we connected to.
+ *
+ * The certificate's Common Name and Subject Alternative Names are considered.
+ */
+int
+pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
+ int *names_examined,
+ char **first_name)
+{
+ STACK_OF(GENERAL_NAME) * peer_san;
+ int i;
+ int rc = 0;
+
+ /*
+ * First, get the Subject Alternative Names (SANs) from the certificate,
+ * and compare them against the originally given hostname.
+ */
+ peer_san = (STACK_OF(GENERAL_NAME) *)
+ X509_get_ext_d2i(conn->peer, NID_subject_alt_name, NULL, NULL);
+
+ if (peer_san)
+ {
+ int san_len = sk_GENERAL_NAME_num(peer_san);
+
+ for (i = 0; i < san_len; i++)
+ {
+ const GENERAL_NAME *name = sk_GENERAL_NAME_value(peer_san, i);
+
+ if (name->type == GEN_DNS)
+ {
+ char *alt_name;
+
+ (*names_examined)++;
+ rc = openssl_verify_peer_name_matches_certificate_name(conn,
+ name->d.dNSName,
+ &alt_name);
+
+ if (alt_name)
+ {
+ if (!*first_name)
+ *first_name = alt_name;
+ else
+ free(alt_name);
+ }
+ }
+ if (rc != 0)
+ break;
+ }
+ sk_GENERAL_NAME_pop_free(peer_san, GENERAL_NAME_free);
+ }
+
+ /*
+ * If there is no subjectAltName extension of type dNSName, check the
+ * Common Name.
+ *
+ * (Per RFC 2818 and RFC 6125, if the subjectAltName extension of type
+ * dNSName is present, the CN must be ignored.)
+ */
+ if (*names_examined == 0)
+ {
+ X509_NAME *subject_name;
+
+ subject_name = X509_get_subject_name(conn->peer);
+ if (subject_name != NULL)
+ {
+ int cn_index;
+
+ cn_index = X509_NAME_get_index_by_NID(subject_name,
+ NID_commonName, -1);
+ if (cn_index >= 0)
+ {
+ (*names_examined)++;
+ rc = openssl_verify_peer_name_matches_certificate_name(conn,
+ X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
+ first_name);
+ }
+ }
+ }
+
+ return rc;
+}
+
+#if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_CRYPTO_LOCK)
+/*
+ * Callback functions for OpenSSL internal locking. (OpenSSL 1.1.0
+ * does its own locking, and doesn't need these anymore. The
+ * CRYPTO_lock() function was removed in 1.1.0, when the callbacks
+ * were made obsolete, so we assume that if CRYPTO_lock() exists,
+ * the callbacks are still required.)
+ */
+
+static unsigned long
+pq_threadidcallback(void)
+{
+ /*
+ * This is not standards-compliant. pthread_self() returns pthread_t, and
+ * shouldn't be cast to unsigned long, but CRYPTO_set_id_callback requires
+ * it, so we have to do it.
+ */
+ return (unsigned long) pthread_self();
+}
+
+static pthread_mutex_t *pq_lockarray;
+
+static void
+pq_lockingcallback(int mode, int n, const char *file, int line)
+{
+ if (mode & CRYPTO_LOCK)
+ {
+ if (pthread_mutex_lock(&pq_lockarray[n]))
+ PGTHREAD_ERROR("failed to lock mutex");
+ }
+ else
+ {
+ if (pthread_mutex_unlock(&pq_lockarray[n]))
+ PGTHREAD_ERROR("failed to unlock mutex");
+ }
+}
+#endif /* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */
+
+/*
+ * Initialize SSL library.
+ *
+ * In threadsafe mode, this includes setting up libcrypto callback functions
+ * to do thread locking.
+ *
+ * If the caller has told us (through PQinitOpenSSL) that he's taking care
+ * of libcrypto, we expect that callbacks are already set, and won't try to
+ * override it.
+ */
+int
+pgtls_init(PGconn *conn, bool do_ssl, bool do_crypto)
+{
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+ /* Also see similar code in fe-connect.c, default_threadlock() */
+ if (ssl_config_mutex == NULL)
+ {
+ while (InterlockedExchange(&win32_ssl_create_mutex, 1) == 1)
+ /* loop, another thread own the lock */ ;
+ if (ssl_config_mutex == NULL)
+ {
+ if (pthread_mutex_init(&ssl_config_mutex, NULL))
+ return -1;
+ }
+ InterlockedExchange(&win32_ssl_create_mutex, 0);
+ }
+#endif
+ if (pthread_mutex_lock(&ssl_config_mutex))
+ return -1;
+
+#ifdef HAVE_CRYPTO_LOCK
+ if (pq_init_crypto_lib)
+ {
+ /*
+ * If necessary, set up an array to hold locks for libcrypto.
+ * libcrypto will tell us how big to make this array.
+ */
+ if (pq_lockarray == NULL)
+ {
+ int i;
+
+ pq_lockarray = malloc(sizeof(pthread_mutex_t) * CRYPTO_num_locks());
+ if (!pq_lockarray)
+ {
+ pthread_mutex_unlock(&ssl_config_mutex);
+ return -1;
+ }
+ for (i = 0; i < CRYPTO_num_locks(); i++)
+ {
+ if (pthread_mutex_init(&pq_lockarray[i], NULL))
+ {
+ free(pq_lockarray);
+ pq_lockarray = NULL;
+ pthread_mutex_unlock(&ssl_config_mutex);
+ return -1;
+ }
+ }
+ }
+
+ if (do_crypto && !conn->crypto_loaded)
+ {
+ if (crypto_open_connections++ == 0)
+ {
+ /*
+ * These are only required for threaded libcrypto
+ * applications, but make sure we don't stomp on them if
+ * they're already set.
+ */
+ if (CRYPTO_get_id_callback() == NULL)
+ CRYPTO_set_id_callback(pq_threadidcallback);
+ if (CRYPTO_get_locking_callback() == NULL)
+ CRYPTO_set_locking_callback(pq_lockingcallback);
+ }
+
+ conn->crypto_loaded = true;
+ }
+ }
+#endif /* HAVE_CRYPTO_LOCK */
+#endif /* ENABLE_THREAD_SAFETY */
+
+ if (!ssl_lib_initialized && do_ssl)
+ {
+ if (pq_init_ssl_lib)
+ {
+#ifdef HAVE_OPENSSL_INIT_SSL
+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
+#else
+ OPENSSL_config(NULL);
+ SSL_library_init();
+ SSL_load_error_strings();
+#endif
+ }
+ ssl_lib_initialized = true;
+ }
+
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_unlock(&ssl_config_mutex);
+#endif
+ return 0;
+}
+
+/*
+ * This function is needed because if the libpq library is unloaded
+ * from the application, the callback functions will no longer exist when
+ * libcrypto is used by other parts of the system. For this reason,
+ * we unregister the callback functions when the last libpq
+ * connection is closed. (The same would apply for OpenSSL callbacks
+ * if we had any.)
+ *
+ * Callbacks are only set when we're compiled in threadsafe mode, so
+ * we only need to remove them in this case. They are also not needed
+ * with OpenSSL 1.1.0 anymore.
+ */
+static void
+destroy_ssl_system(void)
+{
+#if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_CRYPTO_LOCK)
+ /* Mutex is created in pgtls_init() */
+ if (pthread_mutex_lock(&ssl_config_mutex))
+ return;
+
+ if (pq_init_crypto_lib && crypto_open_connections > 0)
+ --crypto_open_connections;
+
+ if (pq_init_crypto_lib && crypto_open_connections == 0)
+ {
+ /*
+ * No connections left, unregister libcrypto callbacks, if no one
+ * registered different ones in the meantime.
+ */
+ if (CRYPTO_get_locking_callback() == pq_lockingcallback)
+ CRYPTO_set_locking_callback(NULL);
+ if (CRYPTO_get_id_callback() == pq_threadidcallback)
+ CRYPTO_set_id_callback(NULL);
+
+ /*
+ * We don't free the lock array. If we get another connection in this
+ * process, we will just re-use them with the existing mutexes.
+ *
+ * This means we leak a little memory on repeated load/unload of the
+ * library.
+ */
+ }
+
+ pthread_mutex_unlock(&ssl_config_mutex);
+#endif
+}
+
+/*
+ * Create per-connection SSL object, and load the client certificate,
+ * private key, and trusted CA certs.
+ *
+ * Returns 0 if OK, -1 on failure (with a message in conn->errorMessage).
+ */
+static int
+initialize_SSL(PGconn *conn)
+{
+ SSL_CTX *SSL_context;
+ struct stat buf;
+ char homedir[MAXPGPATH];
+ char fnbuf[MAXPGPATH];
+ char sebuf[PG_STRERROR_R_BUFLEN];
+ bool have_homedir;
+ bool have_cert;
+ bool have_rootcert;
+ EVP_PKEY *pkey = NULL;
+
+ /*
+ * We'll need the home directory if any of the relevant parameters are
+ * defaulted. If pqGetHomeDirectory fails, act as though none of the
+ * files could be found.
+ */
+ if (!(conn->sslcert && strlen(conn->sslcert) > 0) ||
+ !(conn->sslkey && strlen(conn->sslkey) > 0) ||
+ !(conn->sslrootcert && strlen(conn->sslrootcert) > 0) ||
+ !((conn->sslcrl && strlen(conn->sslcrl) > 0) ||
+ (conn->sslcrldir && strlen(conn->sslcrldir) > 0)))
+ have_homedir = pqGetHomeDirectory(homedir, sizeof(homedir));
+ else /* won't need it */
+ have_homedir = false;
+
+ /*
+ * Create a new SSL_CTX object.
+ *
+ * We used to share a single SSL_CTX between all connections, but it was
+ * complicated if connections used different certificates. So now we
+ * create a separate context for each connection, and accept the overhead.
+ */
+ SSL_context = SSL_CTX_new(SSLv23_method());
+ if (!SSL_context)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not create SSL context: %s\n"),
+ err);
+ SSLerrfree(err);
+ return -1;
+ }
+
+ /*
+ * Delegate the client cert password prompt to the libpq wrapper callback
+ * if any is defined.
+ *
+ * If the application hasn't installed its own and the sslpassword
+ * parameter is non-null, we install ours now to make sure we supply
+ * PGconn->sslpassword to OpenSSL instead of letting it prompt on stdin.
+ *
+ * This will replace OpenSSL's default PEM_def_callback (which prompts on
+ * stdin), but we're only setting it for this SSL context so it's
+ * harmless.
+ */
+ if (PQsslKeyPassHook
+ || (conn->sslpassword && strlen(conn->sslpassword) > 0))
+ {
+ SSL_CTX_set_default_passwd_cb(SSL_context, PQssl_passwd_cb);
+ SSL_CTX_set_default_passwd_cb_userdata(SSL_context, conn);
+ }
+
+ /* Disable old protocol versions */
+ SSL_CTX_set_options(SSL_context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+
+ /* Set the minimum and maximum protocol versions if necessary */
+ if (conn->ssl_min_protocol_version &&
+ strlen(conn->ssl_min_protocol_version) != 0)
+ {
+ int ssl_min_ver;
+
+ ssl_min_ver = ssl_protocol_version_to_openssl(conn->ssl_min_protocol_version);
+
+ if (ssl_min_ver == -1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid value \"%s\" for minimum SSL protocol version\n"),
+ conn->ssl_min_protocol_version);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+
+ if (!SSL_CTX_set_min_proto_version(SSL_context, ssl_min_ver))
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set minimum SSL protocol version: %s\n"),
+ err);
+ SSLerrfree(err);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+ }
+
+ if (conn->ssl_max_protocol_version &&
+ strlen(conn->ssl_max_protocol_version) != 0)
+ {
+ int ssl_max_ver;
+
+ ssl_max_ver = ssl_protocol_version_to_openssl(conn->ssl_max_protocol_version);
+
+ if (ssl_max_ver == -1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid value \"%s\" for maximum SSL protocol version\n"),
+ conn->ssl_max_protocol_version);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+
+ if (!SSL_CTX_set_max_proto_version(SSL_context, ssl_max_ver))
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set maximum SSL protocol version: %s\n"),
+ err);
+ SSLerrfree(err);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+ }
+
+ /*
+ * Disable OpenSSL's moving-write-buffer sanity check, because it causes
+ * unnecessary failures in nonblocking send cases.
+ */
+ SSL_CTX_set_mode(SSL_context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+
+ /*
+ * If the root cert file exists, load it so we can perform certificate
+ * verification. If sslmode is "verify-full" we will also do further
+ * verification after the connection has been completed.
+ */
+ if (conn->sslrootcert && strlen(conn->sslrootcert) > 0)
+ strlcpy(fnbuf, conn->sslrootcert, sizeof(fnbuf));
+ else if (have_homedir)
+ snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, ROOT_CERT_FILE);
+ else
+ fnbuf[0] = '\0';
+
+ if (fnbuf[0] != '\0' &&
+ stat(fnbuf, &buf) == 0)
+ {
+ X509_STORE *cvstore;
+
+ if (SSL_CTX_load_verify_locations(SSL_context, fnbuf, NULL) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not read root certificate file \"%s\": %s\n"),
+ fnbuf, err);
+ SSLerrfree(err);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+
+ if ((cvstore = SSL_CTX_get_cert_store(SSL_context)) != NULL)
+ {
+ char *fname = NULL;
+ char *dname = NULL;
+
+ if (conn->sslcrl && strlen(conn->sslcrl) > 0)
+ fname = conn->sslcrl;
+ if (conn->sslcrldir && strlen(conn->sslcrldir) > 0)
+ dname = conn->sslcrldir;
+
+ /* defaults to use the default CRL file */
+ if (!fname && !dname && have_homedir)
+ {
+ snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, ROOT_CRL_FILE);
+ fname = fnbuf;
+ }
+
+ /* Set the flags to check against the complete CRL chain */
+ if ((fname || dname) &&
+ X509_STORE_load_locations(cvstore, fname, dname) == 1)
+ {
+ X509_STORE_set_flags(cvstore,
+ X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
+ }
+
+ /* if not found, silently ignore; we do not require CRL */
+ ERR_clear_error();
+ }
+ have_rootcert = true;
+ }
+ else
+ {
+ /*
+ * stat() failed; assume root file doesn't exist. If sslmode is
+ * verify-ca or verify-full, this is an error. Otherwise, continue
+ * without performing any server cert verification.
+ */
+ if (conn->sslmode[0] == 'v') /* "verify-ca" or "verify-full" */
+ {
+ /*
+ * The only way to reach here with an empty filename is if
+ * pqGetHomeDirectory failed. That's a sufficiently unusual case
+ * that it seems worth having a specialized error message for it.
+ */
+ if (fnbuf[0] == '\0')
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not get home directory to locate root certificate file\n"
+ "Either provide the file or change sslmode to disable server certificate verification.\n"));
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("root certificate file \"%s\" does not exist\n"
+ "Either provide the file or change sslmode to disable server certificate verification.\n"), fnbuf);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+ have_rootcert = false;
+ }
+
+ /* Read the client certificate file */
+ if (conn->sslcert && strlen(conn->sslcert) > 0)
+ strlcpy(fnbuf, conn->sslcert, sizeof(fnbuf));
+ else if (have_homedir)
+ snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_CERT_FILE);
+ else
+ fnbuf[0] = '\0';
+
+ if (fnbuf[0] == '\0')
+ {
+ /* no home directory, proceed without a client cert */
+ have_cert = false;
+ }
+ else if (stat(fnbuf, &buf) != 0)
+ {
+ /*
+ * If file is not present, just go on without a client cert; server
+ * might or might not accept the connection. Any other error,
+ * however, is grounds for complaint.
+ */
+ if (errno != ENOENT && errno != ENOTDIR)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not open certificate file \"%s\": %s\n"),
+ fnbuf, strerror_r(errno, sebuf, sizeof(sebuf)));
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+ have_cert = false;
+ }
+ else
+ {
+ /*
+ * Cert file exists, so load it. Since OpenSSL doesn't provide the
+ * equivalent of "SSL_use_certificate_chain_file", we have to load it
+ * into the SSL context, rather than the SSL object.
+ */
+ if (SSL_CTX_use_certificate_chain_file(SSL_context, fnbuf) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not read certificate file \"%s\": %s\n"),
+ fnbuf, err);
+ SSLerrfree(err);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+
+ /* need to load the associated private key, too */
+ have_cert = true;
+ }
+
+ /*
+ * The SSL context is now loaded with the correct root and client
+ * certificates. Create a connection-specific SSL object. The private key
+ * is loaded directly into the SSL object. (We could load the private key
+ * into the context, too, but we have done it this way historically, and
+ * it doesn't really matter.)
+ */
+ if (!(conn->ssl = SSL_new(SSL_context)) ||
+ !SSL_set_app_data(conn->ssl, conn) ||
+ !my_SSL_set_fd(conn, conn->sock))
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not establish SSL connection: %s\n"),
+ err);
+ SSLerrfree(err);
+ SSL_CTX_free(SSL_context);
+ return -1;
+ }
+ conn->ssl_in_use = true;
+
+ /*
+ * SSL contexts are reference counted by OpenSSL. We can free it as soon
+ * as we have created the SSL object, and it will stick around for as long
+ * as it's actually needed.
+ */
+ SSL_CTX_free(SSL_context);
+ SSL_context = NULL;
+
+ /*
+ * Set Server Name Indication (SNI), if enabled by connection parameters.
+ * Per RFC 6066, do not set it if the host is a literal IP address (IPv4
+ * or IPv6).
+ */
+ if (conn->sslsni && conn->sslsni[0] == '1')
+ {
+ const char *host = conn->connhost[conn->whichhost].host;
+
+ if (host && host[0] &&
+ !(strspn(host, "0123456789.") == strlen(host) ||
+ strchr(host, ':')))
+ {
+ if (SSL_set_tlsext_host_name(conn->ssl, host) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not set SSL Server Name Indication (SNI): %s\n"),
+ err);
+ SSLerrfree(err);
+ return -1;
+ }
+ }
+ }
+
+ /*
+ * Read the SSL key. If a key is specified, treat it as an engine:key
+ * combination if there is colon present - we don't support files with
+ * colon in the name. The exception is if the second character is a colon,
+ * in which case it can be a Windows filename with drive specification.
+ */
+ if (have_cert && conn->sslkey && strlen(conn->sslkey) > 0)
+ {
+#ifdef USE_SSL_ENGINE
+ if (strchr(conn->sslkey, ':')
+#ifdef WIN32
+ && conn->sslkey[1] != ':'
+#endif
+ )
+ {
+ /* Colon, but not in second character, treat as engine:key */
+ char *engine_str = strdup(conn->sslkey);
+ char *engine_colon;
+
+ if (engine_str == NULL)
+ {
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return -1;
+ }
+
+ /* cannot return NULL because we already checked before strdup */
+ engine_colon = strchr(engine_str, ':');
+
+ *engine_colon = '\0'; /* engine_str now has engine name */
+ engine_colon++; /* engine_colon now has key name */
+
+ conn->engine = ENGINE_by_id(engine_str);
+ if (conn->engine == NULL)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not load SSL engine \"%s\": %s\n"),
+ engine_str, err);
+ SSLerrfree(err);
+ free(engine_str);
+ return -1;
+ }
+
+ if (ENGINE_init(conn->engine) == 0)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not initialize SSL engine \"%s\": %s\n"),
+ engine_str, err);
+ SSLerrfree(err);
+ ENGINE_free(conn->engine);
+ conn->engine = NULL;
+ free(engine_str);
+ return -1;
+ }
+
+ pkey = ENGINE_load_private_key(conn->engine, engine_colon,
+ NULL, NULL);
+ if (pkey == NULL)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not read private SSL key \"%s\" from engine \"%s\": %s\n"),
+ engine_colon, engine_str, err);
+ SSLerrfree(err);
+ ENGINE_finish(conn->engine);
+ ENGINE_free(conn->engine);
+ conn->engine = NULL;
+ free(engine_str);
+ return -1;
+ }
+ if (SSL_use_PrivateKey(conn->ssl, pkey) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not load private SSL key \"%s\" from engine \"%s\": %s\n"),
+ engine_colon, engine_str, err);
+ SSLerrfree(err);
+ ENGINE_finish(conn->engine);
+ ENGINE_free(conn->engine);
+ conn->engine = NULL;
+ free(engine_str);
+ return -1;
+ }
+
+ free(engine_str);
+
+ fnbuf[0] = '\0'; /* indicate we're not going to load from a
+ * file */
+ }
+ else
+#endif /* USE_SSL_ENGINE */
+ {
+ /* PGSSLKEY is not an engine, treat it as a filename */
+ strlcpy(fnbuf, conn->sslkey, sizeof(fnbuf));
+ }
+ }
+ else if (have_homedir)
+ {
+ /* No PGSSLKEY specified, load default file */
+ snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_KEY_FILE);
+ }
+ else
+ fnbuf[0] = '\0';
+
+ if (have_cert && fnbuf[0] != '\0')
+ {
+ /* read the client key from file */
+
+ if (stat(fnbuf, &buf) != 0)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("certificate present, but not private key file \"%s\"\n"),
+ fnbuf);
+ return -1;
+ }
+
+ /* Key file must be a regular file */
+ if (!S_ISREG(buf.st_mode))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("private key file \"%s\" is not a regular file\n"),
+ fnbuf);
+ return -1;
+ }
+
+ /*
+ * Refuse to load world-readable key files. We accept root-owned
+ * files with mode 0640 or less, so that we can access system-wide
+ * certificates if we have a supplementary group membership that
+ * allows us to read 'em. For files with non-root ownership, require
+ * mode 0600 or less. We need not check the file's ownership exactly;
+ * if we're able to read it despite it having such restrictive
+ * permissions, it must have the right ownership.
+ *
+ * Note: be very careful about tightening these rules. Some people
+ * expect, for example, that a client process running as root should
+ * be able to use a non-root-owned key file.
+ *
+ * Note that roughly similar checks are performed in
+ * src/backend/libpq/be-secure-common.c so any changes here may need
+ * to be made there as well. However, this code caters for the case
+ * of current user == root, while that code does not.
+ *
+ * Ideally we would do similar permissions checks on Windows, but it
+ * is not clear how that would work since Unix-style permissions may
+ * not be available.
+ */
+#if !defined(WIN32) && !defined(__CYGWIN__)
+ if (buf.st_uid == 0 ?
+ buf.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO) :
+ buf.st_mode & (S_IRWXG | S_IRWXO))
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"),
+ fnbuf);
+ return -1;
+ }
+#endif
+
+ if (SSL_use_PrivateKey_file(conn->ssl, fnbuf, SSL_FILETYPE_PEM) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ /*
+ * We'll try to load the file in DER (binary ASN.1) format, and if
+ * that fails too, report the original error. This could mask
+ * issues where there's something wrong with a DER-format cert,
+ * but we'd have to duplicate openssl's format detection to be
+ * smarter than this. We can't just probe for a leading -----BEGIN
+ * because PEM can have leading non-matching lines and blanks.
+ * OpenSSL doesn't expose its get_name(...) and its PEM routines
+ * don't differentiate between failure modes in enough detail to
+ * let us tell the difference between "not PEM, try DER" and
+ * "wrong password".
+ */
+ if (SSL_use_PrivateKey_file(conn->ssl, fnbuf, SSL_FILETYPE_ASN1) != 1)
+ {
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not load private key file \"%s\": %s\n"),
+ fnbuf, err);
+ SSLerrfree(err);
+ return -1;
+ }
+
+ SSLerrfree(err);
+
+ }
+ }
+
+ /* verify that the cert and key go together */
+ if (have_cert &&
+ SSL_check_private_key(conn->ssl) != 1)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("certificate does not match private key file \"%s\": %s\n"),
+ fnbuf, err);
+ SSLerrfree(err);
+ return -1;
+ }
+
+ /*
+ * If a root cert was loaded, also set our certificate verification
+ * callback.
+ */
+ if (have_rootcert)
+ SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, verify_cb);
+
+ /*
+ * Set compression option if necessary.
+ */
+ if (conn->sslcompression && conn->sslcompression[0] == '0')
+ SSL_set_options(conn->ssl, SSL_OP_NO_COMPRESSION);
+ else
+ SSL_clear_options(conn->ssl, SSL_OP_NO_COMPRESSION);
+
+ return 0;
+}
+
+/*
+ * Attempt to negotiate SSL connection.
+ */
+static PostgresPollingStatusType
+open_client_SSL(PGconn *conn)
+{
+ int r;
+
+ ERR_clear_error();
+ r = SSL_connect(conn->ssl);
+ if (r <= 0)
+ {
+ int err = SSL_get_error(conn->ssl, r);
+ unsigned long ecode;
+
+ ecode = ERR_get_error();
+ switch (err)
+ {
+ case SSL_ERROR_WANT_READ:
+ return PGRES_POLLING_READING;
+
+ case SSL_ERROR_WANT_WRITE:
+ return PGRES_POLLING_WRITING;
+
+ case SSL_ERROR_SYSCALL:
+ {
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ if (r == -1)
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ else
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: EOF detected\n"));
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+ case SSL_ERROR_SSL:
+ {
+ char *err = SSLerrmessage(ecode);
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL error: %s\n"),
+ err);
+ SSLerrfree(err);
+ switch (ERR_GET_REASON(ecode))
+ {
+ /*
+ * UNSUPPORTED_PROTOCOL, WRONG_VERSION_NUMBER, and
+ * TLSV1_ALERT_PROTOCOL_VERSION have been observed
+ * when trying to communicate with an old OpenSSL
+ * library, or when the client and server specify
+ * disjoint protocol ranges.
+ * NO_PROTOCOLS_AVAILABLE occurs if there's a
+ * local misconfiguration (which can happen
+ * despite our checks, if openssl.cnf injects a
+ * limit we didn't account for). It's not very
+ * clear what would make OpenSSL return the other
+ * codes listed here, but a hint about protocol
+ * versions seems like it's appropriate for all.
+ */
+ case SSL_R_NO_PROTOCOLS_AVAILABLE:
+ case SSL_R_UNSUPPORTED_PROTOCOL:
+ case SSL_R_BAD_PROTOCOL_VERSION_NUMBER:
+ case SSL_R_UNKNOWN_PROTOCOL:
+ case SSL_R_UNKNOWN_SSL_VERSION:
+ case SSL_R_UNSUPPORTED_SSL_VERSION:
+ case SSL_R_WRONG_SSL_VERSION:
+ case SSL_R_WRONG_VERSION_NUMBER:
+ case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
+#ifdef SSL_R_VERSION_TOO_HIGH
+ case SSL_R_VERSION_TOO_HIGH:
+ case SSL_R_VERSION_TOO_LOW:
+#endif
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("This may indicate that the server does not support any SSL protocol version between %s and %s.\n"),
+ conn->ssl_min_protocol_version ?
+ conn->ssl_min_protocol_version :
+ MIN_OPENSSL_TLS_VERSION,
+ conn->ssl_max_protocol_version ?
+ conn->ssl_max_protocol_version :
+ MAX_OPENSSL_TLS_VERSION);
+ break;
+ default:
+ break;
+ }
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unrecognized SSL error code: %d\n"),
+ err);
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+ }
+
+ /*
+ * We already checked the server certificate in initialize_SSL() using
+ * SSL_CTX_set_verify(), if root.crt exists.
+ */
+
+ /* get server certificate */
+ conn->peer = SSL_get_peer_certificate(conn->ssl);
+ if (conn->peer == NULL)
+ {
+ char *err = SSLerrmessage(ERR_get_error());
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("certificate could not be obtained: %s\n"),
+ err);
+ SSLerrfree(err);
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+
+ if (!pq_verify_peer_name_matches_certificate(conn))
+ {
+ pgtls_close(conn);
+ return PGRES_POLLING_FAILED;
+ }
+
+ /* SSL handshake is complete */
+ return PGRES_POLLING_OK;
+}
+
+void
+pgtls_close(PGconn *conn)
+{
+ bool destroy_needed = false;
+
+ if (conn->ssl_in_use)
+ {
+ if (conn->ssl)
+ {
+ /*
+ * We can't destroy everything SSL-related here due to the
+ * possible later calls to OpenSSL routines which may need our
+ * thread callbacks, so set a flag here and check at the end.
+ */
+
+ SSL_shutdown(conn->ssl);
+ SSL_free(conn->ssl);
+ conn->ssl = NULL;
+ conn->ssl_in_use = false;
+
+ destroy_needed = true;
+ }
+
+ if (conn->peer)
+ {
+ X509_free(conn->peer);
+ conn->peer = NULL;
+ }
+
+#ifdef USE_SSL_ENGINE
+ if (conn->engine)
+ {
+ ENGINE_finish(conn->engine);
+ ENGINE_free(conn->engine);
+ conn->engine = NULL;
+ }
+#endif
+ }
+ else
+ {
+ /*
+ * In the non-SSL case, just remove the crypto callbacks if the
+ * connection has then loaded. This code path has no dependency on
+ * any pending SSL calls.
+ */
+ if (conn->crypto_loaded)
+ destroy_needed = true;
+ }
+
+ /*
+ * This will remove our crypto locking hooks if this is the last
+ * connection using libcrypto which means we must wait to call it until
+ * after all the potential SSL calls have been made, otherwise we can end
+ * up with a race condition and possible deadlocks.
+ *
+ * See comments above destroy_ssl_system().
+ */
+ if (destroy_needed)
+ {
+ destroy_ssl_system();
+ conn->crypto_loaded = false;
+ }
+}
+
+
+/*
+ * Obtain reason string for passed SSL errcode
+ *
+ * ERR_get_error() is used by caller to get errcode to pass here.
+ *
+ * Some caution is needed here since ERR_reason_error_string will
+ * return NULL if it doesn't recognize the error code. We don't
+ * want to return NULL ever.
+ */
+static char ssl_nomem[] = "out of memory allocating error description";
+
+#define SSL_ERR_LEN 128
+
+static char *
+SSLerrmessage(unsigned long ecode)
+{
+ const char *errreason;
+ char *errbuf;
+
+ errbuf = malloc(SSL_ERR_LEN);
+ if (!errbuf)
+ return ssl_nomem;
+ if (ecode == 0)
+ {
+ snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("no SSL error reported"));
+ return errbuf;
+ }
+ errreason = ERR_reason_error_string(ecode);
+ if (errreason != NULL)
+ {
+ strlcpy(errbuf, errreason, SSL_ERR_LEN);
+ return errbuf;
+ }
+ snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("SSL error code %lu"), ecode);
+ return errbuf;
+}
+
+static void
+SSLerrfree(char *buf)
+{
+ if (buf != ssl_nomem)
+ free(buf);
+}
+
+/* ------------------------------------------------------------ */
+/* SSL information functions */
+/* ------------------------------------------------------------ */
+
+/*
+ * Return pointer to OpenSSL object.
+ */
+void *
+PQgetssl(PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return conn->ssl;
+}
+
+void *
+PQsslStruct(PGconn *conn, const char *struct_name)
+{
+ if (!conn)
+ return NULL;
+ if (strcmp(struct_name, "OpenSSL") == 0)
+ return conn->ssl;
+ return NULL;
+}
+
+const char *const *
+PQsslAttributeNames(PGconn *conn)
+{
+ static const char *const result[] = {
+ "library",
+ "key_bits",
+ "cipher",
+ "compression",
+ "protocol",
+ NULL
+ };
+
+ return result;
+}
+
+const char *
+PQsslAttribute(PGconn *conn, const char *attribute_name)
+{
+ if (!conn)
+ return NULL;
+ if (conn->ssl == NULL)
+ return NULL;
+
+ if (strcmp(attribute_name, "library") == 0)
+ return "OpenSSL";
+
+ if (strcmp(attribute_name, "key_bits") == 0)
+ {
+ static char sslbits_str[12];
+ int sslbits;
+
+ SSL_get_cipher_bits(conn->ssl, &sslbits);
+ snprintf(sslbits_str, sizeof(sslbits_str), "%d", sslbits);
+ return sslbits_str;
+ }
+
+ if (strcmp(attribute_name, "cipher") == 0)
+ return SSL_get_cipher(conn->ssl);
+
+ if (strcmp(attribute_name, "compression") == 0)
+ return SSL_get_current_compression(conn->ssl) ? "on" : "off";
+
+ if (strcmp(attribute_name, "protocol") == 0)
+ return SSL_get_version(conn->ssl);
+
+ return NULL; /* unknown attribute */
+}
+
+/*
+ * Private substitute BIO: this does the sending and receiving using
+ * pqsecure_raw_write() and pqsecure_raw_read() instead, to allow those
+ * functions to disable SIGPIPE and give better error messages on I/O errors.
+ *
+ * These functions are closely modelled on the standard socket BIO in OpenSSL;
+ * see sock_read() and sock_write() in OpenSSL's crypto/bio/bss_sock.c.
+ * XXX OpenSSL 1.0.1e considers many more errcodes than just EINTR as reasons
+ * to retry; do we need to adopt their logic for that?
+ */
+
+#ifndef HAVE_BIO_GET_DATA
+#define BIO_get_data(bio) (bio->ptr)
+#define BIO_set_data(bio, data) (bio->ptr = data)
+#endif
+
+static BIO_METHOD *my_bio_methods;
+
+static int
+my_sock_read(BIO *h, char *buf, int size)
+{
+ int res;
+
+ res = pqsecure_raw_read((PGconn *) BIO_get_data(h), buf, size);
+ BIO_clear_retry_flags(h);
+ if (res < 0)
+ {
+ /* If we were interrupted, tell caller to retry */
+ switch (SOCK_ERRNO)
+ {
+#ifdef EAGAIN
+ case EAGAIN:
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+#endif
+ case EINTR:
+ BIO_set_retry_read(h);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return res;
+}
+
+static int
+my_sock_write(BIO *h, const char *buf, int size)
+{
+ int res;
+
+ res = pqsecure_raw_write((PGconn *) BIO_get_data(h), buf, size);
+ BIO_clear_retry_flags(h);
+ if (res < 0)
+ {
+ /* If we were interrupted, tell caller to retry */
+ switch (SOCK_ERRNO)
+ {
+#ifdef EAGAIN
+ case EAGAIN:
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+#endif
+ case EINTR:
+ BIO_set_retry_write(h);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return res;
+}
+
+static BIO_METHOD *
+my_BIO_s_socket(void)
+{
+ if (!my_bio_methods)
+ {
+ BIO_METHOD *biom = (BIO_METHOD *) BIO_s_socket();
+#ifdef HAVE_BIO_METH_NEW
+ int my_bio_index;
+
+ my_bio_index = BIO_get_new_index();
+ if (my_bio_index == -1)
+ return NULL;
+ my_bio_index |= (BIO_TYPE_DESCRIPTOR | BIO_TYPE_SOURCE_SINK);
+ my_bio_methods = BIO_meth_new(my_bio_index, "libpq socket");
+ if (!my_bio_methods)
+ return NULL;
+
+ /*
+ * As of this writing, these functions never fail. But check anyway,
+ * like OpenSSL's own examples do.
+ */
+ if (!BIO_meth_set_write(my_bio_methods, my_sock_write) ||
+ !BIO_meth_set_read(my_bio_methods, my_sock_read) ||
+ !BIO_meth_set_gets(my_bio_methods, BIO_meth_get_gets(biom)) ||
+ !BIO_meth_set_puts(my_bio_methods, BIO_meth_get_puts(biom)) ||
+ !BIO_meth_set_ctrl(my_bio_methods, BIO_meth_get_ctrl(biom)) ||
+ !BIO_meth_set_create(my_bio_methods, BIO_meth_get_create(biom)) ||
+ !BIO_meth_set_destroy(my_bio_methods, BIO_meth_get_destroy(biom)) ||
+ !BIO_meth_set_callback_ctrl(my_bio_methods, BIO_meth_get_callback_ctrl(biom)))
+ {
+ BIO_meth_free(my_bio_methods);
+ my_bio_methods = NULL;
+ return NULL;
+ }
+#else
+ my_bio_methods = malloc(sizeof(BIO_METHOD));
+ if (!my_bio_methods)
+ return NULL;
+ memcpy(my_bio_methods, biom, sizeof(BIO_METHOD));
+ my_bio_methods->bread = my_sock_read;
+ my_bio_methods->bwrite = my_sock_write;
+#endif
+ }
+ return my_bio_methods;
+}
+
+/* This should exactly match OpenSSL's SSL_set_fd except for using my BIO */
+static int
+my_SSL_set_fd(PGconn *conn, int fd)
+{
+ int ret = 0;
+ BIO *bio;
+ BIO_METHOD *bio_method;
+
+ bio_method = my_BIO_s_socket();
+ if (bio_method == NULL)
+ {
+ SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB);
+ goto err;
+ }
+ bio = BIO_new(bio_method);
+ if (bio == NULL)
+ {
+ SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB);
+ goto err;
+ }
+ BIO_set_data(bio, conn);
+
+ SSL_set_bio(conn->ssl, bio, bio);
+ BIO_set_fd(bio, fd, BIO_NOCLOSE);
+ ret = 1;
+err:
+ return ret;
+}
+
+/*
+ * This is the default handler to return a client cert password from
+ * conn->sslpassword. Apps may install it explicitly if they want to
+ * prevent openssl from ever prompting on stdin.
+ */
+int
+PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
+{
+ if (conn->sslpassword)
+ {
+ if (strlen(conn->sslpassword) + 1 > size)
+ fprintf(stderr, libpq_gettext("WARNING: sslpassword truncated\n"));
+ strncpy(buf, conn->sslpassword, size);
+ buf[size - 1] = '\0';
+ return strlen(buf);
+ }
+ else
+ {
+ buf[0] = '\0';
+ return 0;
+ }
+}
+
+PQsslKeyPassHook_OpenSSL_type
+PQgetSSLKeyPassHook_OpenSSL(void)
+{
+ return PQsslKeyPassHook;
+}
+
+void
+PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook)
+{
+ PQsslKeyPassHook = hook;
+}
+
+/*
+ * Supply a password to decrypt a client certificate.
+ *
+ * This must match OpenSSL type pem_password_cb.
+ */
+static int
+PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata)
+{
+ PGconn *conn = userdata;
+
+ if (PQsslKeyPassHook)
+ return PQsslKeyPassHook(buf, size, conn);
+ else
+ return PQdefaultSSLKeyPassHook_OpenSSL(buf, size, conn);
+}
+
+/*
+ * Convert TLS protocol version string to OpenSSL values
+ *
+ * If a version is passed that is not supported by the current OpenSSL version,
+ * then we return -1. If a non-negative value is returned, subsequent code can
+ * assume it is working with a supported version.
+ *
+ * Note: this is rather similar to the backend routine in be-secure-openssl.c,
+ * so make sure to update both routines if changing this one.
+ */
+static int
+ssl_protocol_version_to_openssl(const char *protocol)
+{
+ if (pg_strcasecmp("TLSv1", protocol) == 0)
+ return TLS1_VERSION;
+
+#ifdef TLS1_1_VERSION
+ if (pg_strcasecmp("TLSv1.1", protocol) == 0)
+ return TLS1_1_VERSION;
+#endif
+
+#ifdef TLS1_2_VERSION
+ if (pg_strcasecmp("TLSv1.2", protocol) == 0)
+ return TLS1_2_VERSION;
+#endif
+
+#ifdef TLS1_3_VERSION
+ if (pg_strcasecmp("TLSv1.3", protocol) == 0)
+ return TLS1_3_VERSION;
+#endif
+
+ return -1;
+}
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
new file mode 100644
index 0000000..b15d8d1
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure.c
@@ -0,0 +1,552 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure.c
+ * functions related to setting up a secure connection to the backend.
+ * Secure connections are expected to provide confidentiality,
+ * message integrity and endpoint authentication.
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <signal.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <sys/socket.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+#include <arpa/inet.h>
+#endif
+
+#include <sys/stat.h>
+
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#include "pthread-win32.h"
+#else
+#include <pthread.h>
+#endif
+#endif
+
+#include "fe-auth.h"
+#include "libpq-fe.h"
+#include "libpq-int.h"
+
+/*
+ * Macros to handle disabling and then restoring the state of SIGPIPE handling.
+ * On Windows, these are all no-ops since there's no SIGPIPEs.
+ */
+
+#ifndef WIN32
+
+#define SIGPIPE_MASKED(conn) ((conn)->sigpipe_so || (conn)->sigpipe_flag)
+
+#ifdef ENABLE_THREAD_SAFETY
+
+struct sigpipe_info
+{
+ sigset_t oldsigmask;
+ bool sigpipe_pending;
+ bool got_epipe;
+};
+
+#define DECLARE_SIGPIPE_INFO(spinfo) struct sigpipe_info spinfo
+
+#define DISABLE_SIGPIPE(conn, spinfo, failaction) \
+ do { \
+ (spinfo).got_epipe = false; \
+ if (!SIGPIPE_MASKED(conn)) \
+ { \
+ if (pq_block_sigpipe(&(spinfo).oldsigmask, \
+ &(spinfo).sigpipe_pending) < 0) \
+ failaction; \
+ } \
+ } while (0)
+
+#define REMEMBER_EPIPE(spinfo, cond) \
+ do { \
+ if (cond) \
+ (spinfo).got_epipe = true; \
+ } while (0)
+
+#define RESTORE_SIGPIPE(conn, spinfo) \
+ do { \
+ if (!SIGPIPE_MASKED(conn)) \
+ pq_reset_sigpipe(&(spinfo).oldsigmask, (spinfo).sigpipe_pending, \
+ (spinfo).got_epipe); \
+ } while (0)
+#else /* !ENABLE_THREAD_SAFETY */
+
+#define DECLARE_SIGPIPE_INFO(spinfo) pqsigfunc spinfo = NULL
+
+#define DISABLE_SIGPIPE(conn, spinfo, failaction) \
+ do { \
+ if (!SIGPIPE_MASKED(conn)) \
+ spinfo = pqsignal(SIGPIPE, SIG_IGN); \
+ } while (0)
+
+#define REMEMBER_EPIPE(spinfo, cond)
+
+#define RESTORE_SIGPIPE(conn, spinfo) \
+ do { \
+ if (!SIGPIPE_MASKED(conn)) \
+ pqsignal(SIGPIPE, spinfo); \
+ } while (0)
+#endif /* ENABLE_THREAD_SAFETY */
+#else /* WIN32 */
+
+#define DECLARE_SIGPIPE_INFO(spinfo)
+#define DISABLE_SIGPIPE(conn, spinfo, failaction)
+#define REMEMBER_EPIPE(spinfo, cond)
+#define RESTORE_SIGPIPE(conn, spinfo)
+#endif /* WIN32 */
+
+/* ------------------------------------------------------------ */
+/* Procedures common to all secure sessions */
+/* ------------------------------------------------------------ */
+
+
+int
+PQsslInUse(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+ return conn->ssl_in_use;
+}
+
+/*
+ * Exported function to allow application to tell us it's already
+ * initialized OpenSSL.
+ */
+void
+PQinitSSL(int do_init)
+{
+#ifdef USE_SSL
+ pgtls_init_library(do_init, do_init);
+#endif
+}
+
+/*
+ * Exported function to allow application to tell us it's already
+ * initialized OpenSSL and/or libcrypto.
+ */
+void
+PQinitOpenSSL(int do_ssl, int do_crypto)
+{
+#ifdef USE_SSL
+ pgtls_init_library(do_ssl, do_crypto);
+#endif
+}
+
+/*
+ * Initialize global SSL context
+ */
+int
+pqsecure_initialize(PGconn *conn, bool do_ssl, bool do_crypto)
+{
+ int r = 0;
+
+#ifdef USE_SSL
+ r = pgtls_init(conn, do_ssl, do_crypto);
+#endif
+
+ return r;
+}
+
+/*
+ * Begin or continue negotiating a secure session.
+ */
+PostgresPollingStatusType
+pqsecure_open_client(PGconn *conn)
+{
+#ifdef USE_SSL
+ return pgtls_open_client(conn);
+#else
+ /* shouldn't get here */
+ return PGRES_POLLING_FAILED;
+#endif
+}
+
+/*
+ * Close secure session.
+ */
+void
+pqsecure_close(PGconn *conn)
+{
+#ifdef USE_SSL
+ pgtls_close(conn);
+#endif
+}
+
+/*
+ * Read data from a secure connection.
+ *
+ * On failure, this function is responsible for appending a suitable message
+ * to conn->errorMessage. The caller must still inspect errno, but only
+ * to determine whether to continue/retry after error.
+ */
+ssize_t
+pqsecure_read(PGconn *conn, void *ptr, size_t len)
+{
+ ssize_t n;
+
+#ifdef USE_SSL
+ if (conn->ssl_in_use)
+ {
+ n = pgtls_read(conn, ptr, len);
+ }
+ else
+#endif
+#ifdef ENABLE_GSS
+ if (conn->gssenc)
+ {
+ n = pg_GSS_read(conn, ptr, len);
+ }
+ else
+#endif
+ {
+ n = pqsecure_raw_read(conn, ptr, len);
+ }
+
+ return n;
+}
+
+ssize_t
+pqsecure_raw_read(PGconn *conn, void *ptr, size_t len)
+{
+ ssize_t n;
+ int result_errno = 0;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ n = recv(conn->sock, ptr, len, 0);
+
+ if (n < 0)
+ {
+ result_errno = SOCK_ERRNO;
+
+ /* Set error message if appropriate */
+ switch (result_errno)
+ {
+#ifdef EAGAIN
+ case EAGAIN:
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+#endif
+ case EINTR:
+ /* no error message, caller is expected to retry */
+ break;
+
+ case EPIPE:
+ case ECONNRESET:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server closed the connection unexpectedly\n"
+ "\tThis probably means the server terminated abnormally\n"
+ "\tbefore or while processing the request.\n"));
+ break;
+
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not receive data from server: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ break;
+ }
+ }
+
+ /* ensure we return the intended errno to caller */
+ SOCK_ERRNO_SET(result_errno);
+
+ return n;
+}
+
+/*
+ * Write data to a secure connection.
+ *
+ * On failure, this function is responsible for appending a suitable message
+ * to conn->errorMessage. The caller must still inspect errno, but only
+ * to determine whether to continue/retry after error.
+ */
+ssize_t
+pqsecure_write(PGconn *conn, const void *ptr, size_t len)
+{
+ ssize_t n;
+
+#ifdef USE_SSL
+ if (conn->ssl_in_use)
+ {
+ n = pgtls_write(conn, ptr, len);
+ }
+ else
+#endif
+#ifdef ENABLE_GSS
+ if (conn->gssenc)
+ {
+ n = pg_GSS_write(conn, ptr, len);
+ }
+ else
+#endif
+ {
+ n = pqsecure_raw_write(conn, ptr, len);
+ }
+
+ return n;
+}
+
+ssize_t
+pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len)
+{
+ ssize_t n;
+ int flags = 0;
+ int result_errno = 0;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+ DECLARE_SIGPIPE_INFO(spinfo);
+
+#ifdef MSG_NOSIGNAL
+ if (conn->sigpipe_flag)
+ flags |= MSG_NOSIGNAL;
+
+retry_masked:
+#endif /* MSG_NOSIGNAL */
+
+ DISABLE_SIGPIPE(conn, spinfo, return -1);
+
+ n = send(conn->sock, ptr, len, flags);
+
+ if (n < 0)
+ {
+ result_errno = SOCK_ERRNO;
+
+ /*
+ * If we see an EINVAL, it may be because MSG_NOSIGNAL isn't available
+ * on this machine. So, clear sigpipe_flag so we don't try the flag
+ * again, and retry the send().
+ */
+#ifdef MSG_NOSIGNAL
+ if (flags != 0 && result_errno == EINVAL)
+ {
+ conn->sigpipe_flag = false;
+ flags = 0;
+ goto retry_masked;
+ }
+#endif /* MSG_NOSIGNAL */
+
+ /* Set error message if appropriate */
+ switch (result_errno)
+ {
+#ifdef EAGAIN
+ case EAGAIN:
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ case EWOULDBLOCK:
+#endif
+ case EINTR:
+ /* no error message, caller is expected to retry */
+ break;
+
+ case EPIPE:
+ /* Set flag for EPIPE */
+ REMEMBER_EPIPE(spinfo, true);
+
+ /* FALL THRU */
+
+ case ECONNRESET:
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("server closed the connection unexpectedly\n"
+ "\tThis probably means the server terminated abnormally\n"
+ "\tbefore or while processing the request.\n"));
+ break;
+
+ default:
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not send data to server: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ break;
+ }
+ }
+
+ RESTORE_SIGPIPE(conn, spinfo);
+
+ /* ensure we return the intended errno to caller */
+ SOCK_ERRNO_SET(result_errno);
+
+ return n;
+}
+
+/* Dummy versions of SSL info functions, when built without SSL support */
+#ifndef USE_SSL
+
+void *
+PQgetssl(PGconn *conn)
+{
+ return NULL;
+}
+
+void *
+PQsslStruct(PGconn *conn, const char *struct_name)
+{
+ return NULL;
+}
+
+const char *
+PQsslAttribute(PGconn *conn, const char *attribute_name)
+{
+ return NULL;
+}
+
+const char *const *
+PQsslAttributeNames(PGconn *conn)
+{
+ static const char *const result[] = {NULL};
+
+ return result;
+}
+#endif /* USE_SSL */
+
+/*
+ * Dummy versions of OpenSSL key password hook functions, when built without
+ * OpenSSL.
+ */
+#ifndef USE_OPENSSL
+
+PQsslKeyPassHook_OpenSSL_type
+PQgetSSLKeyPassHook_OpenSSL(void)
+{
+ return NULL;
+}
+
+void
+PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook)
+{
+ return;
+}
+
+int
+PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
+{
+ return 0;
+}
+#endif /* USE_OPENSSL */
+
+/* Dummy version of GSSAPI information functions, when built without GSS support */
+#ifndef ENABLE_GSS
+
+void *
+PQgetgssctx(PGconn *conn)
+{
+ return NULL;
+}
+
+int
+PQgssEncInUse(PGconn *conn)
+{
+ return 0;
+}
+
+#endif /* ENABLE_GSS */
+
+
+#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
+
+/*
+ * Block SIGPIPE for this thread. This prevents send()/write() from exiting
+ * the application.
+ */
+int
+pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending)
+{
+ sigset_t sigpipe_sigset;
+ sigset_t sigset;
+
+ sigemptyset(&sigpipe_sigset);
+ sigaddset(&sigpipe_sigset, SIGPIPE);
+
+ /* Block SIGPIPE and save previous mask for later reset */
+ SOCK_ERRNO_SET(pthread_sigmask(SIG_BLOCK, &sigpipe_sigset, osigset));
+ if (SOCK_ERRNO)
+ return -1;
+
+ /* We can have a pending SIGPIPE only if it was blocked before */
+ if (sigismember(osigset, SIGPIPE))
+ {
+ /* Is there a pending SIGPIPE? */
+ if (sigpending(&sigset) != 0)
+ return -1;
+
+ if (sigismember(&sigset, SIGPIPE))
+ *sigpipe_pending = true;
+ else
+ *sigpipe_pending = false;
+ }
+ else
+ *sigpipe_pending = false;
+
+ return 0;
+}
+
+/*
+ * Discard any pending SIGPIPE and reset the signal mask.
+ *
+ * Note: we are effectively assuming here that the C library doesn't queue
+ * up multiple SIGPIPE events. If it did, then we'd accidentally leave
+ * ours in the queue when an event was already pending and we got another.
+ * As long as it doesn't queue multiple events, we're OK because the caller
+ * can't tell the difference.
+ *
+ * The caller should say got_epipe = false if it is certain that it
+ * didn't get an EPIPE error; in that case we'll skip the clear operation
+ * and things are definitely OK, queuing or no. If it got one or might have
+ * gotten one, pass got_epipe = true.
+ *
+ * We do not want this to change errno, since if it did that could lose
+ * the error code from a preceding send(). We essentially assume that if
+ * we were able to do pq_block_sigpipe(), this can't fail.
+ */
+void
+pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe)
+{
+ int save_errno = SOCK_ERRNO;
+ int signo;
+ sigset_t sigset;
+
+ /* Clear SIGPIPE only if none was pending */
+ if (got_epipe && !sigpipe_pending)
+ {
+ if (sigpending(&sigset) == 0 &&
+ sigismember(&sigset, SIGPIPE))
+ {
+ sigset_t sigpipe_sigset;
+
+ sigemptyset(&sigpipe_sigset);
+ sigaddset(&sigpipe_sigset, SIGPIPE);
+
+ sigwait(&sigpipe_sigset, &signo);
+ }
+ }
+
+ /* Restore saved block mask */
+ pthread_sigmask(SIG_SETMASK, osigset, NULL);
+
+ SOCK_ERRNO_SET(save_errno);
+}
+
+#endif /* ENABLE_THREAD_SAFETY && !WIN32 */
diff --git a/src/interfaces/libpq/fe-trace.c b/src/interfaces/libpq/fe-trace.c
new file mode 100644
index 0000000..8660d27
--- /dev/null
+++ b/src/interfaces/libpq/fe-trace.c
@@ -0,0 +1,729 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-trace.c
+ * functions for libpq protocol tracing
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-trace.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <ctype.h>
+#include <limits.h>
+#include <sys/time.h>
+#include <time.h>
+
+#ifdef WIN32
+#include "win32.h"
+#else
+#include <unistd.h>
+#endif
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+#include "port/pg_bswap.h"
+
+
+/* Enable tracing */
+void
+PQtrace(PGconn *conn, FILE *debug_port)
+{
+ if (conn == NULL)
+ return;
+ PQuntrace(conn);
+ if (debug_port == NULL)
+ return;
+
+ conn->Pfdebug = debug_port;
+ conn->traceFlags = 0;
+}
+
+/* Disable tracing */
+void
+PQuntrace(PGconn *conn)
+{
+ if (conn == NULL)
+ return;
+ if (conn->Pfdebug)
+ {
+ fflush(conn->Pfdebug);
+ conn->Pfdebug = NULL;
+ }
+
+ conn->traceFlags = 0;
+}
+
+/* Set flags for current tracing session */
+void
+PQsetTraceFlags(PGconn *conn, int flags)
+{
+ if (conn == NULL)
+ return;
+ /* If PQtrace() failed, do nothing. */
+ if (conn->Pfdebug == NULL)
+ return;
+ conn->traceFlags = flags;
+}
+
+/*
+ * Print the current time, with microseconds, into a caller-supplied
+ * buffer.
+ * Cribbed from setup_formatted_log_time, but much simpler.
+ */
+static void
+pqTraceFormatTimestamp(char *timestr, size_t ts_len)
+{
+ struct timeval tval;
+ time_t now;
+
+ gettimeofday(&tval, NULL);
+
+ /*
+ * MSVC's implementation of timeval uses a long for tv_sec, however,
+ * localtime() expects a time_t pointer. Here we'll assign tv_sec to a
+ * local time_t variable so that we pass localtime() the correct pointer
+ * type.
+ */
+ now = tval.tv_sec;
+ strftime(timestr, ts_len,
+ "%Y-%m-%d %H:%M:%S",
+ localtime(&now));
+ /* append microseconds */
+ snprintf(timestr + strlen(timestr), ts_len - strlen(timestr),
+ ".%06u", (unsigned int) (tval.tv_usec));
+}
+
+/*
+ * pqTraceOutputByte1: output a 1-char message to the log
+ */
+static void
+pqTraceOutputByte1(FILE *pfdebug, const char *data, int *cursor)
+{
+ const char *v = data + *cursor;
+
+ /*
+ * Show non-printable data in hex format, including the terminating \0
+ * that completes ErrorResponse and NoticeResponse messages.
+ */
+ if (!isprint((unsigned char) *v))
+ fprintf(pfdebug, " \\x%02x", *v);
+ else
+ fprintf(pfdebug, " %c", *v);
+ *cursor += 1;
+}
+
+/*
+ * pqTraceOutputInt16: output a 2-byte integer message to the log
+ */
+static int
+pqTraceOutputInt16(FILE *pfdebug, const char *data, int *cursor)
+{
+ uint16 tmp;
+ int result;
+
+ memcpy(&tmp, data + *cursor, 2);
+ *cursor += 2;
+ result = (int) pg_ntoh16(tmp);
+ fprintf(pfdebug, " %d", result);
+
+ return result;
+}
+
+/*
+ * pqTraceOutputInt32: output a 4-byte integer message to the log
+ *
+ * If 'suppress' is true, print a literal NNNN instead of the actual number.
+ */
+static int
+pqTraceOutputInt32(FILE *pfdebug, const char *data, int *cursor, bool suppress)
+{
+ int result;
+
+ memcpy(&result, data + *cursor, 4);
+ *cursor += 4;
+ result = (int) pg_ntoh32(result);
+ if (suppress)
+ fprintf(pfdebug, " NNNN");
+ else
+ fprintf(pfdebug, " %d", result);
+
+ return result;
+}
+
+/*
+ * pqTraceOutputString: output a string message to the log
+ */
+static void
+pqTraceOutputString(FILE *pfdebug, const char *data, int *cursor, bool suppress)
+{
+ int len;
+
+ if (suppress)
+ {
+ fprintf(pfdebug, " \"SSSS\"");
+ *cursor += strlen(data + *cursor) + 1;
+ }
+ else
+ {
+ len = fprintf(pfdebug, " \"%s\"", data + *cursor);
+
+ /*
+ * This is a null-terminated string. So add 1 after subtracting 3
+ * which is the double quotes and space length from len.
+ */
+ *cursor += (len - 3 + 1);
+ }
+}
+
+/*
+ * pqTraceOutputNchar: output a string of exactly len bytes message to the log
+ */
+static void
+pqTraceOutputNchar(FILE *pfdebug, int len, const char *data, int *cursor)
+{
+ int i,
+ next; /* first char not yet printed */
+ const char *v = data + *cursor;
+
+ fprintf(pfdebug, " \'");
+
+ for (next = i = 0; i < len; ++i)
+ {
+ if (isprint((unsigned char) v[i]))
+ continue;
+ else
+ {
+ fwrite(v + next, 1, i - next, pfdebug);
+ fprintf(pfdebug, "\\x%02x", v[i]);
+ next = i + 1;
+ }
+ }
+ if (next < len)
+ fwrite(v + next, 1, len - next, pfdebug);
+
+ fprintf(pfdebug, "\'");
+ *cursor += len;
+}
+
+/*
+ * Output functions by protocol message type
+ */
+
+/* NotificationResponse */
+static void
+pqTraceOutputA(FILE *f, const char *message, int *cursor, bool regress)
+{
+ fprintf(f, "NotificationResponse\t");
+ pqTraceOutputInt32(f, message, cursor, regress);
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputString(f, message, cursor, false);
+}
+
+/* Bind */
+static void
+pqTraceOutputB(FILE *f, const char *message, int *cursor)
+{
+ int nparams;
+
+ fprintf(f, "Bind\t");
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputString(f, message, cursor, false);
+ nparams = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nparams; i++)
+ pqTraceOutputInt16(f, message, cursor);
+
+ nparams = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nparams; i++)
+ {
+ int nbytes;
+
+ nbytes = pqTraceOutputInt32(f, message, cursor, false);
+ if (nbytes == -1)
+ continue;
+ pqTraceOutputNchar(f, nbytes, message, cursor);
+ }
+
+ nparams = pqTraceOutputInt16(f, message, cursor);
+ for (int i = 0; i < nparams; i++)
+ pqTraceOutputInt16(f, message, cursor);
+}
+
+/* Close(F) or CommandComplete(B) */
+static void
+pqTraceOutputC(FILE *f, bool toServer, const char *message, int *cursor)
+{
+ if (toServer)
+ {
+ fprintf(f, "Close\t");
+ pqTraceOutputByte1(f, message, cursor);
+ pqTraceOutputString(f, message, cursor, false);
+ }
+ else
+ {
+ fprintf(f, "CommandComplete\t");
+ pqTraceOutputString(f, message, cursor, false);
+ }
+}
+
+/* Describe(F) or DataRow(B) */
+static void
+pqTraceOutputD(FILE *f, bool toServer, const char *message, int *cursor)
+{
+ if (toServer)
+ {
+ fprintf(f, "Describe\t");
+ pqTraceOutputByte1(f, message, cursor);
+ pqTraceOutputString(f, message, cursor, false);
+ }
+ else
+ {
+ int nfields;
+ int len;
+ int i;
+
+ fprintf(f, "DataRow\t");
+ nfields = pqTraceOutputInt16(f, message, cursor);
+ for (i = 0; i < nfields; i++)
+ {
+ len = pqTraceOutputInt32(f, message, cursor, false);
+ if (len == -1)
+ continue;
+ pqTraceOutputNchar(f, len, message, cursor);
+ }
+ }
+}
+
+/* NoticeResponse / ErrorResponse */
+static void
+pqTraceOutputNR(FILE *f, const char *type, const char *message, int *cursor,
+ bool regress)
+{
+ fprintf(f, "%s\t", type);
+ for (;;)
+ {
+ char field;
+ bool suppress;
+
+ pqTraceOutputByte1(f, message, cursor);
+ field = message[*cursor - 1];
+ if (field == '\0')
+ break;
+
+ suppress = regress && (field == 'L' || field == 'F' || field == 'R');
+ pqTraceOutputString(f, message, cursor, suppress);
+ }
+}
+
+/* Execute(F) or ErrorResponse(B) */
+static void
+pqTraceOutputE(FILE *f, bool toServer, const char *message, int *cursor, bool regress)
+{
+ if (toServer)
+ {
+ fprintf(f, "Execute\t");
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputInt32(f, message, cursor, false);
+ }
+ else
+ pqTraceOutputNR(f, "ErrorResponse", message, cursor, regress);
+}
+
+/* CopyFail */
+static void
+pqTraceOutputf(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "CopyFail\t");
+ pqTraceOutputString(f, message, cursor, false);
+}
+
+/* FunctionCall */
+static void
+pqTraceOutputF(FILE *f, const char *message, int *cursor, bool regress)
+{
+ int nfields;
+ int nbytes;
+
+ fprintf(f, "FunctionCall\t");
+ pqTraceOutputInt32(f, message, cursor, regress);
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ pqTraceOutputInt16(f, message, cursor);
+
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ {
+ nbytes = pqTraceOutputInt32(f, message, cursor, false);
+ if (nbytes == -1)
+ continue;
+ pqTraceOutputNchar(f, nbytes, message, cursor);
+ }
+
+ pqTraceOutputInt16(f, message, cursor);
+}
+
+/* CopyInResponse */
+static void
+pqTraceOutputG(FILE *f, const char *message, int *cursor)
+{
+ int nfields;
+
+ fprintf(f, "CopyInResponse\t");
+ pqTraceOutputByte1(f, message, cursor);
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ pqTraceOutputInt16(f, message, cursor);
+}
+
+/* CopyOutResponse */
+static void
+pqTraceOutputH(FILE *f, const char *message, int *cursor)
+{
+ int nfields;
+
+ fprintf(f, "CopyOutResponse\t");
+ pqTraceOutputByte1(f, message, cursor);
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ pqTraceOutputInt16(f, message, cursor);
+}
+
+/* BackendKeyData */
+static void
+pqTraceOutputK(FILE *f, const char *message, int *cursor, bool regress)
+{
+ fprintf(f, "BackendKeyData\t");
+ pqTraceOutputInt32(f, message, cursor, regress);
+ pqTraceOutputInt32(f, message, cursor, regress);
+}
+
+/* Parse */
+static void
+pqTraceOutputP(FILE *f, const char *message, int *cursor, bool regress)
+{
+ int nparams;
+
+ fprintf(f, "Parse\t");
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputString(f, message, cursor, false);
+ nparams = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nparams; i++)
+ pqTraceOutputInt32(f, message, cursor, regress);
+}
+
+/* Query */
+static void
+pqTraceOutputQ(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "Query\t");
+ pqTraceOutputString(f, message, cursor, false);
+}
+
+/* Authentication */
+static void
+pqTraceOutputR(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "Authentication\t");
+ pqTraceOutputInt32(f, message, cursor, false);
+}
+
+/* ParameterStatus */
+static void
+pqTraceOutputS(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "ParameterStatus\t");
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputString(f, message, cursor, false);
+}
+
+/* ParameterDescription */
+static void
+pqTraceOutputt(FILE *f, const char *message, int *cursor, bool regress)
+{
+ int nfields;
+
+ fprintf(f, "ParameterDescription\t");
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ pqTraceOutputInt32(f, message, cursor, regress);
+}
+
+/* RowDescription */
+static void
+pqTraceOutputT(FILE *f, const char *message, int *cursor, bool regress)
+{
+ int nfields;
+
+ fprintf(f, "RowDescription\t");
+ nfields = pqTraceOutputInt16(f, message, cursor);
+
+ for (int i = 0; i < nfields; i++)
+ {
+ pqTraceOutputString(f, message, cursor, false);
+ pqTraceOutputInt32(f, message, cursor, regress);
+ pqTraceOutputInt16(f, message, cursor);
+ pqTraceOutputInt32(f, message, cursor, regress);
+ pqTraceOutputInt16(f, message, cursor);
+ pqTraceOutputInt32(f, message, cursor, false);
+ pqTraceOutputInt16(f, message, cursor);
+ }
+}
+
+/* NegotiateProtocolVersion */
+static void
+pqTraceOutputv(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "NegotiateProtocolVersion\t");
+ pqTraceOutputInt32(f, message, cursor, false);
+ pqTraceOutputInt32(f, message, cursor, false);
+}
+
+/* FunctionCallResponse */
+static void
+pqTraceOutputV(FILE *f, const char *message, int *cursor)
+{
+ int len;
+
+ fprintf(f, "FunctionCallResponse\t");
+ len = pqTraceOutputInt32(f, message, cursor, false);
+ if (len != -1)
+ pqTraceOutputNchar(f, len, message, cursor);
+}
+
+/* CopyBothResponse */
+static void
+pqTraceOutputW(FILE *f, const char *message, int *cursor, int length)
+{
+ fprintf(f, "CopyBothResponse\t");
+ pqTraceOutputByte1(f, message, cursor);
+
+ while (length > *cursor)
+ pqTraceOutputInt16(f, message, cursor);
+}
+
+/* ReadyForQuery */
+static void
+pqTraceOutputZ(FILE *f, const char *message, int *cursor)
+{
+ fprintf(f, "ReadyForQuery\t");
+ pqTraceOutputByte1(f, message, cursor);
+}
+
+/*
+ * Print the given message to the trace output stream.
+ */
+void
+pqTraceOutputMessage(PGconn *conn, const char *message, bool toServer)
+{
+ char id;
+ int length;
+ char *prefix = toServer ? "F" : "B";
+ int logCursor = 0;
+ bool regress;
+
+ if ((conn->traceFlags & PQTRACE_SUPPRESS_TIMESTAMPS) == 0)
+ {
+ char timestr[128];
+
+ pqTraceFormatTimestamp(timestr, sizeof(timestr));
+ fprintf(conn->Pfdebug, "%s\t", timestr);
+ }
+ regress = (conn->traceFlags & PQTRACE_REGRESS_MODE) != 0;
+
+ id = message[logCursor++];
+
+ memcpy(&length, message + logCursor, 4);
+ length = (int) pg_ntoh32(length);
+ logCursor += 4;
+
+ /*
+ * In regress mode, suppress the length of ErrorResponse and
+ * NoticeResponse. The F (file name), L (line number) and R (routine
+ * name) fields can change as server code is modified, and if their
+ * lengths differ from the originals, that would break tests.
+ */
+ if (regress && !toServer && (id == 'E' || id == 'N'))
+ fprintf(conn->Pfdebug, "%s\tNN\t", prefix);
+ else
+ fprintf(conn->Pfdebug, "%s\t%d\t", prefix, length);
+
+ switch (id)
+ {
+ case '1':
+ fprintf(conn->Pfdebug, "ParseComplete");
+ /* No message content */
+ break;
+ case '2':
+ fprintf(conn->Pfdebug, "BindComplete");
+ /* No message content */
+ break;
+ case '3':
+ fprintf(conn->Pfdebug, "CloseComplete");
+ /* No message content */
+ break;
+ case 'A': /* Notification Response */
+ pqTraceOutputA(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'B': /* Bind */
+ pqTraceOutputB(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'c':
+ fprintf(conn->Pfdebug, "CopyDone");
+ /* No message content */
+ break;
+ case 'C': /* Close(F) or Command Complete(B) */
+ pqTraceOutputC(conn->Pfdebug, toServer, message, &logCursor);
+ break;
+ case 'd': /* Copy Data */
+ /* Drop COPY data to reduce the overhead of logging. */
+ break;
+ case 'D': /* Describe(F) or Data Row(B) */
+ pqTraceOutputD(conn->Pfdebug, toServer, message, &logCursor);
+ break;
+ case 'E': /* Execute(F) or Error Response(B) */
+ pqTraceOutputE(conn->Pfdebug, toServer, message, &logCursor,
+ regress);
+ break;
+ case 'f': /* Copy Fail */
+ pqTraceOutputf(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'F': /* Function Call */
+ pqTraceOutputF(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'G': /* Start Copy In */
+ pqTraceOutputG(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'H': /* Flush(F) or Start Copy Out(B) */
+ if (!toServer)
+ pqTraceOutputH(conn->Pfdebug, message, &logCursor);
+ else
+ fprintf(conn->Pfdebug, "Flush"); /* no message content */
+ break;
+ case 'I':
+ fprintf(conn->Pfdebug, "EmptyQueryResponse");
+ /* No message content */
+ break;
+ case 'K': /* secret key data from the backend */
+ pqTraceOutputK(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'n':
+ fprintf(conn->Pfdebug, "NoData");
+ /* No message content */
+ break;
+ case 'N':
+ pqTraceOutputNR(conn->Pfdebug, "NoticeResponse", message,
+ &logCursor, regress);
+ break;
+ case 'P': /* Parse */
+ pqTraceOutputP(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'Q': /* Query */
+ pqTraceOutputQ(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'R': /* Authentication */
+ pqTraceOutputR(conn->Pfdebug, message, &logCursor);
+ break;
+ case 's':
+ fprintf(conn->Pfdebug, "PortalSuspended");
+ /* No message content */
+ break;
+ case 'S': /* Parameter Status(B) or Sync(F) */
+ if (!toServer)
+ pqTraceOutputS(conn->Pfdebug, message, &logCursor);
+ else
+ fprintf(conn->Pfdebug, "Sync"); /* no message content */
+ break;
+ case 't': /* Parameter Description */
+ pqTraceOutputt(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'T': /* Row Description */
+ pqTraceOutputT(conn->Pfdebug, message, &logCursor, regress);
+ break;
+ case 'v': /* Negotiate Protocol Version */
+ pqTraceOutputv(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'V': /* Function Call response */
+ pqTraceOutputV(conn->Pfdebug, message, &logCursor);
+ break;
+ case 'W': /* Start Copy Both */
+ pqTraceOutputW(conn->Pfdebug, message, &logCursor, length);
+ break;
+ case 'X':
+ fprintf(conn->Pfdebug, "Terminate");
+ /* No message content */
+ break;
+ case 'Z': /* Ready For Query */
+ pqTraceOutputZ(conn->Pfdebug, message, &logCursor);
+ break;
+ default:
+ fprintf(conn->Pfdebug, "Unknown message: %02x", id);
+ break;
+ }
+
+ fputc('\n', conn->Pfdebug);
+
+ /*
+ * Verify the printing routine did it right. Note that the one-byte
+ * message identifier is not included in the length, but our cursor does
+ * include it.
+ */
+ if (logCursor - 1 != length)
+ fprintf(conn->Pfdebug,
+ "mismatched message length: consumed %d, expected %d\n",
+ logCursor - 1, length);
+}
+
+/*
+ * Print special messages (those containing no type byte) to the trace output
+ * stream.
+ */
+void
+pqTraceOutputNoTypeByteMessage(PGconn *conn, const char *message)
+{
+ int length;
+ int logCursor = 0;
+
+ if ((conn->traceFlags & PQTRACE_SUPPRESS_TIMESTAMPS) == 0)
+ {
+ char timestr[128];
+
+ pqTraceFormatTimestamp(timestr, sizeof(timestr));
+ fprintf(conn->Pfdebug, "%s\t", timestr);
+ }
+
+ memcpy(&length, message + logCursor, 4);
+ length = (int) pg_ntoh32(length);
+ logCursor += 4;
+
+ fprintf(conn->Pfdebug, "F\t%d\t", length);
+
+ switch (length)
+ {
+ case 16: /* CancelRequest */
+ fprintf(conn->Pfdebug, "CancelRequest\t");
+ pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
+ pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
+ pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
+ break;
+ case 8: /* GSSENCRequest or SSLRequest */
+ /* These messages do not reach here. */
+ default:
+ fprintf(conn->Pfdebug, "Unknown message: length is %d", length);
+ break;
+ }
+
+ fputc('\n', conn->Pfdebug);
+}
diff --git a/src/interfaces/libpq/legacy-pqsignal.c b/src/interfaces/libpq/legacy-pqsignal.c
new file mode 100644
index 0000000..37fa9e5
--- /dev/null
+++ b/src/interfaces/libpq/legacy-pqsignal.c
@@ -0,0 +1,57 @@
+/*-------------------------------------------------------------------------
+ *
+ * legacy-pqsignal.c
+ * reliable BSD-style signal(2) routine stolen from RWW who stole it
+ * from Stevens...
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/legacy-pqsignal.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include <signal.h>
+
+
+/*
+ * This version of pqsignal() exists only because pre-9.3 releases
+ * of libpq exported pqsignal(), and some old client programs still
+ * depend on that. (Since 9.3, clients are supposed to get it from
+ * libpgport instead.)
+ *
+ * Because it is only intended for backwards compatibility, we freeze it
+ * with the semantics it had in 9.2; in particular, this has different
+ * behavior for SIGALRM than the version in src/port/pqsignal.c.
+ *
+ * libpq itself uses this only for SIGPIPE (and even then, only in
+ * non-ENABLE_THREAD_SAFETY builds), so the incompatibility isn't
+ * troublesome for internal references.
+ */
+pqsigfunc
+pqsignal(int signo, pqsigfunc func)
+{
+#ifndef WIN32
+ struct sigaction act,
+ oact;
+
+ act.sa_handler = func;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ if (signo != SIGALRM)
+ act.sa_flags |= SA_RESTART;
+#ifdef SA_NOCLDSTOP
+ if (signo == SIGCHLD)
+ act.sa_flags |= SA_NOCLDSTOP;
+#endif
+ if (sigaction(signo, &act, &oact) < 0)
+ return SIG_ERR;
+ return oact.sa_handler;
+#else /* WIN32 */
+ return signal(signo, func);
+#endif
+}
diff --git a/src/interfaces/libpq/libpq-events.c b/src/interfaces/libpq/libpq-events.c
new file mode 100644
index 0000000..8e24489
--- /dev/null
+++ b/src/interfaces/libpq/libpq-events.c
@@ -0,0 +1,209 @@
+/*-------------------------------------------------------------------------
+ *
+ * libpq-events.c
+ * functions for supporting the libpq "events" API
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/libpq-events.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres_fe.h"
+
+#include "libpq-fe.h"
+#include "libpq-int.h"
+
+
+/*
+ * Registers an event proc with the given PGconn.
+ *
+ * The same proc can't be registered more than once in a PGconn. This
+ * restriction is required because we use the proc address to identify
+ * the event for purposes such as PQinstanceData().
+ *
+ * The name argument is used within error messages to aid in debugging.
+ * A name must be supplied, but it needn't be unique. The string is
+ * copied, so the passed value needn't be long-lived.
+ *
+ * The passThrough argument is an application specific pointer and can be set
+ * to NULL if not required. It is passed through to the event proc whenever
+ * the event proc is called, and is not otherwise touched by libpq.
+ *
+ * The function returns a non-zero if successful. If the function fails,
+ * zero is returned.
+ */
+int
+PQregisterEventProc(PGconn *conn, PGEventProc proc,
+ const char *name, void *passThrough)
+{
+ int i;
+ PGEventRegister regevt;
+
+ if (!proc || !conn || !name || !*name)
+ return false; /* bad arguments */
+
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ if (conn->events[i].proc == proc)
+ return false; /* already registered */
+ }
+
+ if (conn->nEvents >= conn->eventArraySize)
+ {
+ PGEvent *e;
+ int newSize;
+
+ newSize = conn->eventArraySize ? conn->eventArraySize * 2 : 8;
+ if (conn->events)
+ e = (PGEvent *) realloc(conn->events, newSize * sizeof(PGEvent));
+ else
+ e = (PGEvent *) malloc(newSize * sizeof(PGEvent));
+
+ if (!e)
+ return false;
+
+ conn->eventArraySize = newSize;
+ conn->events = e;
+ }
+
+ conn->events[conn->nEvents].proc = proc;
+ conn->events[conn->nEvents].name = strdup(name);
+ if (!conn->events[conn->nEvents].name)
+ return false;
+ conn->events[conn->nEvents].passThrough = passThrough;
+ conn->events[conn->nEvents].data = NULL;
+ conn->events[conn->nEvents].resultInitialized = false;
+ conn->nEvents++;
+
+ regevt.conn = conn;
+ if (!proc(PGEVT_REGISTER, &regevt, passThrough))
+ {
+ conn->nEvents--;
+ free(conn->events[conn->nEvents].name);
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Set some "instance data" for an event within a PGconn.
+ * Returns nonzero on success, zero on failure.
+ */
+int
+PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data)
+{
+ int i;
+
+ if (!conn || !proc)
+ return false;
+
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ if (conn->events[i].proc == proc)
+ {
+ conn->events[i].data = data;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Obtain the "instance data", if any, for the event.
+ */
+void *
+PQinstanceData(const PGconn *conn, PGEventProc proc)
+{
+ int i;
+
+ if (!conn || !proc)
+ return NULL;
+
+ for (i = 0; i < conn->nEvents; i++)
+ {
+ if (conn->events[i].proc == proc)
+ return conn->events[i].data;
+ }
+
+ return NULL;
+}
+
+/*
+ * Set some "instance data" for an event within a PGresult.
+ * Returns nonzero on success, zero on failure.
+ */
+int
+PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data)
+{
+ int i;
+
+ if (!result || !proc)
+ return false;
+
+ for (i = 0; i < result->nEvents; i++)
+ {
+ if (result->events[i].proc == proc)
+ {
+ result->events[i].data = data;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Obtain the "instance data", if any, for the event.
+ */
+void *
+PQresultInstanceData(const PGresult *result, PGEventProc proc)
+{
+ int i;
+
+ if (!result || !proc)
+ return NULL;
+
+ for (i = 0; i < result->nEvents; i++)
+ if (result->events[i].proc == proc)
+ return result->events[i].data;
+
+ return NULL;
+}
+
+/*
+ * Fire RESULTCREATE events for an application-created PGresult.
+ *
+ * The conn argument can be NULL if event procedures won't use it.
+ */
+int
+PQfireResultCreateEvents(PGconn *conn, PGresult *res)
+{
+ int i;
+
+ if (!res)
+ return false;
+
+ for (i = 0; i < res->nEvents; i++)
+ {
+ if (!res->events[i].resultInitialized)
+ {
+ PGEventResultCreate evt;
+
+ evt.conn = conn;
+ evt.result = res;
+ if (!res->events[i].proc(PGEVT_RESULTCREATE, &evt,
+ res->events[i].passThrough))
+ return false;
+
+ res->events[i].resultInitialized = true;
+ }
+ }
+
+ return true;
+}
diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h
new file mode 100644
index 0000000..30ed851
--- /dev/null
+++ b/src/interfaces/libpq/libpq-events.h
@@ -0,0 +1,94 @@
+/*-------------------------------------------------------------------------
+ *
+ * libpq-events.h
+ * This file contains definitions that are useful to applications
+ * that invoke the libpq "events" API, but are not interesting to
+ * ordinary users of libpq.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/libpq-events.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef LIBPQ_EVENTS_H
+#define LIBPQ_EVENTS_H
+
+#include "libpq-fe.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Callback Event Ids */
+typedef enum
+{
+ PGEVT_REGISTER,
+ PGEVT_CONNRESET,
+ PGEVT_CONNDESTROY,
+ PGEVT_RESULTCREATE,
+ PGEVT_RESULTCOPY,
+ PGEVT_RESULTDESTROY
+} PGEventId;
+
+typedef struct
+{
+ PGconn *conn;
+} PGEventRegister;
+
+typedef struct
+{
+ PGconn *conn;
+} PGEventConnReset;
+
+typedef struct
+{
+ PGconn *conn;
+} PGEventConnDestroy;
+
+typedef struct
+{
+ PGconn *conn;
+ PGresult *result;
+} PGEventResultCreate;
+
+typedef struct
+{
+ const PGresult *src;
+ PGresult *dest;
+} PGEventResultCopy;
+
+typedef struct
+{
+ PGresult *result;
+} PGEventResultDestroy;
+
+typedef int (*PGEventProc) (PGEventId evtId, void *evtInfo, void *passThrough);
+
+/* Registers an event proc with the given PGconn. */
+extern int PQregisterEventProc(PGconn *conn, PGEventProc proc,
+ const char *name, void *passThrough);
+
+/* Sets the PGconn instance data for the provided proc to data. */
+extern int PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data);
+
+/* Gets the PGconn instance data for the provided proc. */
+extern void *PQinstanceData(const PGconn *conn, PGEventProc proc);
+
+/* Sets the PGresult instance data for the provided proc to data. */
+extern int PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data);
+
+/* Gets the PGresult instance data for the provided proc. */
+extern void *PQresultInstanceData(const PGresult *result, PGEventProc proc);
+
+/* Fires RESULTCREATE events for an application-created PGresult. */
+extern int PQfireResultCreateEvents(PGconn *conn, PGresult *res);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBPQ_EVENTS_H */
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
new file mode 100644
index 0000000..a6fd69a
--- /dev/null
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -0,0 +1,672 @@
+/*-------------------------------------------------------------------------
+ *
+ * libpq-fe.h
+ * This file contains definitions for structures and
+ * externs for functions used by frontend postgres applications.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/libpq-fe.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef LIBPQ_FE_H
+#define LIBPQ_FE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdio.h>
+
+/*
+ * postgres_ext.h defines the backend's externally visible types,
+ * such as Oid.
+ */
+#include "postgres_ext.h"
+
+/*
+ * These symbols may be used in compile-time #ifdef tests for the availability
+ * of newer libpq features.
+ */
+/* Indicates presence of PQenterPipelineMode and friends */
+#define LIBPQ_HAS_PIPELINING 1
+/* Indicates presence of PQsetTraceFlags; also new PQtrace output format */
+#define LIBPQ_HAS_TRACE_FLAGS 1
+
+/*
+ * Option flags for PQcopyResult
+ */
+#define PG_COPYRES_ATTRS 0x01
+#define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */
+#define PG_COPYRES_EVENTS 0x04
+#define PG_COPYRES_NOTICEHOOKS 0x08
+
+/* Application-visible enum types */
+
+/*
+ * Although it is okay to add to these lists, values which become unused
+ * should never be removed, nor should constants be redefined - that would
+ * break compatibility with existing code.
+ */
+
+typedef enum
+{
+ CONNECTION_OK,
+ CONNECTION_BAD,
+ /* Non-blocking mode only below here */
+
+ /*
+ * The existence of these should never be relied upon - they should only
+ * be used for user feedback or similar purposes.
+ */
+ CONNECTION_STARTED, /* Waiting for connection to be made. */
+ CONNECTION_MADE, /* Connection OK; waiting to send. */
+ CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the
+ * postmaster. */
+ CONNECTION_AUTH_OK, /* Received authentication; waiting for
+ * backend startup. */
+ CONNECTION_SETENV, /* This state is no longer used. */
+ CONNECTION_SSL_STARTUP, /* Negotiating SSL. */
+ CONNECTION_NEEDED, /* Internal state: connect() needed */
+ CONNECTION_CHECK_WRITABLE, /* Checking if session is read-write. */
+ CONNECTION_CONSUME, /* Consuming any extra messages. */
+ CONNECTION_GSS_STARTUP, /* Negotiating GSSAPI. */
+ CONNECTION_CHECK_TARGET, /* Checking target server properties. */
+ CONNECTION_CHECK_STANDBY /* Checking if server is in standby mode. */
+} ConnStatusType;
+
+typedef enum
+{
+ PGRES_POLLING_FAILED = 0,
+ PGRES_POLLING_READING, /* These two indicate that one may */
+ PGRES_POLLING_WRITING, /* use select before polling again. */
+ PGRES_POLLING_OK,
+ PGRES_POLLING_ACTIVE /* unused; keep for awhile for backwards
+ * compatibility */
+} PostgresPollingStatusType;
+
+typedef enum
+{
+ PGRES_EMPTY_QUERY = 0, /* empty query string was executed */
+ PGRES_COMMAND_OK, /* a query command that doesn't return
+ * anything was executed properly by the
+ * backend */
+ PGRES_TUPLES_OK, /* a query command that returns tuples was
+ * executed properly by the backend, PGresult
+ * contains the result tuples */
+ PGRES_COPY_OUT, /* Copy Out data transfer in progress */
+ PGRES_COPY_IN, /* Copy In data transfer in progress */
+ PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the
+ * backend */
+ PGRES_NONFATAL_ERROR, /* notice or warning message */
+ PGRES_FATAL_ERROR, /* query failed */
+ PGRES_COPY_BOTH, /* Copy In/Out data transfer in progress */
+ PGRES_SINGLE_TUPLE, /* single tuple from larger resultset */
+ PGRES_PIPELINE_SYNC, /* pipeline synchronization point */
+ PGRES_PIPELINE_ABORTED /* Command didn't run because of an abort
+ * earlier in a pipeline */
+} ExecStatusType;
+
+typedef enum
+{
+ PQTRANS_IDLE, /* connection idle */
+ PQTRANS_ACTIVE, /* command in progress */
+ PQTRANS_INTRANS, /* idle, within transaction block */
+ PQTRANS_INERROR, /* idle, within failed transaction */
+ PQTRANS_UNKNOWN /* cannot determine status */
+} PGTransactionStatusType;
+
+typedef enum
+{
+ PQERRORS_TERSE, /* single-line error messages */
+ PQERRORS_DEFAULT, /* recommended style */
+ PQERRORS_VERBOSE, /* all the facts, ma'am */
+ PQERRORS_SQLSTATE /* only error severity and SQLSTATE code */
+} PGVerbosity;
+
+typedef enum
+{
+ PQSHOW_CONTEXT_NEVER, /* never show CONTEXT field */
+ PQSHOW_CONTEXT_ERRORS, /* show CONTEXT for errors only (default) */
+ PQSHOW_CONTEXT_ALWAYS /* always show CONTEXT field */
+} PGContextVisibility;
+
+/*
+ * PGPing - The ordering of this enum should not be altered because the
+ * values are exposed externally via pg_isready.
+ */
+
+typedef enum
+{
+ PQPING_OK, /* server is accepting connections */
+ PQPING_REJECT, /* server is alive but rejecting connections */
+ PQPING_NO_RESPONSE, /* could not establish connection */
+ PQPING_NO_ATTEMPT /* connection not attempted (bad params) */
+} PGPing;
+
+/*
+ * PGpipelineStatus - Current status of pipeline mode
+ */
+typedef enum
+{
+ PQ_PIPELINE_OFF,
+ PQ_PIPELINE_ON,
+ PQ_PIPELINE_ABORTED
+} PGpipelineStatus;
+
+/* PGconn encapsulates a connection to the backend.
+ * The contents of this struct are not supposed to be known to applications.
+ */
+typedef struct pg_conn PGconn;
+
+/* PGresult encapsulates the result of a query (or more precisely, of a single
+ * SQL command --- a query string given to PQsendQuery can contain multiple
+ * commands and thus return multiple PGresult objects).
+ * The contents of this struct are not supposed to be known to applications.
+ */
+typedef struct pg_result PGresult;
+
+/* PGcancel encapsulates the information needed to cancel a running
+ * query on an existing connection.
+ * The contents of this struct are not supposed to be known to applications.
+ */
+typedef struct pg_cancel PGcancel;
+
+/* PGnotify represents the occurrence of a NOTIFY message.
+ * Ideally this would be an opaque typedef, but it's so simple that it's
+ * unlikely to change.
+ * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
+ * whereas in earlier versions it was always your own backend's PID.
+ */
+typedef struct pgNotify
+{
+ char *relname; /* notification condition name */
+ int be_pid; /* process ID of notifying server process */
+ char *extra; /* notification parameter */
+ /* Fields below here are private to libpq; apps should not use 'em */
+ struct pgNotify *next; /* list link */
+} PGnotify;
+
+/* Function types for notice-handling callbacks */
+typedef void (*PQnoticeReceiver) (void *arg, const PGresult *res);
+typedef void (*PQnoticeProcessor) (void *arg, const char *message);
+
+/* Print options for PQprint() */
+typedef char pqbool;
+
+typedef struct _PQprintOpt
+{
+ pqbool header; /* print output field headings and row count */
+ pqbool align; /* fill align the fields */
+ pqbool standard; /* old brain dead format */
+ pqbool html3; /* output html tables */
+ pqbool expanded; /* expand tables */
+ pqbool pager; /* use pager for output if needed */
+ char *fieldSep; /* field separator */
+ char *tableOpt; /* insert to HTML <table ...> */
+ char *caption; /* HTML <caption> */
+ char **fieldName; /* null terminated array of replacement field
+ * names */
+} PQprintOpt;
+
+/* ----------------
+ * Structure for the conninfo parameter definitions returned by PQconndefaults
+ * or PQconninfoParse.
+ *
+ * All fields except "val" point at static strings which must not be altered.
+ * "val" is either NULL or a malloc'd current-value string. PQconninfoFree()
+ * will release both the val strings and the PQconninfoOption array itself.
+ * ----------------
+ */
+typedef struct _PQconninfoOption
+{
+ char *keyword; /* The keyword of the option */
+ char *envvar; /* Fallback environment variable name */
+ char *compiled; /* Fallback compiled in default value */
+ char *val; /* Option's current value, or NULL */
+ char *label; /* Label for field in connect dialog */
+ char *dispchar; /* Indicates how to display this field in a
+ * connect dialog. Values are: "" Display
+ * entered value as is "*" Password field -
+ * hide value "D" Debug option - don't show
+ * by default */
+ int dispsize; /* Field size in characters for dialog */
+} PQconninfoOption;
+
+/* ----------------
+ * PQArgBlock -- structure for PQfn() arguments
+ * ----------------
+ */
+typedef struct
+{
+ int len;
+ int isint;
+ union
+ {
+ int *ptr; /* can't use void (dec compiler barfs) */
+ int integer;
+ } u;
+} PQArgBlock;
+
+/* ----------------
+ * PGresAttDesc -- Data about a single attribute (column) of a query result
+ * ----------------
+ */
+typedef struct pgresAttDesc
+{
+ char *name; /* column name */
+ Oid tableid; /* source table, if known */
+ int columnid; /* source column, if known */
+ int format; /* format code for value (text/binary) */
+ Oid typid; /* type id */
+ int typlen; /* type size */
+ int atttypmod; /* type-specific modifier info */
+} PGresAttDesc;
+
+/* ----------------
+ * Exported functions of libpq
+ * ----------------
+ */
+
+/* === in fe-connect.c === */
+
+/* make a new client connection to the backend */
+/* Asynchronous (non-blocking) */
+extern PGconn *PQconnectStart(const char *conninfo);
+extern PGconn *PQconnectStartParams(const char *const *keywords,
+ const char *const *values, int expand_dbname);
+extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
+
+/* Synchronous (blocking) */
+extern PGconn *PQconnectdb(const char *conninfo);
+extern PGconn *PQconnectdbParams(const char *const *keywords,
+ const char *const *values, int expand_dbname);
+extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
+ const char *pgoptions, const char *pgtty,
+ const char *dbName,
+ const char *login, const char *pwd);
+
+#define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \
+ PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
+
+/* close the current connection and free the PGconn data structure */
+extern void PQfinish(PGconn *conn);
+
+/* get info about connection options known to PQconnectdb */
+extern PQconninfoOption *PQconndefaults(void);
+
+/* parse connection options in same way as PQconnectdb */
+extern PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
+
+/* return the connection options used by a live connection */
+extern PQconninfoOption *PQconninfo(PGconn *conn);
+
+/* free the data structure returned by PQconndefaults() or PQconninfoParse() */
+extern void PQconninfoFree(PQconninfoOption *connOptions);
+
+/*
+ * close the current connection and reestablish a new one with the same
+ * parameters
+ */
+/* Asynchronous (non-blocking) */
+extern int PQresetStart(PGconn *conn);
+extern PostgresPollingStatusType PQresetPoll(PGconn *conn);
+
+/* Synchronous (blocking) */
+extern void PQreset(PGconn *conn);
+
+/* request a cancel structure */
+extern PGcancel *PQgetCancel(PGconn *conn);
+
+/* free a cancel structure */
+extern void PQfreeCancel(PGcancel *cancel);
+
+/* issue a cancel request */
+extern int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize);
+
+/* backwards compatible version of PQcancel; not thread-safe */
+extern int PQrequestCancel(PGconn *conn);
+
+/* Accessor functions for PGconn objects */
+extern char *PQdb(const PGconn *conn);
+extern char *PQuser(const PGconn *conn);
+extern char *PQpass(const PGconn *conn);
+extern char *PQhost(const PGconn *conn);
+extern char *PQhostaddr(const PGconn *conn);
+extern char *PQport(const PGconn *conn);
+extern char *PQtty(const PGconn *conn);
+extern char *PQoptions(const PGconn *conn);
+extern ConnStatusType PQstatus(const PGconn *conn);
+extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn);
+extern const char *PQparameterStatus(const PGconn *conn,
+ const char *paramName);
+extern int PQprotocolVersion(const PGconn *conn);
+extern int PQserverVersion(const PGconn *conn);
+extern char *PQerrorMessage(const PGconn *conn);
+extern int PQsocket(const PGconn *conn);
+extern int PQbackendPID(const PGconn *conn);
+extern PGpipelineStatus PQpipelineStatus(const PGconn *conn);
+extern int PQconnectionNeedsPassword(const PGconn *conn);
+extern int PQconnectionUsedPassword(const PGconn *conn);
+extern int PQclientEncoding(const PGconn *conn);
+extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
+
+/* SSL information functions */
+extern int PQsslInUse(PGconn *conn);
+extern void *PQsslStruct(PGconn *conn, const char *struct_name);
+extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
+extern const char *const *PQsslAttributeNames(PGconn *conn);
+
+/* Get the OpenSSL structure associated with a connection. Returns NULL for
+ * unencrypted connections or if any other TLS library is in use. */
+extern void *PQgetssl(PGconn *conn);
+
+/* Tell libpq whether it needs to initialize OpenSSL */
+extern void PQinitSSL(int do_init);
+
+/* More detailed way to tell libpq whether it needs to initialize OpenSSL */
+extern void PQinitOpenSSL(int do_ssl, int do_crypto);
+
+/* Return true if GSSAPI encryption is in use */
+extern int PQgssEncInUse(PGconn *conn);
+
+/* Returns GSSAPI context if GSSAPI is in use */
+extern void *PQgetgssctx(PGconn *conn);
+
+/* Set verbosity for PQerrorMessage and PQresultErrorMessage */
+extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);
+
+/* Set CONTEXT visibility for PQerrorMessage and PQresultErrorMessage */
+extern PGContextVisibility PQsetErrorContextVisibility(PGconn *conn,
+ PGContextVisibility show_context);
+
+/* Override default notice handling routines */
+extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn,
+ PQnoticeReceiver proc,
+ void *arg);
+extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
+ PQnoticeProcessor proc,
+ void *arg);
+
+/*
+ * Used to set callback that prevents concurrent access to
+ * non-thread safe functions that libpq needs.
+ * The default implementation uses a libpq internal mutex.
+ * Only required for multithreaded apps that use kerberos
+ * both within their app and for postgresql connections.
+ */
+typedef void (*pgthreadlock_t) (int acquire);
+
+extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);
+
+/* === in fe-trace.c === */
+extern void PQtrace(PGconn *conn, FILE *debug_port);
+extern void PQuntrace(PGconn *conn);
+
+/* flags controlling trace output: */
+/* omit timestamps from each line */
+#define PQTRACE_SUPPRESS_TIMESTAMPS (1<<0)
+/* redact portions of some messages, for testing frameworks */
+#define PQTRACE_REGRESS_MODE (1<<1)
+extern void PQsetTraceFlags(PGconn *conn, int flags);
+
+/* === in fe-exec.c === */
+
+/* Simple synchronous query */
+extern PGresult *PQexec(PGconn *conn, const char *query);
+extern PGresult *PQexecParams(PGconn *conn,
+ const char *command,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat);
+extern PGresult *PQprepare(PGconn *conn, const char *stmtName,
+ const char *query, int nParams,
+ const Oid *paramTypes);
+extern PGresult *PQexecPrepared(PGconn *conn,
+ const char *stmtName,
+ int nParams,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat);
+
+/* Interface for multiple-result or asynchronous queries */
+#define PQ_QUERY_PARAM_MAX_LIMIT 65535
+
+extern int PQsendQuery(PGconn *conn, const char *query);
+extern int PQsendQueryParams(PGconn *conn,
+ const char *command,
+ int nParams,
+ const Oid *paramTypes,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat);
+extern int PQsendPrepare(PGconn *conn, const char *stmtName,
+ const char *query, int nParams,
+ const Oid *paramTypes);
+extern int PQsendQueryPrepared(PGconn *conn,
+ const char *stmtName,
+ int nParams,
+ const char *const *paramValues,
+ const int *paramLengths,
+ const int *paramFormats,
+ int resultFormat);
+extern int PQsetSingleRowMode(PGconn *conn);
+extern PGresult *PQgetResult(PGconn *conn);
+
+/* Routines for managing an asynchronous query */
+extern int PQisBusy(PGconn *conn);
+extern int PQconsumeInput(PGconn *conn);
+
+/* Routines for pipeline mode management */
+extern int PQenterPipelineMode(PGconn *conn);
+extern int PQexitPipelineMode(PGconn *conn);
+extern int PQpipelineSync(PGconn *conn);
+extern int PQsendFlushRequest(PGconn *conn);
+
+/* LISTEN/NOTIFY support */
+extern PGnotify *PQnotifies(PGconn *conn);
+
+/* Routines for copy in/out */
+extern int PQputCopyData(PGconn *conn, const char *buffer, int nbytes);
+extern int PQputCopyEnd(PGconn *conn, const char *errormsg);
+extern int PQgetCopyData(PGconn *conn, char **buffer, int async);
+
+/* Deprecated routines for copy in/out */
+extern int PQgetline(PGconn *conn, char *string, int length);
+extern int PQputline(PGconn *conn, const char *string);
+extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
+extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
+extern int PQendcopy(PGconn *conn);
+
+/* Set blocking/nonblocking connection to the backend */
+extern int PQsetnonblocking(PGconn *conn, int arg);
+extern int PQisnonblocking(const PGconn *conn);
+extern int PQisthreadsafe(void);
+extern PGPing PQping(const char *conninfo);
+extern PGPing PQpingParams(const char *const *keywords,
+ const char *const *values, int expand_dbname);
+
+/* Force the write buffer to be written (or at least try) */
+extern int PQflush(PGconn *conn);
+
+/*
+ * "Fast path" interface --- not really recommended for application
+ * use
+ */
+extern PGresult *PQfn(PGconn *conn,
+ int fnid,
+ int *result_buf,
+ int *result_len,
+ int result_is_int,
+ const PQArgBlock *args,
+ int nargs);
+
+/* Accessor functions for PGresult objects */
+extern ExecStatusType PQresultStatus(const PGresult *res);
+extern char *PQresStatus(ExecStatusType status);
+extern char *PQresultErrorMessage(const PGresult *res);
+extern char *PQresultVerboseErrorMessage(const PGresult *res,
+ PGVerbosity verbosity,
+ PGContextVisibility show_context);
+extern char *PQresultErrorField(const PGresult *res, int fieldcode);
+extern int PQntuples(const PGresult *res);
+extern int PQnfields(const PGresult *res);
+extern int PQbinaryTuples(const PGresult *res);
+extern char *PQfname(const PGresult *res, int field_num);
+extern int PQfnumber(const PGresult *res, const char *field_name);
+extern Oid PQftable(const PGresult *res, int field_num);
+extern int PQftablecol(const PGresult *res, int field_num);
+extern int PQfformat(const PGresult *res, int field_num);
+extern Oid PQftype(const PGresult *res, int field_num);
+extern int PQfsize(const PGresult *res, int field_num);
+extern int PQfmod(const PGresult *res, int field_num);
+extern char *PQcmdStatus(PGresult *res);
+extern char *PQoidStatus(const PGresult *res); /* old and ugly */
+extern Oid PQoidValue(const PGresult *res); /* new and improved */
+extern char *PQcmdTuples(PGresult *res);
+extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
+extern int PQgetlength(const PGresult *res, int tup_num, int field_num);
+extern int PQgetisnull(const PGresult *res, int tup_num, int field_num);
+extern int PQnparams(const PGresult *res);
+extern Oid PQparamtype(const PGresult *res, int param_num);
+
+/* Describe prepared statements and portals */
+extern PGresult *PQdescribePrepared(PGconn *conn, const char *stmt);
+extern PGresult *PQdescribePortal(PGconn *conn, const char *portal);
+extern int PQsendDescribePrepared(PGconn *conn, const char *stmt);
+extern int PQsendDescribePortal(PGconn *conn, const char *portal);
+
+/* Delete a PGresult */
+extern void PQclear(PGresult *res);
+
+/* For freeing other alloc'd results, such as PGnotify structs */
+extern void PQfreemem(void *ptr);
+
+/* Exists for backward compatibility. bjm 2003-03-24 */
+#define PQfreeNotify(ptr) PQfreemem(ptr)
+
+/* Error when no password was given. */
+/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */
+#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n"
+
+/* Create and manipulate PGresults */
+extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status);
+extern PGresult *PQcopyResult(const PGresult *src, int flags);
+extern int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs);
+extern void *PQresultAlloc(PGresult *res, size_t nBytes);
+extern size_t PQresultMemorySize(const PGresult *res);
+extern int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len);
+
+/* Quoting strings before inclusion in queries. */
+extern size_t PQescapeStringConn(PGconn *conn,
+ char *to, const char *from, size_t length,
+ int *error);
+extern char *PQescapeLiteral(PGconn *conn, const char *str, size_t len);
+extern char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len);
+extern unsigned char *PQescapeByteaConn(PGconn *conn,
+ const unsigned char *from, size_t from_length,
+ size_t *to_length);
+extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
+ size_t *retbuflen);
+
+/* These forms are deprecated! */
+extern size_t PQescapeString(char *to, const char *from, size_t length);
+extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length,
+ size_t *to_length);
+
+
+
+/* === in fe-print.c === */
+
+extern void PQprint(FILE *fout, /* output stream */
+ const PGresult *res,
+ const PQprintOpt *ps); /* option structure */
+
+/*
+ * really old printing routines
+ */
+extern void PQdisplayTuples(const PGresult *res,
+ FILE *fp, /* where to send the output */
+ int fillAlign, /* pad the fields with spaces */
+ const char *fieldSep, /* field separator */
+ int printHeader, /* display headers? */
+ int quiet);
+
+extern void PQprintTuples(const PGresult *res,
+ FILE *fout, /* output stream */
+ int PrintAttNames, /* print attribute names */
+ int TerseOutput, /* delimiter bars */
+ int colWidth); /* width of column, if 0, use
+ * variable width */
+
+
+/* === in fe-lobj.c === */
+
+/* Large-object access routines */
+extern int lo_open(PGconn *conn, Oid lobjId, int mode);
+extern int lo_close(PGconn *conn, int fd);
+extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
+extern int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
+extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
+extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
+extern Oid lo_creat(PGconn *conn, int mode);
+extern Oid lo_create(PGconn *conn, Oid lobjId);
+extern int lo_tell(PGconn *conn, int fd);
+extern pg_int64 lo_tell64(PGconn *conn, int fd);
+extern int lo_truncate(PGconn *conn, int fd, size_t len);
+extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len);
+extern int lo_unlink(PGconn *conn, Oid lobjId);
+extern Oid lo_import(PGconn *conn, const char *filename);
+extern Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
+extern int lo_export(PGconn *conn, Oid lobjId, const char *filename);
+
+/* === in fe-misc.c === */
+
+/* Get the version of the libpq library in use */
+extern int PQlibVersion(void);
+
+/* Determine length of multibyte encoded char at *s */
+extern int PQmblen(const char *s, int encoding);
+
+/* Same, but not more than the distance to the end of string s */
+extern int PQmblenBounded(const char *s, int encoding);
+
+/* Determine display length of multibyte encoded char at *s */
+extern int PQdsplen(const char *s, int encoding);
+
+/* Get encoding id from environment variable PGCLIENTENCODING */
+extern int PQenv2encoding(void);
+
+/* === in fe-auth.c === */
+
+extern char *PQencryptPassword(const char *passwd, const char *user);
+extern char *PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user, const char *algorithm);
+
+/* === in encnames.c === */
+
+extern int pg_char_to_encoding(const char *name);
+extern const char *pg_encoding_to_char(int encoding);
+extern int pg_valid_server_encoding_id(int encoding);
+
+/* === in fe-secure-openssl.c === */
+
+/* Support for overriding sslpassword handling with a callback */
+typedef int (*PQsslKeyPassHook_OpenSSL_type) (char *buf, int size, PGconn *conn);
+extern PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
+extern void PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook);
+extern int PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBPQ_FE_H */
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
new file mode 100644
index 0000000..df2f177
--- /dev/null
+++ b/src/interfaces/libpq/libpq-int.h
@@ -0,0 +1,866 @@
+/*-------------------------------------------------------------------------
+ *
+ * libpq-int.h
+ * This file contains internal definitions meant to be used only by
+ * the frontend libpq library, not by applications that call it.
+ *
+ * An application can include this file if it wants to bypass the
+ * official API defined by libpq-fe.h, but code that does so is much
+ * more likely to break across PostgreSQL releases than code that uses
+ * only the official API.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/libpq-int.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef LIBPQ_INT_H
+#define LIBPQ_INT_H
+
+/* We assume libpq-fe.h has already been included. */
+#include "libpq-events.h"
+
+#include <time.h>
+#ifndef WIN32
+#include <sys/time.h>
+#endif
+
+#ifdef ENABLE_THREAD_SAFETY
+#ifdef WIN32
+#include "pthread-win32.h"
+#else
+#include <pthread.h>
+#endif
+#include <signal.h>
+#endif
+
+/* include stuff common to fe and be */
+#include "getaddrinfo.h"
+#include "libpq/pqcomm.h"
+/* include stuff found in fe only */
+#include "pqexpbuffer.h"
+
+#ifdef ENABLE_GSS
+#if defined(HAVE_GSSAPI_H)
+#include <gssapi.h>
+#else
+#include <gssapi/gssapi.h>
+#endif
+#endif
+
+#ifdef ENABLE_SSPI
+#define SECURITY_WIN32
+#if defined(WIN32) && !defined(_MSC_VER)
+#include <ntsecapi.h>
+#endif
+#include <security.h>
+#undef SECURITY_WIN32
+
+#ifndef ENABLE_GSS
+/*
+ * Define a fake structure compatible with GSSAPI on Unix.
+ */
+typedef struct
+{
+ void *value;
+ int length;
+} gss_buffer_desc;
+#endif
+#endif /* ENABLE_SSPI */
+
+#ifdef USE_OPENSSL
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+
+#ifndef OPENSSL_NO_ENGINE
+#define USE_SSL_ENGINE
+#endif
+#endif /* USE_OPENSSL */
+
+/*
+ * POSTGRES backend dependent Constants.
+ */
+#define CMDSTATUS_LEN 64 /* should match COMPLETION_TAG_BUFSIZE */
+
+/*
+ * PGresult and the subsidiary types PGresAttDesc, PGresAttValue
+ * represent the result of a query (or more precisely, of a single SQL
+ * command --- a query string given to PQexec can contain multiple commands).
+ * Note we assume that a single command can return at most one tuple group,
+ * hence there is no need for multiple descriptor sets.
+ */
+
+/* Subsidiary-storage management structure for PGresult.
+ * See space management routines in fe-exec.c for details.
+ * Note that space[k] refers to the k'th byte starting from the physical
+ * head of the block --- it's a union, not a struct!
+ */
+typedef union pgresult_data PGresult_data;
+
+union pgresult_data
+{
+ PGresult_data *next; /* link to next block, or NULL */
+ char space[1]; /* dummy for accessing block as bytes */
+};
+
+/* Data about a single parameter of a prepared statement */
+typedef struct pgresParamDesc
+{
+ Oid typid; /* type id */
+} PGresParamDesc;
+
+/*
+ * Data for a single attribute of a single tuple
+ *
+ * We use char* for Attribute values.
+ *
+ * The value pointer always points to a null-terminated area; we add a
+ * null (zero) byte after whatever the backend sends us. This is only
+ * particularly useful for text values ... with a binary value, the
+ * value might have embedded nulls, so the application can't use C string
+ * operators on it. But we add a null anyway for consistency.
+ * Note that the value itself does not contain a length word.
+ *
+ * A NULL attribute is a special case in two ways: its len field is NULL_LEN
+ * and its value field points to null_field in the owning PGresult. All the
+ * NULL attributes in a query result point to the same place (there's no need
+ * to store a null string separately for each one).
+ */
+
+#define NULL_LEN (-1) /* pg_result len for NULL value */
+
+typedef struct pgresAttValue
+{
+ int len; /* length in bytes of the value */
+ char *value; /* actual value, plus terminating zero byte */
+} PGresAttValue;
+
+/* Typedef for message-field list entries */
+typedef struct pgMessageField
+{
+ struct pgMessageField *next; /* list link */
+ char code; /* field code */
+ char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */
+} PGMessageField;
+
+/* Fields needed for notice handling */
+typedef struct
+{
+ PQnoticeReceiver noticeRec; /* notice message receiver */
+ void *noticeRecArg;
+ PQnoticeProcessor noticeProc; /* notice message processor */
+ void *noticeProcArg;
+} PGNoticeHooks;
+
+typedef struct PGEvent
+{
+ PGEventProc proc; /* the function to call on events */
+ char *name; /* used only for error messages */
+ void *passThrough; /* pointer supplied at registration time */
+ void *data; /* optional state (instance) data */
+ bool resultInitialized; /* T if RESULTCREATE/COPY succeeded */
+} PGEvent;
+
+struct pg_result
+{
+ int ntups;
+ int numAttributes;
+ PGresAttDesc *attDescs;
+ PGresAttValue **tuples; /* each PGresult tuple is an array of
+ * PGresAttValue's */
+ int tupArrSize; /* allocated size of tuples array */
+ int numParameters;
+ PGresParamDesc *paramDescs;
+ ExecStatusType resultStatus;
+ char cmdStatus[CMDSTATUS_LEN]; /* cmd status from the query */
+ int binary; /* binary tuple values if binary == 1,
+ * otherwise text */
+
+ /*
+ * These fields are copied from the originating PGconn, so that operations
+ * on the PGresult don't have to reference the PGconn.
+ */
+ PGNoticeHooks noticeHooks;
+ PGEvent *events;
+ int nEvents;
+ int client_encoding; /* encoding id */
+
+ /*
+ * Error information (all NULL if not an error result). errMsg is the
+ * "overall" error message returned by PQresultErrorMessage. If we have
+ * per-field info then it is stored in a linked list.
+ */
+ char *errMsg; /* error message, or NULL if no error */
+ PGMessageField *errFields; /* message broken into fields */
+ char *errQuery; /* text of triggering query, if available */
+
+ /* All NULL attributes in the query result point to this null string */
+ char null_field[1];
+
+ /*
+ * Space management information. Note that attDescs and error stuff, if
+ * not null, point into allocated blocks. But tuples points to a
+ * separately malloc'd block, so that we can realloc it.
+ */
+ PGresult_data *curBlock; /* most recently allocated block */
+ int curOffset; /* start offset of free space in block */
+ int spaceLeft; /* number of free bytes remaining in block */
+
+ size_t memorySize; /* total space allocated for this PGresult */
+};
+
+/* PGAsyncStatusType defines the state of the query-execution state machine */
+typedef enum
+{
+ PGASYNC_IDLE, /* nothing's happening, dude */
+ PGASYNC_BUSY, /* query in progress */
+ PGASYNC_READY, /* query done, waiting for client to fetch
+ * result */
+ PGASYNC_READY_MORE, /* query done, waiting for client to fetch
+ * result, more results expected from this
+ * query */
+ PGASYNC_COPY_IN, /* Copy In data transfer in progress */
+ PGASYNC_COPY_OUT, /* Copy Out data transfer in progress */
+ PGASYNC_COPY_BOTH, /* Copy In/Out data transfer in progress */
+ PGASYNC_PIPELINE_IDLE, /* "Idle" between commands in pipeline mode */
+} PGAsyncStatusType;
+
+/* Target server type (decoded value of target_session_attrs) */
+typedef enum
+{
+ SERVER_TYPE_ANY = 0, /* Any server (default) */
+ SERVER_TYPE_READ_WRITE, /* Read-write server */
+ SERVER_TYPE_READ_ONLY, /* Read-only server */
+ SERVER_TYPE_PRIMARY, /* Primary server */
+ SERVER_TYPE_STANDBY, /* Standby server */
+ SERVER_TYPE_PREFER_STANDBY, /* Prefer standby server */
+ SERVER_TYPE_PREFER_STANDBY_PASS2 /* second pass - behaves same as ANY */
+} PGTargetServerType;
+
+/* Boolean value plus a not-known state, for GUCs we might have to fetch */
+typedef enum
+{
+ PG_BOOL_UNKNOWN = 0, /* Currently unknown */
+ PG_BOOL_YES, /* Yes (true) */
+ PG_BOOL_NO /* No (false) */
+} PGTernaryBool;
+
+/* Typedef for the EnvironmentOptions[] array */
+typedef struct PQEnvironmentOption
+{
+ const char *envName, /* name of an environment variable */
+ *pgName; /* name of corresponding SET variable */
+} PQEnvironmentOption;
+
+/* Typedef for parameter-status list entries */
+typedef struct pgParameterStatus
+{
+ struct pgParameterStatus *next; /* list link */
+ char *name; /* parameter name */
+ char *value; /* parameter value */
+ /* Note: name and value are stored in same malloc block as struct is */
+} pgParameterStatus;
+
+/* large-object-access data ... allocated only if large-object code is used. */
+typedef struct pgLobjfuncs
+{
+ Oid fn_lo_open; /* OID of backend function lo_open */
+ Oid fn_lo_close; /* OID of backend function lo_close */
+ Oid fn_lo_creat; /* OID of backend function lo_creat */
+ Oid fn_lo_create; /* OID of backend function lo_create */
+ Oid fn_lo_unlink; /* OID of backend function lo_unlink */
+ Oid fn_lo_lseek; /* OID of backend function lo_lseek */
+ Oid fn_lo_lseek64; /* OID of backend function lo_lseek64 */
+ Oid fn_lo_tell; /* OID of backend function lo_tell */
+ Oid fn_lo_tell64; /* OID of backend function lo_tell64 */
+ Oid fn_lo_truncate; /* OID of backend function lo_truncate */
+ Oid fn_lo_truncate64; /* OID of function lo_truncate64 */
+ Oid fn_lo_read; /* OID of backend function LOread */
+ Oid fn_lo_write; /* OID of backend function LOwrite */
+} PGlobjfuncs;
+
+/* PGdataValue represents a data field value being passed to a row processor.
+ * It could be either text or binary data; text data is not zero-terminated.
+ * A SQL NULL is represented by len < 0; then value is still valid but there
+ * are no data bytes there.
+ */
+typedef struct pgDataValue
+{
+ int len; /* data length in bytes, or <0 if NULL */
+ const char *value; /* data value, without zero-termination */
+} PGdataValue;
+
+/* Host address type enum for struct pg_conn_host */
+typedef enum pg_conn_host_type
+{
+ CHT_HOST_NAME,
+ CHT_HOST_ADDRESS,
+ CHT_UNIX_SOCKET
+} pg_conn_host_type;
+
+/*
+ * PGQueryClass tracks which query protocol is in use for each command queue
+ * entry, or special operation in execution
+ */
+typedef enum
+{
+ PGQUERY_SIMPLE, /* simple Query protocol (PQexec) */
+ PGQUERY_EXTENDED, /* full Extended protocol (PQexecParams) */
+ PGQUERY_PREPARE, /* Parse only (PQprepare) */
+ PGQUERY_DESCRIBE, /* Describe Statement or Portal */
+ PGQUERY_SYNC, /* Sync (at end of a pipeline) */
+ PGQUERY_CLOSE
+} PGQueryClass;
+
+/*
+ * An entry in the pending command queue.
+ */
+typedef struct PGcmdQueueEntry
+{
+ PGQueryClass queryclass; /* Query type */
+ char *query; /* SQL command, or NULL if none/unknown/OOM */
+ struct PGcmdQueueEntry *next; /* list link */
+} PGcmdQueueEntry;
+
+/*
+ * pg_conn_host stores all information about each of possibly several hosts
+ * mentioned in the connection string. Most fields are derived by splitting
+ * the relevant connection parameter (e.g., pghost) at commas.
+ */
+typedef struct pg_conn_host
+{
+ pg_conn_host_type type; /* type of host address */
+ char *host; /* host name or socket path */
+ char *hostaddr; /* host numeric IP address */
+ char *port; /* port number (always provided) */
+ char *password; /* password for this host, read from the
+ * password file; NULL if not sought or not
+ * found in password file. */
+} pg_conn_host;
+
+/*
+ * PGconn stores all the state data associated with a single connection
+ * to a backend.
+ */
+struct pg_conn
+{
+ /* Saved values of connection options */
+ char *pghost; /* the machine on which the server is running,
+ * or a path to a UNIX-domain socket, or a
+ * comma-separated list of machines and/or
+ * paths; if NULL, use DEFAULT_PGSOCKET_DIR */
+ char *pghostaddr; /* the numeric IP address of the machine on
+ * which the server is running, or a
+ * comma-separated list of same. Takes
+ * precedence over pghost. */
+ char *pgport; /* the server's communication port number, or
+ * a comma-separated list of ports */
+ char *connect_timeout; /* connection timeout (numeric string) */
+ char *pgtcp_user_timeout; /* tcp user timeout (numeric string) */
+ char *client_encoding_initial; /* encoding to use */
+ char *pgoptions; /* options to start the backend with */
+ char *appname; /* application name */
+ char *fbappname; /* fallback application name */
+ char *dbName; /* database name */
+ char *replication; /* connect as the replication standby? */
+ char *pguser; /* Postgres username and password, if any */
+ char *pgpass;
+ char *pgpassfile; /* path to a file containing password(s) */
+ char *channel_binding; /* channel binding mode
+ * (require,prefer,disable) */
+ char *keepalives; /* use TCP keepalives? */
+ char *keepalives_idle; /* time between TCP keepalives */
+ char *keepalives_interval; /* time between TCP keepalive
+ * retransmits */
+ char *keepalives_count; /* maximum number of TCP keepalive
+ * retransmits */
+ char *sslmode; /* SSL mode (require,prefer,allow,disable) */
+ char *sslcompression; /* SSL compression (0 or 1) */
+ char *sslkey; /* client key filename */
+ char *sslcert; /* client certificate filename */
+ char *sslpassword; /* client key file password */
+ char *sslrootcert; /* root certificate filename */
+ char *sslcrl; /* certificate revocation list filename */
+ char *sslcrldir; /* certificate revocation list directory name */
+ char *sslsni; /* use SSL SNI extension (0 or 1) */
+ char *requirepeer; /* required peer credentials for local sockets */
+ char *gssencmode; /* GSS mode (require,prefer,disable) */
+ char *krbsrvname; /* Kerberos service name */
+ char *gsslib; /* What GSS library to use ("gssapi" or
+ * "sspi") */
+ char *ssl_min_protocol_version; /* minimum TLS protocol version */
+ char *ssl_max_protocol_version; /* maximum TLS protocol version */
+ char *target_session_attrs; /* desired session properties */
+
+ /* Optional file to write trace info to */
+ FILE *Pfdebug;
+ int traceFlags;
+
+ /* Callback procedures for notice message processing */
+ PGNoticeHooks noticeHooks;
+
+ /* Event procs registered via PQregisterEventProc */
+ PGEvent *events; /* expandable array of event data */
+ int nEvents; /* number of active events */
+ int eventArraySize; /* allocated array size */
+
+ /* Status indicators */
+ ConnStatusType status;
+ PGAsyncStatusType asyncStatus;
+ PGTransactionStatusType xactStatus; /* never changes to ACTIVE */
+ char last_sqlstate[6]; /* last reported SQLSTATE */
+ bool options_valid; /* true if OK to attempt connection */
+ bool nonblocking; /* whether this connection is using nonblock
+ * sending semantics */
+ PGpipelineStatus pipelineStatus; /* status of pipeline mode */
+ bool singleRowMode; /* return current query result row-by-row? */
+ char copy_is_binary; /* 1 = copy binary, 0 = copy text */
+ int copy_already_done; /* # bytes already returned in COPY OUT */
+ PGnotify *notifyHead; /* oldest unreported Notify msg */
+ PGnotify *notifyTail; /* newest unreported Notify msg */
+
+ /* Support for multiple hosts in connection string */
+ int nconnhost; /* # of hosts named in conn string */
+ int whichhost; /* host we're currently trying/connected to */
+ pg_conn_host *connhost; /* details about each named host */
+ char *connip; /* IP address for current network connection */
+
+ /*
+ * The pending command queue as a singly-linked list. Head is the command
+ * currently in execution, tail is where new commands are added.
+ */
+ PGcmdQueueEntry *cmd_queue_head;
+ PGcmdQueueEntry *cmd_queue_tail;
+
+ /*
+ * To save malloc traffic, we don't free entries right away; instead we
+ * save them in this list for possible reuse.
+ */
+ PGcmdQueueEntry *cmd_queue_recycle;
+
+ /* Connection data */
+ pgsocket sock; /* FD for socket, PGINVALID_SOCKET if
+ * unconnected */
+ SockAddr laddr; /* Local address */
+ SockAddr raddr; /* Remote address */
+ ProtocolVersion pversion; /* FE/BE protocol version in use */
+ int sversion; /* server version, e.g. 70401 for 7.4.1 */
+ bool auth_req_received; /* true if any type of auth req received */
+ bool password_needed; /* true if server demanded a password */
+ bool sigpipe_so; /* have we masked SIGPIPE via SO_NOSIGPIPE? */
+ bool sigpipe_flag; /* can we mask SIGPIPE via MSG_NOSIGNAL? */
+ bool write_failed; /* have we had a write failure on sock? */
+ char *write_err_msg; /* write error message, or NULL if OOM */
+
+ /* Transient state needed while establishing connection */
+ PGTargetServerType target_server_type; /* desired session properties */
+ bool try_next_addr; /* time to advance to next address/host? */
+ bool try_next_host; /* time to advance to next connhost[]? */
+ struct addrinfo *addrlist; /* list of addresses for current connhost */
+ struct addrinfo *addr_cur; /* the one currently being tried */
+ int addrlist_family; /* needed to know how to free addrlist */
+ bool send_appname; /* okay to send application_name? */
+
+ /* Miscellaneous stuff */
+ int be_pid; /* PID of backend --- needed for cancels */
+ int be_key; /* key of backend --- needed for cancels */
+ pgParameterStatus *pstatus; /* ParameterStatus data */
+ int client_encoding; /* encoding id */
+ bool std_strings; /* standard_conforming_strings */
+ PGTernaryBool default_transaction_read_only; /* default_transaction_read_only */
+ PGTernaryBool in_hot_standby; /* in_hot_standby */
+ PGVerbosity verbosity; /* error/notice message verbosity */
+ PGContextVisibility show_context; /* whether to show CONTEXT field */
+ PGlobjfuncs *lobjfuncs; /* private state for large-object access fns */
+
+ /* Buffer for data received from backend and not yet processed */
+ char *inBuffer; /* currently allocated buffer */
+ int inBufSize; /* allocated size of buffer */
+ int inStart; /* offset to first unconsumed data in buffer */
+ int inCursor; /* next byte to tentatively consume */
+ int inEnd; /* offset to first position after avail data */
+
+ /* Buffer for data not yet sent to backend */
+ char *outBuffer; /* currently allocated buffer */
+ int outBufSize; /* allocated size of buffer */
+ int outCount; /* number of chars waiting in buffer */
+
+ /* State for constructing messages in outBuffer */
+ int outMsgStart; /* offset to msg start (length word); if -1,
+ * msg has no length word */
+ int outMsgEnd; /* offset to msg end (so far) */
+
+ /* Row processor interface workspace */
+ PGdataValue *rowBuf; /* array for passing values to rowProcessor */
+ int rowBufLen; /* number of entries allocated in rowBuf */
+
+ /* Status for asynchronous result construction */
+ PGresult *result; /* result being constructed */
+ PGresult *next_result; /* next result (used in single-row mode) */
+
+ /* Assorted state for SASL, SSL, GSS, etc */
+ void *sasl_state;
+
+ /* SSL structures */
+ bool ssl_in_use;
+
+#ifdef USE_SSL
+ bool allow_ssl_try; /* Allowed to try SSL negotiation */
+ bool wait_ssl_try; /* Delay SSL negotiation until after
+ * attempting normal connection */
+#ifdef USE_OPENSSL
+ SSL *ssl; /* SSL status, if have SSL connection */
+ X509 *peer; /* X509 cert of server */
+#ifdef USE_SSL_ENGINE
+ ENGINE *engine; /* SSL engine, if any */
+#else
+ void *engine; /* dummy field to keep struct the same if
+ * OpenSSL version changes */
+#endif
+ bool crypto_loaded; /* Track if libcrypto locking callbacks have
+ * been done for this connection. This can be
+ * removed once support for OpenSSL 1.0.2 is
+ * removed as this locking is handled
+ * internally in OpenSSL >= 1.1.0. */
+#endif /* USE_OPENSSL */
+#endif /* USE_SSL */
+
+#ifdef ENABLE_GSS
+ gss_ctx_id_t gctx; /* GSS context */
+ gss_name_t gtarg_nam; /* GSS target name */
+
+ /* The following are encryption-only */
+ bool try_gss; /* GSS attempting permitted */
+ bool gssenc; /* GSS encryption is usable */
+ gss_cred_id_t gcred; /* GSS credential temp storage. */
+
+ /* GSS encryption I/O state --- see fe-secure-gssapi.c */
+ char *gss_SendBuffer; /* Encrypted data waiting to be sent */
+ int gss_SendLength; /* End of data available in gss_SendBuffer */
+ int gss_SendNext; /* Next index to send a byte from
+ * gss_SendBuffer */
+ int gss_SendConsumed; /* Number of *unencrypted* bytes consumed
+ * for current contents of gss_SendBuffer */
+ char *gss_RecvBuffer; /* Received, encrypted data */
+ int gss_RecvLength; /* End of data available in gss_RecvBuffer */
+ char *gss_ResultBuffer; /* Decryption of data in gss_RecvBuffer */
+ int gss_ResultLength; /* End of data available in
+ * gss_ResultBuffer */
+ int gss_ResultNext; /* Next index to read a byte from
+ * gss_ResultBuffer */
+ uint32 gss_MaxPktSize; /* Maximum size we can encrypt and fit the
+ * results into our output buffer */
+#endif
+
+#ifdef ENABLE_SSPI
+ CredHandle *sspicred; /* SSPI credentials handle */
+ CtxtHandle *sspictx; /* SSPI context */
+ char *sspitarget; /* SSPI target name */
+ int usesspi; /* Indicate if SSPI is in use on the
+ * connection */
+#endif
+
+ /*
+ * Buffer for current error message. This is cleared at the start of any
+ * connection attempt or query cycle; after that, all code should append
+ * messages to it, never overwrite.
+ */
+ PQExpBufferData errorMessage; /* expansible string */
+
+ /* Buffer for receiving various parts of messages */
+ PQExpBufferData workBuffer; /* expansible string */
+};
+
+/* PGcancel stores all data necessary to cancel a connection. A copy of this
+ * data is required to safely cancel a connection running on a different
+ * thread.
+ */
+struct pg_cancel
+{
+ SockAddr raddr; /* Remote address */
+ int be_pid; /* PID of backend --- needed for cancels */
+ int be_key; /* key of backend --- needed for cancels */
+};
+
+
+/* String descriptions of the ExecStatusTypes.
+ * direct use of this array is deprecated; call PQresStatus() instead.
+ */
+extern char *const pgresStatus[];
+
+
+#ifdef USE_SSL
+
+#ifndef WIN32
+#define USER_CERT_FILE ".postgresql/postgresql.crt"
+#define USER_KEY_FILE ".postgresql/postgresql.key"
+#define ROOT_CERT_FILE ".postgresql/root.crt"
+#define ROOT_CRL_FILE ".postgresql/root.crl"
+#else
+/* On Windows, the "home" directory is already PostgreSQL-specific */
+#define USER_CERT_FILE "postgresql.crt"
+#define USER_KEY_FILE "postgresql.key"
+#define ROOT_CERT_FILE "root.crt"
+#define ROOT_CRL_FILE "root.crl"
+#endif
+
+#endif /* USE_SSL */
+
+/* ----------------
+ * Internal functions of libpq
+ * Functions declared here need to be visible across files of libpq,
+ * but are not intended to be called by applications. We use the
+ * convention "pqXXX" for internal functions, vs. the "PQxxx" names
+ * used for application-visible routines.
+ * ----------------
+ */
+
+/* === in fe-connect.c === */
+
+extern void pqDropConnection(PGconn *conn, bool flushInput);
+extern int pqPacketSend(PGconn *conn, char pack_type,
+ const void *buf, size_t buf_len);
+extern bool pqGetHomeDirectory(char *buf, int bufsize);
+
+#ifdef ENABLE_THREAD_SAFETY
+extern pgthreadlock_t pg_g_threadlock;
+
+#define PGTHREAD_ERROR(msg) \
+ do { \
+ fprintf(stderr, "%s\n", msg); \
+ abort(); \
+ } while (0)
+
+
+#define pglock_thread() pg_g_threadlock(true)
+#define pgunlock_thread() pg_g_threadlock(false)
+#else
+#define pglock_thread() ((void) 0)
+#define pgunlock_thread() ((void) 0)
+#endif
+
+/* === in fe-exec.c === */
+
+extern void pqSetResultError(PGresult *res, PQExpBuffer errorMessage);
+extern void *pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary);
+extern char *pqResultStrdup(PGresult *res, const char *str);
+extern void pqClearAsyncResult(PGconn *conn);
+extern void pqSaveErrorResult(PGconn *conn);
+extern PGresult *pqPrepareAsyncResult(PGconn *conn);
+extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void pqSaveMessageField(PGresult *res, char code,
+ const char *value);
+extern void pqSaveParameterStatus(PGconn *conn, const char *name,
+ const char *value);
+extern int pqRowProcessor(PGconn *conn, const char **errmsgp);
+extern void pqCommandQueueAdvance(PGconn *conn);
+extern int PQsendQueryContinue(PGconn *conn, const char *query);
+
+/* === in fe-protocol3.c === */
+
+extern char *pqBuildStartupPacket3(PGconn *conn, int *packetlen,
+ const PQEnvironmentOption *options);
+extern void pqParseInput3(PGconn *conn);
+extern int pqGetErrorNotice3(PGconn *conn, bool isError);
+extern void pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
+ PGVerbosity verbosity, PGContextVisibility show_context);
+extern int pqGetCopyData3(PGconn *conn, char **buffer, int async);
+extern int pqGetline3(PGconn *conn, char *s, int maxlen);
+extern int pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize);
+extern int pqEndcopy3(PGconn *conn);
+extern PGresult *pqFunctionCall3(PGconn *conn, Oid fnid,
+ int *result_buf, int *actual_result_len,
+ int result_is_int,
+ const PQArgBlock *args, int nargs);
+
+/* === in fe-misc.c === */
+
+ /*
+ * "Get" and "Put" routines return 0 if successful, EOF if not. Note that for
+ * Get, EOF merely means the buffer is exhausted, not that there is
+ * necessarily any error.
+ */
+extern int pqCheckOutBufferSpace(size_t bytes_needed, PGconn *conn);
+extern int pqCheckInBufferSpace(size_t bytes_needed, PGconn *conn);
+extern int pqGetc(char *result, PGconn *conn);
+extern int pqPutc(char c, PGconn *conn);
+extern int pqGets(PQExpBuffer buf, PGconn *conn);
+extern int pqGets_append(PQExpBuffer buf, PGconn *conn);
+extern int pqPuts(const char *s, PGconn *conn);
+extern int pqGetnchar(char *s, size_t len, PGconn *conn);
+extern int pqSkipnchar(size_t len, PGconn *conn);
+extern int pqPutnchar(const char *s, size_t len, PGconn *conn);
+extern int pqGetInt(int *result, size_t bytes, PGconn *conn);
+extern int pqPutInt(int value, size_t bytes, PGconn *conn);
+extern int pqPutMsgStart(char msg_type, PGconn *conn);
+extern int pqPutMsgEnd(PGconn *conn);
+extern int pqReadData(PGconn *conn);
+extern int pqFlush(PGconn *conn);
+extern int pqWait(int forRead, int forWrite, PGconn *conn);
+extern int pqWaitTimed(int forRead, int forWrite, PGconn *conn,
+ time_t finish_time);
+extern int pqReadReady(PGconn *conn);
+extern int pqWriteReady(PGconn *conn);
+
+/* === in fe-secure.c === */
+
+extern int pqsecure_initialize(PGconn *, bool, bool);
+extern PostgresPollingStatusType pqsecure_open_client(PGconn *);
+extern void pqsecure_close(PGconn *);
+extern ssize_t pqsecure_read(PGconn *, void *ptr, size_t len);
+extern ssize_t pqsecure_write(PGconn *, const void *ptr, size_t len);
+extern ssize_t pqsecure_raw_read(PGconn *, void *ptr, size_t len);
+extern ssize_t pqsecure_raw_write(PGconn *, const void *ptr, size_t len);
+
+#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
+extern int pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending);
+extern void pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending,
+ bool got_epipe);
+#endif
+
+/* === SSL === */
+
+/*
+ * The SSL implementation provides these functions.
+ */
+
+/*
+ * Implementation of PQinitSSL().
+ */
+extern void pgtls_init_library(bool do_ssl, int do_crypto);
+
+/*
+ * Initialize SSL library.
+ *
+ * The conn parameter is only used to be able to pass back an error
+ * message - no connection-local setup is made here. do_ssl controls
+ * if SSL is initialized, and do_crypto does the same for the crypto
+ * part.
+ *
+ * Returns 0 if OK, -1 on failure (adding a message to conn->errorMessage).
+ */
+extern int pgtls_init(PGconn *conn, bool do_ssl, bool do_crypto);
+
+/*
+ * Begin or continue negotiating a secure session.
+ */
+extern PostgresPollingStatusType pgtls_open_client(PGconn *conn);
+
+/*
+ * Close SSL connection.
+ */
+extern void pgtls_close(PGconn *conn);
+
+/*
+ * Read data from a secure connection.
+ *
+ * On failure, this function is responsible for appending a suitable message
+ * to conn->errorMessage. The caller must still inspect errno, but only
+ * to determine whether to continue/retry after error.
+ */
+extern ssize_t pgtls_read(PGconn *conn, void *ptr, size_t len);
+
+/*
+ * Is there unread data waiting in the SSL read buffer?
+ */
+extern bool pgtls_read_pending(PGconn *conn);
+
+/*
+ * Write data to a secure connection.
+ *
+ * On failure, this function is responsible for appending a suitable message
+ * to conn->errorMessage. The caller must still inspect errno, but only
+ * to determine whether to continue/retry after error.
+ */
+extern ssize_t pgtls_write(PGconn *conn, const void *ptr, size_t len);
+
+/*
+ * Get the hash of the server certificate, for SCRAM channel binding type
+ * tls-server-end-point.
+ *
+ * NULL is sent back to the caller in the event of an error, with an
+ * error message for the caller to consume.
+ *
+ * This is not supported with old versions of OpenSSL that don't have
+ * the X509_get_signature_nid() function.
+ */
+#if defined(USE_OPENSSL) && defined(HAVE_X509_GET_SIGNATURE_NID)
+#define HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
+extern char *pgtls_get_peer_certificate_hash(PGconn *conn, size_t *len);
+#endif
+
+/*
+ * Verify that the server certificate matches the host name we connected to.
+ *
+ * The certificate's Common Name and Subject Alternative Names are considered.
+ *
+ * Returns 1 if the name matches, and 0 if it does not. On error, returns
+ * -1, and sets the libpq error message.
+ *
+ */
+extern int pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
+ int *names_examined,
+ char **first_name);
+
+/* === GSSAPI === */
+
+#ifdef ENABLE_GSS
+
+/*
+ * Establish a GSSAPI-encrypted connection.
+ */
+extern PostgresPollingStatusType pqsecure_open_gss(PGconn *conn);
+
+/*
+ * Read and write functions for GSSAPI-encrypted connections, with internal
+ * buffering to handle nonblocking sockets.
+ */
+extern ssize_t pg_GSS_write(PGconn *conn, const void *ptr, size_t len);
+extern ssize_t pg_GSS_read(PGconn *conn, void *ptr, size_t len);
+#endif
+
+/* === in libpq-trace.c === */
+
+extern void pqTraceOutputMessage(PGconn *conn, const char *message,
+ bool toServer);
+extern void pqTraceOutputNoTypeByteMessage(PGconn *conn, const char *message);
+
+/* === miscellaneous macros === */
+
+/*
+ * this is so that we can check if a connection is non-blocking internally
+ * without the overhead of a function call
+ */
+#define pqIsnonblocking(conn) ((conn)->nonblocking)
+
+/*
+ * Connection's outbuffer threshold, for pipeline mode.
+ */
+#define OUTBUFFER_THRESHOLD 65536
+
+#ifdef ENABLE_NLS
+extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
+extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n) pg_attribute_format_arg(1) pg_attribute_format_arg(2);
+#else
+#define libpq_gettext(x) (x)
+#define libpq_ngettext(s, p, n) ((n) == 1 ? (s) : (p))
+#endif
+
+/*
+ * These macros are needed to let error-handling code be portable between
+ * Unix and Windows. (ugh)
+ */
+#ifdef WIN32
+#define SOCK_ERRNO (WSAGetLastError())
+#define SOCK_STRERROR winsock_strerror
+#define SOCK_ERRNO_SET(e) WSASetLastError(e)
+#else
+#define SOCK_ERRNO errno
+#define SOCK_STRERROR strerror_r
+#define SOCK_ERRNO_SET(e) (errno = (e))
+#endif
+
+#endif /* LIBPQ_INT_H */
diff --git a/src/interfaces/libpq/nls.mk b/src/interfaces/libpq/nls.mk
new file mode 100644
index 0000000..a7e54cd
--- /dev/null
+++ b/src/interfaces/libpq/nls.mk
@@ -0,0 +1,6 @@
+# src/interfaces/libpq/nls.mk
+CATALOG_NAME = libpq
+AVAIL_LANGUAGES = cs de el es fr ja ko ru sv uk zh_CN
+GETTEXT_FILES = fe-auth.c fe-auth-scram.c fe-connect.c fe-exec.c fe-gssapi-common.c fe-lobj.c fe-misc.c fe-protocol3.c fe-secure.c fe-secure-common.c fe-secure-gssapi.c fe-secure-openssl.c win32.c
+GETTEXT_TRIGGERS = libpq_gettext pqInternalNotice:2
+GETTEXT_FLAGS = libpq_gettext:1:pass-c-format pqInternalNotice:2:c-format
diff --git a/src/interfaces/libpq/pg_service.conf.sample b/src/interfaces/libpq/pg_service.conf.sample
new file mode 100644
index 0000000..5a1c083
--- /dev/null
+++ b/src/interfaces/libpq/pg_service.conf.sample
@@ -0,0 +1,17 @@
+#
+# Connection configuration file
+#
+# A service is a set of named connection parameters. You may specify
+# multiple services in this file. Each starts with a service name in
+# brackets. Subsequent lines have connection configuration parameters of
+# the pattern "param=value" or LDAP URLs starting with "ldap://"
+# to look up such parameters. A sample configuration for postgres is
+# included in this file. Lines beginning with '#' are comments.
+#
+# Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and
+# rename it pg_service.conf.
+#
+#
+#[postgres]
+#dbname=postgres
+#user=postgres
diff --git a/src/interfaces/libpq/po/cs.po b/src/interfaces/libpq/po/cs.po
new file mode 100644
index 0000000..ff590c7
--- /dev/null
+++ b/src/interfaces/libpq/po/cs.po
@@ -0,0 +1,1334 @@
+# Czech translation of libpq messages
+#
+# pgtranslation Id: libpq.po,v 1.6 2011/09/08 18:23:05 petere Exp $
+#
+# Karel Žák, 2001-2003, 2004.
+# Zdeněk Kotala, 2009, 2011, 2012, 2013.
+# Tomáš Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-31 16:09+0000\n"
+"PO-Revision-Date: 2020-10-31 21:45+0100\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: fe-auth-scram.c:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "poškozená SCRAM zpráva (prázdná zpráva)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "poškozená SCRAM zpráva (délka neodpovídá)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "chybná signatura serveru\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "chybný stav SCRAM výměny\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "poškozená SCRAM zpráva (očekáván atribut \"%c\")\n"
+
+#: fe-auth-scram.c:305
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "poškozená SCRAM zpráva (očekáván znak \"=\" pro atribut \"%c\")\n"
+
+#: fe-auth-scram.c:346
+msgid "could not generate nonce\n"
+msgstr "nelze vygenerovat nonce\n"
+
+#: fe-auth-scram.c:356 fe-auth-scram.c:431 fe-auth-scram.c:579
+#: fe-auth-scram.c:600 fe-auth-scram.c:626 fe-auth-scram.c:641
+#: fe-auth-scram.c:691 fe-auth-scram.c:725 fe-auth.c:289 fe-auth.c:359
+#: fe-auth.c:394 fe-auth.c:611 fe-auth.c:770 fe-auth.c:1129 fe-auth.c:1277
+#: fe-connect.c:892 fe-connect.c:1419 fe-connect.c:1595 fe-connect.c:2200
+#: fe-connect.c:2223 fe-connect.c:2952 fe-connect.c:4601 fe-connect.c:4857
+#: fe-connect.c:4976 fe-connect.c:5229 fe-connect.c:5309 fe-connect.c:5408
+#: fe-connect.c:5664 fe-connect.c:5693 fe-connect.c:5765 fe-connect.c:5789
+#: fe-connect.c:5807 fe-connect.c:5908 fe-connect.c:5917 fe-connect.c:6273
+#: fe-connect.c:6423 fe-exec.c:2747 fe-exec.c:3494 fe-exec.c:3659
+#: fe-gssapi-common.c:111 fe-lobj.c:895 fe-protocol2.c:1207 fe-protocol3.c:995
+#: fe-protocol3.c:1699 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1091
+msgid "out of memory\n"
+msgstr "nedostatek paměti\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "nelze zakódovat nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "nelze zakódovat client proof\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "chybná SCRAM odpověď (nonce neodpovídá)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "poškozená SCRAM zpráva (chybná salt hodnota)\n"
+
+#: fe-auth-scram.c:665
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "poškozená SCRAM zpráva (chybný počet iterací)\n"
+
+#: fe-auth-scram.c:671
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "poškozená SCRAM zpráva (smetí na konci server-first-message)\n"
+
+#: fe-auth-scram.c:702
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "server zaslal chybu v rámci SCRAM výměny: %s\n"
+
+#: fe-auth-scram.c:718
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "poškozená SCRAM zpráva (smetí na konci server-final-message)\n"
+
+#: fe-auth-scram.c:737
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "poškozená SCRAM zpráva (chybná signatura serveru)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "při alokaci GSSAPI bufferu došla paměť (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "Přetrvávající chyba GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:388 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "host musí být specifikován\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "duplikátní GSS autentizační požadavek\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "při alokaci SSPI bufferu došla paměť (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "Přetrvávající chyba SSPI"
+
+#: fe-auth.c:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "duplicitní SSPI autentizační požadavek\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "nelze získat SSPI credentials"
+
+#: fe-auth.c:429
+msgid "channel binding required, but SSL not in use\n"
+msgstr "channel binding vyžadováno, ale SSL není zapnuto\n"
+
+#: fe-auth.c:436
+msgid "duplicate SASL authentication request\n"
+msgstr "duplicitní SASL autentizační požadavek\n"
+
+#: fe-auth.c:492
+msgid "channel binding is required, but client does not support it\n"
+msgstr "channel binding je vyžadován, ale klient ho nepodporuje\n"
+
+#: fe-auth.c:509
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "server nabídl SCRAM-SHA-256-PLUS authentizaci přes ne-SSL spojení\n"
+
+#: fe-auth.c:521
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "žádný ze SASL authentizačních mechanismů serveru není podporován\n"
+
+#: fe-auth.c:529
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "channel binding je vyžadováno, ale server nenabídl methodu autentizace které channel binding podporuje\n"
+
+#: fe-auth.c:635
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "při alokaci SASL bufferu došla paměť (%d)\n"
+
+#: fe-auth.c:660
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "AuthenticationSASLFinal obdržena od serveru, ale SASL authentizace nebyla dokončena\n"
+
+#: fe-auth.c:737
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "SCM_CRED metoda autentizace není podporována\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "channel binding vyžadováno, ale server authentizoval klienta bez channel binding\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "channel binding je vyžadován ale není podporován autentizační metodou serveru\n"
+
+#: fe-auth.c:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos 4 autentizace není podporována\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos 5 autentizace není podporována\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI autentizace není podporována\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI autentizace není podporována\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "Crypt autentizace není podporována\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "autentizační metoda %u není podporována\n"
+
+#: fe-auth.c:1104
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "vyhledání uživatele selhalo: chybový kód %lu\n"
+
+#: fe-auth.c:1114 fe-connect.c:2834
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "nelze vyhledat lokálního uživatele ID %d: %s\n"
+
+#: fe-auth.c:1119 fe-connect.c:2839
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "lokální uživatel s ID %d neexistuje\n"
+
+#: fe-auth.c:1221
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "neočekávaná podoba výsledku pro SHOW\n"
+
+#: fe-auth.c:1230
+msgid "password_encryption value too long\n"
+msgstr "hodnota password_encryption je příliš dlouhá\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "neznámý algoritmus pro šifrování hesla \"%s\"\n"
+
+#: fe-connect.c:1075
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "nelze napárovat %d jmen hostů na %d hostaddr hodnot\n"
+
+#: fe-connect.c:1156
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "nelze napárovat %d čísel portů na %d hostů\n"
+
+#: fe-connect.c:1249
+#, c-format
+#| msgid "invalid channel binding type\n"
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "neplatná hodnota channel_binding: \"%s\"\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "neplatná hodnota sslmode: \"%s\"\n"
+
+#: fe-connect.c:1296
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "hodnota sslmode \"%s\" je neplatná pokud není zakompilována podpora SSL\n"
+
+#: fe-connect.c:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "neplatná hodnodta ssl_min_protocol_version: \"%s\"\n"
+
+#: fe-connect.c:1325
+#, c-format
+#| msgid "invalid sslmode value: \"%s\"\n"
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "neplatná hodnota ssl_max_protocol_version: \"%s\"\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "neplatný rozsah verzí SSL protokolu\n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "invalid gssencmode gssencmode: \"%s\"\n"
+
+#: fe-connect.c:1366
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "gssencmode hodnota \"%s\" je neplatná při nezakompilované GSSAPI podpoře\n"
+
+#: fe-connect.c:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "neplatná hodnota target_session_attrs: \"%s\"\n"
+
+#: fe-connect.c:1619
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "nelze nastavit \"no delay\" mód TCP soketu: %s\n"
+
+#: fe-connect.c:1680
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running locally and accepting\n"
+"\tconnections on Unix domain socket \"%s\"?\n"
+msgstr ""
+"nelze navázat spojení se serverem: %s\n"
+"\tJe spuštěn server lokálně a akceptuje\n"
+"\tspojení pomocí Unix soketu \"%s\"?\n"
+
+#: fe-connect.c:1717
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running on host \"%s\" (%s) and accepting\n"
+"\tTCP/IP connections on port %s?\n"
+msgstr ""
+"nelze navázat spojení se serverem: %s\n"
+"\tJe server na \"%s\" (%s) spuštěn a akceptuje\n"
+"\tTCP/IP spojení na portu %s?\n"
+
+#: fe-connect.c:1725
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running on host \"%s\" and accepting\n"
+"\tTCP/IP connections on port %s?\n"
+msgstr ""
+"nelze navázat spojení se serverem: %s\n"
+"\tJe server na \"%s\" spuštěn a akceptuje\n"
+"\tTCP/IP spojení na portu %s?\n"
+
+#: fe-connect.c:1795
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "chybná integer hodnota \"%s\" pro volbu spojení \"%s\"\n"
+
+#: fe-connect.c:1825 fe-connect.c:1859 fe-connect.c:1894 fe-connect.c:1981
+#: fe-connect.c:2623
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "setsockopt(%s) selhalo: %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) selhalo: %ui\n"
+
+#: fe-connect.c:2313
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "neplatný stav spojení, pravděpodobně způsobený poškozením paměti\n"
+
+#: fe-connect.c:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "neplatné číslo portu: \"%s\"\n"
+
+#: fe-connect.c:2395
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "nemohu přeložit jméno hostitele \"%s\" na adresu: %s\n"
+
+#: fe-connect.c:2408
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "nelze naparsovat síťovou adresu \"%s\": %s\n"
+
+#: fe-connect.c:2421
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Cesta k unixovému \"%s\" je příliš dlouhá (maximum %d bytů)\n"
+
+#: fe-connect.c:2436
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "nemohu přeložit cestu Unix-domain soketu \"%s\" na adresu: %s\n"
+
+#: fe-connect.c:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "nelze vytvořit soket: %s\n"
+
+#: fe-connect.c:2582
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "soket nelze nastavit do neblokujícího módu: %s\n"
+
+#: fe-connect.c:2592
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "nelze nastavit soket do close-on-exec módu: %s\n"
+
+#: fe-connect.c:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "parametr keepalives musí být celé číslo\n"
+
+#: fe-connect.c:2750
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "nelze obdržet chybový status soketu: %s\n"
+
+#: fe-connect.c:2778
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "nelze získat adresu klienta ze soketu: %s\n"
+
+#: fe-connect.c:2820
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "parametr requirepeer není na této platformě podporován\n"
+
+#: fe-connect.c:2823
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "nelze získat informace (credentials) protistrany: %s\n"
+
+#: fe-connect.c:2847
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer obsahuje \"%s\", ale skutečné jméno peera je \"%s\"\n"
+
+#: fe-connect.c:2887
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "nelze zaslat GSSAPI negociační packet: %s\n"
+
+#: fe-connect.c:2899
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "GSSAPI šifrování je vyžadováno ale bylo nemožné (možná kvůli chybějící credential cache, podpoře na serveru, nebo používání lokálního socketu)\n"
+
+#: fe-connect.c:2926
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "nelze poslat SSL \"negotiation paket\": %s\n"
+
+#: fe-connect.c:2965
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "nelze poslat počáteční paket: %s\n"
+
+#: fe-connect.c:3035
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "server nepodporuje SSL, leč SSL je vyžadováno\n"
+
+#: fe-connect.c:3061
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "přijata neplatná odpověď na SSL negotiation: %c\n"
+
+#: fe-connect.c:3151
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "server nepodporuje GSSAPI šifrování, to ale bylo vyžadováno\n"
+
+#: fe-connect.c:3162
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "přijata neplatná odpověď na GSSAPI negotiation: %c\n"
+
+#: fe-connect.c:3229 fe-connect.c:3260
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "očekáván byl autentizační dotaz ze serveru, ale přijat byl %c\n"
+
+#: fe-connect.c:3502
+msgid "unexpected message from server during startup\n"
+msgstr "neočekávaná zpráva ze serveru během startu\n"
+
+#: fe-connect.c:3707
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "nelze otevřít zapisovatelné spojení na server \"%s:%s\"\n"
+
+#: fe-connect.c:3753
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "test \"SHOW transaction_read_only\" selhal na serveru \"%s:%s\"\n"
+
+#: fe-connect.c:3768
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "neplatný stav spojení %d, pravděpodobně způsobený poškozením paměti\n"
+
+#: fe-connect.c:4207 fe-connect.c:4267
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc \"%s\" selhalo během události PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4614
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "naplatné LDAP URL \"%s\": schéma musí být ldap://\n"
+
+#: fe-connect.c:4629
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "neplatné LDAP URL \"%s\": chybí rozlišující jméno\n"
+
+#: fe-connect.c:4641 fe-connect.c:4696
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "neplatné LDAP URL \"%s\": musí mít právě jeden atribut\n"
+
+#: fe-connect.c:4652 fe-connect.c:4711
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "naplatné LDAP URL \"%s\": musí mít vyhledávací rozsah (base/one/sub)\n"
+
+#: fe-connect.c:4663
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "naplatné LDAP URL \"%s\": není filter\n"
+
+#: fe-connect.c:4684
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "naplatné LDAP URL \"%s\": neplatný číslo portu\n"
+
+#: fe-connect.c:4720
+msgid "could not create LDAP structure\n"
+msgstr "nelze vytvořit LDAP strukturu\n"
+
+#: fe-connect.c:4796
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "vyhledávání na LDAP serveru selhalo: %s\n"
+
+#: fe-connect.c:4807
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "nalezen více jak jeden záznam při LDAP vyhledávání\n"
+
+#: fe-connect.c:4808 fe-connect.c:4820
+msgid "no entry found on LDAP lookup\n"
+msgstr "nebyl nalezen žádný záznam při LDAP vyhledávání\n"
+
+#: fe-connect.c:4831 fe-connect.c:4844
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "atribut nemá žádnou hodnotu při LDAP vyhledávání\n"
+
+#: fe-connect.c:4896 fe-connect.c:4915 fe-connect.c:5447
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "chybné \"=\" po \"%s\" v informačním řetězci spojení\n"
+
+#: fe-connect.c:4988 fe-connect.c:5632 fe-connect.c:6406
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "neplatný parametr spojení \"%s\"\n"
+
+#: fe-connect.c:5004 fe-connect.c:5496
+msgid "unterminated quoted string in connection info string\n"
+msgstr "neukončený řetězec v uvozovkách v informačním řetězci spojení\n"
+
+#: fe-connect.c:5087
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "definice služby \"%s\" nenalezena\n"
+
+#: fe-connect.c:5110
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "soubor se seznamem služeb \"%s\" nebyl nalezen\n"
+
+#: fe-connect.c:5125
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "řádek %d v souboru se seznamem služeb \"%s\" je příliš dlouhý\n"
+
+#: fe-connect.c:5197 fe-connect.c:5241
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "syntaktická chyba v souboru se seznamu služeb \"%s\", řádek %d\n"
+
+#: fe-connect.c:5208
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "vnořené specifikace služeb nejsou podporovány v service souboru \"%s\", řádek %d\n"
+
+#: fe-connect.c:5928
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "neplatné URI propagované do interní procedury parseru: \"%s\"\n"
+
+#: fe-connect.c:6005
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "při hledání odpovídajícího znaku \"]\" v IPv6 adrese hostitele byl dosažen konec řetězce URI: \"%s\"\n"
+
+#: fe-connect.c:6012
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6 adresa hostitele v URI nesmí být prázdná: \"%s\"\n"
+
+#: fe-connect.c:6027
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "neočekávaný znak \"%c\" na pozici %d v URI (očekáváno \":\" nebo \"/\"): \"%s\"\n"
+
+#: fe-connect.c:6156
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "přebytečný oddělovač klíče/hodnoty \"=\" v URI parametru dotazu: \"%s\"\n"
+
+#: fe-connect.c:6176
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "chybějící oddělovač klíče/hodnoty \"=\" v URI parametru dotazu: \"%s\"\n"
+
+#: fe-connect.c:6227
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "neplatný parametr v URI dotazu: \"%s\"\n"
+
+#: fe-connect.c:6301
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "neplatný procenty-kódovaný token \"%s\"\n"
+
+#: fe-connect.c:6311
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "zakázaná hodnota %%00 v procenty-k´odované hodnotě: \"%s\"\n"
+
+#: fe-connect.c:6674
+msgid "connection pointer is NULL\n"
+msgstr "pointer spojení je NULL\n"
+
+#: fe-connect.c:6970
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "VAROVÁNÍ: soubor s hesly \"%s\" není prostý (plain) soubor\n"
+
+#: fe-connect.c:6979
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "UPOZORNĚNÍ: Soubor s hesly \"%s\" má přístupová práva pro čtení pro skupinu nebo všechny uživatele; práva by měla být u=rw (0600)\n"
+
+#: fe-connect.c:7087
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "heslo načteno ze souboru \"%s\"\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "číslo řádky %d je mimo rozsah 0..%d"
+
+#: fe-exec.c:505 fe-protocol2.c:497 fe-protocol2.c:532 fe-protocol2.c:1050
+#: fe-protocol3.c:206 fe-protocol3.c:233 fe-protocol3.c:250 fe-protocol3.c:330
+#: fe-protocol3.c:723 fe-protocol3.c:954
+msgid "out of memory"
+msgstr "nedostatek paměti"
+
+#: fe-exec.c:506 fe-protocol2.c:1396 fe-protocol3.c:1907
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:815
+msgid "write to server failed\n"
+msgstr "zápis na server selhal\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "POZNÁMKA"
+
+#: fe-exec.c:954
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult nemůže podporovat více než INT_MAX řádek"
+
+#: fe-exec.c:966
+msgid "size_t overflow"
+msgstr "size_t přetečení"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "řetězec příkazu je prázdný ukazatel\n"
+
+#: fe-exec.c:1307 fe-exec.c:1353 fe-exec.c:1448
+msgid "number of parameters must be between 0 and 65535\n"
+msgstr "počet parametrů musí být mezi 0 a 65535\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "název výrazu je prázdný ukazatel\n"
+
+#: fe-exec.c:1361 fe-exec.c:1524 fe-exec.c:2233 fe-exec.c:2435
+msgid "function requires at least protocol version 3.0\n"
+msgstr "funkce vyžaduje protokol alespoň 3.0 a vyšší\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "není spojení se serverem\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "zpracovává se již jiný příkaz\n"
+
+#: fe-exec.c:1600
+msgid "length must be given for binary parameter\n"
+msgstr "délka musí být specifikována pro binarní parametr\n"
+
+#: fe-exec.c:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "neočekávaný asyncStatus: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc \"%s\" selhala během události PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY bylo ukončeno novým PQexec"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "COPY IN status musí být nejdříve ukončen\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "COPY OUT status musí být nejdříve ukončen\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec není povoleno během COPY BOTH\n"
+
+#: fe-exec.c:2325 fe-exec.c:2392 fe-exec.c:2482 fe-protocol2.c:1353
+#: fe-protocol3.c:1838
+msgid "no COPY in progress\n"
+msgstr "COPY se neprovádí\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "spojení je ve špatném stavu\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "neplatný ExecStatusType kód"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult není chybový výsledek\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "číslo sloupce %d je mimo rozsah 0..%d"
+
+#: fe-exec.c:2843
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "číslo parametru %d je mimo rozsah 0..%d"
+
+#: fe-exec.c:3153
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "nelze interpretovat výsledek ze serveru: %s"
+
+#: fe-exec.c:3392 fe-exec.c:3476
+msgid "incomplete multibyte character\n"
+msgstr "nekompletní multibyte znak\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "chyba importu GSSAPI jména"
+
+#: fe-lobj.c:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "nelze určit OID funkce lo_truncare\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "argument pro lo_truncate přesahuje rozsah typu integer\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "nelze určit OID funkce lo_truncare64\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "agrument pro lo_read přesahuje rozsah typu integer\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "agrument pro lo_write přesahuje rozsah typu integer\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "nelze určit OID funkce lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "nelze určit OID funkce lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "nelze určit OID funkce lo_tell64\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "nelze otevřít soubor \"%s\": %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "nelze číst ze souboru \"%s\": %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "nelze zapsat do souboru \"%s\": %s\n"
+
+#: fe-lobj.c:946
+msgid "query to initialize large object functions did not return data\n"
+msgstr "dotaz inicializující \"large object\" funkce nevrátil data\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "nelze určit OID funkce lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "nelze určit OID funkce lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "nelze určit OID funkce lo_create\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "nelze určit OID funkce lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "nelze určit OID funkce lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "nelze určit OID funkce lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "nelze určit OID funkce loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "nelze určit OID funkce lowrite\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "pqGetInt nepodporuje integer velikosti %lu"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "pqPutInt nepodporuje integer velikosti %lu"
+
+#: fe-misc.c:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "spojení není otevřeno\n"
+
+#: fe-misc.c:805 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:267 fe-secure.c:383
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"server neočekávaně ukončil spojení\n"
+"\tToto pravděpodobně znamená, že byl ukončen nestandardně\n"
+"\tpřed nebo během vykonávání požadavku.\n"
+
+#: fe-misc.c:1063
+msgid "timeout expired\n"
+msgstr "časový limit (timeout) uběhl\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "chybný socket\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() selhal: %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "neplatný status spojení %c, pravděpodobně způsobený poškozením paměti\n"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "neplatný status %c, pravděpodobně způsobený poškozením paměti\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "zpráva typu 0x%02x přišla ze serveru během nečinnosti"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "neočekávaný znak %c následuje prázdnou odezvu dotazu(\"I\" zpráva)"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "server odeslal data (\"D\" zpráva) bez předcházejícího popisu řádky (\"T\" zpráva)"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "server odeslal binární data (\"B\" zpráva) bez předchozího popisu řádky (\"T\" zpráva)"
+
+#: fe-protocol2.c:626 fe-protocol3.c:408
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "neočekávaná odpověď serveru; předchozí znak byl \"%c\"\n"
+
+#: fe-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:622 fe-protocol3.c:849
+msgid "out of memory for query result"
+msgstr "nedostatek paměti pro výsledek dotazu"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "ztráta synchronizace se serverem, resetuji spojení"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2095
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "chyba protokolu: id=0x%x\n"
+
+#: fe-protocol3.c:365
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "server odeslal data (\"D\" zpráva) bez předchozího popisu řádky (\"T\" zpráva)\n"
+
+#: fe-protocol3.c:429
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "obsah zprávy nesouhlasí s délkou v typu zprávy \"%c\"\n"
+
+#: fe-protocol3.c:449
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "ztracena synchronizace se serverem: obdržena zpráva typu \"%c\", délky %d\n"
+
+#: fe-protocol3.c:500 fe-protocol3.c:540
+msgid "insufficient data in \"T\" message"
+msgstr "nedostatek dat v \"T\" zprávě"
+
+#: fe-protocol3.c:573
+msgid "extraneous data in \"T\" message"
+msgstr "přebytečná data v \"T\" zprávě"
+
+#: fe-protocol3.c:686
+msgid "extraneous data in \"t\" message"
+msgstr "přebytečná data v \"t\" zprávě"
+
+#: fe-protocol3.c:757 fe-protocol3.c:789 fe-protocol3.c:807
+msgid "insufficient data in \"D\" message"
+msgstr "nedostatek dat v \"D\" zprávě"
+
+#: fe-protocol3.c:763
+msgid "unexpected field count in \"D\" message"
+msgstr "neočekávaný počet položek v \"D\" zprávě"
+
+#: fe-protocol3.c:816
+msgid "extraneous data in \"D\" message"
+msgstr "přebytečná data v \"D\" zprávě"
+
+#: fe-protocol3.c:1008
+msgid "no error message available\n"
+msgstr "chybová zpráva není k dispozici\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1056 fe-protocol3.c:1075
+#, c-format
+msgid " at character %s"
+msgstr " na znaku %s"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETAIL: %s\n"
+
+#: fe-protocol3.c:1091
+#, c-format
+msgid "HINT: %s\n"
+msgstr "DOPORUČENÍ: %s\n"
+
+#: fe-protocol3.c:1094
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "DOTAZ: %s\n"
+
+#: fe-protocol3.c:1101
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "KONTEXT: %s\n"
+
+#: fe-protocol3.c:1110
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NÁZEV SCHÉMATU: %s\n"
+
+#: fe-protocol3.c:1114
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NÁZEV TABULKY: %s\n"
+
+#: fe-protocol3.c:1118
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NÁZEV SLOUPCE: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NÁZEV DATOVÉHO TYPU: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NÁZEV OMEZENÍ: %s\n"
+
+#: fe-protocol3.c:1138
+msgid "LOCATION: "
+msgstr "UMÍSTĚNÍ: "
+
+#: fe-protocol3.c:1140
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1337
+#, c-format
+msgid "LINE %d: "
+msgstr "ŘÁDKA %d: "
+
+#: fe-protocol3.c:1732
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: not doing text COPY OUT\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "jméno SSL certifikátu obsahuje vloženou null hodnotu\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "host musí být specifikován pro ověřené SSL spojení\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "serverový certifikát pro \"%s\" nesouhlasí s jménem serveru (host name) \"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "ze serverového certifikátu nelze získat host name serveru\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPI wrap error"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "odchozí GSSAPI zpráva by nepoužívala důvěrnost (confidentiality)\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "klient se pokusil zaslat příliš velký GSSAPI packet (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "příliš velký GSSAPI packet zaslán serverem (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPI unwrap error"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "příchozí GSSAPI zpráva nepoužívala důvěrnost (confidentiality)\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "nelze inicializovat GSSAPI bezpečnostní kontext"
+
+#: fe-secure-gssapi.c:673
+msgid "GSSAPI size check error"
+msgstr "GSSAPI size check error"
+
+#: fe-secure-gssapi.c:684
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI context establishment error"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1291
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL chyba: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1295
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL chyba: detekován EOF\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1304
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL chyba: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL spojení bylo neočekávaně ukončeno\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1354
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "neznámý chybový kód SSL: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "nelze určit podepisovací algoritmus serverového certifikátu\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "nelze nalézt digest pro NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "nelze vygenerovat hash peer cerfitikátu\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "SSL certifikátu chybí položka name\n"
+
+#: fe-secure-openssl.c:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "nelze vytvořit SSL kontext: %s\n"
+
+#: fe-secure-openssl.c:854
+#, c-format
+#| msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "neplatná hodnota \"%s\" pro minimální verzi SSL protokolu\n"
+
+#: fe-secure-openssl.c:865
+#, c-format
+#| msgid "could not establish SSL connection: %s\n"
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "nelze nastavit minimální verzi SSL protokolu: %s\n"
+
+#: fe-secure-openssl.c:883
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "neplatná hodnota \"%s\" pro maximální verzi SSL protokolu\n"
+
+#: fe-secure-openssl.c:894
+#, c-format
+#| msgid "could not establish SSL connection: %s\n"
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "nelze nastavit maximální verzi SSL protokolu: %s\n"
+
+#: fe-secure-openssl.c:930
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "nelze číst soubor s kořenovým certifikátem \"%s\": %s\n"
+
+#: fe-secure-openssl.c:974
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"nelze určit domácí adresář pro nalezení souboru s kořenovým certifikátem\n"
+"Buď poskytněte soubor nebo změňte ssl mód tak, aby neověřoval certifkát serveru.\n"
+
+#: fe-secure-openssl.c:978
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"soubor s kořenovým certifikátem \"%s\" neexistuje\n"
+"poskytněnte soubor nebo změntě ssl mód tak, aby neověřoval certifkát serveru.\n"
+
+#: fe-secure-openssl.c:1009
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "nelze otevřít soubor s certifikátem \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1028
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "nelze číst soubor s certifikátem \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "nelze vytvořit SSL spojení: %s\n"
+
+#: fe-secure-openssl.c:1107
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "nelze nahrát SSL engine \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1119
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "nelze inicializovat SSL engine \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1135
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "nelze číst soubor privátního klíče \"%s\" z enginu \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "nelze načíst soubor privátního klíče \"%s\" z enginu \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1186
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "certifikát je přítomen, ale soubor privátního klíče ne \"%s\"\n"
+
+#: fe-secure-openssl.c:1194
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "soubor s privátním klíčem \"%s\" má povolená přístupová práva pro skupinu nebo všechny uživatele; práva by měla být u=rw (0600) nebo přísnější\n"
+
+#: fe-secure-openssl.c:1219
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "nelze načíst soubor privátního klíče \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "certifikát nesouhlasí se souborem privátního klíče \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1337
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Toto může znamenat že server nepodporuje verzi SSL protokolu mezi %s a %s.\n"
+
+#: fe-secure-openssl.c:1373
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "certifikát nelze získat: %s\n"
+
+#: fe-secure-openssl.c:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "žádný chybový kód SSL nebyl hlášený"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL chybový kód %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "WARNING: hodnota sslpassword oříznuta\n"
+
+#: fe-secure.c:275
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "nelze přijmout data ze serveru: %s\n"
+
+#: fe-secure.c:390
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "nelze poslat data na server: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "neznámá chyba socketu: 0x%08X/%d"
+
+#~ msgid "empty channel binding data for channel binding type \"%s\"\n"
+#~ msgstr ""
+#~ "prázdná \"channel binding data\" pro channel binding typu \"%s\"\n"
+#~ "\n"
+
+#~ msgid "could not set socket to blocking mode: %s\n"
+#~ msgstr "nelze nastavit soket do blokujícího módu: %s\n"
+
+#~ msgid "Kerberos 5 authentication rejected: %*s\n"
+#~ msgstr "Kerberos 5 autentizace odmítnuta: %*s\n"
+
+#~ msgid "setsockopt(TCP_KEEPIDLE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPIDLE) selhalo: %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPALIVE) selhalo: %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPINTVL) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPINTVL) selhalo: %s\n"
+
+#~ msgid "setsockopt(SO_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(SO_KEEPALIVE) selhalo: %s\n"
+
+#~ msgid "could not get home directory to locate service definition file"
+#~ msgstr "nelze získat domovský adresář pro nalezení kořenového certifikátu"
+
+#~ msgid "socket not open\n"
+#~ msgstr "soket není otevřen\n"
+
+#~ msgid "unrecognized return value from row processor"
+#~ msgstr "nerozpoznaná návratová hodnota z processoru řádek"
+
+#~ msgid "private key file \"%s\" changed during execution\n"
+#~ msgstr "soubor privátního klíče \"%s\" byl za chodu změněn\n"
+
+#~ msgid "could not open private key file \"%s\": %s\n"
+#~ msgstr "nelze otevřít soubor s privátním klíčem \"%s\": %s\n"
+
+#~ msgid "could not get home directory to locate client certificate files"
+#~ msgstr "nelze získat domovský adresář pro nalezení klientského certifikátu"
+
+#~ msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+#~ msgstr "knihovna SSL nepodporuje CRL certifikáty (soubor \"%s\")\n"
diff --git a/src/interfaces/libpq/po/de.po b/src/interfaces/libpq/po/de.po
new file mode 100644
index 0000000..1546180
--- /dev/null
+++ b/src/interfaces/libpq/po/de.po
@@ -0,0 +1,1221 @@
+# German message translation file for libpq
+# Peter Eisentraut <peter@eisentraut.org>, 2001 - 2022.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-07-19 08:55+0000\n"
+"PO-Revision-Date: 2022-04-01 11:08+0200\n"
+"Last-Translator: Peter Eisentraut <peter@eisentraut.org>\n"
+"Language-Team: German <pgsql-translators@postgresql.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (leere Nachricht)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Länge stimmt nicht überein)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "konnte Serversignatur nicht überprüfen\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "falsche Serversignatur\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "ungültiger Zustand des SCRAM-Austauschs\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Attribut »%c« erwartet)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Zeichen »=« für Attribut »%c« erwartet)\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "konnte Nonce nicht erzeugen\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3125 fe-exec.c:3309
+#: fe-exec.c:4082 fe-exec.c:4247 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:979 fe-protocol3.c:994 fe-protocol3.c:1027
+#: fe-protocol3.c:1735 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "Speicher aufgebraucht\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "konnte Nonce nicht kodieren\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "konnte Client-Proof nicht berechnen\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "konnte Client-Proof nicht kodieren\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "ungültige SCRAM-Antwort (Nonce stimmt nicht überein)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (ungültiges Salt)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (ungültige Iterationszahl)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Müll am Ende der »server-first-message«)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "Fehler vom Server empfangen im SCRAM-Austausch: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Müll am Ende der »server-final-message«)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (ungültige Serversignatur)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "Speicher aufgebraucht beim Anlegen des GSSAPI-Puffers (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI-Fortsetzungsfehler"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "Hostname muss angegeben werden\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "doppelte GSSAPI-Authentifizierungsanfrage\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "Speicher aufgebraucht beim Anlegen des SSPI-Puffers (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "SSPI-Fortsetzungsfehler"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "doppelte SSPI-Authentifizierungsanfrage\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "konnte SSPI-Credentials nicht erhalten"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "Channel-Binding wurde verlangt, aber SSL wird nicht verwendet\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "doppelte SASL-Authentifizierungsanfrage\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "Channel-Binding wurde verlangt, aber der Client unterstützt es nicht\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "Server hat Authentifizierung mit SCRAM-SHA-256-PLUS über eine Verbindung ohne SSL angeboten\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "keine der SASL-Authentifizierungsmechanismen des Servers werden unterstützt\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "Channel-Binding wurde verlangt, aber der Server hat keine Authentifizierungsmethode mit Channel-Binding angeboten\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "Speicher aufgebraucht beim Anlegen des SASL-Puffers (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "AuthenticationSASLFinal vom Server empfangen, aber SASL-Authentifizierung war noch nicht abgeschlossen\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "SCM_CRED-Authentifizierungsmethode nicht unterstützt\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "Channel-Binding wurde verlangt, aber der Server hat den Client ohne Channel-Binding authentifiziert\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "Channel-Binding wurde verlangt aber von der Authentifizierungsanfrage des Servers nicht unterstützt\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Authentifizierung mit Kerberos 4 nicht unterstützt\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Authentifizierung mit Kerberos 5 nicht unterstützt\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "Authentifizierung mit GSSAPI nicht unterstützt\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "Authentifizierung mit SSPI nicht unterstützt\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "Authentifizierung mit Crypt nicht unterstützt\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "Authentifizierungsmethode %u nicht unterstützt\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "Fehler beim Nachschlagen des Benutzernamens: Fehlercode %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "konnte lokale Benutzer-ID %d nicht nachschlagen: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "lokaler Benutzer mit ID %d existiert nicht\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "unerwartete Form der Ergebnismenge von SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "Wert von password_encryption ist zu lang\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "unbekannter Passwortverschlüsselungsalgorithmus »%s«\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "fehlerhafte Angabe: %d Hostnamen und %d hostaddr-Angaben\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "fehlerhafte Angabe: %d Portnummern und %d Hosts\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "ungültiger %s-Wert: »%s«\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "sslmode-Wert »%s« ist ungültig, wenn SSL-Unterstützung nicht einkompiliert worden ist\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "ungültiges SSL-Protokollsintervall\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "gssencmode-Wert »%s« ist ungültig, wenn GSSAPI-Unterstützung nicht einkompiliert worden ist\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "konnte Socket nicht auf TCP »No Delay«-Modus umstellen: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "Verbindung zum Server auf Socket »%s« fehlgeschlagen: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "Verbindung zum Server auf »%s« (%s), Port %s fehlgeschlagen: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "Verbindung zum Server auf »%s«, Port %s fehlgeschlagen: "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\tLäuft der Server lokal und akzeptiert er Verbindungen auf diesem Socket?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tLäuft der Server auf diesem Host und akzeptiert er TCP/IP-Verbindungen?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "ungültiger Zahlenwert »%s« für Verbindungsoption »%s«\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s) fehlgeschlagen: %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) fehlgeschlagen: Fehlercode %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "ungültiger Verbindungszustand, möglicherweise ein Speicherproblem\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "ungültige Portnummer: »%s«\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "konnte Hostnamen »%s« nicht in Adresse übersetzen: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "konnte Netzwerkadresse »%s« nicht interpretieren: %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unix-Domain-Socket-Pfad »%s« ist zu lang (maximal %d Bytes)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "konnte Unix-Domain-Socket-Pfad »%s« nicht in Adresse übersetzen: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "konnte Socket nicht erzeugen: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "konnte Socket nicht auf nicht-blockierenden Modus umstellen: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "konnte Socket nicht auf »Close on exec«-Modus umstellen: %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "Parameter »keepalives« muss eine ganze Zahl sein\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "konnte Socket-Fehlerstatus nicht ermitteln: %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "konnte Client-Adresse vom Socket nicht ermitteln: %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "Parameter »requirepeer« wird auf dieser Plattform nicht unterstützt\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "konnte Credentials von Gegenstelle nicht ermitteln: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer gibt »%s« an, aber tatsächlicher Benutzername der Gegenstelle ist »%s«\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "konnte Paket zur GSSAPI-Verhandlung nicht senden: %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "GSSAPI-Verschlüsselung war gefordert aber war nicht möglich (möglicherweise kein Credential-Cache, keine Serverunterstützung oder lokales Socket wird verwendet)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "konnte Paket zur SSL-Verhandlung nicht senden: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "konnte Startpaket nicht senden: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "Server unterstützt kein SSL, aber SSL wurde verlangt\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "ungültige Antwort auf SSL-Verhandlungspaket empfangen: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "unverschlüsselte Daten nach SSL-Antwort empfangen\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "Server unterstützt keine GSSAPI-Verschlüsselung, sie wurde aber verlangt\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "ungültige Antwort auf GSSAPI-Verhandlungspaket empfangen: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "unverschlüsselte Daten nach GSSAPI-Verschlüsselungsantwort empfangen\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "Authentifizierungsanfrage wurde vom Server erwartet, aber %c wurde empfangen\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "unerwartete Nachricht vom Server beim Start\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "Sitzung ist read-only\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "Sitzung ist nicht read-only\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "Server ist im Hot-Standby-Modus\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "Server ist nicht im Hot-Standby-Modus\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "»%s« fehlgeschlagen\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "ungültiger Verbindungszustand %d, möglicherweise ein Speicherproblem\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc »%s« während PGEVT_CONNRESET-Ereignis fehlgeschlagen\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "ungültige LDAP-URL »%s«: Schema muss ldap:// sein\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "ungültige LDAP-URL »%s«: Distinguished Name fehlt\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "ungültige LDAP-URL »%s«: muss genau ein Attribut haben\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "ungültige LDAP-URL »%s«: Suchbereich fehlt (base/one/sub)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "ungültige LDAP-URL »%s«: kein Filter\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "ungültige LDAP-URL »%s«: ungültige Portnummer\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "konnte LDAP-Struktur nicht erzeugen\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "Suche auf LDAP-Server fehlgeschlagen: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP-Suche ergab mehr als einen Eintrag\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "kein Eintrag gefunden bei LDAP-Suche\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "Attribut hat keine Werte bei LDAP-Suche\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "fehlendes »=« nach »%s« in der Zeichenkette der Verbindungsdaten\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "ungültige Verbindungsoption »%s«\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "fehlendes schließendes Anführungszeichen (\") in der Zeichenkette der Verbindungsdaten\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "Definition von Service »%s« nicht gefunden\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "Servicedatei »%s« nicht gefunden\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "Zeile %d zu lang in Servicedatei »%s«\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "Syntaxfehler in Servicedatei »%s«, Zeile %d\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "geschachtelte »service«-Definitionen werden nicht unterstützt in Servicedatei »%s«, Zeile %d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "ungültige URI an interne Parserroutine weitergeleitet: »%s«\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "Ende der Eingabezeichenkette gefunden beim Suchen nach passendem »]« in IPv6-Hostadresse in URI: »%s«\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6-Hostadresse darf nicht leer sein in URI: »%s«\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "unerwartetes Zeichen »%c« an Position %d in URI (»:« oder »/« erwartet): »%s«\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "zusätzliches Schlüssel/Wert-Trennzeichen »=« in URI-Query-Parameter: »%s«\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "fehlendes Schlüssel/Wert-Trennzeichen »=« in URI-Query-Parameter: »%s«\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "ungültiger URI-Query-Parameter: »%s«\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "ungültiges Prozent-kodiertes Token: »%s«\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "verbotener Wert %%00 in Prozent-kodiertem Wert: »%s«\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "Verbindung ist ein NULL-Zeiger\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "WARNUNG: Passwortdatei »%s« ist keine normale Datei\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "WARNUNG: Passwortdatei »%s« erlaubt Lesezugriff für Gruppe oder Andere; Rechte sollten u=rw (0600) oder weniger sein\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "Passwort wurde aus Datei »%s« gelesen\n"
+
+#: fe-exec.c:449 fe-exec.c:3383
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "Zeilennummer %d ist außerhalb des zulässigen Bereichs 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:207 fe-protocol3.c:232 fe-protocol3.c:261
+#: fe-protocol3.c:279 fe-protocol3.c:375 fe-protocol3.c:747
+msgid "out of memory"
+msgstr "Speicher aufgebraucht"
+
+#: fe-exec.c:511 fe-protocol3.c:1943
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "Schreiben zum Server fehlgeschlagen\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "HINWEIS"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult kann nicht mehr als INT_MAX Tupel enthalten"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "Überlauf von size_t"
+
+#: fe-exec.c:1351 fe-exec.c:1477 fe-exec.c:1526
+msgid "command string is a null pointer\n"
+msgstr "Befehlszeichenkette ist ein NULL-Zeiger\n"
+
+#: fe-exec.c:1483 fe-exec.c:1532 fe-exec.c:1628
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "Anzahl der Parameter muss zwischen 0 und %d sein\n"
+
+#: fe-exec.c:1520 fe-exec.c:1622
+msgid "statement name is a null pointer\n"
+msgstr "Anweisungsname ist ein NULL-Zeiger\n"
+
+#: fe-exec.c:1664 fe-exec.c:3236
+msgid "no connection to the server\n"
+msgstr "keine Verbindung mit dem Server\n"
+
+#: fe-exec.c:1673 fe-exec.c:3245
+msgid "another command is already in progress\n"
+msgstr "ein anderer Befehl ist bereits in Ausführung\n"
+
+#: fe-exec.c:1704
+msgid "cannot queue commands during COPY\n"
+msgstr "während COPY können keine Befehle aufgereiht werden\n"
+
+#: fe-exec.c:1822
+msgid "length must be given for binary parameter\n"
+msgstr "für binäre Parameter muss eine Länge angegeben werden\n"
+
+#: fe-exec.c:2149
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "unerwarteter asyncStatus: %d\n"
+
+#: fe-exec.c:2185
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc »%s« während PGEVT_RESULTCREATE-Ereignis fehlgeschlagen\n"
+
+#: fe-exec.c:2333
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "synchrone Befehlsausführungsfunktionen sind im Pipeline-Modus nicht erlaubt\n"
+
+#: fe-exec.c:2355
+msgid "COPY terminated by new PQexec"
+msgstr "COPY von neuem PQexec beendet"
+
+#: fe-exec.c:2372
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec ist während COPY BOTH nicht erlaubt\n"
+
+#: fe-exec.c:2600 fe-exec.c:2656 fe-exec.c:2725 fe-protocol3.c:1874
+msgid "no COPY in progress\n"
+msgstr "keine COPY in Ausführung\n"
+
+#: fe-exec.c:2902
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfn im Pipeline-Modus nicht erlaubt\n"
+
+#: fe-exec.c:2910
+msgid "connection in wrong state\n"
+msgstr "Verbindung im falschen Zustand\n"
+
+#: fe-exec.c:2954
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "kann Pipeline-Modus nicht einschalten, Verbindung ist nicht inaktiv\n"
+
+#: fe-exec.c:2991 fe-exec.c:3015
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "kann Pipeline-Modus nicht beenden, wegen nicht eingesammelter Ergebnisse\n"
+
+#: fe-exec.c:2996
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "kann Pipeline-Modus nicht beenden während die Verbindung beschäftigt ist\n"
+
+#: fe-exec.c:3008
+msgid "cannot exit pipeline mode while in COPY\n"
+msgstr "kann Pipeline-Modus nicht beenden während COPY aktiv ist\n"
+
+#: fe-exec.c:3169
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "Pipeline kann nicht gesendet werden, wenn der Pipeline-Modus aus ist\n"
+
+#: fe-exec.c:3272
+msgid "invalid ExecStatusType code"
+msgstr "ungültiger ExecStatusType-Kode"
+
+#: fe-exec.c:3299
+msgid "PGresult is not an error result\n"
+msgstr "PGresult ist kein Fehlerresultat\n"
+
+#: fe-exec.c:3367 fe-exec.c:3390
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "Spaltennummer %d ist außerhalb des zulässigen Bereichs 0..%d"
+
+#: fe-exec.c:3405
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "Parameternummer %d ist außerhalb des zulässigen Bereichs 0..%d"
+
+#: fe-exec.c:3715
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "konnte Ergebnis vom Server nicht interpretieren: %s"
+
+#: fe-exec.c:3975 fe-exec.c:4064
+msgid "incomplete multibyte character\n"
+msgstr "unvollständiges Mehrbyte-Zeichen\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "GSSAPI-Namensimportfehler"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "kann OID der Funktion %s nicht ermitteln\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "Argument von lo_truncate überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "Argument von lo_read überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "Argument von lo_write überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "konnte Datei »%s« nicht öffnen: %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "konnte nicht aus Datei »%s« lesen: %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "konnte nicht in Datei »%s« schreiben: %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "Abfrage zur Initialisierung der Large-Object-Funktionen ergab keine Daten\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "Integer der Größe %lu wird von pqGetInt nicht unterstützt"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "Integer der Größe %lu wird von pqPutInt nicht unterstützt"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "Verbindung nicht offen\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"Server beendete die Verbindung unerwartet\n"
+"\tDas heißt wahrscheinlich, dass der Server abnormal beendete\n"
+"\tbevor oder während die Anweisung bearbeitet wurde.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "Timeout abgelaufen\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "ungültiges Socket\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s() fehlgeschlagen: %s\n"
+
+#: fe-protocol3.c:184
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "Nachricht vom Typ 0x%02x kam vom Server im Ruhezustand"
+
+#: fe-protocol3.c:407
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "Server sendete Daten (»D«-Nachricht) ohne vorherige Zeilenbeschreibung (»T«-Nachricht)\n"
+
+#: fe-protocol3.c:450
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "unerwartete Antwort vom Server; erstes empfangenes Zeichen war »%c«\n"
+
+#: fe-protocol3.c:475
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "Nachrichteninhalt stimmt nicht mit Länge in Nachrichtentyp »%c« überein\n"
+
+#: fe-protocol3.c:495
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "Synchronisation mit Server verloren: Nachrichtentyp »%c« empfangen, Länge %d\n"
+
+#: fe-protocol3.c:547 fe-protocol3.c:587
+msgid "insufficient data in \"T\" message"
+msgstr "nicht genug Daten in »T«-Nachricht"
+
+#: fe-protocol3.c:658 fe-protocol3.c:864
+msgid "out of memory for query result"
+msgstr "Speicher für Anfrageergebnis aufgebraucht"
+
+#: fe-protocol3.c:727
+msgid "insufficient data in \"t\" message"
+msgstr "nicht genug Daten in »t«-Nachricht"
+
+#: fe-protocol3.c:786 fe-protocol3.c:818 fe-protocol3.c:836
+msgid "insufficient data in \"D\" message"
+msgstr "nicht genug Daten in »D«-Nachricht"
+
+#: fe-protocol3.c:792
+msgid "unexpected field count in \"D\" message"
+msgstr "unerwartete Feldzahl in »D«-Nachricht"
+
+#: fe-protocol3.c:1040
+msgid "no error message available\n"
+msgstr "keine Fehlermeldung verfügbar\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1088 fe-protocol3.c:1107
+#, c-format
+msgid " at character %s"
+msgstr " bei Zeichen %s"
+
+#: fe-protocol3.c:1120
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETAIL: %s\n"
+
+#: fe-protocol3.c:1123
+#, c-format
+msgid "HINT: %s\n"
+msgstr "TIP: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "ANFRAGE: %s\n"
+
+#: fe-protocol3.c:1133
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "KONTEXT: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMANAME: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABELLENNAME: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "SPALTENNAME: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATENTYPNAME: %s\n"
+
+#: fe-protocol3.c:1158
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "CONSTRAINT-NAME: %s\n"
+
+#: fe-protocol3.c:1170
+msgid "LOCATION: "
+msgstr "ORT: "
+
+#: fe-protocol3.c:1172
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1174
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1369
+#, c-format
+msgid "LINE %d: "
+msgstr "ZEILE %d: "
+
+#: fe-protocol3.c:1768
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: Text COPY OUT nicht ausgeführt\n"
+
+#: fe-protocol3.c:2134
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "Protokollfehler: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "Name im SSL-Zertifikat enthält Null-Byte\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "Hostname muss angegeben werden für eine verifizierte SSL-Verbindung\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "Server-Zertifikat für »%s« stimmt nicht mit dem Hostnamen »%s« überein\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "konnte Hostnamen des Servers nicht aus dem Serverzertifikat ermitteln\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPI-Wrap-Fehler"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "ausgehende GSSAPI-Nachricht würde keine Vertraulichkeit verwenden\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "Client versuchte übergroßes GSSAPI-Paket zu senden (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "übergroßes GSSAPI-Paket vom Server gesendet (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPI-Unwrap-Fehler"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "eingehende GSSAPI-Nachricht verwendete keine Vertraulichkeit\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "konnte GSSAPI-Sicherheitskontext nicht initiieren"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "GSSAPI-Fehler bei der Größenprüfung"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI-Fehler beim Einrichten des Kontexts"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL-SYSCALL-Fehler: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL-SYSCALL-Fehler: Dateiende entdeckt\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL-Fehler: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL-Verbindung wurde unerwartet geschlossen\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "unbekannter SSL-Fehlercode: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "konnte Signaturalgorithmus des Serverzertifikats nicht ermitteln\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "konnte Digest für NID %s nicht finden\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "konnte Hash des Zertifikats der Gegenstelle nicht erzeugen\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "Namenseintrag fehlt im SSL-Zertifikat\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "konnte SSL-Kontext nicht erzeugen: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "ungültiger Wert »%s« für minimale SSL-Protokollversion\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "konnte minimale SSL-Protokollversion nicht setzen: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "ungültiger Wert »%s« für maximale SSL-Protokollversion\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "konnte maximale SSL-Protokollversion nicht setzen: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "konnte Root-Zertifikat-Datei »%s« nicht lesen: %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"konnte Home-Verzeichnis nicht ermitteln, um Root-Zertifikat-Datei zu finden\n"
+"Legen Sie entweder die Datei an oder ändern Sie sslmode, um die Überprüfung der Serverzertifikate abzuschalten.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"Root-Zertifikat-Datei »%s« existiert nicht\n"
+"Legen Sie entweder die Datei an oder ändern Sie sslmode, um die Überprüfung der Serverzertifikate abzuschalten.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "konnte Zertifikatdatei »%s« nicht öffnen: %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "konnte Zertifikatdatei »%s« nicht lesen: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "konnte SSL-Verbindung nicht aufbauen: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "konnte SSL-Server-Name-Indication (SNI) nicht setzen: %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "konnte SSL-Engine »%s« nicht laden: %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "konnte SSL-Engine »%s« nicht initialisieren: %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "konnte privaten SSL-Schlüssel »%s« nicht von Engine »%s« lesen: %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "konnte privaten SSL-Schlüssel »%s« nicht von Engine »%s« laden: %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "Zertifikat vorhanden, aber keine private Schlüsseldatei »%s«\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "private Schlüsseldatei »%s« ist keine normale Datei\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "private Schlüsseldatei »%s« erlaubt Lesezugriff für Gruppe oder Andere; Dateirechte müssen u=rw (0600) oder weniger sein, wenn der Eigentümer der aktuelle Benutzer ist, oder u=rw,g=r (0640) oder weniger, wenn der Eigentümer »root« ist\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "konnte private Schlüsseldatei »%s« nicht laden: %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "Zertifikat passt nicht zur privaten Schlüsseldatei »%s«: %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Das zeigt möglicherweise an, dass der Server keine SSL-Protokollversion zwischen %s und %s unterstützt.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "Zertifikat konnte nicht ermittelt werden: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "kein SSL-Fehler berichtet"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL-Fehlercode %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "WARNUNG: sslpassword abgeschnitten\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "konnte keine Daten vom Server empfangen: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "konnte keine Daten an den Server senden: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "unbekannter Socket-Fehler: 0x%08X/%d"
diff --git a/src/interfaces/libpq/po/el.po b/src/interfaces/libpq/po/el.po
new file mode 100644
index 0000000..cb286d4
--- /dev/null
+++ b/src/interfaces/libpq/po/el.po
@@ -0,0 +1,1314 @@
+# Greek message translation file for libpq
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the libpq (PostgreSQL) package.
+# Georgios Kokolatos <gkokolatos@pm.me>, 2021
+#
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-07-14 05:09+0000\n"
+"PO-Revision-Date: 2021-07-14 10:16+0200\n"
+"Last-Translator: Georgios Kokolatos <gkokolatos@pm.me>\n"
+"Language-Team: \n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (κενό μήνυμα)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (αναντιστοιχία μήκους)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "δεν ήταν δυνατή πιστοποίηση της υπογραφής του διακομιστή\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "λανθασμένη υπογραφή διακομιστή\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "άκυρη κατάσταση ανταλλαγής SCRAM\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (αναμένεται χαρακτηριστικό «%c»)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (αναμένεται χαρακτήρας «=» για το χαρακτηριστικό «%c»)\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "δεν δύναται να δημιουργήσει nonce\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1455 fe-connect.c:1624 fe-connect.c:2976
+#: fe-connect.c:4657 fe-connect.c:4918 fe-connect.c:5037 fe-connect.c:5289
+#: fe-connect.c:5370 fe-connect.c:5469 fe-connect.c:5725 fe-connect.c:5754
+#: fe-connect.c:5826 fe-connect.c:5850 fe-connect.c:5868 fe-connect.c:5969
+#: fe-connect.c:5978 fe-connect.c:6336 fe-connect.c:6486 fe-exec.c:1209
+#: fe-exec.c:3029 fe-exec.c:3212 fe-exec.c:3985 fe-exec.c:4150
+#: fe-gssapi-common.c:111 fe-lobj.c:881 fe-protocol3.c:1016 fe-protocol3.c:1724
+#: fe-secure-common.c:110 fe-secure-gssapi.c:504 fe-secure-openssl.c:440
+#: fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "έλλειψη μνήμης\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "δεν δύναται να κωδικοποιήσει nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "δεν δύναται να υπολογίσει την απόδειξη του πελάτη\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "δεν δύναται να κωδικοποιήσει την απόδειξη του πελάτη\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "μη έγκυρη απόκριση SCRAM (ασυμφωνία nonce)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (άκυρο salt)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (άκυρη μέτρηση επαναλήψεων)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (σκουπίδια στο τέλος του πρώτου-μηνύματος-διακομιστή)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "ελήφθει σφάλμα από τον διακομιστή κατά την ανταλλαγή SCRAM: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (σκουπίδια στο τέλος του τελικού-μηνύματος-διακομιστή)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "κακοσχηματισμένο μήνυμα SCRAM (άκυρη υπογραφή διακομιστή)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "η μνήμη δεν επαρκεί για την εκχώρηση της ενδιάμεσης μνήμης του GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "σφάλμα συνέχισης GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "πρέπει να καθοριστεί το όνομα κεντρικού υπολογιστή\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "διπλότυπη αίτηση ελέγχου ταυτότητας GSS\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "η μνήμη δεν επαρκεί για την εκχώρηση της ενδιάμεσης μνήμης του SSPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "σφάλμα συνέχισης SSPI"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "διπλότυπη αίτηση ελέγχου ταυτότητας SSPI\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "δεν δύναται η απόκτηση διαπιστευτηρίων SSPI"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "απαιτείται σύνδεση καναλιού, αλλά δεν χρησιμοποιείται SSL\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "διπλότυπη αίτηση ελέγχου ταυτότητας SASL\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "απαιτείται σύνδεση καναλιού, αλλά ο πελάτης δεν την υποστηρίζει\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "ο διακομιστής προσέφερε έλεγχο ταυτότητας SCRAM-SHA-256-PLUS μέσω σύνδεσης που δεν είναι SSL\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "δεν υποστηρίζεται κανένας από τους μηχανισμούς ελέγχου ταυτότητας SASL του διακομιστή\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "απαιτείται σύνδεση καναλιού, αλλά ο διακομιστής δεν προσέφερε καμία μέθοδο ελέγχου ταυτότητας που να υποστηρίζει σύνδεση καναλιού\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "η μνήμη δεν επαρκεί για την εκχώρηση της ενδιάμεσης μνήμης του SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "παραλήφθηκε AuthenticationSASLFinal από το διακομιστή, αλλά ο έλεγχος ταυτότητας SASL έχει ολοκληρωθεί\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης SCM_CRED\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "απαιτείται σύνδεση καναλιού, αλλά ο διακομιστής πιστοποίησε τον πελάτη χωρίς σύνδεση καναλιού\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "απαιτείται σύνδεση καναλιού αλλά αυτή δεν υποστηρίζεται από την αίτηση ελέγχου ταυτότητας του διακομιστή\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης Kerberos 4\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης Kerberos 5\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης GSSAPI\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης SSPI\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης Crypt\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "δεν υποστηρίζεται η μέθοδος πιστοποίησης %u\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "αποτυχία αναζήτησης ονόματος χρήστη: κωδικός σφάλματος % lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2851
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "δεν ήταν δυνατή η αναζήτηση ID τοπικού χρήστη %d: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2856
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "δεν υπάρχει τοπικός χρήστης με ID %d\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "μη αναμενόμενο σχήμα συνόλου αποτελεσμάτων που επιστράφηκε από την εντολή SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "πολύ μακρυά τιμή password_encryption\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "μη αναγνωρίσιμος αλγόριθμος κρυπτογράφησης «%s» κωδικού πρόσβασης\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "δεν μπόρεσε να ταιριάξει %d ονομασίες διακομιστών με %d τιμές hostaddr\n"
+
+#: fe-connect.c:1175
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "δεν μπόρεσε να ταιριάξει %d αριθμούς θυρών με %d διακομιστές\n"
+
+#: fe-connect.c:1268 fe-connect.c:1294 fe-connect.c:1336 fe-connect.c:1345
+#: fe-connect.c:1378 fe-connect.c:1422
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "άκυρο %s τιμή: «%s»\n"
+
+#: fe-connect.c:1315
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "η τιμή SSLmode «%s» είναι άκυρη όταν η υποστήριξη SSL δεν έχει μεταγλωττιστεί (compiled)\n"
+
+#: fe-connect.c:1363
+msgid "invalid SSL protocol version range\n"
+msgstr "άκυρο εύρος εκδόσεων πρωτοκόλλου SSL\n"
+
+#: fe-connect.c:1388
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "η τιμή SSLmode «%s» είναι άκυρη όταν η υποστήριξη GSSAPI δεν έχει μεταγλωττιστεί (compiled)\n"
+
+#: fe-connect.c:1648
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "δεν μπόρεσε να ορίσει τον υποδοχέα σε λειτουργία TCP χωρίς καθυστέρηση: %s\n"
+
+#: fe-connect.c:1710
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "σύνδεση στον διακομιστή στην υποδοχή «%s» απέτυχε: "
+
+#: fe-connect.c:1737
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "σύνδεση στον διακομιστή σε «%s» (%s), θύρα %s απέτυχε: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "σύνδεση στον διακομιστή σε «%s», θύρα %s απέτυχε: "
+
+#: fe-connect.c:1767
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\tΕκτελείται τοπικά ο διακομιστής και αποδέχεται συνδέσεις σε αυτή την υποδοχή;\n"
+
+#: fe-connect.c:1771
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tΕκτελείται ο διακομιστής σε αυτόν τον κεντρικό υπολογιστή και αποδέχεται συνδέσεις TCP/IP;\n"
+
+#: fe-connect.c:1835
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "άκυρη τιμή ακεραίου »%s» για την επιλογή σύνδεσης «%s»\n"
+
+#: fe-connect.c:1865 fe-connect.c:1900 fe-connect.c:1936 fe-connect.c:2025
+#: fe-connect.c:2639
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s) απέτυχε: %s\n"
+
+#: fe-connect.c:1990
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) απέτυχε: κωδικός σφάλματος %d\n"
+
+#: fe-connect.c:2305
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "μη έγκυρη κατάσταση σύνδεσης, πιθανώς ενδεικτική αλλοίωσης μνήμης\n"
+
+#: fe-connect.c:2384
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "μη έγκυρος αριθμός πύλης: «%s»\n"
+
+#: fe-connect.c:2400
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "δεν ήταν δυνατή η μετάφραση του ονόματος κεντρικού υπολογιστή «%s» στη διεύθυνση: %s\n"
+
+#: fe-connect.c:2413
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η ανάλυση της διεύθυνσης δικτύου «%s»: %s\n"
+
+#: fe-connect.c:2426
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "η διαδρομή υποδοχής τομέα Unix «%s» είναι πολύ μακρυά (μέγιστο %d bytes)\n"
+
+#: fe-connect.c:2441
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "δεν ήταν δυνατή η μετάφραση της διαδρομής υποδοχής πεδίου-Unix «%s» στη διεύθυνση: %s\n"
+
+#: fe-connect.c:2567
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "δεν ήταν δυνατή η δημιουργία υποδοχέα: %s\n"
+
+#: fe-connect.c:2598
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "δεν ήταν δυνατή η ρύθμιση της υποδοχής σε λειτουργία μη αποκλεισμού: %s\n"
+
+#: fe-connect.c:2608
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "δεν ήταν δυνατή η ρύθμιση της υποδοχής σε λειτουργία close-on-exec: %s\n"
+
+#: fe-connect.c:2626
+msgid "keepalives parameter must be an integer\n"
+msgstr "η παράμετρος keepalives πρέπει να είναι ακέραιος\n"
+
+#: fe-connect.c:2767
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "δεν ήταν δυνατή η απόκτηση κατάστασης σφάλματος της υποδοχής: %s\n"
+
+#: fe-connect.c:2795
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "δεν ήταν δυνατή η απόκτηση διεύθυνσης πελάτη από την υποδοχή: %s\n"
+
+#: fe-connect.c:2837
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "η παράμετρος requirepeer δεν υποστηρίζεται από την παρούσα πλατφόρμα\n"
+
+#: fe-connect.c:2840
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "δεν ήταν δυνατή η απόκτηση διαπιστευτηρίων από peer: %s\n"
+
+#: fe-connect.c:2864
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "το requirepeer καθορίζει «%s», αλλά το πραγματικό όνομα ομότιμου χρήστη είναι «%s»\n"
+
+#: fe-connect.c:2904
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "δεν ήταν δυνατή η αποστολή GSSAPI πακέτου διαπραγμάτευσης: %s\n"
+
+#: fe-connect.c:2916
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "GSSAPI κρυπτογράφηση απαιτείται αλλά ήταν αδύνατη (πιθανώς απουσία cache διαπιστευτηρίων, απουσία υποστήριξης διακομιστή, ή χρησιμοποιείται τοπική υποδοχή)\n"
+
+#: fe-connect.c:2958
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr ""
+"δεν ήταν δυνατή η αποστολή SSL πακέτου διαπραγμάτευσης: %s\n"
+"\n"
+
+#: fe-connect.c:2989
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "δεν ήταν δυνατή η αποστολή πακέτου εκκίνησης: %s\n"
+
+#: fe-connect.c:3065
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "ο διακομιστής δεν υποστηρίζει SSL, αλλά απαιτείται SSL\n"
+
+#: fe-connect.c:3092
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "έλαβε μη έγκυρη απάντηση κατά τη διαπραγμάτευση SSL: %c\n"
+
+#: fe-connect.c:3181
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "ο διακομιστής δεν υποστηρίζει κρυπτογράφηση GSSAPI, αλλά αυτή ήταν απαραίτητη\n"
+
+#: fe-connect.c:3193
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "έλαβε μη έγκυρη απάντηση κατά τη διαπραγμάτευση GSSAPI: %c\n"
+
+#: fe-connect.c:3259 fe-connect.c:3284
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "ανέμενε αίτηση ελέγχου ταυτότητας από το διακομιστή, αλλά αντί αυτής ελήφθη %c\n"
+
+#: fe-connect.c:3491
+msgid "unexpected message from server during startup\n"
+msgstr "μη αναμενόμενο μήνυμα από το διακομιστή κατά την εκκίνηση\n"
+
+#: fe-connect.c:3583
+msgid "session is read-only\n"
+msgstr "η περίοδος λειτουργίας είναι μόνο για ανάγνωση\n"
+
+#: fe-connect.c:3586
+msgid "session is not read-only\n"
+msgstr "η περίοδος λειτουργίας δεν είναι μόνο για ανάγνωση\n"
+
+#: fe-connect.c:3640
+msgid "server is in hot standby mode\n"
+msgstr "%s: ο διακομιστής βρίσκεται σε hot κατάσταση αναμονής\n"
+
+#: fe-connect.c:3643
+msgid "server is not in hot standby mode\n"
+msgstr "ο διακομιστής δεν βρίσκεται σε hot κατάσταση αναμονής\n"
+
+#: fe-connect.c:3754 fe-connect.c:3806
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "«%s» απέτυχε.\n"
+
+#: fe-connect.c:3820
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "κατάσταση μη έγκυρης σύνδεσης %d, πιθανώς ενδεικτική αλλοίωσης της μνήμης\n"
+
+#: fe-connect.c:4266 fe-connect.c:4326
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc «%s» απέτυχε κατά τη διάρκεια συμβάντος PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4670
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: ο συνδυασμός πρέπει να είναι ldap://\n"
+
+#: fe-connect.c:4685
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: λείπει το αποκλειστικό όνομα\n"
+
+#: fe-connect.c:4697 fe-connect.c:4755
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: πρέπει να περιέχει ακριβώς ένα χαρακτηριστικό\n"
+
+#: fe-connect.c:4709 fe-connect.c:4771
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: πρέπει να έχει εμβέλεια αναζήτησης (base/one/sub)\n"
+
+#: fe-connect.c:4721
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: κανένα φίλτρο\n"
+
+#: fe-connect.c:4743
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "άκυρη διεύθυνση URL LDAP «%s»: άκυρος αριθμός θύρας\n"
+
+#: fe-connect.c:4781
+msgid "could not create LDAP structure\n"
+msgstr "δεν ήταν δυνατή η δημιουργία δομής LDAP\n"
+
+#: fe-connect.c:4857
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "απέτυχε η αναζήτηση στον διακομιστή LDAP: %s\n"
+
+#: fe-connect.c:4868
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "βρέθηκαν περισσότερες από μία καταχωρήσεις στην αναζήτηση LDAP\n"
+
+#: fe-connect.c:4869 fe-connect.c:4881
+msgid "no entry found on LDAP lookup\n"
+msgstr "δεν βρέθηκε καταχώρηση στην αναζήτηση LDAP\n"
+
+#: fe-connect.c:4892 fe-connect.c:4905
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "το χαρακτηριστικό δεν έχει τιμές στην αναζήτηση LDAP\n"
+
+#: fe-connect.c:4957 fe-connect.c:4976 fe-connect.c:5508
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "λείπει το «=» μετά από «%s» στην συμβολοσειρά πληροφορίας σύνδεσης\n"
+
+#: fe-connect.c:5049 fe-connect.c:5693 fe-connect.c:6469
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "άκυρη επιλογή σύνδεσης «%s»\n"
+
+#: fe-connect.c:5065 fe-connect.c:5557
+msgid "unterminated quoted string in connection info string\n"
+msgstr "ατερμάτιστη συμβολοσειρά με εισαγωγικά στην συμβολοσειρά πληροφορίας σύνδεσης\n"
+
+#: fe-connect.c:5146
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "δεν βρέθηκε ο ορισμός της υπηρεσίας «%s»\n"
+
+#: fe-connect.c:5172
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "δεν βρέθηκε αρχείο υπηρεσίας «%s»\n"
+
+#: fe-connect.c:5186
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "Πολύ μακρυά γραμμή %d στο αρχείο υπηρεσίας «%s»\n"
+
+#: fe-connect.c:5257 fe-connect.c:5301
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "συντακτικό σφάλμα στο αρχείο υπηρεσίας «%s», γραμμή %d\n"
+
+#: fe-connect.c:5268
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "οι ένθετες προδιαγραφές υπηρεσίας δεν υποστηρίζονται στο αρχείο υπηρεσίας «%s», γραμμή %d\n"
+
+#: fe-connect.c:5989
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "μη έγκυρο URI διαδόθηκε στη ρουτίνα εσωτερικής ανάλυσης: «%s»\n"
+
+#: fe-connect.c:6066
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "έφτασε στο τέλος της συμβολοσειράς κατά την αναζήτηση αντίστοιχου «]» στη διεύθυνση IPv6 κεντρικού υπολογιστή στο URI: «%s»\n"
+
+#: fe-connect.c:6073
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "η διεύθυνση IPv6 κεντρικού υπολογιστή δεν δύναται να είναι κενή στο URI: «%s»\n"
+
+#: fe-connect.c:6088
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "μη αναμενόμενος χαρακτήρας «%c» στη θέση %d του URI (αναμένεται «:» ή «/»): «%s»\n"
+
+#: fe-connect.c:6218
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "επιπλέον διαχωριστικό κλειδιού/τιμής «=» στην παράμετρο ερωτήματος URI: «%s»\n"
+
+#: fe-connect.c:6238
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "λείπει διαχωριστικό κλειδιού/τιμής «=» στην παράμετρο ερωτήματος URI: «%s»\n"
+
+#: fe-connect.c:6290
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "άκυρη παράμετρος ερωτήματος URI: «%s»\n"
+
+#: fe-connect.c:6364
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "άκυρο διακριτικό με κωδικοποίηση ποσοστού: «%s»\n"
+
+#: fe-connect.c:6374
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "απαγορευμένη τιμή %%00 σε τιμή κωδικοποιημένου ποσοστού: «%s»\n"
+
+#: fe-connect.c:6744
+msgid "connection pointer is NULL\n"
+msgstr "ο δείκτης σύνδεσης είναι NULL\n"
+
+#: fe-connect.c:7024
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: το αρχείο κωδικών πρόσβασης «%s» δεν είναι ένα απλό αρχείο\n"
+
+#: fe-connect.c:7033
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: το αρχείο κωδικού πρόσβασης «%s» έχει ομαδική ή παγκόσμια πρόσβαση· τα δικαιώματα πρέπει να είναι U=RW (0600) ή λιγότερα\n"
+
+#: fe-connect.c:7141
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "ο κωδικός πρόσβασης ελήφθει από αρχείο «%s»\n"
+
+#: fe-exec.c:449 fe-exec.c:3286
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "ο αριθμός σειράς %d βρίσκεται εκτός εύρους 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:219 fe-protocol3.c:244 fe-protocol3.c:273
+#: fe-protocol3.c:291 fe-protocol3.c:371 fe-protocol3.c:743 fe-protocol3.c:975
+msgid "out of memory"
+msgstr "έλλειψη μνήμης"
+
+#: fe-exec.c:511 fe-protocol3.c:1932
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:778
+msgid "write to server failed\n"
+msgstr "απέτυχε η εγγραφή στον διακομιστή\n"
+
+#: fe-exec.c:850
+msgid "NOTICE"
+msgstr "NOTICE"
+
+#: fe-exec.c:908
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "το PGresult δεν μπορεί να υποστηρίξει περισσότερες πλείαδες από INT_MAX"
+
+#: fe-exec.c:920
+msgid "size_t overflow"
+msgstr "υπερχείλιση overflow"
+
+#: fe-exec.c:1335 fe-exec.c:1440 fe-exec.c:1489
+msgid "command string is a null pointer\n"
+msgstr "η συμβολοσειρά εντολής είναι ένας κενός δείκτης\n"
+
+#: fe-exec.c:1446 fe-exec.c:1495 fe-exec.c:1591
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "ο αριθμός των παραμέτρων πρέπει να είναι μεταξύ 0 και %d\n"
+
+#: fe-exec.c:1483 fe-exec.c:1585
+msgid "statement name is a null pointer\n"
+msgstr "η ονομασία της δήλωσης είναι ένας κενός δείκτης\n"
+
+#: fe-exec.c:1627 fe-exec.c:3139
+msgid "no connection to the server\n"
+msgstr "καμία σύνδεση στον διακομιστή\n"
+
+#: fe-exec.c:1636 fe-exec.c:3148
+msgid "another command is already in progress\n"
+msgstr "υπάρχει άλλη εντολή σε πρόοδο\n"
+
+#: fe-exec.c:1665
+msgid "cannot queue commands during COPY\n"
+msgstr "δεν είναι δυνατή η ουρά εντολών κατά τη διάρκεια του COPY\n"
+
+#: fe-exec.c:1783
+msgid "length must be given for binary parameter\n"
+msgstr "το μήκος πρέπει να περαστεί ως δυαδική παράμετρος\n"
+
+#: fe-exec.c:2103
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "μη αναμενόμενο asyncStatus: %d\n"
+
+#: fe-exec.c:2123
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc «%s» κατά τη διάρκεια συμβάντος PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2271
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "οι συναρτήσεις σύγχρονης εκτέλεσης εντολών δεν επιτρέπονται σε λειτουργία διοχέτευσης\n"
+
+#: fe-exec.c:2293
+msgid "COPY terminated by new PQexec"
+msgstr "COPY τερματίστηκε από νέο PQexec"
+
+#: fe-exec.c:2310
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec δεν επιτρέπεται κατά τη διάρκεια COPY BOTH\n"
+
+#: fe-exec.c:2538 fe-exec.c:2594 fe-exec.c:2663 fe-protocol3.c:1863
+msgid "no COPY in progress\n"
+msgstr "κανένα COPY σε εξέλιξη\n"
+
+#: fe-exec.c:2840
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "το PQfn δεν επιτρέπεται σε λειτουργία διοχέτευσης\n"
+
+#: fe-exec.c:2848
+msgid "connection in wrong state\n"
+msgstr "σύνδεση σε λανθάνουσα κατάσταση\n"
+
+#: fe-exec.c:2892
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "δεν ήταν δυνατή η είσοδος σε λειτουργία διοχέτευσης, σύνδεση μη αδρανή\n"
+
+#: fe-exec.c:2926 fe-exec.c:2943
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "δεν είναι δυνατή η έξοδος από τη λειτουργία διοχέτευσης με μη λαμβανόμενα αποτελέσματα\n"
+
+#: fe-exec.c:2931
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "δεν είναι δυνατή η έξοδος από τη λειτουργία διοχέτευσης ενώ απασχολείται\n"
+
+#: fe-exec.c:3073
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "δεν είναι δυνατή η αποστολή διοχέτευσης όταν δεν βρίσκεται σε λειτουργία διοχέτευσης\n"
+
+#: fe-exec.c:3175
+msgid "invalid ExecStatusType code"
+msgstr "άκυρος κωδικός ExecStatusType"
+
+#: fe-exec.c:3202
+msgid "PGresult is not an error result\n"
+msgstr "PGresult δεν είναι ένα αποτέλεσμα σφάλματος\n"
+
+#: fe-exec.c:3270 fe-exec.c:3293
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "αριθμός στήλης %d βρίσκεται εκτός εύρους 0..%d"
+
+#: fe-exec.c:3308
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "αριθμός παραμέτρου %d βρίσκεται εκτός εύρους 0..%d"
+
+#: fe-exec.c:3618
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "δεν μπόρεσε να ερμηνεύσει το αποτέλεσμα από τον διακομιστή: %s"
+
+#: fe-exec.c:3878 fe-exec.c:3967
+msgid "incomplete multibyte character\n"
+msgstr "ελλιπής χαρακτήρας πολλαπλών byte\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "σφάλμα εισαγωγής ονόματος GSSAPI"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "δεν ήταν δυνατός ο προσδιορισμός του OID της συνάρτησης %s\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "η παράμετρος του lo_truncate υπερβαίνει το εύρος ακέραιων\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "η παράμετρος του lo_read υπερβαίνει το εύρος ακέραιων\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "η παράμετρος του lo_write υπερβαίνει το εύρος ακέραιων\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου «%s»: %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η ανάγνωση από το αρχείο «%s»: %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η εγγραφή στο αρχείο »%s»: %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "το ερώτημα αρχικοποίησης συναρτήσεων μεγάλων αντικειμένων δεν επέστρεψε δεδομένα\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "ακέραιος μεγέθους %lu δεν υποστηρίζεται από pqGetInt"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "ακέραιος μεγέθους %lu δεν υποστηρίζεται από pqPutInt"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "μη ανοικτή σύνδεση\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"ο διακομιστής έκλεισε απροσδόκητα τη σύνδεση\n"
+"\tΑυτό πιθανώς σημαίνει ότι ο διακομιστής τερματίστηκε ασυνήθιστα\n"
+"\tπριν ή κατά την επεξεργασία του αιτήματος.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "έληξε το χρονικό όριο\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "άκυρος υποδοχέας\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s() απέτυχε: %s\n"
+
+#: fe-protocol3.c:196
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "μήνυμα τύπου 0x%02x έφτασε από το διακομιστή ενώ αυτός ήταν αδρανής"
+
+#: fe-protocol3.c:403
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "ο διακομιστής έστειλε δεδομένα («D» μήνυμα) χωρίς προηγούμενη περιγραφή γραμμής («T» μήνυμα)\n"
+
+#: fe-protocol3.c:446
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "μη αναμενόμενη απόκριση από το διακομιστή· πρώτος χαρακτήρας που ελήφθη ήταν «%c»\n"
+
+#: fe-protocol3.c:471
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "τα περιεχόμενα του μηνύματος δεν συμφωνούν με το μήκος του σε τύπο μηνύματος «%c»\n"
+
+#: fe-protocol3.c:491
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "χάθηκε ο συγχρονισμός με το διακομιστή: ελήφθει τύπος μηνύματος «%c», μήκους %d\n"
+
+#: fe-protocol3.c:543 fe-protocol3.c:583
+msgid "insufficient data in \"T\" message"
+msgstr "ανεπαρκή δεδομένα σε «T» μήνυμα"
+
+#: fe-protocol3.c:654 fe-protocol3.c:860
+msgid "out of memory for query result"
+msgstr "έλλειψη μνήμης για το αποτέλεσμα ερωτήματος"
+
+#: fe-protocol3.c:723
+msgid "insufficient data in \"t\" message"
+msgstr "ανεπαρκή δεδομένα σε «t» μήνυμα"
+
+#: fe-protocol3.c:782 fe-protocol3.c:814 fe-protocol3.c:832
+msgid "insufficient data in \"D\" message"
+msgstr "ανεπαρκή δεδομένα σε «D» μήνυμα"
+
+#: fe-protocol3.c:788
+msgid "unexpected field count in \"D\" message"
+msgstr "μη αναμενόμενο πλήθος πεδίων σε »D» μήνυμα"
+
+#: fe-protocol3.c:1029
+msgid "no error message available\n"
+msgstr "κανένα μήνυμα σφάλματος διαθέσιμο\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1077 fe-protocol3.c:1096
+#, c-format
+msgid " at character %s"
+msgstr "σε χαρακτήρα %s"
+
+#: fe-protocol3.c:1109
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETAIL: %s\n"
+
+#: fe-protocol3.c:1112
+#, c-format
+msgid "HINT: %s\n"
+msgstr "HINT: %s\n"
+
+#: fe-protocol3.c:1115
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "ΕΡΩΤΗΜΑ: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXT: %s\n"
+
+#: fe-protocol3.c:1131
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMA NAME: %s\n"
+
+#: fe-protocol3.c:1135
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABLE NAME: %s\n"
+
+#: fe-protocol3.c:1139
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "COLUMN NAME: %s\n"
+
+#: fe-protocol3.c:1143
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATATYPE NAME: %s\n"
+
+#: fe-protocol3.c:1147
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "CONSTRAINT NAME: %s\n"
+
+#: fe-protocol3.c:1159
+msgid "LOCATION: "
+msgstr "LOCATION: "
+
+#: fe-protocol3.c:1161
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1163
+#, c-format
+msgid "%s:%s"
+msgstr "%s: %s"
+
+#: fe-protocol3.c:1358
+#, c-format
+msgid "LINE %d: "
+msgstr "ΓΡΑΜΜΗ %d: "
+
+#: fe-protocol3.c:1757
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: δεν κάνει το κείμενο COPY OUT\n"
+
+#: fe-protocol3.c:2123
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "σφάλμα πρωτοκόλλου: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "το όνομα του πιστοποιητικού SSL περιέχει ενσωματωμένο null\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "το όνομα κεντρικού υπολογιστή πρέπει να έχει καθοριστεί για μια επαληθευμένη σύνδεση SSL\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "το πιστοποιητικό διακομιστή για το «%s» δεν ταιριάζει με το όνομα κεντρικού υπολογιστή «%s»\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "δεν ήταν δυνατή η απόκτηση του όνοματος κεντρικού υπολογιστή του διακομιστή από το πιστοποιητικό διακομιστή\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "σφάλμα αναδίπλωσης GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "το εξερχόμενο μήνυμα GSSAPI δεν θα χρησιμοποιούσε εμπιστευτικότητα\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "ο πελάτης προσπάθησε να στείλει υπερμέγεθες πακέτο GSSAPI (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "ο διακομιστής έστειλε υπερμέγεθες πακέτο GSSAPI (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "σφάλμα ξεδιπλώσης GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "εισερχόμενο μήνυμα GSSAPI δεν χρησιμοποίησε εμπιστευτικότητα\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "δεν ήταν δυνατή η έναρξη περιεχομένου ασφαλείας GSSAPI"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "σφάλμα ελέγχου μεγέθους GSSAPI"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "σφάλμα δημιουργίας περιεχομένου GSSAPI"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1333
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL σφάλμα: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1337
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL σφάλμα: ανιχνεύτηκε EOF\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1346
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL σφάλμα: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "η σύνδεση SSL έκλεισε απροσδόκητα\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1396
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "μη αναγνωρίσιμος κωδικός σφάλματος SSL: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "δεν μπόρεσε να προσδιορίσει τον αλγόριθμο υπογραφής πιστοποιητικού διακομιστή\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "δεν μπόρεσε να βρεθεί σύνοψη (digest) για NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "δεν ήταν δυνατή η δημιουργία ομότιμου πιστοποιητικού hash\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "λείπει καταχώρηση ονόματος του πιστοποιητικού SSL\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "δεν ήταν δυνατή η δημιουργία περιεχομένου SSL: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "άκυρη τιμή «%s» για την ελάχιστη έκδοση πρωτοκόλλου SSL\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "δεν ήταν δυνατό να ορίσει ελάχιστη έκδοση πρωτοκόλλου SSL: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "άκυρη τιμή «%s» για μέγιστη έκδοση πρωτοκόλλου SSL\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "δεν ήταν δυνατό να ορίσει μέγιστη έκδοση πρωτοκόλλου SSL: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η ανάγνωση βασικού αρχείου πιστοποιητικού «%s»: %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"δεν ήταν δυνατή η δημιουργία του προσωπικού καταλόγου για τον εντοπισμό βασικού αρχείου πιστοποιητικού\n"
+"Δώστε το αρχείο ή αλλάξτε το sslmode για να απενεργοποιήσετε την επαλήθευση πιστοποιητικού διακομιστή.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"βασικό αρχείο πιστοποιητικού \"%s\" δεν υπάρχει\n"
+"Είτε παρουσιάστε το αρχείο ή αλλάξτε το sslmode για να απενεργοποιήσετε την επαλήθευση πιστοποιητικού διακομιστή.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατό το άνοιγμα αρχείου πιστοποιητικού «%s»: %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η ανάγνωση αρχείου πιστοποιητικού «%s»: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "δεν ήταν δυνατή η δημιουργία σύνδεσης SSL: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "δεν ήταν δυνατός ο ορισμός SSL Server Name Indication (SNI): %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η φόρτωση της μηχανής SSL «%s»: %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr ""
+"δεν ήταν δυνατή η εκκίνηση του κινητήρα SSL »%s»: %s\n"
+"\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η ανάγνωση του ιδιωτικού κλειδιού SSL «%s» από την μηχανή «%s»: %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η φόρτωση του ιδιωτικού κλειδιού SSL «%s» από την μηχανή «%s»: %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "υπάρχει πιστοποιητικό, αλλά όχι αρχείο ιδιωτικού κλειδιού «%s»\n"
+
+#: fe-secure-openssl.c:1236
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "αρχείο ιδιωτικού κλειδιού «%s» έχει ομαδική ή παγκόσμια πρόσβαση· τα δικαιώματα πρέπει να είναι U=RW (0600) ή λιγότερα\n"
+
+#: fe-secure-openssl.c:1261
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "δεν ήταν δυνατή η φόρτωση αρχείου ιδιωτικού κλειδιού «%s»: %s\n"
+
+#: fe-secure-openssl.c:1279
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "το πιστοποιητικό δεν ταιριάζει με το αρχείο ιδιωτικού κλειδιού «%s»: %s\n"
+
+#: fe-secure-openssl.c:1379
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Αυτό μπορεί να υποδεικνύει ότι ο διακομιστής δεν υποστηρίζει καμία έκδοση πρωτοκόλλου SSL μεταξύ %s και %s.\n"
+
+#: fe-secure-openssl.c:1415
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr ""
+"δεν ήταν δυνατή η λήψη πιστοποιητικού: %s\n"
+"\n"
+
+#: fe-secure-openssl.c:1521
+#, c-format
+msgid "no SSL error reported"
+msgstr "δεν αναφέρθηκε κανένα σφάλμα SSL"
+
+#: fe-secure-openssl.c:1530
+#, c-format
+msgid "SSL error code %lu"
+msgstr "κωδικός σφάλματος SSL %lu"
+
+#: fe-secure-openssl.c:1777
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "WARNING: περικομμένο sslpassword\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "δεν ήταν δυνατή η λήψη δεδομένων από το διακομιστή: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "δεν ήταν δυνατή η αποστολή δεδομένων στο διακομιστή: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "μη αναγνωρίσιμο σφάλμα υποδοχής: 0x%08X/%d"
+
+#~ msgid "invalid channel_binding value: \"%s\"\n"
+#~ msgstr "άκυρη τιμή channel_binding: «%s»\n"
+
+#~ msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+#~ msgstr "άκυρη τιμή ssl_min_protocol_version: «%s»\n"
+
+#~ msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+#~ msgstr "άκυρη τιμή ssl_max_protocol_version: «%s»\n"
+
+#~ msgid "invalid gssencmode value: \"%s\"\n"
+#~ msgstr "άκυρη τιμή gssencmode: «%s»\n"
+
+#~ msgid "invalid target_session_attrs value: \"%s\"\n"
+#~ msgstr "άκυρη τιμή target_session_attrs: «%s»\n"
+
+#~ msgid ""
+#~ "could not connect to server: %s\n"
+#~ "\tIs the server running on host \"%s\" (%s) and accepting\n"
+#~ "\tTCP/IP connections on port %s?\n"
+#~ msgstr ""
+#~ "δεν ήταν δυνατή η σύνδεση με το διακομιστή: %s\n"
+#~ "\tΕκτελείται ο διακομιστής στον κεντρικό υπολογιστή »%s» (%s) και αποδέχεται\n"
+#~ "\tσυνδέσεις TCP/IP στην θύρα %s;\n"
+
+#~ msgid "setsockopt(%s) failed: %s\n"
+#~ msgstr "setsockopt(%s) απέτυχε: %s\n"
+
+#~ msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+#~ msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) απέτυχε: %ui\n"
+
+#~ msgid "could not make a writable connection to server \"%s:%s\"\n"
+#~ msgstr "δεν ήταν δυνατή η πραγματοποίηση εγγράψιμης σύνδεσης με το διακομιστή \"%s:%s\"\n"
+
+#~ msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+#~ msgstr "το τεστ «SHOW transaction_read_only» απέτυχε στον διακομιστή «%s:%s»\n"
+
+#~ msgid "function requires at least protocol version 3.0\n"
+#~ msgstr "η συνάρτηση απαιτεί πρωτόκολλο ελάχιστης έκδοσης 3.0\n"
+
+#~ msgid "COPY IN state must be terminated first\n"
+#~ msgstr ""
+#~ "πρέπει πρώτα να τερματιστεί η κατάσταση COPY IN\n"
+#~ "\n"
+
+#~ msgid "COPY OUT state must be terminated first\n"
+#~ msgstr "πρέπει πρώτα να τερματιστεί η κατάσταση COPY OUT\n"
+
+#~ msgid "cannot determine OID of function lo_truncate\n"
+#~ msgstr "δεν μπόρεσε να προσδιορίσει το OID της συνάρτησης lo_truncate\n"
+
+#~ msgid "cannot determine OID of function lo_truncate64\n"
+#~ msgstr "δεν μπόρεσε να προσδιορίσει το OID της συνάρτησης lo_truncate64\n"
+
+#~ msgid "cannot determine OID of function lo_lseek64\n"
+#~ msgstr "δεν μπόρεσε να προσδιορίσει το OID της συνάρτησης lo_lseek64\n"
+
+#~ msgid "cannot determine OID of function lo_create\n"
+#~ msgstr "δεν μπόρεσε να προσδιορίσει το OID της συνάρτησης lo_create\n"
+
+#~ msgid "cannot determine OID of function lo_tell64\n"
+#~ msgstr "δεν μπόρεσε να προσδιορίσει το OID της συνάρτησης lo_tell64\n"
+
+#~ msgid "cannot determine OID of function lo_open\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης lo_open\n"
+
+#~ msgid "cannot determine OID of function lo_creat\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης lo_creat\n"
+
+#~ msgid "cannot determine OID of function lo_unlink\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης lo_unlink\n"
+
+#~ msgid "cannot determine OID of function lo_lseek\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης lo_lseek\n"
+
+#~ msgid "cannot determine OID of function loread\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης loread\n"
+
+#~ msgid "cannot determine OID of function lowrite\n"
+#~ msgstr "δεν είναι δυνατός ο προσδιορισμός του OID της συνάρτησης lowrite\n"
+
+#~ msgid "select() failed: %s\n"
+#~ msgstr "απέτυχε το select(): %s\n"
+
+#~ msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+#~ msgstr "μη έγκυρη κατάσταση %c setenv, πιθανώς ενδεικτική αλλοίωσης μνήμης\n"
+
+#~ msgid "invalid state %c, probably indicative of memory corruption\n"
+#~ msgstr "μη έγκυρη κατάσταση %c, πιθανώς ενδεικτική αλλοίωσης μνήμης\n"
+
+#~ msgid "unexpected character %c following empty query response (\"I\" message)"
+#~ msgstr "μη αναμενόμενος χαρακτήρας %c μετά από κενή απόκριση ερωτήματος («I» μήνυμα)"
+
+#~ msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+#~ msgstr "ο διακομιστής έστειλε δεδομένα («D» μήνυμα) χωρίς προηγούμενη περιγραφή γραμμής («T» μήνυμα)"
+
+#~ msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+#~ msgstr "ο διακομιστής έστειλε δυαδικά δεδομένα («B» μήνυμα) χωρίς προηγούμενη περιγραφή γραμμής («T» μήνυμα)"
+
+#~ msgid "lost synchronization with server, resetting connection"
+#~ msgstr "χάθηκε ο συγχρονισμός με τον διακομιστή, επαναρυθμίζεται η σύνδεση"
diff --git a/src/interfaces/libpq/po/es.po b/src/interfaces/libpq/po/es.po
new file mode 100644
index 0000000..f5b4ee7
--- /dev/null
+++ b/src/interfaces/libpq/po/es.po
@@ -0,0 +1,1227 @@
+# Spanish message translation file for libpq 2013-08-30 12:42-0400\n"
+#
+# Copyright (c) 2002-2021, PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Karim <karim@mribti.com>, 2002.
+# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2003-2013
+# Mario González <gonzalemario@gmail.com>, 2005
+# Carlos Chapi <carloswaldo@babelruins.org>, 2017, 2021
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-07 20:26+0000\n"
+"PO-Revision-Date: 2022-08-08 00:59+0200\n"
+"Last-Translator: Carlos Chapi <carloswaldo@babelruins.org>\n"
+"Language-Team: PgSQL-es-Ayuda <pgsql-es-ayuda@lists.postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: BlackCAT 1.1\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "mensaje SCRAM mal formado (mensaje vacío)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "mensaje SCRAM mal formado (longitud no coincide)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "no se pudo verificar la signatura del servidor\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "signatura de servidor incorrecta\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "estado de intercambio SCRAM no es válido\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "mensaje SCRAM mal formado (se esperaba atributo «%c»)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "mensaje SCRAM mal formado (se esperaba el carácter «=» para el atributo «%c»)\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "no se pude generar nonce\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3125 fe-exec.c:3309
+#: fe-exec.c:4082 fe-exec.c:4247 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:979 fe-protocol3.c:994 fe-protocol3.c:1027
+#: fe-protocol3.c:1735 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "memoria agotada\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "no se pude generar nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "no se pudo calcular la prueba del cliente\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "no se pudo codificar la prueba del cliente\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "respuesta SCRAM no es válida (nonce no coincide)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "mensaje SCRAM mal formado (sal no válida)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "mensaje SCRAM mal formado (el conteo de iteración no es válido)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "mensaje SCRAM mal formado (se encontró basura al final de server-first-message)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "se recibió un error desde el servidor durante el intercambio SCRAM: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "mensaje SCRAM mal formado (se encontró basura al final de server-final-message)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "mensaje SCRAM mal formado (la signatura del servidor no es válida)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "memoria agotada creando el búfer GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "error en continuación de GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "el nombre de servidor debe ser especificado\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "petición de autentificación GSS duplicada\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "memoria agotada creando el búfer SSPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "error en continuación de SSPI"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "petición de autentificación SSPI duplicada\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "no se pudo obtener las credenciales SSPI"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "se requiere enlazado de canal (channel binding), pero no se está usando SSL\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "petición de autentificación SASL duplicada\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "se requiere enlazado de canal (channel binding), pero no está soportado en el cliente\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "el servidor ofreció autenticación SCRAM-SHA-256-PLUS sobre una conexión no-SSL\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "ningún método de autentificación SASL del servidor está soportado\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "se requiere enlazado de canal (channel binding), pero el servidor no ofrece un método de autenticación que lo soporte\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "memoria agotada creando el búfer SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "Se recibió AuthenticationSASLFinal desde el servidor, pero la autentificación SASL no se completó\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "el método de autentificación SCM_CRED no está soportado\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "se requiere enlazado de canal (channel binding), pero el servidor autenticó al cliente sin enlazado de canal\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "se requiere enlazado de canal (channel binding), pero no es compatible con la solicitud de autenticación del servidor\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "el método de autentificación Kerberos 4 no está soportado\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "el método de autentificación Kerberos 5 no está soportado\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "el método de autentificación GSSAPI no está soportado\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "el método de autentificación SSPI no está soportado\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "el método de autentificación Crypt no está soportado\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "el método de autentificación %u no está soportado\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "fallo en la búsqueda del nombre de usuario: código de error %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "no se pudo buscar el usuario local de ID %d: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "no existe un usuario local con ID %d\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW retornó un conjunto de resultados con estructura inesperada\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "el valor para password_encryption es demasiado largo\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "algoritmo para cifrado de contraseña «%s» desconocido\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "no se pudo emparejar %d nombres de host a %d direcciones de host\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "no se pudo emparejar %d números de puertos a %d hosts\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "valor %s no válido: «%s»\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "el valor sslmode «%s» no es válido cuando no se ha compilado con soporte SSL\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "rango de protocolo SSL no válido \n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "el valor gssencmode «%s» no es válido cuando no se ha compilado con soporte GSSAPI\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "no se pudo establecer el socket en modo TCP sin retardo: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "falló la conexión al servidor en el socket «%s»: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "falló la conexión al servidor en «%s» (%s), puerto %s: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "falló la conexión al servidor en «%s», puerto %s: "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\t¿Está el servidor en ejecución localmente y aceptando conexiones en ese socket?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\t¿Está el servidor en ejecución en ese host y aceptando conexiones TCP/IP?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "valor entero «%s» no válido para la opción de conexión «%s»\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s) falló: %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) falló: código de error %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "el estado de conexión no es válido, probablemente por corrupción de memoria\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "número de puerto no válido: «%s»\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "no se pudo traducir el nombre «%s» a una dirección: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "no se pudo interpretar la dirección de red «%s»: %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "la ruta del socket de dominio Unix «%s» es demasiado larga (máximo %d bytes)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "no se pudo traducir la ruta del socket Unix «%s» a una dirección: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "no se pudo crear el socket: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "no se pudo establecer el socket en modo no bloqueante: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "no se pudo poner el socket en modo close-on-exec: %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "el parámetro de keepalives debe ser un entero\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "no se pudo determinar el estado de error del socket: %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "no se pudo obtener la dirección del cliente desde el socket: %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "el parámetro requirepeer no está soportado en esta plataforma\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "no se pudo obtener credenciales de la contraparte: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer especifica «%s», pero el nombre de usuario de la contraparte es «%s»\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "no se pudo enviar el paquete de negociación GSSAPI: %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "cifrado GSSAPI requerido, pero fue imposible (posiblemente no hay cache de credenciales, no hay soporte de servidor, o se está usando un socket local)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "no se pudo enviar el paquete de negociación SSL: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "no se pudo enviar el paquete de inicio: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "el servidor no soporta SSL, pero SSL es requerida\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "se ha recibido una respuesta no válida en la negociación SSL: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "se recibieron datos no cifrados después de la respuesta SSL\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "el servidor no soporta cifrado GSSAPI, pero es requerida\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "se ha recibido una respuesta no válida en la negociación GSSAPI: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "se recibieron datos no cifrados después de la respuesta de cifrado GSSAPI\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "se esperaba una petición de autentificación desde el servidor, pero se ha recibido %c\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "se ha recibido un mensaje inesperado del servidor durante el inicio\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "la sesión es de solo lectura\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "la sesión no es de solo lectura\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "el servidor está en modo hot standby\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "el servidor no está en modo hot standby\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "«%s» falló\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "estado de conexión no válido %d, probablemente por corrupción de memoria\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc «%s» falló durante el evento PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "URL LDAP no válida «%s»: el esquema debe ser ldap://\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "URL LDAP no válida «%s»: distinguished name faltante\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "URL LDAP no válida «%s»: debe tener exactamente un atributo\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "URL LDAP no válida «%s»: debe tener ámbito de búsqueda (base/one/sub)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "URL LDAP no válida «%s»: no tiene filtro\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "URL LDAP no válida «%s»: número de puerto no válido\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "no se pudo crear estructura LDAP\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "búsqueda en servidor LDAP falló: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "se encontro más de una entrada en búsqueda LDAP\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "no se encontró ninguna entrada en búsqueda LDAP\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "la búsqueda LDAP entregó atributo sin valores\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "falta «=» después de «%s» en la cadena de información de la conexión\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "opción de conexión no válida «%s»\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "cadena de caracteres entre comillas sin terminar en la cadena de información de conexión\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "la definición de servicio «%s» no fue encontrada\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "el archivo de servicio «%s» no fue encontrado\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "la línea %d es demasiado larga en archivo de servicio «%s»\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "error de sintaxis en archivo de servicio «%s», línea %d\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "especificaciones de servicio anidadas no soportadas en archivo de servicio «%s», línea %d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "URI no válida propagada a rutina interna de procesamiento: «%s»\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "se encontró el fin de la cadena mientras se buscaba el «]» correspondiente en dirección IPv6 en URI: «%s»\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "la dirección IPv6 no puede ser vacía en la URI: «%s»\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "carácter «%c» inesperado en la posición %d en URI (se esperaba «:» o «/»): «%s»\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "separador llave/valor «=» extra en parámetro de la URI: «%s»\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "separador llave/valor «=» faltante en parámetro de la URI: «%s»\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "parámetro de URI no válido: «%s»\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "elemento escapado con %% no válido: «%s»\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "valor no permitido %%00 en valor escapado con %%: «%s»\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "el puntero de conexión es NULL\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ADVERTENCIA: El archivo de claves «%s» no es un archivo plano\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "ADVERTENCIA: El archivo de claves «%s» tiene permiso de lectura para el grupo u otros; los permisos deberían ser u=rw (0600) o menos\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "contraseña obtenida desde el archivo «%s»\n"
+
+#: fe-exec.c:449 fe-exec.c:3383
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "el número de fila %d está fuera del rango 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:207 fe-protocol3.c:232 fe-protocol3.c:261
+#: fe-protocol3.c:279 fe-protocol3.c:375 fe-protocol3.c:747
+msgid "out of memory"
+msgstr "memoria agotada"
+
+#: fe-exec.c:511 fe-protocol3.c:1943
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "falló escritura al servidor\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "AVISO"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult no puede soportar un número de tuplas mayor que INT_MAX"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "desbordamiento de size_t"
+
+#: fe-exec.c:1351 fe-exec.c:1477 fe-exec.c:1526
+msgid "command string is a null pointer\n"
+msgstr "la cadena de orden es un puntero nulo\n"
+
+#: fe-exec.c:1483 fe-exec.c:1532 fe-exec.c:1628
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "el número de parámetros debe estar entre 0 y %d\n"
+
+#: fe-exec.c:1520 fe-exec.c:1622
+msgid "statement name is a null pointer\n"
+msgstr "el nombre de sentencia es un puntero nulo\n"
+
+#: fe-exec.c:1664 fe-exec.c:3236
+msgid "no connection to the server\n"
+msgstr "no hay conexión con el servidor\n"
+
+#: fe-exec.c:1673 fe-exec.c:3245
+msgid "another command is already in progress\n"
+msgstr "hay otra orden en ejecución\n"
+
+#: fe-exec.c:1704
+msgid "cannot queue commands during COPY\n"
+msgstr "no se puede agregar órdenes a la cola mientras se hace COPY\n"
+
+#: fe-exec.c:1822
+msgid "length must be given for binary parameter\n"
+msgstr "el largo debe ser especificado para un parámetro binario\n"
+
+#: fe-exec.c:2149
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "asyncStatus no esperado: %d\n"
+
+#: fe-exec.c:2185
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc «%s» falló durante el evento PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2333
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "no se permiten funciones que ejecuten órdenes sincrónicas en modo pipeline\n"
+
+#: fe-exec.c:2355
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminado por un nuevo PQexec"
+
+#: fe-exec.c:2372
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec no está permitido durante COPY BOTH\n"
+
+#: fe-exec.c:2600 fe-exec.c:2656 fe-exec.c:2725 fe-protocol3.c:1874
+msgid "no COPY in progress\n"
+msgstr "no hay COPY alguno en ejecución\n"
+
+#: fe-exec.c:2902
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "no se permite PQfn en modo pipeline\n"
+
+#: fe-exec.c:2910
+msgid "connection in wrong state\n"
+msgstr "la conexión está en un estado incorrecto\n"
+
+#: fe-exec.c:2954
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "no se puede entrar en modo pipeline, la conexión no está inactiva\n"
+
+#: fe-exec.c:2991 fe-exec.c:3015
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "no se puede salir de modo pipeline al tener resultados sin recolectar\n"
+
+#: fe-exec.c:2996
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "no se puede salir de modo pipeline mientras haya actividad\n"
+
+#: fe-exec.c:3008
+msgid "cannot exit pipeline mode while in COPY\n"
+msgstr "no se puede salir de modo pipeline mientras se está en COPY\n"
+
+#: fe-exec.c:3169
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "no se puede enviar pipeline cuando no se está en modo pipeline\n"
+
+#: fe-exec.c:3272
+msgid "invalid ExecStatusType code"
+msgstr "el código de ExecStatusType no es válido"
+
+#: fe-exec.c:3299
+msgid "PGresult is not an error result\n"
+msgstr "PGresult no es un resultado de error\n"
+
+#: fe-exec.c:3367 fe-exec.c:3390
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "el número de columna %d está fuera del rango 0..%d"
+
+#: fe-exec.c:3405
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "el número de parámetro %d está fuera del rango 0..%d"
+
+#: fe-exec.c:3715
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "no se pudo interpretar el resultado del servidor: %s"
+
+#: fe-exec.c:3975 fe-exec.c:4064
+msgid "incomplete multibyte character\n"
+msgstr "carácter multibyte incompleto\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "error de importación de nombre de GSSAPI"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "no se puede determinar el OID de la función %s\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "el argumento de lo_truncate excede el rango de enteros\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "el argumento de lo_read excede el rango de enteros\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "el argumento de lo_write excede el rango de enteros\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "no se pudo abrir el archivo «%s»: %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "no se pudo leer el archivo «%s»: %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "no se pudo escribir a archivo «%s»: %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "la consulta para inicializar las funciones de objetos grandes no devuelve datos\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "el entero de tamaño %lu no está soportado por pqGetInt"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "el entero de tamaño %lu no está soportado por pqPutInt"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "la conexión no está abierta\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"el servidor ha cerrado la conexión inesperadamente\n"
+"\tProbablemente se debe a que el servidor terminó de manera anormal\n"
+"\tantes o durante el procesamiento de la petición.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "tiempo de espera agotado\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "socket no válido\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s() falló: %s\n"
+
+#: fe-protocol3.c:184
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "un mensaje de tipo 0x%02x llegó del servidor estando inactivo"
+
+#: fe-protocol3.c:407
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "el servidor envió datos (mensaje «D») sin precederlos con una descripción de fila (mensaje «T»)\n"
+
+#: fe-protocol3.c:450
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "se ha recibido una respuesta inesperada del servidor; el primer carácter recibido fue «%c»\n"
+
+#: fe-protocol3.c:475
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "el contenido del mensaje no concuerda con el largo, en el mensaje tipo «%c»\n"
+
+#: fe-protocol3.c:495
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "se perdió la sincronía con el servidor: se recibió un mensaje de tipo «%c», largo %d\n"
+
+#: fe-protocol3.c:547 fe-protocol3.c:587
+msgid "insufficient data in \"T\" message"
+msgstr "datos insuficientes en el mensaje «T»"
+
+#: fe-protocol3.c:658 fe-protocol3.c:864
+msgid "out of memory for query result"
+msgstr "no hay suficiente memoria para el resultado de la consulta"
+
+#: fe-protocol3.c:727
+msgid "insufficient data in \"t\" message"
+msgstr "datos insuficientes en el mensaje «t»"
+
+#: fe-protocol3.c:786 fe-protocol3.c:818 fe-protocol3.c:836
+msgid "insufficient data in \"D\" message"
+msgstr "datos insuficientes en el mensaje «D»"
+
+#: fe-protocol3.c:792
+msgid "unexpected field count in \"D\" message"
+msgstr "cantidad de campos inesperada en mensaje «D»"
+
+#: fe-protocol3.c:1040
+msgid "no error message available\n"
+msgstr "no hay mensaje de error disponible\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1088 fe-protocol3.c:1107
+#, c-format
+msgid " at character %s"
+msgstr " en el carácter %s"
+
+#: fe-protocol3.c:1120
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETALLE: %s\n"
+
+#: fe-protocol3.c:1123
+#, c-format
+msgid "HINT: %s\n"
+msgstr "SUGERENCIA: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "CONSULTA: %s\n"
+
+#: fe-protocol3.c:1133
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXTO: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NOMBRE DE ESQUEMA: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NOMBRE DE TABLA: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NOMBRE DE COLUMNA: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NOMBRE TIPO DE DATO: %s\n"
+
+#: fe-protocol3.c:1158
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NOMBRE DE RESTRICCIÓN: %s\n"
+
+#: fe-protocol3.c:1170
+msgid "LOCATION: "
+msgstr "UBICACIÓN: "
+
+#: fe-protocol3.c:1172
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1174
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1369
+#, c-format
+msgid "LINE %d: "
+msgstr "LÍNEA %d: "
+
+#: fe-protocol3.c:1768
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: no se está haciendo COPY OUT de texto\n"
+
+#: fe-protocol3.c:2134
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "error de protocolo: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "el elemento de nombre en el certificado SSL contiene un carácter null\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "el nombre de servidor debe ser especificado para una conexión SSL verificada\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "el certificado de servidor para «%s» no coincide con el nombre de servidor «%s»\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "no se pudo obtener el nombre de servidor desde el certificado del servidor\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "error de «wrap» de GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "mensaje GSSAPI de saluda no proveería confidencialidad\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "el cliente intentó enviar un paquete GSSAPI demasiado grande (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "paquete GSSAPI demasiado grande enviado por el servidor (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "error de «unwrap» de GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "mensaje GSSAPI entrante no usó confidencialidad\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "no se pudo iniciar un contexto de seguridad GSSAPI"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "error de verificación de tamaño GSSAPI"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "error de establecimiento de contexto de GSSAPI"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "ERROR en llamada SSL: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "ERROR en llamada SSL: detectado fin de archivo\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "error de SSL: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "la conexión SSL se ha cerrado inesperadamente\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "código de error SSL no reconocido: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "no se pudo determinar el algoritmo de firma del certificado del servidor\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "no se pudo encontrar «digest» para el NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "no se pudo generar hash de certificado de la contraparte\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "falta el elemento de nombre en el certificado SSL\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "no se pudo crear un contexto SSL: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "valor entero «%s» no válido para la versión mínima del protocolo SSL\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "no se pudo definir la versión mínima de protocolo SSL: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "valor entero «%s» no válido para la versión máxima del protocolo SSL\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "no se pudo definir la versión máxima de protocolo SSL: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "no se pudo leer la lista de certificado raíz «%s»: %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"no se pudo obtener el directorio «home» para ubicar el archivo del certificado raíz\n"
+"Debe ya sea entregar este archivo, o bien cambiar sslmode para deshabilitar la verificación de certificados del servidor.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"el archivo de certificado raíz «%s» no existe\n"
+"Debe ya sea entregar este archivo, o bien cambiar sslmode para deshabilitar la verificación de certificados del servidor.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "no se pudo abrir el archivo de certificado «%s»: %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "no se pudo leer el archivo de certificado «%s»: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "no se pudo establecer conexión SSL: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "no se pudo establecer el Indicador de Nombre del Servidor (SNI) de SSL: %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "no se pudo cargar el motor SSL «%s»: %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "no se pudo inicializar el motor SSL «%s»: %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "no se pudo leer el archivo de la llave privada SSL «%s» desde el motor «%s»: %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "no se pudo leer la llave privada SSL «%s» desde el motor «%s»: %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "el certificado está presente, pero no la llave privada «%s»\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "el archivo de llave privada «%s» no es un archivo regular\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "el archivo de llave privada «%s» tiene acceso de grupo o para todos; debe tener permisos u=rw (0600) o menos si es de propiedad del usuario de base de datos, o permisos u=rw,g=r (0640) o menos si es de root\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "no se pudo cargar el archivo de la llave privada «%s»: %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "el certificado no coincide con la llave privada «%s»: %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Esto puede indicar que el servidor no soporta ninguna versión del protocolo SSL entre %s and %s.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "el certificado no pudo ser obtenido: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "código de error SSL no reportado"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "código de error SSL %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ADVERTENCIA: sslpassword truncada\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "no se pudo recibir datos del servidor: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "no se pudo enviar datos al servidor: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "código de error de socket no reconocido: 0x%08X/%d"
diff --git a/src/interfaces/libpq/po/fr.po b/src/interfaces/libpq/po/fr.po
new file mode 100644
index 0000000..b67f3eb
--- /dev/null
+++ b/src/interfaces/libpq/po/fr.po
@@ -0,0 +1,1461 @@
+# translation of libpq.po to fr_fr
+# french message translation file for libpq
+#
+# Use these quotes: « %s »
+#
+# Guillaume Lelarge <guillaume@lelarge.info>, 2004-2009.
+# Stéphane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-07-18 13:25+0000\n"
+"PO-Revision-Date: 2022-07-18 17:18+0200\n"
+"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
+"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.1\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "message SCRAM malformé (message vide)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "message SCRAM malformé (pas de correspondance sur la longueur)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "n'a pas pu vérifier la signature du serveur\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "signature invalide du serveur\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "état d'échange SCRAM invalide\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "message SCRAM malformé (attribut « %c » attendu)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "message SCRAM malformé (caractère « = » attendu pour l'attribut « %c »)\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "n'a pas pu générer le nonce\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3125 fe-exec.c:3309
+#: fe-exec.c:4082 fe-exec.c:4247 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:979 fe-protocol3.c:994 fe-protocol3.c:1027
+#: fe-protocol3.c:1735 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "mémoire épuisée\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "n'a pas pu encoder le nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "n'a pas pu calculer la preuve du client\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "n'a pas pu encoder la preuve du client\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "réponse SCRAM invalide (pas de correspondance sur nonce)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "message SCRAM malformé (sel invalide)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "message SCRAM malformé (décompte d'itération invalide)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "message SCRAM malformé (problème à la fin du server-first-message)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "réception d'une erreur du serveur dans l'échange SCRAM : %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "message SCRAM malformé (problème à la fin du server-final-message)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "message SCRAM malformé (signature serveur invalide)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "mémoire épuisée lors de l'allocation du tampon GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "erreur de suite GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "le nom d'hôte doit être précisé\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "requête d'authentification GSS dupliquée\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "mémoire épuisée lors de l'allocation du tampon SSPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "erreur de suite SSPI"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "requête d'authentification SSPI dupliquée\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "n'a pas pu obtenir les pièces d'identité SSPI"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "lien de canal requis, mais SSL non utilisé\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "requête d'authentification SASL dupliquée\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "le lien de canal SCRAM est requis mais le client ne supporte par cette option\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "le serveur a proposé une authentification SCRAM-SHA-256-PLUS sur une connexion non SSL\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr ""
+"authentification Kerberos 4 non supportée\n"
+"aucun des mécanismes d'authentification SASL du serveur n'est supporté\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "Lien de canal requis, mais le serveur ne propose pas de méthode d'authentification le supportant\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "mémoire épuisée lors de l'allocation du tampon SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "AuthenticationSASLFinal reçu du serveur mais l'authentification SASL n'a pas été terminée\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "authentification SCM_CRED non supportée\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "lien de canal requis, mais le serveur a authentifié le client sans lien de canal\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "lien de canal requis, mais non supporté par la requête d'authentification du serveur\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "authentification Kerberos 4 non supportée\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "authentification Kerberos 5 non supportée\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "authentification GSSAPI non supportée\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "authentification SSPI non supportée\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "authentification crypt non supportée\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "méthode d'authentification %u non supportée\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "échec de la recherche du nom d'utilisateur : code d'erreur %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "n'a pas pu rechercher l'identifiant de l'utilisateur local %d : %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "l'utilisateur local dont l'identifiant est %d n'existe pas\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "forme du résultat inattendu pour SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "la valeur de password_encryption est trop longue\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "algorithme de chiffrement du mot de passe « %s » non reconnu\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "n'a pas pu faire correspondre les %d noms d'hôte aux %d valeurs hostaddr\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "n'a pas pu faire correspondre les %d numéros de port aux %d hôtes\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "valeur %s invalide : « %s »\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "valeur sslmode « %s » invalide si le support SSL n'est pas compilé initialement\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "intervalle de version invalide pour le protocole SSL\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "valeur gssencmode « %s » invalide si le support GSSAPI n'est pas compilé\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "n'a pas pu activer le mode TCP sans délai pour la socket : %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "la connexion au serveur sur le socket « %s » a échoué : "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "la connexion au serveur sur « %s » (%s), port %s a échoué : "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "la connexion au serveur sur « %s », port %s a échoué : "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\tLe serveur est-il actif localement et accepte-t-il les connexions sur ce socket ?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tLe serveur est-il actif sur cet hôte et accepte-t-il les connexions ?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "valeur entière « %s » invalide pour l'option de connexion « %s »\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "échec de %s(%s) : %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "échec de %s(%s) : code d'erreur %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "état de connexion invalide, indique probablement une corruption de mémoire\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "numéro de port invalide : « %s »\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "n'a pas pu traduire le nom d'hôte « %s » en adresse : %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "n'a pas pu analyser l'adresse réseau « %s » : %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Le chemin du socket de domaine Unix, « %s », est trop (maximum %d octets)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr ""
+"n'a pas pu traduire le chemin de la socket du domaine Unix « %s » en adresse :\n"
+"%s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "n'a pas pu créer la socket : %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "n'a pas pu activer le mode non-bloquant pour la socket : %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "n'a pas pu paramétrer la socket en mode close-on-exec : %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "le paramètre keepalives doit être un entier\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "n'a pas pu déterminer le statut d'erreur de la socket : %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "n'a pas pu obtenir l'adresse du client depuis la socket : %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "le paramètre requirepeer n'est pas supporté sur cette plateforme\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "n'a pas pu obtenir l'authentification de l'autre : %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer indique « %s » mais le nom de l'utilisateur réel est « %s »\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "n'a pas pu transmettre le paquet de négociation GSSAPI : %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "le chiffrage avec GSSAPI était requis, mais impossible (potentiellement pas de cache, de support serveur ou de socket local)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "n'a pas pu transmettre le paquet de négociation SSL : %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "n'a pas pu transmettre le paquet de démarrage : %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "le serveur ne supporte pas SSL alors que SSL était réclamé\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "a reçu une réponse invalide à la négociation SSL : %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "a reçu des données non chiffrées après la réponse SSL\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "le serveur ne supporte pas le chiffrage GSSAPI alors qu'il était réclamé\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "a reçu une réponse invalide à la négociation GSSAPI : %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "a reçu des données non chiffrées après la réponse de chiffrement GSSAPI\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr ""
+"attendait une requête d'authentification en provenance du serveur, mais a\n"
+" reçu %c\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "message inattendu du serveur lors du démarrage\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "la session est en lecture seule\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "la session n'est pas en lecture seule\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "le serveur est dans le mode hot standby\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "le serveur n'est pas dans le mode hot standby\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "échec de « %s »\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr ""
+"état de connexion invalide (%d), indiquant probablement une corruption de\n"
+" mémoire\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "échec de PGEventProc « %s » lors de l'événement PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "URL LDAP « %s » invalide : le schéma doit être ldap://\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "URL LDAP « %s » invalide : le « distinguished name » manque\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "URL LDAP « %s » invalide : doit avoir exactement un attribut\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "URL LDAP « %s » invalide : doit avoir une échelle de recherche (base/un/sous)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "URL LDAP « %s » invalide : aucun filtre\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "URL LDAP « %s » invalide : numéro de port invalide\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "n'a pas pu créer la structure LDAP\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "échec de la recherche sur le serveur LDAP : %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "plusieurs entrées trouvées pendant la recherche LDAP\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "aucune entrée trouvée pendant la recherche LDAP\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "l'attribut n'a pas de valeur après la recherche LDAP\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "« = » manquant après « %s » dans la chaîne des paramètres de connexion\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "option de connexion « %s » invalide\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "guillemets non refermés dans la chaîne des paramètres de connexion\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "définition du service « %s » introuvable\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "fichier de service « %s » introuvable\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "ligne %d trop longue dans le fichier service « %s »\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "erreur de syntaxe dans le fichier service « %s », ligne %d\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "spécifications imbriquées de service non supportées dans le fichier service « %s », ligne %d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "URI invalide propagée à la routine d'analyse interne : « %s »\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr ""
+"fin de chaîne atteinte lors de la recherche du « ] » correspondant dans\n"
+"l'adresse IPv6 de l'hôte indiquée dans l'URI : « %s »\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "l'adresse IPv6 de l'hôte ne peut pas être vide dans l'URI : « %s »\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr ""
+"caractère « %c » inattendu à la position %d de l'URI (caractère « : » ou\n"
+"« / » attendu) : « %s »\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "séparateur « = » de clé/valeur en trop dans le paramètre de requête URI : « %s »\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "séparateur « = » de clé/valeur manquant dans le paramètre de requête URI : « %s »\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "paramètre de la requête URI invalide : « %s »\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "jeton encodé en pourcentage invalide : « %s »\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "valeur %%00 interdite dans la valeur codée en pourcentage : « %s »\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "le pointeur de connexion est NULL\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ATTENTION : le fichier de mots de passe « %s » n'est pas un fichier texte\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr ""
+"ATTENTION : le fichier de mots de passe « %s » a des droits d'accès en\n"
+"lecture pour le groupe ou universel ; les droits devraient être u=rw (0600)\n"
+"ou inférieur\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "mot de passe récupéré dans le fichier « %s »\n"
+
+#: fe-exec.c:449 fe-exec.c:3383
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "le numéro de ligne %d est en dehors des limites 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:207 fe-protocol3.c:232 fe-protocol3.c:261
+#: fe-protocol3.c:279 fe-protocol3.c:375 fe-protocol3.c:747
+msgid "out of memory"
+msgstr "mémoire épuisée"
+
+#: fe-exec.c:511 fe-protocol3.c:1943
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "échec en écriture vers le serveur\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "NOTICE"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult ne supporte pas plus de INT_MAX lignes"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "saturation de size_t"
+
+#: fe-exec.c:1351 fe-exec.c:1477 fe-exec.c:1526
+msgid "command string is a null pointer\n"
+msgstr "la chaîne de commande est un pointeur nul\n"
+
+#: fe-exec.c:1483 fe-exec.c:1532 fe-exec.c:1628
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "le nombre de paramètres doit être compris entre 0 et %d\n"
+
+#: fe-exec.c:1520 fe-exec.c:1622
+msgid "statement name is a null pointer\n"
+msgstr "le nom de l'instruction est un pointeur nul\n"
+
+#: fe-exec.c:1664 fe-exec.c:3236
+msgid "no connection to the server\n"
+msgstr "aucune connexion au serveur\n"
+
+#: fe-exec.c:1673 fe-exec.c:3245
+msgid "another command is already in progress\n"
+msgstr "une autre commande est déjà en cours\n"
+
+#: fe-exec.c:1704
+msgid "cannot queue commands during COPY\n"
+msgstr "ne peut pas mettre en queue les commandes lors du COPY\n"
+
+#: fe-exec.c:1822
+msgid "length must be given for binary parameter\n"
+msgstr "la longueur doit être indiquée pour les paramètres binaires\n"
+
+#: fe-exec.c:2149
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "asyncStatus inattendu : %d\n"
+
+#: fe-exec.c:2185
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "échec de PGEventProc « %s » lors de l'événement PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2333
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "les fonctions d'exécution de commande synchrone ne sont pas autorisées en mode pipeline\n"
+
+#: fe-exec.c:2355
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminé par un nouveau PQexec"
+
+#: fe-exec.c:2372
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec non autorisé pendant COPY BOTH\n"
+
+#: fe-exec.c:2600 fe-exec.c:2656 fe-exec.c:2725 fe-protocol3.c:1874
+msgid "no COPY in progress\n"
+msgstr "aucun COPY en cours\n"
+
+#: fe-exec.c:2902
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfn non autorisé dans le mode pipeline\n"
+
+#: fe-exec.c:2910
+msgid "connection in wrong state\n"
+msgstr "connexion dans un état erroné\n"
+
+#: fe-exec.c:2954
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "ne peut pas entrer dans le mode pipeline, connexion active\n"
+
+#: fe-exec.c:2991 fe-exec.c:3015
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "ne peut pas sortir du mode pipeline avec des résultats non récupérés\n"
+
+#: fe-exec.c:2996
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "ne peut pas sortir du mode pipeline alors qu'il est occupé\n"
+
+#: fe-exec.c:3008
+msgid "cannot exit pipeline mode while in COPY\n"
+msgstr "ne peut pas sortir du mode pipeline pendant un COPY\n"
+
+#: fe-exec.c:3169
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "ne peut pas envoyer le pipeline lorsqu'il n'est pas en mode pipeline\n"
+
+#: fe-exec.c:3272
+msgid "invalid ExecStatusType code"
+msgstr "code ExecStatusType invalide"
+
+#: fe-exec.c:3299
+msgid "PGresult is not an error result\n"
+msgstr "PGresult n'est pas un résultat d'erreur\n"
+
+#: fe-exec.c:3367 fe-exec.c:3390
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "le numéro de colonne %d est en dehors des limites 0..%d"
+
+#: fe-exec.c:3405
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "le numéro de paramètre %d est en dehors des limites 0..%d"
+
+#: fe-exec.c:3715
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "n'a pas pu interpréter la réponse du serveur : %s"
+
+#: fe-exec.c:3975 fe-exec.c:4064
+msgid "incomplete multibyte character\n"
+msgstr "caractère multi-octet incomplet\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "erreur d'import du nom GSSAPI"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "ne peut pas déterminer l'OID de la fonction %s\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "l'argument de lo_truncate dépasse l'échelle des entiers\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "l'argument de lo_read dépasse l'échelle des entiers\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "l'argument de lo_write dépasse l'échelle des entiers\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "n'a pas pu ouvrir le fichier « %s » : %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "n'a pas pu lire le fichier « %s » : %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "n'a pas pu écrire dans le fichier « %s » : %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr ""
+"la requête d'initialisation des fonctions pour « Larges Objects » ne renvoie\n"
+"pas de données\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "entier de taille %lu non supporté par pqGetInt"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "entier de taille %lu non supporté par pqPutInt"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "la connexion n'est pas active\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"la connexion au serveur a été coupée de façon inattendue\n"
+"\tLe serveur s'est peut-être arrêté anormalement avant ou durant le\n"
+"\ttraitement de la requête.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "le délai est dépassé\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "socket invalide\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "échec de %s() : %s\n"
+
+#: fe-protocol3.c:184
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "le message de type 0x%02x est arrivé alors que le serveur était en attente"
+
+#: fe-protocol3.c:407
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr ""
+"le serveur a envoyé des données (message « D ») sans description préalable\n"
+"de la ligne (message « T »)\n"
+
+#: fe-protocol3.c:450
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "réponse inattendue du serveur, le premier caractère reçu étant « %c »\n"
+
+#: fe-protocol3.c:475
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr ""
+"le contenu du message ne correspond pas avec la longueur du type de message\n"
+"« %c »\n"
+
+#: fe-protocol3.c:495
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr ""
+"synchronisation perdue avec le serveur : a reçu le type de message « %c »,\n"
+"longueur %d\n"
+
+#: fe-protocol3.c:547 fe-protocol3.c:587
+msgid "insufficient data in \"T\" message"
+msgstr "données insuffisantes dans le message « T »"
+
+#: fe-protocol3.c:658 fe-protocol3.c:864
+msgid "out of memory for query result"
+msgstr "mémoire épuisée pour le résultat de la requête"
+
+#: fe-protocol3.c:727
+msgid "insufficient data in \"t\" message"
+msgstr "données insuffisantes dans le message « t »"
+
+#: fe-protocol3.c:786 fe-protocol3.c:818 fe-protocol3.c:836
+msgid "insufficient data in \"D\" message"
+msgstr "données insuffisantes dans le message « D »"
+
+#: fe-protocol3.c:792
+msgid "unexpected field count in \"D\" message"
+msgstr "nombre de champs inattendu dans le message « D »"
+
+#: fe-protocol3.c:1040
+msgid "no error message available\n"
+msgstr "aucun message d'erreur disponible\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1088 fe-protocol3.c:1107
+#, c-format
+msgid " at character %s"
+msgstr " au caractère %s"
+
+#: fe-protocol3.c:1120
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DÉTAIL : %s\n"
+
+#: fe-protocol3.c:1123
+#, c-format
+msgid "HINT: %s\n"
+msgstr "ASTUCE : %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "REQUÊTE : %s\n"
+
+#: fe-protocol3.c:1133
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXTE : %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NOM DE SCHÉMA : %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NOM DE TABLE : %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NOM DE COLONNE : %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NOM DU TYPE DE DONNÉES : %s\n"
+
+#: fe-protocol3.c:1158
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NOM DE CONTRAINTE : %s\n"
+
+#: fe-protocol3.c:1170
+msgid "LOCATION: "
+msgstr "EMPLACEMENT : "
+
+#: fe-protocol3.c:1172
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1174
+#, c-format
+msgid "%s:%s"
+msgstr "%s : %s"
+
+#: fe-protocol3.c:1369
+#, c-format
+msgid "LINE %d: "
+msgstr "LIGNE %d : "
+
+#: fe-protocol3.c:1768
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline : ne va pas réaliser un COPY OUT au format texte\n"
+
+#: fe-protocol3.c:2134
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "erreur de protocole : id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "le nom du certificat SSL contient des NULL\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "le nom d'hôte doit être précisé pour une connexion SSL vérifiée\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "le certificat serveur pour « %s » ne correspond pas au nom d'hôte « %s »\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "n'a pas pu récupérer le nom d'hôte du serveur à partir du certificat serveur\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "erreur d'emballage GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "le message sortant GSSAPI n'utiliserait pas la confidentialité\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "le client a essayé d'envoyer un paquet GSSAPI trop gros (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "paquet GSSAPI trop gros envoyé par le serveur (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "erreur de dépaquetage GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "le message entrant GSSAPI n'a pas utilisé pas la confidentialité\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "n'a pas pu initier le contexte de sécurité GSSAPI"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "erreur de vérification de la taille GSSAPI"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "erreur d'établissement du contexte GSSAPI"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "erreur SYSCALL SSL : %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "erreur SYSCALL SSL : EOF détecté\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "erreur SSL : %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "la connexion SSL a été fermée de façon inattendu\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "code d'erreur SSL inconnu : %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "n'a pas pu déterminer l'algorithme de signature du certificat serveur\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "n'a pas pu trouver l'entrée pour le NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "n'a pas pu générer le hachage du certificat peer\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "l'entrée du nom du certificat SSL est manquante\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "n'a pas pu créer le contexte SSL : %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "valeur « %s » invalide pour la version minimale du protocole SSL\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "n'a pas pu configurer la version minimale de protocole SSL : %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "valeur « %s » invalide pour la version maximale du protocole SSL\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "n'a pas pu configurer la version maximale de protocole SSL : %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "n'a pas pu lire le certificat racine « %s » : %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"n'a pas pu obtenir le répertoire personnel pour situer le fichier de certificat racine.\n"
+"Fournissez le fichier ou modifiez sslmode pour désactiver la vérification du\n"
+"certificat par le serveur.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"le fichier de certificat racine « %s » n'existe pas.\n"
+"Fournissez le fichier ou modifiez sslmode pour désactiver la vérification du\n"
+"certificat par le serveur.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "n'a pas pu ouvrir le certificat « %s » : %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "n'a pas pu lire le certificat « %s » : %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "n'a pas pu établir la connexion SSL : %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "n'a pas pu configurer le SSL Server Name Indication (SNI) : %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "n'a pas pu charger le moteur SSL « %s » : %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "n'a pas pu initialiser le moteur SSL « %s » : %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "n'a pas pu lire la clé privée SSL « %s » à partir du moteur « %s » : %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "n'a pas pu charger la clé privée SSL « %s » à partir du moteur « %s » : %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "le certificat est présent, mais la clé privée « %s » est absente\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "le fichier de clé privée « %s » n'est pas un fichier standard\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "le fichier de clé privée « %s » a des droits d'accès pour le groupe ou le monde ; le fichier doit avoir les droits u=rw (0600) ou moins si le propriétaire est l'utilisateur courant, ou les droits u=rw,g=r (0640) ou moins si le propriétaire est root\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "n'a pas pu charger le fichier de clé privée « %s » : %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "le certificat ne correspond pas à la clé privée « %s » : %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Ceci pourrait indiquer que le serveur ne supporte aucune des versions du protocole SSL entre %s et %s.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "le certificat n'a pas pu être obtenu : %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "aucune erreur SSL reportée"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "code d'erreur SSL %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ATTENTION : sslpassword tronqué\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "n'a pas pu recevoir des données depuis le serveur : %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "n'a pas pu transmettre les données au serveur : %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "erreur de socket non reconnue : 0x%08X/%d"
+
+#~ msgid "\"SELECT pg_is_in_recovery()\" failed\n"
+#~ msgstr "\"SELECT pg_is_in_recovery()\" a échoué\n"
+
+#~ msgid "\"SHOW transaction_read_only\" failed\n"
+#~ msgstr "\"SHOW transaction_read_only\" a échoué\n"
+
+#~ msgid "COPY IN state must be terminated first\n"
+#~ msgstr "l'état COPY IN doit d'abord être terminé\n"
+
+#~ msgid "COPY OUT state must be terminated first\n"
+#~ msgstr "l'état COPY OUT doit d'abord être terminé\n"
+
+#~ msgid "Kerberos 5 authentication rejected: %*s\n"
+#~ msgstr "authentification Kerberos 5 rejetée : %*s\n"
+
+#~ msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+#~ msgstr "la bibliothèque SSL ne supporte pas les certificats CRL (fichier « %s »)\n"
+
+#~ msgid "WARNING: line %d too long in password file \"%s\"\n"
+#~ msgstr "ATTENTION : ligne %d trop longue dans le fichier de mots de passe « %s »\n"
+
+#~ msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %d\n"
+#~ msgstr "échec de WSAIoctl(SIO_KEEPALIVE_VALS) : %d\n"
+
+#~ msgid "cannot determine OID of function lo_creat\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_creat\n"
+
+#~ msgid "cannot determine OID of function lo_create\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_create\n"
+
+#~ msgid "cannot determine OID of function lo_lseek\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_lseek\n"
+
+#~ msgid "cannot determine OID of function lo_lseek64\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_lseek64\n"
+
+#~ msgid "cannot determine OID of function lo_open\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_open\n"
+
+#~ msgid "cannot determine OID of function lo_tell64\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_tell64\n"
+
+#~ msgid "cannot determine OID of function lo_truncate\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_truncate\n"
+
+#~ msgid "cannot determine OID of function lo_truncate64\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_truncate64\n"
+
+#~ msgid "cannot determine OID of function lo_unlink\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lo_unlink\n"
+
+#~ msgid "cannot determine OID of function loread\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction loread\n"
+
+#~ msgid "cannot determine OID of function lowrite\n"
+#~ msgstr "ne peut pas déterminer l'OID de la fonction lowrite\n"
+
+#~ msgid "could not acquire mutex: %s\n"
+#~ msgstr "n'a pas pu acquérir le mutex : %s\n"
+
+#~ msgid ""
+#~ "could not connect to server: %s\n"
+#~ "\tIs the server running on host \"%s\" (%s) and accepting\n"
+#~ "\tTCP/IP connections on port %s?\n"
+#~ msgstr ""
+#~ "n'a pas pu se connecter au serveur : %s\n"
+#~ "\tLe serveur est-il actif sur l'hôte « %s » (%s)\n"
+#~ "\tet accepte-t-il les connexionsTCP/IP sur le port %s ?\n"
+
+#, c-format
+#~ msgid "could not encrypt password: %s\n"
+#~ msgstr "n'a pas pu chiffré le mot de passe : %s\n"
+
+#~ msgid "could not get home directory to locate client certificate files\n"
+#~ msgstr ""
+#~ "n'a pas pu récupérer le répertoire personnel pour trouver les certificats\n"
+#~ "du client\n"
+
+#~ msgid "could not get home directory to locate password file\n"
+#~ msgstr ""
+#~ "n'a pas pu obtenir le répertoire personnel pour trouver le fichier de\n"
+#~ "mot de passe\n"
+
+#~ msgid "could not get home directory to locate service definition file"
+#~ msgstr ""
+#~ "n'a pas pu obtenir le répertoire personnel pour trouver le certificat de\n"
+#~ "définition du service"
+
+#~ msgid "could not make a writable connection to server \"%s:%s\"\n"
+#~ msgstr "n'a pas pu réaliser une connexion en écriture au serveur « %s » : %s\n"
+
+#~ msgid "could not open private key file \"%s\": %s\n"
+#~ msgstr "n'a pas pu ouvrir le fichier de clé privée « %s » : %s\n"
+
+#~ msgid "could not read private key file \"%s\": %s\n"
+#~ msgstr "n'a pas pu lire la clé privée « %s » : %s\n"
+
+#~ msgid "could not restore nonblocking mode on socket: %s\n"
+#~ msgstr "n'a pas pu rétablir le mode non-bloquant pour la socket : %s\n"
+
+#~ msgid "could not set maximum version of SSL protocol: %s\n"
+#~ msgstr "n'a pas pu mettre en place la version maximale du protocole SSL : %s\n"
+
+#~ msgid "could not set minimum version of SSL protocol: %s\n"
+#~ msgstr "n'a pas pu mettre en place la version minimale du protocole SSL : %s\n"
+
+#~ msgid "could not set socket to blocking mode: %s\n"
+#~ msgstr "n'a pas pu activer le mode bloquant pour la socket : %s\n"
+
+#~ msgid "extraneous data in \"D\" message"
+#~ msgstr "données supplémentaires dans le message « D »"
+
+#~ msgid "extraneous data in \"T\" message"
+#~ msgstr "données supplémentaires dans le message « T »"
+
+#~ msgid "extraneous data in \"t\" message"
+#~ msgstr "données supplémentaires dans le message « t »"
+
+#~ msgid "failed to generate nonce\n"
+#~ msgstr "échec pour la génération de nonce\n"
+
+#~ msgid "function requires at least protocol version 3.0\n"
+#~ msgstr "la fonction nécessite au minimum le protocole 3.0\n"
+
+#~ msgid "invalid appname state %d, probably indicative of memory corruption\n"
+#~ msgstr "état appname %d invalide, indiquant probablement une corruption de la mémoire\n"
+
+#~ msgid "invalid channel_binding value: \"%s\"\n"
+#~ msgstr "valeur de channel_binding invalide : « %s »\n"
+
+#~ msgid "invalid gssencmode value: \"%s\"\n"
+#~ msgstr "valeur gssencmode invalide : « %s »\n"
+
+#~ msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+#~ msgstr "état setenv %c invalide, indiquant probablement une corruption de la mémoire\n"
+
+#~ msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+#~ msgstr "valeur ssl_max_protocol_version invalide : « %s »\n"
+
+#~ msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+#~ msgstr "valeur ssl_min_protocol_version invalide : « %s »\n"
+
+#~ msgid "invalid state %c, probably indicative of memory corruption\n"
+#~ msgstr "état %c invalide, indiquant probablement une corruption de la mémoire\n"
+
+#~ msgid "invalid target_session_attrs value: \"%s\"\n"
+#~ msgstr "valeur target_session_attrs invalide : « %s »\n"
+
+#~ msgid "lost synchronization with server, resetting connection"
+#~ msgstr "synchronisation perdue avec le serveur, réinitialisation de la connexion"
+
+#~ msgid "no GSSAPI support; cannot require GSSAPI\n"
+#~ msgstr "pas de support de GSSAPI : ne peut pas nécessiter GSSAPI\n"
+
+#~ msgid "private key file \"%s\" changed during execution\n"
+#~ msgstr "la clé privée « %s » a été modifiée durant l'exécution\n"
+
+#, c-format
+#~ msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+#~ msgstr ""
+#~ "le fichier de la clé privée « %s » a des droits d'accès en lecture\n"
+#~ "pour le groupe ou universel ; les droits devraient être u=rw (0600)\n"
+#~ "ou inférieur\n"
+
+#, c-format
+#~ msgid "private key file \"%s\" must be owned by the current user or root\n"
+#~ msgstr "le fichier de clé privée « %s » doit avoir comme propriétaire l'utilisateur courant ou root\n"
+
+#~ msgid "select() failed: %s\n"
+#~ msgstr "échec de select() : %s\n"
+
+#~ msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+#~ msgstr ""
+#~ "le serveur a envoyé des données binaires (message « B ») sans description\n"
+#~ "préalable de la ligne (message « T »)"
+
+#~ msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+#~ msgstr ""
+#~ "le serveur a envoyé des données (message « D ») sans description préalable\n"
+#~ "de la ligne (message « T »)"
+
+#~ msgid "setsockopt(%s) failed: %s\n"
+#~ msgstr "setsockopt(%s) a échoué : %s\n"
+
+#~ msgid "setsockopt(SO_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(SO_KEEPALIVE) a échoué : %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPALIVE) a échoué : %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPIDLE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPIDLE) a échoué : %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPINTVL) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPINTVL) a échoué : %s\n"
+
+#~ msgid "socket not open\n"
+#~ msgstr "socket non ouvert\n"
+
+#~ msgid "unexpected character %c following empty query response (\"I\" message)"
+#~ msgstr ""
+#~ "caractère %c inattendu à la suite d'une réponse de requête vide (message\n"
+#~ "« I »)"
+
+#~ msgid "unrecognized return value from row processor"
+#~ msgstr "valeur de retour du traitement de la ligne non reconnue"
+
+#~ msgid "verified SSL connections are only supported when connecting to a host name\n"
+#~ msgstr ""
+#~ "les connexions SSL vérifiées ne sont supportées que lors de la connexion\n"
+#~ "à un alias hôte\n"
diff --git a/src/interfaces/libpq/po/ja.po b/src/interfaces/libpq/po/ja.po
new file mode 100644
index 0000000..cf219cb
--- /dev/null
+++ b/src/interfaces/libpq/po/ja.po
@@ -0,0 +1,1231 @@
+# libpq.po
+# Japanese message translation file for libpq
+#
+# Copyright (C) 2011-2022 PostgreSQL Global Development Group
+#
+# This file is distributed under the same license as the PostgreSQL package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL 14)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-07-06 10:32+0900\n"
+"PO-Revision-Date: 2022-07-06 10:52+0900\n"
+"Last-Translator: Kyotaro Horiguchi <horikyota.ntt@gmail.com>\n"
+"Language-Team: Japan PostgreSQL Users Group <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.13\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (空のメッセージ)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (長さの不整合)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "サーバーシグネチャの検証ができませんでした\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "正しくないサーバー署名\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "不正なSCRAM交換状態\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (属性 \"%c\" が必要)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "SCRAMメッセージのフォーマット異常 (属性 \"%c\" に文字 \"=\" が必要)\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "nonce を生成できませんでした\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3124 fe-exec.c:3308
+#: fe-exec.c:4081 fe-exec.c:4246 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:979 fe-protocol3.c:994 fe-protocol3.c:1027
+#: fe-protocol3.c:1735 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "メモリ不足\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "nonceをエンコードに失敗しました\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "クライアント証明の算出に失敗しました\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "クライアントの証明のエンコードに失敗しました\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "不正なSCRAM応答 (nonce の不一致)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (不正なソルト)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (不正な繰り返し回数)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (server-first-message 終端の余分なデータ)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "SCRAM交換中にサーバーからのエラーを受信しました: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (server-final-message 終端の余分なデータ)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "SCRAMメッセージのフォーマット異常 (不正なサーバー署名)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "GSSAPIバッファの割り当ての際のメモリ不足(%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "GSSAI続行エラー"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "ホスト名を指定しなければなりません\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "重複するGSS認証要求\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "SSPIバッファの割り当ての際のメモリ不足(%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "SSPI続行エラー"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "重複するSSPI認証要求\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "SSPIクレデンシャルを取得できませんでした"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "チャネルバインディングが要求されていますが、SSLが使用されていません\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "重複するSASL認証要求\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "チャネルバインディングが要求されていますが、クライアントがサポートしていません\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "サーバーが非SSL接続上で SCRAM-SHA-256-PLUS 認証を提示してきました\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "サーバー側のいずれのSASL認証機構もサポートされていません\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "チャネルバインディングが要求されていますが、サーバーがチャネルバインディングをサポートする認証方式を提供しませんでした\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "SASLバッファの割り当ての際のメモリ不足(%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "サーバーからAuthenticationSASLFinalを受信しました、しかしSASL認証は完了していません\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "SCM_CRED認証方式はサポートされていません\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "チャネルバインディングが要求されていますが、サーバーはチャネルバインディングを使用せずに認証を行いました\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "チャネルバインディングが要求されていますが、サーバーの認証要求ではサポートされていません\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos 4認証はサポートされていません\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos 5認証はサポートされていません\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI認証はサポートされていません\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI認証はサポートされていません\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "Crypt認証はサポートされていません\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "認証方式%uはサポートされていません\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "ユーザー名の参照に失敗: エラーコード %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "ローカルユーザID%dが見つかりませんでした: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "ID %d を持つローカルユーザは存在しません\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW に対する予期しない形のリザルトセット\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "password_encryptionの値が長すぎます\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "認識できないパスワード暗号化アルゴリズム \"%s\"\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "%d個のホスト名と%d個のhostaddrの値との突き合せはできません\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "%d個のポート番号と%d個のホストとの突き合せはできません\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "%s の値が不正: \"%s\"\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "SSLサポートが組み込まれていない場合sslmodeの値\"%s\"は不正です\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "不正なSSLプロトコルバージョン範囲\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "gssencmodeの値\"%s\"はGSSAPIサポートがコンパイルされていない場合は不正\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "TCPソケットを非遅延モードに設定できませんでした: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "ソケット\"%s\"上でのサーバーへの接続に失敗しました: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "\"%s\" (%s)、ポート %sでのサーバーへの接続に失敗しました: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "\"%s\"、ポート%sでのサーバーへの接続に失敗しました: "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\tサーバーは同一マシン上で動作していて、そのソケットで接続の待ち受けをしていますか?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tサーバーはそのホストで動作していて、TCP/IP接続を受け付けていますか?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "接続オプション\"%2$s\"に対する不正な整数値\"%1$s\"\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s)が失敗しました: %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s)が失敗しました: エラーコード %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "接続状態が不正です。メモリ障害の可能性があります\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "不正なポート番号です: \"%s\"\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "ホスト名\"%s\"をアドレスに変換できませんでした: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "ネットワークアドレス\"%s\"をパースできませんでした: %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unixドメインソケットのパス\"%s\"が長すぎます(最大 %d バイト)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "Unixドメインソケットのパス\"%s\"をアドレスに変換できませんでした: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "ソケットを作成できませんでした: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "ソケットを非ブロッキングモードに設定できませんでした: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "ソケットをclose-on-execモードに設定できませんでした: %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepaliveのパラメータは整数でなければなりません\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "ソケットのエラー状態を入手できませんでした: %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "ソケットからクライアントアドレスを入手できませんでした: %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "このプラットフォームでは requirepeer パラメータはサポートされていません\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "ピアの資格証明を入手できませんでした: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeerは\"%s\"を指定していますが、実際のピア名は\"%s\"です\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "GSSAPIネゴシエーションパケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "GSSAPI暗号化が要求されていますが、実行できませんでした(おそらく資格キャッシュがない、サーバーがサポートしていないあるいはローカルソケットで接続しています)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "SSLネゴシエーションパケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "開始パケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "サーバーはSSLをサポートしていませんが、SSLが要求されました\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "SSLネゴシエーションに対して不正な応答を受信しました: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "SSL応答の後に非暗号化データを受信しました\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "サーバーはGSSAPI暗号化をサポートしていませんが、要求されました\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "GSSAPIネゴシエーションに対して不正な応答を受信しました: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "GSSAPI暗号化応答の後に非暗号化データを受信しました\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "サーバーからの認証要求を想定していましたが、%cを受信しました\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "起動時にサーバーから想定外のメッセージがありました\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "セッションは読み取り専用です\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "セッションは読み取り専用ではありません\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "サーバーはホットスタンバイモードです\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "サーバーはホットスタンバイモードではありません\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "\"%s\"が失敗しました\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "接続状態%dが不正です。メモリ障害の可能性があります\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEVT_CONNRESETイベント中にPGEventProc \"%s\"に失敗しました\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "不正なLDAP URL\"%s\":スキーマはldap://でなければなりません\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "不正なLDAP URL \"%s\": 区別名がありません\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "不正なLDAP URL \"%s\": 正確に1つの属性を持たなければなりません\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "不正なLDAP URL \"%s\": 検索スコープ(base/one/sub)を持たなければなりません\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "不正なLDAP URL \"%s\": フィルタがありません\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "不正なLDAP URL \"%s\": ポート番号が不正です\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "LDAP構造体を作成できませんでした\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "LDAPサーバーで検索に失敗しました: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP検索結果が複数ありました\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "LDAP検索結果が空でした\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "LDAP検索で属性に値がありませんでした\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "接続情報文字列において\"%s\"の後に\"=\"がありませんでした\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "接続オプション\"%s\"は不正です\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "接続情報文字列において閉じていない引用符がありました\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "サービス定義\"%s\"がみつかりません\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "サービスファイル\"%s\"がみつかりません\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "サービスファイル\"%2$s\"の行%1$dが長すぎます\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "サービスファイル\"%s\"の行%dに構文エラーがあります\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "サービスファイル\"%s\"ではネストしたサービス指定はサポートされていません、行%d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "内部パーサ処理へ伝わった不正なURI: \"%s\"\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "URI \"%s\"内のIPv6ホストアドレスにおいて対応する\"]\"を探している間に文字列が終わりました\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "URI \"%s\"内のIPv6ホストアドレスが空である可能性があります\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "URI(\":\"と\"/\"を除く)内の位置%2$dに想定外の\"%1$c\"文字があります: \"%3$s\"\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI問い合わせパラメータ内に余分なキーと値を分ける\"=\"があります: \"%s\"\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI問い合わせパラメータ内にキーと値を分ける\\\"=\\\"がありません: \"%s\"\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "不正なURI問い合わせパラメータ:\"%s\"\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "不正なパーセント符号化トークン: \"%s\"\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "パーセント符号化された値では%%00値は許されません: \"%s\"\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "接続ポインタはNULLです\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "警告: パスワードファイル\"%s\"がテキストファイルではありません\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "警告: パスワードファイル\"%s\"がグループメンバもしくは他のユーザから読める状態になっています。この権限はu=rw (0600)以下にすべきです\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "ファイル\"%s\"からパスワードを読み込みました\n"
+
+#: fe-exec.c:449 fe-exec.c:3382
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "行番号%dは0..%dの範囲を超えています"
+
+#: fe-exec.c:510 fe-protocol3.c:207 fe-protocol3.c:232 fe-protocol3.c:261
+#: fe-protocol3.c:279 fe-protocol3.c:375 fe-protocol3.c:747
+msgid "out of memory"
+msgstr "メモリ不足"
+
+#: fe-exec.c:511 fe-protocol3.c:1943
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "サーバーへの書き込みに失敗\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "NOTICE"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresultはINT_MAX個以上のタプルを扱えません"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "size_t オーバーフロー"
+
+#: fe-exec.c:1351 fe-exec.c:1476 fe-exec.c:1525
+msgid "command string is a null pointer\n"
+msgstr "コマンド文字列がヌルポインタです\n"
+
+#: fe-exec.c:1482 fe-exec.c:1531 fe-exec.c:1627
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "パラメータ数は0から%dまでの間でなければなりません\n"
+
+#: fe-exec.c:1519 fe-exec.c:1621
+msgid "statement name is a null pointer\n"
+msgstr "文の名前がヌルポインタです\n"
+
+#: fe-exec.c:1663 fe-exec.c:3235
+msgid "no connection to the server\n"
+msgstr "サーバーへの接続がありません\n"
+
+#: fe-exec.c:1672 fe-exec.c:3244
+msgid "another command is already in progress\n"
+msgstr "他のコマンドを処理しています\n"
+
+#: fe-exec.c:1703
+msgid "cannot queue commands during COPY\n"
+msgstr "COPYの実行中はコマンドの先行積み込みはできません\n"
+
+#: fe-exec.c:1821
+msgid "length must be given for binary parameter\n"
+msgstr "バイナリパラメータには長さを指定しなければなりません\n"
+
+#: fe-exec.c:2148
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "想定外のasyncStatus: %d\n"
+
+#: fe-exec.c:2184
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEVT_RESULTCREATEイベント中にPGEventProc \"%s\"に失敗しました\n"
+
+#: fe-exec.c:2332
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "同期コマンド実行関数はパイプラインモードでは使用できません\n"
+
+#: fe-exec.c:2354
+msgid "COPY terminated by new PQexec"
+msgstr "新たなPQexec\"によりCOPYが終了しました"
+
+#: fe-exec.c:2371
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "COPY BOTH 実行中の PQexec は許可されていません\n"
+
+#: fe-exec.c:2599 fe-exec.c:2655 fe-exec.c:2724 fe-protocol3.c:1874
+msgid "no COPY in progress\n"
+msgstr "実行中のCOPYはありません\n"
+
+#: fe-exec.c:2901
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfnはパイプラインモードでは実行できません\n"
+
+#: fe-exec.c:2909
+msgid "connection in wrong state\n"
+msgstr "接続状態が異常です\n"
+
+#: fe-exec.c:2953
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "パイプラインモードに移行できません、接続はアイドル状態です\n"
+
+#: fe-exec.c:2990 fe-exec.c:3014
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "未受信の結果がある状態でパイプラインモードを終了することはできません\n"
+
+#: fe-exec.c:2995
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "ビジー状態でパイプラインモードを終了することはできません\n"
+
+#: fe-exec.c:3007
+msgid "cannot exit pipeline mode while in COPY\n"
+msgstr "COPY実行中にパイプラインモードを抜けることはできません\n"
+
+#: fe-exec.c:3168
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "パイプラインモード中ではないためパイプラインの送出はできません\n"
+
+#: fe-exec.c:3271
+msgid "invalid ExecStatusType code"
+msgstr "ExecStatusTypeコードが不正です"
+
+#: fe-exec.c:3298
+msgid "PGresult is not an error result\n"
+msgstr "PGresutがエラー結果ではありません\n"
+
+#: fe-exec.c:3366 fe-exec.c:3389
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "列番号%dは0..%dの範囲を超えています"
+
+#: fe-exec.c:3404
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "パラメータ%dは0..%dの範囲を超えています"
+
+#: fe-exec.c:3714
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "サーバーからの結果を解釈できませんでした: %s"
+
+#: fe-exec.c:3974 fe-exec.c:4063
+msgid "incomplete multibyte character\n"
+msgstr "不完全なマルチバイト文字\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "GSSAPI名のインポートエラー"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "関数%sのOIDを確定できません\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "lo_truncateへの引数が整数範囲を超えています。\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "lo_readへの引数が整数範囲を超えています。\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "lo_writeへの引数が整数範囲を超えています。\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "ファイル\"%s\"をオープンできませんでした: %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "ファイル\"%s\"を読み込めませんでした: %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "ファイル\"%s\"に書き込めませんでした: %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "ラージオブジェクト機能を初期化する問い合わせがデータを返しませんでした\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "サイズ%luの整数はpqGetIntでサポートされていません"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "サイズ%luの整数はpqPutIntでサポートされていません"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "接続はオープンされていません\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"サーバーとの接続が予期せずクローズされました\n"
+" おそらく要求の処理前または処理中にサーバが異常終了\n"
+" したことを意味しています。\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "タイムアウト期間が過ぎました\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "不正なソケットです\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s()が失敗しました: %s\n"
+
+#: fe-protocol3.c:184
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "待機中にサーバーからメッセージ種類0x%02xが届きました"
+
+#: fe-protocol3.c:407
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "サーバーが事前の行記述(\"T\"メッセージ)なしにデータ(\"D\"メッセージ)を送信しました\"\n"
+
+#: fe-protocol3.c:450
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "サーバーから想定外の応答がありました。受け付けた先頭文字は\"%c\"です\n"
+
+#: fe-protocol3.c:475
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "メッセージの内容がメッセージ種類\"%c\"の長さに合いません\n"
+
+#: fe-protocol3.c:495
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "サーバーとの同期が失われました。受信したメッセージ種類は\"%c\"、長さは%d\n"
+
+#: fe-protocol3.c:547 fe-protocol3.c:587
+msgid "insufficient data in \"T\" message"
+msgstr "\"T\"メッセージ内のデータが不十分です"
+
+#: fe-protocol3.c:658 fe-protocol3.c:864
+msgid "out of memory for query result"
+msgstr "問い合わせ結果用のメモリが不足しています"
+
+#: fe-protocol3.c:727
+msgid "insufficient data in \"t\" message"
+msgstr "\"t\"メッセージ内のデータが不十分です"
+
+#: fe-protocol3.c:786 fe-protocol3.c:818 fe-protocol3.c:836
+msgid "insufficient data in \"D\" message"
+msgstr "\"D\"\"メッセージ内のデータが不十分です"
+
+#: fe-protocol3.c:792
+msgid "unexpected field count in \"D\" message"
+msgstr "\"D\"メッセージ内のフィールド数が想定外です。"
+
+#: fe-protocol3.c:1040
+msgid "no error message available\n"
+msgstr "エラーメッセージがありません\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1088 fe-protocol3.c:1107
+#, c-format
+msgid " at character %s"
+msgstr "(文字位置: %s)"
+
+#: fe-protocol3.c:1120
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETAIL: %s\n"
+
+#: fe-protocol3.c:1123
+#, c-format
+msgid "HINT: %s\n"
+msgstr "HINT: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "QUERY: %s\n"
+
+#: fe-protocol3.c:1133
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXT: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMA NAME: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABLE NAME: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "COLUMN NAME: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATATYPE NAME: %s\n"
+
+#: fe-protocol3.c:1158
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "CONSTRAINT NAME: %s\n"
+
+#: fe-protocol3.c:1170
+msgid "LOCATION: "
+msgstr "LOCATION: "
+
+#: fe-protocol3.c:1172
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1174
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1369
+#, c-format
+msgid "LINE %d: "
+msgstr "行 %d: "
+
+#: fe-protocol3.c:1768
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: テキストのCOPY OUTを行っていません\n"
+
+#: fe-protocol3.c:2134
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "プロトコルエラー: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "SSL証明書の名前の途中にnullが含まれています\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "SSL 接続を検証するためにホスト名を指定しなければなりません\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "\"%s\"のサーバー証明書がホスト名\"%s\"とマッチしません\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "サーバー証明書からサーバのホスト名を取り出すことができませんでした。\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPIラップエラー"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "送出されるGSSAPIメッセージは機密性を使用しません\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "クライアントは過大なGSSAPIパケットを送信しようとしました: (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "過大なGSSAPIパケットがサーバーから送出されました: (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPIアンラップエラー"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "受信したGSSAPIメッセージは機密性を使用していませんでした\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "GSSAPIセキュリティコンテキストを開始できませんでした"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "GSSAPIサイズチェックエラー"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPIコンテクスト確立エラー"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALLエラー: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALLエラー: EOFを検知\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSLエラー: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL接続が意図せずにクローズされました\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "認識できないSSLエラーコード: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "サーバー証明書の署名アルゴリズムを決定できませんでした\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "NID %sのダイジェストが見つかりませんでした\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "ピアの証明書ハッシュの生成に失敗しました\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "SSL証明書に名前の項目がありません\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "SSLコンテキストを作成できませんでした: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "不正なSSLプロトコル最小バージョンの値\"%s\"\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "SSLプロトコル最小バージョンを設定できませんでした: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "不正なSSLプロトコル最大バージョンの値\"%s\"\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "SSLプロトコル最大バージョンを設定できませんでした: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "ルート証明書\"%s\"を読み取れませんでした: %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"ルート証明書ファイルを置くためのホームディレクトリが存在しません。\n"
+"ファイルを用意するか、サーバー証明書の検証を無効にするように sslmode を変更してください\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"ルート証明書ファイル\"%s\"が存在しません。\n"
+"ファイルを用意するかサーバー証明書の検証を無効にするようにsslmodeを変更してください\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "証明書ファイル\"%s\"をオープンできませんでした: %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "証明書ファイル\"%s\"を読み込めませんでした: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "SSL接続を確立できませんでした: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "SSLサーバー名表示を設定できませんでした: %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "SSLエンジン\"%s\"を読み込みできませんでした: %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "SSLエンジン\"%s\"を初期化できませんでした: %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "SSL秘密鍵ファイル\"%s\"をエンジン\"%s\"から読み取れませんでした: %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "SSL秘密鍵\"%s\"をエンジン\"%s\"から読み取れませんでした: %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "証明書はありましたが、秘密鍵ファイル\"%s\"はありませんでした\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "秘密鍵ファイル\"%s\"は通常のファイルではありません\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "秘密鍵ファイル\"%s\"はグループに対して、もしくは無制限にアクセスを許可しています; ファイルのパーミッションは u=rw (0600) かそれよりも狭い必要があります、rootが所有している場合は u=rw,g=r (0640) かそれよりも狭い必要があります\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "秘密鍵ファイル\"%s\"をロードできませんでした: %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "証明書と秘密鍵ファイル\"%s\"が一致しません: %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "このことは、クライアントがSSLプロトコルのバージョン%sから%sの間のいずれもサポートしていないことを示唆しているかもしれません。\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "証明書を入手できませんでした: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "SSLエラーはありませんでした"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSLエラーコード: %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "警告: sslpasswordが切り詰められました\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "サーバーからデータを受信できませんでした: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "サーバーにデータを送信できませんでした: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "不明なソケットエラー 0x%08X/%d"
+
+#~ msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+#~ msgstr "警告:秘密鍵ファイル\"%s\"がグループメンバや第三者から読める状態になっています。この権限はu=rw (0600)またはそれ以下とすべきです\n"
+
+#~ msgid "private key file \"%s\" must be owned by the current user or root\n"
+#~ msgstr "秘密鍵ファイル\"%s\"は現在のユーザーもしくはrootの所有である必要があります\n"
diff --git a/src/interfaces/libpq/po/ko.po b/src/interfaces/libpq/po/ko.po
new file mode 100644
index 0000000..602069a
--- /dev/null
+++ b/src/interfaces/libpq/po/ko.po
@@ -0,0 +1,1340 @@
+# Korean message translation file for libpq
+# Ioseph Kim. <ioseph@uri.sarang.net>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-05 01:09+0000\n"
+"PO-Revision-Date: 2020-10-05 17:53+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean <pgsql-kr@postgresql.kr>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: fe-auth-scram.c:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "SCRAM 메시지가 형식에 안맞음 (메시지 비었음)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "SCRAM 메시지가 형식에 안맞음 (길이 불일치)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "잘못된 서버 서명\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "SCRAM 교화 상태가 바르지 않음\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "SCRAM 메시지가 형식에 안맞음 (\"%c\" 속성이 예상됨)\n"
+
+#: fe-auth-scram.c:305
+#, c-format
+msgid ""
+"malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "SCRAM 메시지가 형식에 안맞음 (\"%c\" 속성 예상값은 \"=\")\n"
+
+#: fe-auth-scram.c:346
+msgid "could not generate nonce\n"
+msgstr "암호화 토큰(nonce)을 만들 수 없음\n"
+
+#: fe-auth-scram.c:356 fe-auth-scram.c:431 fe-auth-scram.c:579
+#: fe-auth-scram.c:600 fe-auth-scram.c:626 fe-auth-scram.c:641
+#: fe-auth-scram.c:691 fe-auth-scram.c:725 fe-auth.c:289 fe-auth.c:359
+#: fe-auth.c:394 fe-auth.c:611 fe-auth.c:770 fe-auth.c:1129 fe-auth.c:1277
+#: fe-connect.c:892 fe-connect.c:1419 fe-connect.c:1595 fe-connect.c:2200
+#: fe-connect.c:2223 fe-connect.c:2952 fe-connect.c:4598 fe-connect.c:4854
+#: fe-connect.c:4973 fe-connect.c:5226 fe-connect.c:5306 fe-connect.c:5405
+#: fe-connect.c:5661 fe-connect.c:5690 fe-connect.c:5762 fe-connect.c:5786
+#: fe-connect.c:5804 fe-connect.c:5905 fe-connect.c:5914 fe-connect.c:6270
+#: fe-connect.c:6420 fe-exec.c:2747 fe-exec.c:3494 fe-exec.c:3659
+#: fe-gssapi-common.c:111 fe-lobj.c:895 fe-protocol2.c:1207 fe-protocol3.c:995
+#: fe-protocol3.c:1699 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1091
+msgid "out of memory\n"
+msgstr "메모리 부족\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "암호화 토큰(nonce)을 인코딩할 수 없음\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "클라이언트 프루프(proof)를 인코딩할 수 없음\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "잘못된 SCRAM 응답 (토큰 불일치)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "형식에 맞지 않은 SCRAM 메시지 (잘못된 소금)\n"
+
+#: fe-auth-scram.c:665
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "형식에 맞지 않은 SCRAM 메시지 (나열 숫자가 이상함)\n"
+
+#: fe-auth-scram.c:671
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr ""
+"형식에 맞지 않은 SCRAM 메시지 (서버 첫 메시지 끝에 쓸모 없는 값이 있음)\n"
+
+#: fe-auth-scram.c:702
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "SCRAM 교환작업에서 서버로부터 데이터를 받지 못했음: %s\n"
+
+#: fe-auth-scram.c:718
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr ""
+"형식에 맞지 않은 SCRAM 메시지 (서버 끝 메시지 뒤에 쓸모 없는 값이 있음)\n"
+
+#: fe-auth-scram.c:737
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "형식에 맞지 않은 SCRAM 메시지 (서버 사인이 이상함)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "GSSAPI 버퍼(%d)에 할당할 메모리 부족\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI 연속 오류"
+
+#: fe-auth.c:158 fe-auth.c:388 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "호스트 이름을 지정해야 함\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "중복된 GSS 인증 요청\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "SSPI 버퍼(%d)에 할당할 메모리 부족\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "SSPI 연속 오류"
+
+#: fe-auth.c:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "중복된 SSPI 인증 요청\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "SSPI 자격 증명을 가져올 수 없음"
+
+#: fe-auth.c:429
+msgid "channel binding required, but SSL not in use\n"
+msgstr "채널 바인딩이 필요한데, SSL 기능이 꺼져있음\n"
+
+#: fe-auth.c:436
+msgid "duplicate SASL authentication request\n"
+msgstr "중복된 SASL 인증 요청\n"
+
+#: fe-auth.c:492
+msgid "channel binding is required, but client does not support it\n"
+msgstr "채널 바인딩이 필요한데, 클라이언트에서 지원하지 않음\n"
+
+#: fe-auth.c:509
+msgid ""
+"server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "서버는 non-SSL 접속으로 SCRAM-SHA-256-PLUS 인증을 제공함\n"
+
+#: fe-auth.c:521
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "SASL 인증 메커니즘을 지원하는 서버가 없습니다.\n"
+
+#: fe-auth.c:529
+msgid ""
+"channel binding is required, but server did not offer an authentication "
+"method that supports channel binding\n"
+msgstr ""
+"채널 바인딩 기능을 사용하도록 지정했지만, 서버가 이 기능을 지원하지 않음\n"
+
+#: fe-auth.c:635
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "SASL 버퍼(%d)에 할당할 메모리 부족\n"
+
+#: fe-auth.c:660
+msgid ""
+"AuthenticationSASLFinal received from server, but SASL authentication was "
+"not completed\n"
+msgstr ""
+"서버에서 AuthenticationSASLFinal 응답을 받았지만, SASL 인증이 끝나지 않았음\n"
+
+#: fe-auth.c:737
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "SCM_CRED 인증 방법이 지원되지 않음\n"
+
+#: fe-auth.c:836
+msgid ""
+"channel binding required, but server authenticated client without channel "
+"binding\n"
+msgstr ""
+"채널 바인딩이 필요한데, 서버가 체널 바인딩 없이 클라이언트를 인증함\n"
+
+#: fe-auth.c:842
+msgid ""
+"channel binding required but not supported by server's authentication "
+"request\n"
+msgstr ""
+"채널 바인딩이 필요한데, 서버 인증 요청에서 지원하지 않음\n"
+
+#: fe-auth.c:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos 4 인증 방법이 지원되지 않음\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos 5 인증 방법이 지원되지 않음\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI 인증은 지원되지 않음\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI 인증은 지원되지 않음\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "암호화 인증은 지원되지 않음\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "%u 인증 방법이 지원되지 않음\n"
+
+#: fe-auth.c:1104
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "사용자 이름 찾기 실패: 오류 코드 %lu\n"
+
+#: fe-auth.c:1114 fe-connect.c:2834
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "UID %d 해당하는 사용자를 찾을 수 없음: %s\n"
+
+#: fe-auth.c:1119 fe-connect.c:2839
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "ID %d 로컬 사용자 없음\n"
+
+#: fe-auth.c:1221
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW 명령의 결과 자료가 비정상임\n"
+
+#: fe-auth.c:1230
+msgid "password_encryption value too long\n"
+msgstr "password_encryption 너무 긺\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "알 수 없는 비밀번호 암호화 알고리즘: \"%s\"\n"
+
+#: fe-connect.c:1075
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "호스트 이름은 %d개인데, 호스트 주소는 %d개임\n"
+
+#: fe-connect.c:1156
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "포트 번호는 %d개인데, 호스트는 %d개입니다.\n"
+
+#: fe-connect.c:1249
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "잘못된 channel_binding 값: \"%s\"\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "잘못된 sslmode 값: \"%s\"\n"
+
+#: fe-connect.c:1296
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr ""
+"SSL 연결 기능을 지원하지 않고 컴파일 된 경우는 sslmode 값으로 \"%s\" 값은 타"
+"당치 않습니다\n"
+
+#: fe-connect.c:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "잘못된 ssl_min_protocol_version 값: \"%s\"\n"
+
+#: fe-connect.c:1325
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "잘못된 ssl_max_protocol_version 값: \"%s\"\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "잘못된 SSL 프로토콜 버전 범위\n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "잘못된 gssencmode 값: \"%s\"\n"
+
+#: fe-connect.c:1366
+#, c-format
+msgid ""
+"gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr ""
+"GSSAPI 접속을 지원하지 않는 서버에서는 gssencmode 값(\"%s\")이 적당하지 않"
+"음\n"
+
+#: fe-connect.c:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "잘못된 target_session_attrs 값: \"%s\"\n"
+
+#: fe-connect.c:1619
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "소켓을 TCP에 no delay 모드로 지정할 수 없음: %s\n"
+
+#: fe-connect.c:1680
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running locally and accepting\n"
+"\tconnections on Unix domain socket \"%s\"?\n"
+msgstr ""
+"서버에 연결할 수 없음: %s\n"
+"\t로컬호스트에 서버가 가동 중인지,\n"
+"\t\"%s\" 유닉스 도메인 소켓 접근이 가능한지 살펴보십시오.\n"
+
+#: fe-connect.c:1717
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running on host \"%s\" (%s) and accepting\n"
+"\tTCP/IP connections on port %s?\n"
+msgstr ""
+"서버에 연결할 수 없음: %s\n"
+"\t\"%s\" (%s) 호스트에 서버가 가동 중인지,\n"
+"\t%s 포트로 TCP/IP 연결이 가능한지 살펴보십시오.\n"
+
+#: fe-connect.c:1725
+#, c-format
+msgid ""
+"could not connect to server: %s\n"
+"\tIs the server running on host \"%s\" and accepting\n"
+"\tTCP/IP connections on port %s?\n"
+msgstr ""
+"서버에 연결할 수 없음: %s\n"
+"\t\"%s\" 호스트에 서버가 가동 중인지,\n"
+"\t%s 포트로 TCP/IP 연결이 가능한지 살펴보십시오.\n"
+
+#: fe-connect.c:1795
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "잘못된 정수값: \"%s\", 해당 연결 옵션: \"%s\"\n"
+
+#: fe-connect.c:1825 fe-connect.c:1859 fe-connect.c:1894 fe-connect.c:1981
+#: fe-connect.c:2623
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "setsockopt(%s) 실패: %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) 실패: %ui\n"
+
+#: fe-connect.c:2313
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "잘못된 연결 상태, 메모리 손상일 가능성이 큼\n"
+
+#: fe-connect.c:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "잘못된 포트 번호: \"%s\"\n"
+
+#: fe-connect.c:2395
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "\"%s\" 호스트 이름을 전송할 수 없습니다: 대상 주소: %s\n"
+
+#: fe-connect.c:2408
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "\"%s\" 네트워크 주소를 해석할 수 없음: %s\n"
+
+#: fe-connect.c:2421
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "\"%s\" 유닉스 도메인 소켓 경로가 너무 깁니다 (최대 %d 바이트)\n"
+
+#: fe-connect.c:2436
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "\"%s\" 유닉스 도메인 소켓 경로를 전송할 수 없습니다: 대상 주소: %s\n"
+
+#: fe-connect.c:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "소켓을 만들 수 없음: %s\n"
+
+#: fe-connect.c:2582
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "소켓을 nonblocking 모드로 지정할 수 없음: %s\n"
+
+#: fe-connect.c:2592
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "소켓을 close-on-exec 모드로 지정할 수 없음: %s\n"
+
+#: fe-connect.c:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepalives 매개변수값은 정수여야 합니다.\n"
+
+#: fe-connect.c:2750
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "소켓 오류 상태를 구할 수 없음: %s\n"
+
+#: fe-connect.c:2778
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "소켓에서 클라이언트 주소를 구할 수 없음: %s\n"
+
+#: fe-connect.c:2820
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "requirepeer 매개변수는 이 운영체제에서 지원하지 않음\n"
+
+#: fe-connect.c:2823
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "신뢰성 피어를 얻을 수 없습니다: %s\n"
+
+#: fe-connect.c:2847
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr ""
+"\"%s\" 이름으로 requirepeer를 지정했지만, 실재 사용자 이름은 \"%s\" 입니다\n"
+
+#: fe-connect.c:2887
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "GSSAPI 교섭 패킷을 보낼 수 없음: %s\n"
+
+#: fe-connect.c:2899
+msgid ""
+"GSSAPI encryption required but was impossible (possibly no credential cache, "
+"no server support, or using a local socket)\n"
+msgstr ""
+"GSSAPI 암호화가 필요하지만 사용할 수 없음 (자격 증명 캐시가 없거나, 서버가 지"
+"원하지 않거나, 로컬 소켓을 사용하고 있는 듯합니다.)\n"
+
+#: fe-connect.c:2926
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "SSL 교섭 패킷을 보낼 수 없음: %s\n"
+
+#: fe-connect.c:2965
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "시작 패킷을 보낼 수 없음: %s\n"
+
+#: fe-connect.c:3035
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "서버가 SSL 기능을 지원하지 않는데, SSL 기능을 요구했음\n"
+
+#: fe-connect.c:3061
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "SSL 교섭에 대한 잘못된 응답을 감지했음: %c\n"
+
+#: fe-connect.c:3151
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "서버가 GSSAPI 암호화 기능을 지원하지 않는데, 이것이 필요함\n"
+
+#: fe-connect.c:3162
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "GSSAPI 교섭에 대한 잘못된 응답을 감지했음: %c\n"
+
+#: fe-connect.c:3229 fe-connect.c:3260
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "서버가 인증을 요구했지만, %c 받았음\n"
+
+#: fe-connect.c:3502
+msgid "unexpected message from server during startup\n"
+msgstr "시작하는 동안 서버로부터 기대되지 않는 메시지\n"
+
+#: fe-connect.c:3707
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "\"%s:%s\" 서버에 쓰기 가능한 연결을 맺을 수 없음\n"
+
+#: fe-connect.c:3753
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "\"%s:%s\" 서버에서 \"SHOW transaction_read_only\" 검사가 실패함\n"
+
+#: fe-connect.c:3768
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "잘못된 연결 상태 %d, 메모리 손상일 가능성이 큼\n"
+
+#: fe-connect.c:4204 fe-connect.c:4264
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEVT_CONNRESET 이벤트 동안 PGEventProc \"%s\"이(가) 실패함\n"
+
+#: fe-connect.c:4611
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "잘못된 LDAP URL \"%s\": 스키마는 ldap:// 여야함\n"
+
+#: fe-connect.c:4626
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "잘못된 LDAP URL \"%s\": 식별자 이름이 빠졌음\n"
+
+#: fe-connect.c:4638 fe-connect.c:4693
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "잘못된 LDAP URL \"%s\": 단 하나의 속성만 가져야함\n"
+
+#: fe-connect.c:4649 fe-connect.c:4708
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "잘못된 LDAP URL \"%s\": 검색범위(base/one/sub)를 지정해야함\n"
+
+#: fe-connect.c:4660
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "잘못된 LDAP URL \"%s\": 필터 없음\n"
+
+#: fe-connect.c:4681
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "잘못된 LDAP URL \"%s\": 포트번호가 잘못됨\n"
+
+#: fe-connect.c:4717
+msgid "could not create LDAP structure\n"
+msgstr "LDAP 구조를 만들 수 없음\n"
+
+#: fe-connect.c:4793
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "LDAP 서버를 찾을 수 없음: %s\n"
+
+#: fe-connect.c:4804
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP 검색에서 하나 이상의 엔트리가 발견되었음\n"
+
+#: fe-connect.c:4805 fe-connect.c:4817
+msgid "no entry found on LDAP lookup\n"
+msgstr "LDAP 검색에서 해당 항목 없음\n"
+
+#: fe-connect.c:4828 fe-connect.c:4841
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "LDAP 검색에서 속성의 값이 없음\n"
+
+#: fe-connect.c:4893 fe-connect.c:4912 fe-connect.c:5444
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "연결문자열에서 \"%s\" 다음에 \"=\" 문자 빠졌음\n"
+
+#: fe-connect.c:4985 fe-connect.c:5629 fe-connect.c:6403
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "잘못된 연결 옵션 \"%s\"\n"
+
+#: fe-connect.c:5001 fe-connect.c:5493
+msgid "unterminated quoted string in connection info string\n"
+msgstr "연결문자열에서 완성되지 못한 따옴표문자열이 있음\n"
+
+#: fe-connect.c:5084
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "\"%s\" 서비스 정의를 찾을 수 없음\n"
+
+#: fe-connect.c:5107
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "\"%s\" 서비스 파일을 찾을 수 없음\n"
+
+#: fe-connect.c:5122
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "%d번째 줄이 \"%s\" 서비스 파일에서 너무 깁니다\n"
+
+#: fe-connect.c:5194 fe-connect.c:5238
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "\"%s\" 서비스 파일의 %d번째 줄에 구문 오류 있음\n"
+
+#: fe-connect.c:5205
+#, c-format
+msgid ""
+"nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "\"%s\" 서비스 파일의 %d번째 줄에 설정을 지원하지 않음\n"
+
+#: fe-connect.c:5925
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "URI 구문 분석을 할 수 없음: \"%s\"\n"
+
+#: fe-connect.c:6002
+#, c-format
+msgid ""
+"end of string reached when looking for matching \"]\" in IPv6 host address "
+"in URI: \"%s\"\n"
+msgstr ""
+"URI의 IPv6 호스트 주소에서 \"]\" 매칭 검색을 실패했습니다, 해당 URI: \"%s\"\n"
+
+#: fe-connect.c:6009
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6 호스트 주소가 없습니다, 해당 URI: \"%s\"\n"
+
+#: fe-connect.c:6024
+#, c-format
+msgid ""
+"unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): "
+"\"%s\"\n"
+msgstr ""
+"잘못된 \"%c\" 문자가 URI 문자열 가운데 %d 번째 있습니다(\":\" 또는 \"/\" 문자"
+"가 있어야 함): \"%s\"\n"
+
+#: fe-connect.c:6153
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "키/밸류 구분자 \"=\" 문자가 필요함, 해당 URI 쿼리 매개변수: \"%s\"\n"
+
+#: fe-connect.c:6173
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "키/밸류 구분자 \"=\" 문자가 필요함, 해당 URI 쿼리 매개변수: \"%s\"\n"
+
+#: fe-connect.c:6224
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "잘못된 URL 쿼리 매개변수값: \"%s\"\n"
+
+#: fe-connect.c:6298
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "잘못된 퍼센트 인코드 토큰: \"%s\"\n"
+
+#: fe-connect.c:6308
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "퍼센트 인코드 값에 %%00 숨김 값이 있음: \"%s\"\n"
+
+#: fe-connect.c:6671
+msgid "connection pointer is NULL\n"
+msgstr "연결 포인터가 NULL\n"
+
+#: fe-connect.c:6967
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "경고: \"%s\" 패스워드 파일이 plain 파일이 아님\n"
+
+#: fe-connect.c:6976
+#, c-format
+msgid ""
+"WARNING: password file \"%s\" has group or world access; permissions should "
+"be u=rw (0600) or less\n"
+msgstr ""
+"경고: 패스워드 파일 \"%s\"에 그룹 또는 범용 액세스 권한이 있습니다. 권한은 "
+"u=rw(0600) 이하여야 합니다.\n"
+
+#: fe-connect.c:7084
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "\"%s\" 파일에서 암호를 찾을 수 없음\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "%d 번째 행(row)은 0..%d 범위를 벗어났음"
+
+#: fe-exec.c:505 fe-protocol2.c:497 fe-protocol2.c:532 fe-protocol2.c:1050
+#: fe-protocol3.c:206 fe-protocol3.c:233 fe-protocol3.c:250 fe-protocol3.c:330
+#: fe-protocol3.c:723 fe-protocol3.c:954
+msgid "out of memory"
+msgstr "메모리 부족"
+
+#: fe-exec.c:506 fe-protocol2.c:1396 fe-protocol3.c:1907
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:815
+msgid "write to server failed\n"
+msgstr "서버에 쓰기 실패\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "알림"
+
+#: fe-exec.c:954
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult 함수는 INT_MAX 튜플보다 많은 경우를 지원하지 않음"
+
+#: fe-exec.c:966
+msgid "size_t overflow"
+msgstr "size_t 초과"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "명령 문자열이 null 포인터\n"
+
+#: fe-exec.c:1307 fe-exec.c:1353 fe-exec.c:1448
+msgid "number of parameters must be between 0 and 65535\n"
+msgstr "매개변수값으로 숫자는 0에서 65535까지만 쓸 수 있음\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "실행 구문 이름이 null 포인트(값이 없음)입니다\n"
+
+#: fe-exec.c:1361 fe-exec.c:1524 fe-exec.c:2233 fe-exec.c:2435
+msgid "function requires at least protocol version 3.0\n"
+msgstr "함수는 적어도 버전 3의 프로토콜을 요구하고 있습니다\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "서버에 대한 연결이 없음\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "처리 중에 이미 다른 명령이 존재함\n"
+
+#: fe-exec.c:1600
+msgid "length must be given for binary parameter\n"
+msgstr "바이너리 자료 매개 변수를 사용할 때는 그 길이를 지정해야 함\n"
+
+#: fe-exec.c:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "기대되지 않은 동기화상태: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEVT_RESULTCREATE 이벤트 동안 PGEventProc \"%s\" 실패함\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "새 PQexec 호출로 COPY 작업이 중지 되었습니다"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "COPY IN 상태가 먼저 끝나야함\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "COPY OUT 상태가 먼저 끝나야함\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "COPY BOTH 작업 중에는 PQexec 사용할 수 없음\n"
+
+#: fe-exec.c:2325 fe-exec.c:2392 fe-exec.c:2482 fe-protocol2.c:1353
+#: fe-protocol3.c:1838
+msgid "no COPY in progress\n"
+msgstr "처리 가운데 COPY가 없음\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "잘못된 상태의 연결\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "잘못된 ExecStatusType 코드"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult가 오류 결과가 아님\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "%d 번째 열은 0..%d 범위를 벗어났음"
+
+#: fe-exec.c:2843
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "%d개의 매개 변수는 0..%d 범위를 벗어났음"
+
+#: fe-exec.c:3153
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "서버로부터 결과처리를 중지 시킬 수 없음: %s"
+
+#: fe-exec.c:3392 fe-exec.c:3476
+msgid "incomplete multibyte character\n"
+msgstr "완성되지 않은 멀티바이트 문자\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "GSSAPI 이름 가져오기 오류"
+
+#: fe-lobj.c:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "lo_truncate 함수의 OID를 결정할 수 없음\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "lo_truncate 함수의 인자값이 정수 범위가 아님\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "lo_truncate64 함수의 OID를 알 수 없음\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "lo_read 함수의 인자값이 정수 범위가 아님\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "lo_write 함수의 인자값이 정수 범위가 아님\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "lo_lseek64 함수의 OID를 알 수 없음\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "lo_create 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "lo_tell64 함수의 OID를 알 수 없음\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "\"%s\" 파일을 열 수 없음: %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "\"%s\" 파일을 읽을 수 없음: %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "\"%s\" 파일을 쓸 수 없음: %s\n"
+
+#: fe-lobj.c:946
+msgid "query to initialize large object functions did not return data\n"
+msgstr "large object function을 초기화 하는 쿼리가 데이터를 리턴하지 않았음\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "lo_open 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "lo_close 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "lo_create 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "lo_unlink 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "lo_lseek 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "lo_tell 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "loread 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "lowrite 함수의 OID 조사를 할 수 없음\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "%lu 정수형 크기는 pqGetInt 함수에서 지원하지 않음"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "%lu 정수형 크기는 pqPutInt 함수에서 지원하지 않음"
+
+#: fe-misc.c:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "연결 열기 실패\n"
+
+#: fe-misc.c:805 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:267 fe-secure.c:383
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"서버가 갑자기 연결을 닫았음\n"
+"\t이런 처리는 클라이언트의 요구를 처리하는 동안이나\n"
+"\t처리하기 전에 서버가 갑자기 종료되었음을 의미함\n"
+
+#: fe-misc.c:1063
+msgid "timeout expired\n"
+msgstr "시간 초과\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "잘못된 소켓\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() 실패: %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "잘못된 환경변수 상태 %c, 메모리 손상일 가능성이 큼\n"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "잘못된 상태 %c, 메모리 손상일 가능성이 큼\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "휴지(idle)동안 서버로 부터 0x%02x 형태 메시지를 받았음"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "비어있는 쿼리 응답(\"I\" 메시지)에 뒤이어 %c의 잘못된 문자가 있음"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid ""
+"server sent data (\"D\" message) without prior row description (\"T\" "
+"message)"
+msgstr ""
+"서버에서 먼저 행(row) 설명(\"T\" 메시지) 없이 자료(\"D\" 메시지)를 보냈음"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid ""
+"server sent binary data (\"B\" message) without prior row description (\"T\" "
+"message)"
+msgstr ""
+"서버에서 먼저 행(row) 설명(\"T\" 메시지) 없이 바이너리 자료(\"B\" 메시지)를 "
+"보냈음"
+
+#: fe-protocol2.c:626 fe-protocol3.c:408
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "서버로부터 예상치 못한 응답을 받았음; \"%c\" 문자를 첫문자로 받았음\n"
+
+#: fe-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:622 fe-protocol3.c:849
+msgid "out of memory for query result"
+msgstr "쿼리 결과 처리를 위한 메모리 부족"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "서버와의 동기화가 끊김, 연결을 재 시도함"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2095
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "프로토콜 오류: id=0x%x\n"
+
+#: fe-protocol3.c:365
+msgid ""
+"server sent data (\"D\" message) without prior row description (\"T\" "
+"message)\n"
+msgstr ""
+"서버에서 먼저 행(row) 설명(\"T\" 메시지) 없이 자료(\"D\" 메시지)를 보냈음\n"
+
+#: fe-protocol3.c:429
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "메시지 내용이 \"%c\" 메시지 형태의 길이를 허락하지 않음\n"
+
+#: fe-protocol3.c:449
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "서버와의 동기화가 끊김: \"%c\" 형태 길이 %d 메시지 받음\n"
+
+#: fe-protocol3.c:500 fe-protocol3.c:540
+msgid "insufficient data in \"T\" message"
+msgstr "\"T\" 메시지 안에 부족자 데이터"
+
+#: fe-protocol3.c:573
+msgid "extraneous data in \"T\" message"
+msgstr "\"T\" 메시지 안에 잘못된 데이터"
+
+#: fe-protocol3.c:686
+msgid "extraneous data in \"t\" message"
+msgstr "\"t\" 메시지 안에 잘못된 데이터"
+
+#: fe-protocol3.c:757 fe-protocol3.c:789 fe-protocol3.c:807
+msgid "insufficient data in \"D\" message"
+msgstr "\"D\" 메시지 안에 불충분한 데이터"
+
+#: fe-protocol3.c:763
+msgid "unexpected field count in \"D\" message"
+msgstr "\"D\" 메시지 안에 예상치 못한 필드 수"
+
+#: fe-protocol3.c:816
+msgid "extraneous data in \"D\" message"
+msgstr "\"D\" 메시지 안에 잘못된 데이터"
+
+#: fe-protocol3.c:1008
+msgid "no error message available\n"
+msgstr "보여줄 오류 메시지가 없음\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1056 fe-protocol3.c:1075
+#, c-format
+msgid " at character %s"
+msgstr " 위치: %s"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "상세정보: %s\n"
+
+#: fe-protocol3.c:1091
+#, c-format
+msgid "HINT: %s\n"
+msgstr "힌트: %s\n"
+
+#: fe-protocol3.c:1094
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "쿼리: %s\n"
+
+#: fe-protocol3.c:1101
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "구문: %s\n"
+
+#: fe-protocol3.c:1110
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "스키마 이름: %s\n"
+
+#: fe-protocol3.c:1114
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "테이블 이름: %s\n"
+
+#: fe-protocol3.c:1118
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "칼럼 이름: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "자료형 이름: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "제약조건 이름: %s\n"
+
+#: fe-protocol3.c:1138
+msgid "LOCATION: "
+msgstr "위치: "
+
+#: fe-protocol3.c:1140
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1337
+#, c-format
+msgid "LINE %d: "
+msgstr "줄 %d: "
+
+#: fe-protocol3.c:1732
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: text COPY OUT 작업을 할 수 없음\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "SSL 인증서의 이름에 null 문자가 있음\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "인증된 SSL 접속을 위해서는 호스트 이름을 지정해야 함\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr ""
+"서버 인증서의 이름 \"%s\"이(가) 호스트 이름 \"%s\"과(와) 일치하지 않음\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "서버 인증서에서 서버 호스트 이름을 찾을 수 없음\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPI 감싸기 오류"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "GSSAPI 송출 메시지는 기밀성을 사용하지 말아야함\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "클라이언트의 GSSAPI 패킷이 너무 큼 (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "서버의 GSSAPI 패킷이 너무 큼 (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPI 벗기기 오류"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "GSSAPI 수신 메시지는 기밀성을 사용하지 말아야 함\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "GSSAPI 보안 context 초기화 실패"
+
+#: fe-secure-gssapi.c:673
+msgid "GSSAPI size check error"
+msgstr "GSSAPI 크기 검사 오류"
+
+#: fe-secure-gssapi.c:684
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI context 설정 오류"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1291
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL 오류: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1295
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL 오류: EOF 감지됨\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1304
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL 오류: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL 연결이 예상치 못하게 끊김\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1354
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "알 수 없는 SSL 오류 코드: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "서버 인증서 서명 알고리즘을 알 수 없음\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "%s NID용 다이제스트를 찾을 수 없음\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "피어 인증 해시 값을 만들 수 없음\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "SSL 인증서의 이름 항목이 잘못됨\n"
+
+#: fe-secure-openssl.c:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "SSL context를 만들 수 없음: %s\n"
+
+#: fe-secure-openssl.c:854
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "잘못된 값: \"%s\", 대상: 최소 SSL 프로토콜 버전\n"
+
+#: fe-secure-openssl.c:865
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "최소 SSL 프로토콜 버전을 지정할 수 없음: %s\n"
+
+#: fe-secure-openssl.c:883
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "잘못된 값: \"%s\", 대상: 최대 SSL 프로토콜 버전\n"
+
+#: fe-secure-openssl.c:894
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "최대 SSL 프로토콜 버전을 지정할 수 없음: %s\n"
+
+#: fe-secure-openssl.c:930
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "\"%s\" 루트 인증서 파일을 읽을 수 없음: %s\n"
+
+#: fe-secure-openssl.c:974
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate "
+"verification.\n"
+msgstr ""
+"루트 인증서 파일이 있는 홈 디렉터리를 찾을 수 없음\n"
+"해당 파일을 제공하거나 서버 인증서 확인을 사용하지 않도록 sslmode를 변경하십"
+"시오.\n"
+
+#: fe-secure-openssl.c:978
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate "
+"verification.\n"
+msgstr ""
+"루트 인증서 파일 \"%s\"이(가) 없습니다.\n"
+"해당 파일을 제공하거나 서버 인증서 확인을 사용하지 않도록 sslmode를 변경하십"
+"시오.\n"
+
+#: fe-secure-openssl.c:1009
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "\"%s\" 인증서 파일을 열수 없음: %s\n"
+
+#: fe-secure-openssl.c:1028
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "\"%s\" 인증서 파일을 읽을 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "SSL 연결을 확립할 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1107
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "SSL 엔진 \"%s\"을(를) 로드할 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1119
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "SSL 엔진 \"%s\"을(를) 초기화할 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1135
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "개인 SSL 키 \"%s\"을(를) \"%s\" 엔진에서 읽을 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "개인 SSL 키 \"%s\"을(를) \"%s\" 엔진에서 읽을 수 없음: %s\n"
+
+#: fe-secure-openssl.c:1186
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "인증서가 있지만, \"%s\" 개인키가 아닙니다.\n"
+
+#: fe-secure-openssl.c:1194
+#, c-format
+msgid ""
+"private key file \"%s\" has group or world access; permissions should be "
+"u=rw (0600) or less\n"
+msgstr ""
+"개인 키 파일 \"%s\"에 그룹 또는 범용 액세스 권한이 있습니다. 권한은 "
+"u=rw(0600) 이하여야 합니다.\n"
+
+#: fe-secure-openssl.c:1219
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "\"%s\" 개인키 파일을 불러들일 수 없습니다: %s\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "인증서가 \"%s\" 개인키 파일과 맞지 않습니다: %s\n"
+
+#: fe-secure-openssl.c:1337
+#, c-format
+msgid ""
+"This may indicate that the server does not support any SSL protocol version "
+"between %s and %s.\n"
+msgstr ""
+"해당 서버는 SSL 프로토콜 버전 %s - %s 사이를 지원하지 않습니다.\n"
+
+#: fe-secure-openssl.c:1373
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "인증서를 구하질 못했습니다: %s\n"
+
+#: fe-secure-openssl.c:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "SSL 오류 없음이 보고됨"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL 오류 번호 %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "경고: sslpassword 삭제됨\n"
+
+#: fe-secure.c:275
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "서버로부터 데이터를 받지 못했음: %s\n"
+
+#: fe-secure.c:390
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "서버에 데이터를 보낼 수 없음: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "알 수 없는 소켓오류: 0x%08X/%d"
diff --git a/src/interfaces/libpq/po/ru.po b/src/interfaces/libpq/po/ru.po
new file mode 100644
index 0000000..6d265da
--- /dev/null
+++ b/src/interfaces/libpq/po/ru.po
@@ -0,0 +1,1465 @@
+# Russian message translation file for libpq
+# Copyright (C) 2001-2016 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Serguei A. Mokhov <mokhov@cs.concordia.ca>, 2001-2004.
+# Oleg Bartunov <oleg@sai.msu.su>, 2005.
+# Andrey Sudnik <sudnikand@yandex.ru>, 2010.
+# Alexander Lakhin <exclusion@gmail.com>, 2012-2017, 2018, 2019, 2020, 2021, 2022.
+# Maxim Yablokov <m.yablokov@postgrespro.ru>, 2021.
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-05-07 06:06+0300\n"
+"PO-Revision-Date: 2022-05-07 06:33+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "неправильное сообщение SCRAM (пустое содержимое)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "неправильное сообщение SCRAM (некорректная длина)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "не удалось проверить сигнатуру сервера\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "некорректная сигнатура сервера\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "ошибочное состояние обмена SCRAM\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "неправильное сообщение SCRAM (ожидался атрибут \"%c\")\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid ""
+"malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr ""
+"неправильное сообщение SCRAM (для атрибута \"%c\" ожидался символ \"=\")\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "не удалось сгенерировать разовый код\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3047 fe-exec.c:3230
+#: fe-exec.c:4003 fe-exec.c:4168 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:975 fe-protocol3.c:990 fe-protocol3.c:1023
+#: fe-protocol3.c:1731 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "нехватка памяти\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "не удалось оформить разовый код\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "не удалось вычислить подтверждение клиента\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "не удалось закодировать подтверждение клиента\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "неверный ответ SCRAM (несовпадение проверочного кода)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "неправильное сообщение SCRAM (некорректная соль)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "неправильное сообщение SCRAM (некорректное число итераций)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr ""
+"неправильное сообщение SCRAM (мусор в конце первого сообщения сервера)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "в ходе обмена SCRAM от сервера получена ошибка: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr ""
+"неправильное сообщение SCRAM (мусор в конце последнего сообщения сервера)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "неправильное сообщение SCRAM (неверная сигнатура сервера)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "недостаточно памяти для буфера GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "ошибка продолжения в GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "требуется указать имя сервера\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "повторный запрос аутентификации GSS\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "недостаточно памяти для буфера SSPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "ошибка продолжения в SSPI"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "повторный запрос аутентификации SSPI\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "не удалось получить удостоверение SSPI"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "требуется привязка каналов, но SSL не используется\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "повторный запрос аутентификации SASL\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "требуется привязка каналов, но клиент её не поддерживает\n"
+
+#: fe-auth.c:513
+msgid ""
+"server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr ""
+"сервер предложил аутентификацию SCRAM-SHA-256-PLUS для соединения, не "
+"защищённого SSL\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr ""
+"ни один из серверных механизмов аутентификации SASL не поддерживается\n"
+
+#: fe-auth.c:533
+msgid ""
+"channel binding is required, but server did not offer an authentication "
+"method that supports channel binding\n"
+msgstr ""
+"требуется привязка каналов, но сервер не предложил поддерживающий её метод "
+"аутентификации\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "недостаточно памяти для буфера SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid ""
+"AuthenticationSASLFinal received from server, but SASL authentication was "
+"not completed\n"
+msgstr ""
+"c сервера получено сообщение AuthenticationSASLFinal, но аутентификация SASL "
+"ещё не завершена\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "аутентификация SCM_CRED не поддерживается\n"
+
+#: fe-auth.c:836
+msgid ""
+"channel binding required, but server authenticated client without channel "
+"binding\n"
+msgstr ""
+"требуется привязка каналов, но сервер аутентифицировал клиента без привязки\n"
+
+#: fe-auth.c:842
+msgid ""
+"channel binding required but not supported by server's authentication "
+"request\n"
+msgstr ""
+"требуется привязка каналов, но она не поддерживается при том запросе "
+"аутентификации, который передал сервер\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "аутентификация Kerberos 4 не поддерживается\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "аутентификация Kerberos 5 не поддерживается\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "аутентификация через GSSAPI не поддерживается\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "аутентификация через SSPI не поддерживается\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "аутентификация Crypt не поддерживается\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "метод аутентификации %u не поддерживается\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "распознать имя пользователя не удалось (код ошибки: %lu)\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "найти локального пользователя по идентификатору (%d) не удалось: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "локальный пользователь с ID %d не существует\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "неожиданная форма набора результатов, возвращённого для SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "слишком длинное значение password_encryption\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "нераспознанный алгоритм шифрования пароля \"%s\"\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "не удалось сопоставить имена узлов (%d) со значениями hostaddr (%d)\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "не удалось сопоставить номера портов (%d) с узлами (%d)\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "неверное значение %s: \"%s\"\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "значение sslmode \"%s\" недопустимо для сборки без поддержки SSL\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "неверный диапазон версий протокола SSL\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid ""
+"gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr ""
+"значение gssencmode \"%s\" недопустимо для сборки без поддержки GSSAPI\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "не удалось перевести сокет в режим TCP-передачи без задержки: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "подключиться к серверу через сокет \"%s\" не удалось: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "подключиться к серверу \"%s\" (%s), порту %s не удалось: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "подключиться к серверу \"%s\", порту %s не удалось: "
+
+#: fe-connect.c:1772
+msgid ""
+"\tIs the server running locally and accepting connections on that socket?\n"
+msgstr ""
+"\tСервер действительно работает локально и принимает подключения через этот "
+"сокет?\n"
+
+#: fe-connect.c:1776
+msgid ""
+"\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr ""
+"\tСервер действительно работает по данному адресу и принимает TCP-"
+"соединения?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr ""
+"неверное целочисленное значение \"%s\" для параметра соединения \"%s\"\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "ошибка в %s(%s): %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "ошибка в %s(%s): код ошибки %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "неверное состояние соединения - возможно разрушение памяти\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "неверный номер порта: \"%s\"\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "преобразовать имя \"%s\" в адрес не удалось: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "не удалось разобрать сетевой адрес \"%s\": %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "длина пути Unix-сокета \"%s\" превышает предел (%d байт)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "преобразовать путь Unix-сокета \"%s\" в адрес не удалось: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "не удалось создать сокет: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "не удалось перевести сокет в неблокирующий режим: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr ""
+"не удалось перевести сокет в режим закрытия при выполнении (close-on-exec): "
+"%s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "параметр keepalives должен быть целым числом\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "не удалось получить статус ошибки сокета: %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "не удалось получить адрес клиента из сокета: %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "параметр requirepeer не поддерживается в этой ОС\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "не удалось получить учётные данные сервера: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr ""
+"requirepeer допускает подключение только к \"%s\", но сервер работает под "
+"именем \"%s\"\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "не удалось отправить пакет согласования GSSAPI: %s\n"
+
+#: fe-connect.c:2921
+msgid ""
+"GSSAPI encryption required but was impossible (possibly no credential cache, "
+"no server support, or using a local socket)\n"
+msgstr ""
+"затребовано шифрование GSSAPI, но это требование невыполнимо (возможно, "
+"отсутствует кеш учётных данных, нет поддержки на сервере или используется "
+"локальный сокет)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "не удалось отправить пакет согласования SSL: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "не удалось отправить стартовый пакет: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "затребовано подключение через SSL, но сервер не поддерживает SSL\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "получен неверный ответ при согласовании SSL: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "после ответа SSL получены незашифрованные данные\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "затребовано шифрование GSSAPI, но сервер его не поддерживает\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "получен неверный ответ при согласовании GSSAPI: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr ""
+"после ответа на запрос шифрования GSSAPI получены незашифрованные данные\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "ожидался запрос аутентификации от сервера, но получено: %c\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "неожиданное сообщение от сервера в начале работы\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "сеанс не допускает запись\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "сеанс допускает запись\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "сервер работает в режиме горячего резерва\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "сервер работает не в режиме горячего резерва\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "выполнить \"%s\" не удалось\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "неверное состояние соединения %d - возможно разрушение памяти\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "ошибка в PGEventProc \"%s\" при обработке события PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "некорректный адрес LDAP \"%s\": схема должна быть ldap://\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "некорректный адрес LDAP \"%s\": отсутствует уникальное имя\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "некорректный адрес LDAP \"%s\": должен быть только один атрибут\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr ""
+"некорректный адрес LDAP \"%s\": не указана область поиска (base/one/sub)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "некорректный адрес LDAP \"%s\": нет фильтра\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "некорректный адрес LDAP \"%s\": неверный номер порта\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "не удалось создать структуру LDAP\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "ошибка поиска на сервере LDAP: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "при поиске LDAP найдено более одного вхождения\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "при поиске LDAP ничего не найдено\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "атрибут не содержит значений при поиске LDAP\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "в строке соединения нет \"=\" после \"%s\"\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "неверный параметр соединения \"%s\"\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "в строке соединения не хватает закрывающей кавычки\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "определение службы \"%s\" не найдено\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "файл определений служб \"%s\" не найден\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "слишком длинная строка (%d) в файле определений служб \"%s\"\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "синтаксическая ошибка в файле определения служб \"%s\" (строка %d)\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid ""
+"nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr ""
+"рекурсивные определения служб не поддерживаются (файл определения служб \"%s"
+"\", строка %d)\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "во внутреннюю процедуру разбора строки передан ошибочный URI: \"%s\"\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid ""
+"end of string reached when looking for matching \"]\" in IPv6 host address "
+"in URI: \"%s\"\n"
+msgstr "URI не содержит символ \"]\" после адреса IPv6: \"%s\"\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6, содержащийся в URI, не может быть пустым: \"%s\"\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid ""
+"unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): "
+"\"%s\"\n"
+msgstr ""
+"неожиданный символ \"%c\" в позиции %d в URI (ожидалось \":\" или \"/\"): "
+"\"%s\"\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "лишний разделитель ключа/значения \"=\" в параметрах URI: \"%s\"\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "в параметрах URI не хватает разделителя ключа/значения \"=\": \"%s\"\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "неверный параметр в URI: \"%s\"\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "неверный символ, закодированный с %%: \"%s\"\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "недопустимое значение %%00 для символа, закодированного с %%: \"%s\"\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "нулевой указатель соединения\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: файл паролей \"%s\" - не обычный файл\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid ""
+"WARNING: password file \"%s\" has group or world access; permissions should "
+"be u=rw (0600) or less\n"
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: к файлу паролей \"%s\" имеют доступ все или группа; права "
+"должны быть u=rw (0600) или более ограниченные\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "пароль получен из файла \"%s\"\n"
+
+#: fe-exec.c:449 fe-exec.c:3304
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "номер записи %d вне диапазона 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:219 fe-protocol3.c:244 fe-protocol3.c:273
+#: fe-protocol3.c:291 fe-protocol3.c:371 fe-protocol3.c:743
+msgid "out of memory"
+msgstr "нехватка памяти"
+
+#: fe-exec.c:511 fe-protocol3.c:1939
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "ошибка при передаче данных серверу\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "ЗАМЕЧАНИЕ"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult не может вместить больше чем INT_MAX кортежей"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "переполнение size_t"
+
+#: fe-exec.c:1349 fe-exec.c:1454 fe-exec.c:1503
+msgid "command string is a null pointer\n"
+msgstr "указатель на командную строку нулевой\n"
+
+#: fe-exec.c:1460 fe-exec.c:1509 fe-exec.c:1605
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "число параметров должно быть от 0 до %d\n"
+
+#: fe-exec.c:1497 fe-exec.c:1599
+msgid "statement name is a null pointer\n"
+msgstr "указатель на имя оператора нулевой\n"
+
+#: fe-exec.c:1641 fe-exec.c:3157
+msgid "no connection to the server\n"
+msgstr "нет соединения с сервером\n"
+
+#: fe-exec.c:1650 fe-exec.c:3166
+msgid "another command is already in progress\n"
+msgstr "уже выполняется другая команда\n"
+
+#: fe-exec.c:1679
+msgid "cannot queue commands during COPY\n"
+msgstr "во время COPY нельзя добавлять команды в очередь\n"
+
+#: fe-exec.c:1797
+msgid "length must be given for binary parameter\n"
+msgstr "для двоичного параметра должна быть указана длина\n"
+
+#: fe-exec.c:2121
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "неожиданный asyncStatus: %d\n"
+
+#: fe-exec.c:2141
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "ошибка в PGEventProc \"%s\" при обработке события PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2289
+msgid ""
+"synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr ""
+"функции синхронного выполнения команд не допускаются в конвейерном режиме\n"
+
+#: fe-exec.c:2311
+msgid "COPY terminated by new PQexec"
+msgstr "операция COPY прервана вызовом PQexec"
+
+#: fe-exec.c:2328
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "вызов PQexec не допускается в процессе COPY BOTH\n"
+
+#: fe-exec.c:2556 fe-exec.c:2612 fe-exec.c:2681 fe-protocol3.c:1870
+msgid "no COPY in progress\n"
+msgstr "операция COPY не выполняется\n"
+
+#: fe-exec.c:2858
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfn не допускается в конвейерном режиме\n"
+
+#: fe-exec.c:2866
+msgid "connection in wrong state\n"
+msgstr "соединение в неправильном состоянии\n"
+
+#: fe-exec.c:2910
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "перейти в конвейерный режиме нельзя, соединение не простаивает\n"
+
+#: fe-exec.c:2944 fe-exec.c:2961
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "выйти из конвейерного режима нельзя, не собрав все результаты\n"
+
+#: fe-exec.c:2949
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "выйти из конвейерного режима в занятом состоянии нельзя\n"
+
+#: fe-exec.c:3091
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "отправить конвейер, не перейдя в конвейерный режим, нельзя\n"
+
+#: fe-exec.c:3193
+msgid "invalid ExecStatusType code"
+msgstr "неверный код ExecStatusType"
+
+#: fe-exec.c:3220
+msgid "PGresult is not an error result\n"
+msgstr "В PGresult не передан результат ошибки\n"
+
+#: fe-exec.c:3288 fe-exec.c:3311
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "номер столбца %d вне диапазона 0..%d"
+
+#: fe-exec.c:3326
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "номер параметра %d вне диапазона 0..%d"
+
+#: fe-exec.c:3636
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "не удалось интерпретировать ответ сервера: %s"
+
+#: fe-exec.c:3896 fe-exec.c:3985
+msgid "incomplete multibyte character\n"
+msgstr "неполный многобайтный символ\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "ошибка импорта имени в GSSAPI"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "определить OID функции %s нельзя\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "аргумент lo_truncate не умещается в обычном целом\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "аргумент lo_read не умещается в обычном целом\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "аргумент lo_write не умещается в обычном целом\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "не удалось открыть файл \"%s\": %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "не удалось прочитать файл \"%s\": %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "не удалось записать файл \"%s\": %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "запрос инициализации функций для больших объектов не вернул данные\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "функция pqGetInt не поддерживает integer размером %lu байт"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "функция pqPutInt не поддерживает integer размером %lu байт"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "соединение не открыто\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"сервер неожиданно закрыл соединение\n"
+"\tСкорее всего сервер прекратил работу из-за сбоя\n"
+"\tдо или в процессе выполнения запроса.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "тайм-аут\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "неверный сокет\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "ошибка в %s(): %s\n"
+
+#: fe-protocol3.c:196
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "от сервера во время простоя получено сообщение типа 0x%02x"
+
+#: fe-protocol3.c:403
+msgid ""
+"server sent data (\"D\" message) without prior row description (\"T\" "
+"message)\n"
+msgstr ""
+"сервер отправил данные (сообщение \"D\") без предварительного описания "
+"строки (сообщение \"T\")\n"
+
+#: fe-protocol3.c:446
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "неожиданный ответ сервера; первый полученный символ: \"%c\"\n"
+
+#: fe-protocol3.c:471
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "содержимое не соответствует длине в сообщении типа \"%c\"\n"
+
+#: fe-protocol3.c:491
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr ""
+"потеряна синхронизация с сервером: получено сообщение типа \"%c\", длина %d\n"
+
+#: fe-protocol3.c:543 fe-protocol3.c:583
+msgid "insufficient data in \"T\" message"
+msgstr "недостаточно данных в сообщении \"T\""
+
+#: fe-protocol3.c:654 fe-protocol3.c:860
+msgid "out of memory for query result"
+msgstr "недостаточно памяти для результата запроса"
+
+#: fe-protocol3.c:723
+msgid "insufficient data in \"t\" message"
+msgstr "недостаточно данных в сообщении \"t\""
+
+#: fe-protocol3.c:782 fe-protocol3.c:814 fe-protocol3.c:832
+msgid "insufficient data in \"D\" message"
+msgstr "недостаточно данных в сообщении \"D\""
+
+#: fe-protocol3.c:788
+msgid "unexpected field count in \"D\" message"
+msgstr "неверное число полей в сообщении \"D\""
+
+#: fe-protocol3.c:1036
+msgid "no error message available\n"
+msgstr "нет сообщения об ошибке\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1084 fe-protocol3.c:1103
+#, c-format
+msgid " at character %s"
+msgstr " символ %s"
+
+#: fe-protocol3.c:1116
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "ПОДРОБНОСТИ: %s\n"
+
+#: fe-protocol3.c:1119
+#, c-format
+msgid "HINT: %s\n"
+msgstr "ПОДСКАЗКА: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "ЗАПРОС: %s\n"
+
+#: fe-protocol3.c:1129
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "КОНТЕКСТ: %s\n"
+
+#: fe-protocol3.c:1138
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "СХЕМА: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "ТАБЛИЦА: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "СТОЛБЕЦ: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "ТИП ДАННЫХ: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "ОГРАНИЧЕНИЕ: %s\n"
+
+#: fe-protocol3.c:1166
+msgid "LOCATION: "
+msgstr "ПОЛОЖЕНИЕ: "
+
+#: fe-protocol3.c:1168
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1170
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1365
+#, c-format
+msgid "LINE %d: "
+msgstr "СТРОКА %d: "
+
+#: fe-protocol3.c:1764
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline можно вызывать только во время COPY OUT с текстом\n"
+
+#: fe-protocol3.c:2130
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "ошибка протокола: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "имя в SSL-сертификате включает нулевой байт\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "для проверенного SSL-соединения требуется указать имя узла\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr ""
+"серверный сертификат для \"%s\" не соответствует имени сервера \"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "не удалось получить имя сервера из сертификата\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "ошибка обёртывания сообщения в GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "исходящее сообщение GSSAPI не будет защищено\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "клиент попытался передать чрезмерно большой пакет GSSAPI (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "сервер передал чрезмерно большой пакет GSSAPI (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "ошибка развёртывания сообщения в GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "входящее сообщение GSSAPI не защищено\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "не удалось инициализировать контекст безопасности GSSAPI"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "ошибка проверки размера в GSSAPI"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "ошибка установления контекста в GSSAPI"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "ошибка SSL SYSCALL: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "ошибка SSL SYSCALL: конец файла (EOF)\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "ошибка SSL: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL-соединение было неожиданно закрыто\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "нераспознанный код ошибки SSL: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "не удалось определить алгоритм подписи сертификата сервера\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "не удалось найти алгоритм хеширования по NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "не удалось сгенерировать хеш сертификата сервера\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "запись имени в SSL-сертификате отсутствует\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "не удалось создать контекст SSL: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "неверное значение \"%s\" для минимальной версии протокола SSL\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "не удалось задать минимальную версию протокола SSL: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "неверное значение \"%s\" для максимальной версии протокола SSL\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "не удалось задать максимальную версию протокола SSL: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "не удалось прочитать файл корневых сертификатов \"%s\": %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate "
+"verification.\n"
+msgstr ""
+"не удалось получить домашний каталог для поиска файла корневых сертификатов\n"
+"Укажите полный путь к файлу или отключите проверку сертификата сервера, "
+"изменив sslmode.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate "
+"verification.\n"
+msgstr ""
+"файл корневых сертификатов \"%s\" не существует\n"
+"Укажите полный путь к файлу или отключите проверку сертификата сервера, "
+"изменив sslmode.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "не удалось открыть файл сертификата \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "не удалось прочитать файл сертификата \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "не удалось установить SSL-соединение: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr ""
+"не удалось задать SNI (Server Name Indication) для SSL-подключения: %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "не удалось загрузить модуль SSL ENGINE \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "не удалось инициализировать модуль SSL ENGINE \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "не удалось прочитать закрытый ключ SSL \"%s\" из модуля \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "не удалось загрузить закрытый ключ SSL \"%s\" из модуля \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "сертификат присутствует, но файла закрытого ключа \"%s\" нет\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "файл закрытого ключа \"%s\" - не обычный файл\n"
+
+#: fe-secure-openssl.c:1261
+#, c-format
+msgid "private key file \"%s\" must be owned by the current user or root\n"
+msgstr ""
+"файл закрытого ключа \"%s\" должен принадлежать root или текущему "
+"пользователю\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid ""
+"private key file \"%s\" has group or world access; file must have "
+"permissions u=rw (0600) or less if owned by the current user, or permissions "
+"u=rw,g=r (0640) or less if owned by root\n"
+msgstr ""
+"к файлу закрытого ключа \"%s\" имеют доступ все или группа; для него должны "
+"быть заданы разрешения u=rw (0600) или более строгие, если он принадлежит "
+"текущему пользователю, либо u=rw,g=r (0640) или более строгие, если он "
+"принадлежит root\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "не удалось загрузить файл закрытого ключа \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "сертификат не соответствует файлу закрытого ключа \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid ""
+"This may indicate that the server does not support any SSL protocol version "
+"between %s and %s.\n"
+msgstr ""
+"Это может указывать на то, что сервер не поддерживает ни одну версию "
+"протокола SSL между %s и %s.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "не удалось получить сертификат: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "нет сообщения об ошибке SSL"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "код ошибки SSL: %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: значение sslpassword усечено\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "не удалось получить данные с сервера: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "не удалось передать данные серверу: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "нераспознанная ошибка сокета: 0x%08X/%d"
+
+#~ msgid "invalid channel_binding value: \"%s\"\n"
+#~ msgstr "неверное значение channel_binding: \"%s\"\n"
+
+#~ msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+#~ msgstr "неверное значение ssl_min_protocol_version: \"%s\"\n"
+
+#~ msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+#~ msgstr "неверное значение ssl_max_protocol_version: \"%s\"\n"
+
+#~ msgid "invalid gssencmode value: \"%s\"\n"
+#~ msgstr "неверное значение gssencmode: \"%s\"\n"
+
+#~ msgid "invalid target_session_attrs value: \"%s\"\n"
+#~ msgstr "неверное значение target_session_attrs: \"%s\"\n"
+
+#~ msgid ""
+#~ "could not connect to server: %s\n"
+#~ "\tIs the server running on host \"%s\" (%s) and accepting\n"
+#~ "\tTCP/IP connections on port %s?\n"
+#~ msgstr ""
+#~ "не удалось подключиться к серверу: %s\n"
+#~ "\tОн действительно работает по адресу \"%s\" (%s)\n"
+#~ "\t и принимает TCP-соединения (порт %s)?\n"
+
+#~ msgid "setsockopt(%s) failed: %s\n"
+#~ msgstr "ошибка в setsockopt(%s): %s\n"
+
+#~ msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+#~ msgstr "ошибка в WSAIoctl(SIO_KEEPALIVE_VALS): %ui\n"
+
+#~ msgid "could not make a writable connection to server \"%s:%s\"\n"
+#~ msgstr ""
+#~ "не удалось установить подключение для чтения/записи к серверу \"%s:%s\"\n"
+
+#~ msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+#~ msgstr ""
+#~ "проверка \"SHOW transaction_read_only\" не пройдена на сервере \"%s:%s\"\n"
+
+#~ msgid "function requires at least protocol version 3.0\n"
+#~ msgstr "функция требует протокол минимум версии 3.0\n"
+
+#~ msgid "COPY IN state must be terminated first\n"
+#~ msgstr "сначала должно завершиться состояние COPY IN\n"
+
+#~ msgid "COPY OUT state must be terminated first\n"
+#~ msgstr "сначала должно завершиться состояние COPY OUT\n"
+
+#~ msgid "cannot determine OID of function lo_truncate\n"
+#~ msgstr "не удалось определить OID функции lo_truncate\n"
+
+#~ msgid "cannot determine OID of function lo_truncate64\n"
+#~ msgstr "не удалось определить OID функции lo_truncate64\n"
+
+#~ msgid "cannot determine OID of function lo_lseek64\n"
+#~ msgstr "не удалось определить OID функции lo_lseek64\n"
+
+#~ msgid "cannot determine OID of function lo_create\n"
+#~ msgstr "не удалось определить OID функции lo_create\n"
+
+#~ msgid "cannot determine OID of function lo_tell64\n"
+#~ msgstr "не удалось определить OID функции lo_tell64\n"
+
+#~ msgid "cannot determine OID of function lo_open\n"
+#~ msgstr "не удалось определить OID функции lo_open\n"
+
+#~ msgid "cannot determine OID of function lo_creat\n"
+#~ msgstr "не удалось определить OID функции lo_creat\n"
+
+#~ msgid "cannot determine OID of function lo_unlink\n"
+#~ msgstr "не удалось определить OID функции lo_unlink\n"
+
+#~ msgid "cannot determine OID of function lo_lseek\n"
+#~ msgstr "не удалось определить OID функции lo_lseek\n"
+
+#~ msgid "cannot determine OID of function loread\n"
+#~ msgstr "не удалось определить OID функции loread\n"
+
+#~ msgid "cannot determine OID of function lowrite\n"
+#~ msgstr "не удалось определить OID функции lowrite\n"
+
+#~ msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+#~ msgstr "неверное состояние setenv %c - возможно разрушение памяти\n"
+
+#~ msgid "invalid state %c, probably indicative of memory corruption\n"
+#~ msgstr "неверное состояние %c - возможно разрушение памяти\n"
+
+#~ msgid ""
+#~ "unexpected character %c following empty query response (\"I\" message)"
+#~ msgstr "неожиданный символ %c вслед за пустым ответом (сообщение \"I\")"
+
+#~ msgid ""
+#~ "server sent data (\"D\" message) without prior row description (\"T\" "
+#~ "message)"
+#~ msgstr ""
+#~ "сервер отправил данные (сообщение \"D\") без предварительного описания "
+#~ "строки (сообщение \"T\")"
+
+#~ msgid ""
+#~ "server sent binary data (\"B\" message) without prior row description (\"T"
+#~ "\" message)"
+#~ msgstr ""
+#~ "сервер отправил двоичные данные (сообщение \"B\") без предварительного "
+#~ "описания строки (сообщение \"T\")"
+
+#~ msgid "lost synchronization with server, resetting connection"
+#~ msgstr "потеряна синхронизация с сервером; попытка восстановить соединение"
+
+#~ msgid "extraneous data in \"T\" message"
+#~ msgstr "лишние данные в сообщении \"T\""
+
+#~ msgid "extraneous data in \"t\" message"
+#~ msgstr "лишние данные в сообщении \"t\""
+
+#~ msgid "extraneous data in \"D\" message"
+#~ msgstr "лишние данные в сообщении \"D\""
+
+#~ msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+#~ msgstr "Библиотека SSL не поддерживает проверку CRL (файл \"%s\")\n"
+
+#~ msgid "could not get home directory to locate password file\n"
+#~ msgstr "не удалось получить домашний каталог для загрузки файла паролей\n"
+
+#~ msgid "could not get home directory to locate service definition file"
+#~ msgstr ""
+#~ "не удалось получить домашний каталог для загрузки файла определений служб"
+
+#~ msgid "setsockopt(TCP_KEEPIDLE) failed: %s\n"
+#~ msgstr "ошибка в setsockopt(TCP_KEEPIDLE): %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPALIVE) failed: %s\n"
+#~ msgstr "ошибка в setsockopt(TCP_KEEPALIVE): %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPINTVL) failed: %s\n"
+#~ msgstr "ошибка в setsockopt(TCP_KEEPINTVL): %s\n"
+
+#~ msgid "setsockopt(SO_KEEPALIVE) failed: %s\n"
+#~ msgstr "ошибка в setsockopt(SO_KEEPALIVE): %s\n"
+
+#~ msgid "could not acquire mutex: %s\n"
+#~ msgstr "не удалось заблокировать семафор: %s\n"
+
+#~ msgid "socket not open\n"
+#~ msgstr "сокет не открыт\n"
+
+#~ msgid "unrecognized return value from row processor"
+#~ msgstr "процессор строк вернул нераспознанное значение"
+
+#~ msgid "could not restore nonblocking mode on socket: %s\n"
+#~ msgstr "не удалось вернуть сокет в неблокирующий режим: %s\n"
+
+#~ msgid "Kerberos 5 authentication rejected: %*s\n"
+#~ msgstr "аутентификация Kerberos 5 не пройдена: %*s\n"
+
+#~ msgid "could not set socket to blocking mode: %s\n"
+#~ msgstr "не удалось перевести сокет в блокирующий режим: %s\n"
diff --git a/src/interfaces/libpq/po/sv.po b/src/interfaces/libpq/po/sv.po
new file mode 100644
index 0000000..8c84415
--- /dev/null
+++ b/src/interfaces/libpq/po/sv.po
@@ -0,0 +1,1225 @@
+# Swedish message translation file for libpq
+# Peter Eisentraut <peter_e@gmx.net>, 2001, 2010.
+# Dennis Björklund <db@zigo.dhs.org>, 2002, 2003, 2004, 2005, 2006, 2017, 2018, 2019, 2020, 2021, 2022.
+#
+# Use these quotes: "%s"
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-04 09:26+0000\n"
+"PO-Revision-Date: 2022-08-04 12:19+0200\n"
+"Last-Translator: Dennis Björklund <db@zigo.dhs.org>\n"
+"Language-Team: Swedish <pgsql-translators@postgresql.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "felaktigt SCRAM-meddelande (tomt meddelande)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "felaktigt SCRAM-meddelande (längden stämmer inte)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "kunde inte verifiera serversignaturen\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "felaktig serversignatur\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "ogiltig SCRAM-utbytesstatus\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "felaktigt SCRAM-meddelande (förväntade attribut %c)\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "felaktigt SCRAM-meddelande (förväntade tecken \"=\" för attribut '%c')\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "kunde inte skapa engångsnummer\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3125 fe-exec.c:3309
+#: fe-exec.c:4082 fe-exec.c:4247 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:979 fe-protocol3.c:994 fe-protocol3.c:1027
+#: fe-protocol3.c:1735 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "slut på minne\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "kunde inte koda engångsnummer\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "kunde inte räkna ut klientbevis\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "kunde inte koda klientbevis\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "ogiltigt SCRAM-svar (engångsnummer matchar inte)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "felaktigt SCRAM-meddelande (ogiltigt salt)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "felaktigt SCRAM-meddelande (ogiltig iterationsräknare)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "felaktigt SCRAM-meddelande (skräp i slutet på server-first-message)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "fel mottaget från server i SCRAM-utbyte: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "felaktigt SCRAM-meddelande (skräp i slutet av server-final-message)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "felaktigt SCRAM-meddelande (ogiltigt serversignatur)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "slut på minne vid allokering av buffer till GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI fortsättningsfel"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "värdnamn måste anges\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "duplicerad autentiseringsbegäran från GSS\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "slut på minne vid allokering av buffer till GSSAPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "SSPI fortsättningsfel"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "duplicerad autentiseringsbegäran från SSPI\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "kunde inte hämta SSPI-referenser"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "kräver kanalbindning, men SSL används inte\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "duplicerad autentiseringsbegäran från SASL\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "kanalbindning krävs men klienten stöder inte det\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "servern erbjöd SCRAM-SHA-256-PLUS-autentisering över en icke-SSL-anslutning\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "ingen av serverns SASL-autentiseringsmekanismer stöds\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "kräver kanalbindning, men servern erbjöd ingen autentiseringsmetod som stöder kanalbindning\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "slut på minne vid allokering av buffer till SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "mottog AuthenticationSASLFinal från server, men SASL-autentisering slutfördes ej\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "autentiseringsmetoden SCM_CRED stöds ej\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "kräver kanalbindning, men servern autentiserade klienten utan kanalbindning\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "kanalbindning krävs men stöds inte av serverns autentiseringsförfrågan\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos-4-autentisering stöds ej\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos-5-autentisering stöds ej\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI-autentisering stöds ej\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI-autentisering stöds ej\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "Crypt-autentisering stöds ej\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "autentiseringsmetod %u stöds ej\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "misslyckad sökning efter användarnamn: felkod %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "kunde inte slå upp lokalt användar-id %d: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "lokal användare med ID %d existerar inte\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "oväntad form på resultatmängden som returnerades för SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "password_encryption-värdet är för långt\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "okänd lösenordskrypteringsalgoritm \"%s\"\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "kunde inte matcha %d värdnamn till %d värdadresser\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "kunde inte matcha %d portnummer med %d värdar\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "ogiltigt %s-värde: \"%s\"\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "värde för ssl-läge, \"%s\", är ogiltigt när SSL-stöd inte kompilerats in\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "ogiltigt intervall för SSL-protokollversion\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "värde för gssenc-läge, \"%s\", är ogiltigt när GSSAPI-stöd inte kompilerats in\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "kunde inte sätta uttag (socket) till läget TCP-ingen-fördröjning: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "anslutning till server på uttag \"%s\" misslyckades: "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "anslutning til server på \"%s\" (%s), port %s misslyckades: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "anslutning till server på \"%s\", port %s misslyckades: "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr ""
+"\tKör servern lokalt och accepterar den\n"
+"\tanslutningar till detta uttag (socket)?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tKör servern på den värden och accepterar den TCP/IP-anslutningar?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "ogiltigt heltalsvärde \"%s\" för anslutningsflagga \"%s\"\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s) misslyckades: %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) misslyckades: felkod %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "ogiltigt tillstånd i anslutning, antagligen korrupt minne\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "ogiltigt portnummer \"%s\"\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "kunde inte översätta värdnamn \"%s\" till adress: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "kunde inte parsa nätverksadress \"%s\": %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Sökväg till unixdomänuttag \"%s\" är för lång (maximalt %d byte)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "kunde inte översätta sökväg till unix-uttag (socket) \"%s\" till adress: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "kan inte skapa uttag: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "kunde inte sätta uttag (socket) till ickeblockerande läge: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "kunde inte ställa in uttag (socket) i \"close-on-exec\"-läge: %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepalives-parameter måste vara ett heltal\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "kunde inte hämta felstatus för uttag (socket): %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "kunde inte få tag på klientadressen från uttag (socket): %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "requirepeer-parameter stöds inte på denna plattform\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "kunde inte hämta andra sidans referenser: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer anger \"%s\", men andra sidans användarnamn är \"%s\"\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "kunde inte skicka GSSAPI-paket för uppkopplingsförhandling: %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "GSSAPI-kryptering krävdes men var omöjligt (kanske ingen credential-cache, inget serverstöd eller använder ett lokalt uttag)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "kunde inte skicka SSL-paket för uppkopplingsförhandling: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "kan inte skicka startpaketet: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "SSL stöds inte av servern, men SSL krävdes\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "tog emot ogiltigt svar till SSL-uppkopplingsförhandling: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "tog emot okrypterad data efter SSL-svar\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "GSSAPI stöds inte av servern, men det krävdes\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "tog emot ogiltigt svar till GSSAPI-uppkopplingsförhandling: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "tog emot okrypterad data efter GSSAPI-krypteringssvar\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "förväntade autentiseringsförfrågan från servern, men fick %c\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "oväntat meddelande från servern under starten\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "sessionen är i readonly-läge\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "sessionen är inte i readonly-läge\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "servern är i varmt standby-läge\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "servern är inte i varmt standby-läge\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "\"%s\" misslyckades\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "ogiltigt tillstånd %d i anslutning, antagligen korrupt minne\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc \"%s\" misslyckades under PGEVT_CONNRESET-händelse\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "ogiltig LDAP URL \"%s\": schemat måste vara ldap://\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "ogiltig LDAP URL \"%s\": saknar urskiljbart namn\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "ogiltig LDAP URL \"%s\": måste finnas exakt ett attribut\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "ogiltig LDAP URL \"%s\": måste ha sök-scope (base/one/sub)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "ogiltigt LDAP URL \"%s\": inget filter\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "ogiltig LDAP URL \"%s\": ogiltigt portnummer\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "kunde inte skapa LDAP-struktur\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "uppslagning av LDAP-server misslyckades: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "mer än en post hittad i LDAP-uppslagning\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "ingen post hittad i LDAP-uppslagning\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "attributet har inga värden i LDAP-uppslagning\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "\"=\" efter \"%s\" saknas i anslutningssträng\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "ogiltig anslutningsparameter \"%s\"\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "icke terminerad sträng i uppkopplingsinformationen\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "definition av service \"%s\" hittades inte\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "servicefil \"%s\" hittades inte\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "rad %d för lång i servicefil \"%s\"\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "syntaxfel i servicefel \"%s\", rad %d\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "nästlade servicespecifikationer stöds inte i servicefil \"%s\", rad %d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "ogiltig URI propagerad till intern parsningsrutin: \"%s\"\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "nådde slutet på strängen när vi letade efter matchande \"]\" i IPv6-värdadress i URI: \"%s\"\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6-värdadress får ej vara tom i URI: \"%s\"\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "oväntat tecken \"%c\" vid position %d i URI (förväntade \":\" eller \"/\"): \"%s\"\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "extra nyckel/värde-separator \"=\" i URI-frågeparameter: \"%s\"\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "saknar nyckel/värde-separator \"=\" i URI-frågeparameter: \"%s\"\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "ogiltig URI-frågeparameter: \"%s\"\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "ogiltigt procent-kodad symbol: \"%s\"\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "förbjudet värde %%00 i procentkodat värde: \"%s\"\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "anslutningspekare är NULL\n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "FEL: lösenordsfil \"%s\" är inte en vanlig fil\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "VARNING: lösenordsfilen \"%s\" har läsrättigheter för gruppen eller världen; rättigheten skall vara u=rw (0600) eller mindre\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "lösenord hämtat från fil \"%s\"\n"
+
+#: fe-exec.c:449 fe-exec.c:3383
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "radnummer %d är utanför giltigt intervall 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:207 fe-protocol3.c:232 fe-protocol3.c:261
+#: fe-protocol3.c:279 fe-protocol3.c:375 fe-protocol3.c:747
+msgid "out of memory"
+msgstr "slut på minne"
+
+#: fe-exec.c:511 fe-protocol3.c:1943
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "skrivning till servern misslyckades\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "NOTIS"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult stöder inte mer än INT_MAX tupler"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "size_t-överspill"
+
+#: fe-exec.c:1351 fe-exec.c:1477 fe-exec.c:1526
+msgid "command string is a null pointer\n"
+msgstr "kommandosträngen är en null-pekare\n"
+
+#: fe-exec.c:1483 fe-exec.c:1532 fe-exec.c:1628
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "antal parametrar måste vara mellan 0 och %d\n"
+
+#: fe-exec.c:1520 fe-exec.c:1622
+msgid "statement name is a null pointer\n"
+msgstr "satsens namn är en null-pekare\n"
+
+#: fe-exec.c:1664 fe-exec.c:3236
+msgid "no connection to the server\n"
+msgstr "inte förbunden till servern\n"
+
+#: fe-exec.c:1673 fe-exec.c:3245
+msgid "another command is already in progress\n"
+msgstr "ett annat kommando pågår redan\n"
+
+#: fe-exec.c:1704
+msgid "cannot queue commands during COPY\n"
+msgstr "kan inte köa kommandon när COPY körs\n"
+
+#: fe-exec.c:1822
+msgid "length must be given for binary parameter\n"
+msgstr "längden måste anges för en binär parameter\n"
+
+#: fe-exec.c:2149
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "oväntad asyncStatus: %d\n"
+
+#: fe-exec.c:2185
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc \"%s\" misslyckades under PGEVT_RESULTCREATE-händelse\n"
+
+#: fe-exec.c:2333
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "synkrona kommandoexekveringsfunktioner tillåts inte i pipeline-läge\n"
+
+#: fe-exec.c:2355
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminerad av ny PQexec"
+
+#: fe-exec.c:2372
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec tillåts inte under COPY BOTH\n"
+
+#: fe-exec.c:2600 fe-exec.c:2656 fe-exec.c:2725 fe-protocol3.c:1874
+msgid "no COPY in progress\n"
+msgstr "ingen COPY pågår\n"
+
+#: fe-exec.c:2902
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfn tillåts inte i pipeline-läge\n"
+
+#: fe-exec.c:2910
+msgid "connection in wrong state\n"
+msgstr "anslutning i felaktigt tillstånd\n"
+
+#: fe-exec.c:2954
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "kan inte byta till pipeline-läge, anslutningen är inte inaktiv\n"
+
+#: fe-exec.c:2991 fe-exec.c:3015
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "kan inte anvsluta pipeline-läge när alla svar inte tagits emot\n"
+
+#: fe-exec.c:2996
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "är upptagen och kan inte avsluta pipeline-läge\n"
+
+#: fe-exec.c:3008
+msgid "cannot exit pipeline mode while in COPY\n"
+msgstr "kan inte avsluta pipeline-läge inne i en COPY\n"
+
+#: fe-exec.c:3169
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "kan inte skicka en pipeline när vi inte är i pipeline-läge\n"
+
+#: fe-exec.c:3272
+msgid "invalid ExecStatusType code"
+msgstr "ogiltig ExecStatusType-kod"
+
+#: fe-exec.c:3299
+msgid "PGresult is not an error result\n"
+msgstr "PGresult är inte ett felresultat\n"
+
+#: fe-exec.c:3367 fe-exec.c:3390
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "kolumnnummer %d är utanför giltigt intervall 0..%d"
+
+#: fe-exec.c:3405
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "parameter nummer %d är utanför giltigt intervall 0..%d"
+
+#: fe-exec.c:3715
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "kunde inte tolka svaret från servern: %s"
+
+#: fe-exec.c:3975 fe-exec.c:4064
+msgid "incomplete multibyte character\n"
+msgstr "ofullständigt multibyte-tecken\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "GSSAPI-fel vid import av namn"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "kan inte ta reda på OID för funktionen %s\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "argumentet till lo_truncate överskrider heltalsintervallet\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "ett argument till lo_read överskriver heltalsintervallet\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "ett argument till lo_write överskriver heltalsintervallet\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "kan inte öppna fil \"%s\": %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "kunde inte läsa från fil \"%s\": %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "kan inte skriva till fil \"%s\": %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "fråga för att initiera stort objekt-funktion returnerade ingen data\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "heltal med storlek %lu stöds inte av pqGetInt"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "heltal med storlek %lu stöds inte av pqPutInt"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "anslutningen är inte öppen\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"servern stängde oväntat ner uppkopplingen\n"
+"\tTroligen så terminerade servern pga något fel antingen\n"
+"\tinnan eller under tiden den bearbetade en förfrågan.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "timeout utgången\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "ogiltigt uttag\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s() misslyckades: %s\n"
+
+#: fe-protocol3.c:184
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "meddelandetyp 0x%02x kom från server under viloperiod"
+
+#: fe-protocol3.c:407
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "servern skickade data (meddelande \"D\") utan att först skicka en radbeskrivning (meddelande \"T\")\n"
+
+#: fe-protocol3.c:450
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "oväntat svar för servern; första mottagna tecknet var \"%c\"\n"
+
+#: fe-protocol3.c:475
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "meddelandeinnehåll stämmer inte med längden för meddelandetyp \"%c\"\n"
+
+#: fe-protocol3.c:495
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "tappade synkronisering med servern: fick meddelandetyp \"%c\", längd %d\n"
+
+#: fe-protocol3.c:547 fe-protocol3.c:587
+msgid "insufficient data in \"T\" message"
+msgstr "otillräckligt med data i \"T\"-meddelande"
+
+#: fe-protocol3.c:658 fe-protocol3.c:864
+msgid "out of memory for query result"
+msgstr "slut på minnet för frågeresultat"
+
+#: fe-protocol3.c:727
+msgid "insufficient data in \"t\" message"
+msgstr "otillräckligt med data i \"t\"-meddelande"
+
+#: fe-protocol3.c:786 fe-protocol3.c:818 fe-protocol3.c:836
+msgid "insufficient data in \"D\" message"
+msgstr "otillräckligt med data i \"D\"-meddelande"
+
+#: fe-protocol3.c:792
+msgid "unexpected field count in \"D\" message"
+msgstr "oväntat fältantal i \"D\"-meddelande"
+
+#: fe-protocol3.c:1040
+msgid "no error message available\n"
+msgstr "inget felmeddelande finns tillgängligt\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1088 fe-protocol3.c:1107
+#, c-format
+msgid " at character %s"
+msgstr " vid tecken %s"
+
+#: fe-protocol3.c:1120
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETALJ: %s\n"
+
+#: fe-protocol3.c:1123
+#, c-format
+msgid "HINT: %s\n"
+msgstr "TIPS: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "FRÅGA: %s\n"
+
+#: fe-protocol3.c:1133
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "KONTEXT: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMANAMN: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABELLNAMN: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "KOLUMNNAMN: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATATYPNAMN: %s\n"
+
+#: fe-protocol3.c:1158
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "VILLKORSNAMN: %s\n"
+
+#: fe-protocol3.c:1170
+msgid "LOCATION: "
+msgstr "PLATS: "
+
+#: fe-protocol3.c:1172
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1174
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1369
+#, c-format
+msgid "LINE %d: "
+msgstr "RAD %d: "
+
+#: fe-protocol3.c:1768
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: utför inte text-COPY OUT\n"
+
+#: fe-protocol3.c:2134
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "protokollfel: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "SSL-certifikatets namn innehåller null-värden\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "värdnamn måste anges för en verifierad SSL-anslutning\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "servercertifikat för \"%s\" matchar inte värdnamn \"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "kan inte hämta ut serverns värdnamn från servercertifikatet\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPI-fel vid inpackning"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "utgående GSSAPI-meddelande skulle inte använda sekretess\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "klienten försöke skicka för stort GSSAPI-paket (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "för stort GSSAPI-paket skickat av servern (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPI-fel vid uppackning"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "inkommande GSSAPI-meddelande använde inte sekretess\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "kunde inte initiera GSSAPI-säkerhetskontext"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "GSSAPI-fel vid kontroll av storlek"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI-fel vid skapande av kontext"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL fel: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL-fel: EOF upptäckt\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL-fel: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL-anslutning har oväntat stängts\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "okänd SSL-felkod: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "kunde inte lista ut serverns algoritm för certifikatsignering\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "kunde inte hitta kontrollsumma för NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "kunde inte generera peer-certifikathash\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "SSL-certifikatets namnpost saknas\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "kan inte skapa SSL-omgivning: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "ogiltigt värde \"%s\" för minimal SSL-protokollversion\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "kunde inte sätta minimal SSL-protokollversion: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "ogiltigt värde \"%s\" för maximal SSL-protokollversion\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "kunde inte sätta maximal SSL-protokollversion: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "kunde inte läsa root-certifikatfilen \"%s\": %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"kunde inte hämta hemkatalogen för att lokalisera root-certifikatfilen\n"
+"Antingen tillhandahåll filen eller ändra sslmode för att stänga av serverns certifikatverifiering.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"root-certifikatfilen \"%s\" finns inte\n"
+"Antingen tillhandahåll filen eller ändra sslmode för att stänga av serverns certifikatverifiering.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "kunde inte öppna certifikatfil \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "kunde inte läsa certifikatfil \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "kan inte skapa SSL-anslutning: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "kunde inte sätta SSL servernamnsindikering (SNI): %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "kunde inte ladda SSL-motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "kunde inte initiera SSL-motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "kunde inte läsa privat SSL-nyckel \"%s\" från motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "kunde inte ladda privat SSL-nyckel \"%s\" från motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "certifikat tillgängligt, men inte den privata nyckelfilen \"%s\"\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "privat nyckelfilen \"%s\" är inte en vanlig fil\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "privata nyckelfilen \"%s\" har grupp- eller världsrättigheter; filen måste ha rättigheterna u=rw (0600) eller mindre om den ägs av databasanvändaren eller rättigheterna u=rw,g=r (0640) eller mindre om den ägs av root.\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "kunde inte ladda privata nyckelfilen \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "certifikatet matchar inte den privata nyckelfilen \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Detta kan tyda på att servern inte stöder någon SSL-protokolversion mellan %s och %s.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "certifikatet kunde inte hämtas: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "inget SSL-fel rapporterat"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL-felkod %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "VARNING: sslpassword trunkerat\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "kan inte ta emot data från servern: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "kan inte skicka data till servern: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "okänt uttagsfel: 0x%08X/%d"
diff --git a/src/interfaces/libpq/po/uk.po b/src/interfaces/libpq/po/uk.po
new file mode 100644
index 0000000..962ea65
--- /dev/null
+++ b/src/interfaces/libpq/po/uk.po
@@ -0,0 +1,1212 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-06-16 03:55+0000\n"
+"PO-Revision-Date: 2022-06-19 10:10\n"
+"Last-Translator: \n"
+"Language-Team: Ukrainian\n"
+"Language: uk_UA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
+"X-Crowdin-Project: postgresql\n"
+"X-Crowdin-Project-ID: 324573\n"
+"X-Crowdin-Language: uk\n"
+"X-Crowdin-File: /REL_14_STABLE/libpq.pot\n"
+"X-Crowdin-File-ID: 774\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "неправильне повідомлення SCRAM (пусте повідомлення)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "неправильне повідомлення SCRAM (невідповідність довжини)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "не вдалося перевірити підпис сервера\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "невірний підпис сервера\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "неприпустимий стан обміну SCRAM\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "неправильне повідомлення SCRAM (очікувався атрибут \"%c\")\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "неправильне повідомлення SCRAM (очікувався символ \"=\" для атрибута \"%c\")\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "не вдалося згенерувати одноразовий ідентифікатор\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1460 fe-connect.c:1629 fe-connect.c:2981
+#: fe-connect.c:4711 fe-connect.c:4972 fe-connect.c:5091 fe-connect.c:5343
+#: fe-connect.c:5424 fe-connect.c:5523 fe-connect.c:5779 fe-connect.c:5808
+#: fe-connect.c:5880 fe-connect.c:5904 fe-connect.c:5922 fe-connect.c:6023
+#: fe-connect.c:6032 fe-connect.c:6390 fe-connect.c:6540 fe-connect.c:6806
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3047 fe-exec.c:3230
+#: fe-exec.c:4003 fe-exec.c:4168 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:975 fe-protocol3.c:990 fe-protocol3.c:1023
+#: fe-protocol3.c:1731 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "недостатньо пам'яті\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "не вдалося закодувати одноразовий ідентифікатор\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "не вдалося обчислити підтвердження клієнта\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "не вдалося закодувати підтвердження клієнта\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "неприпустима відповідь SCRAM (невідповідність одноразового ідентифікатора)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "неправильне повідомлення SCRAM (неприпустима сіль)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "неправильне повідомлення SCRAM (неприпустима кількість ітерацій)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "неправильне повідомлення SCRAM (сміття в кінці першого повідомлення сервера)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "отримано помилку від сервера під час обміну SCRAM: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "неправильне повідомлення SCRAM (сміття в кінці останнього повідомлення сервера)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "неправильне повідомлення SCRAM (неприпустимий підпис сервера)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "недостатньо пам'яті для буфера GSSAPI (%d)\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "Помилка продовження у GSSAPI"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "потрібно вказати ім’я хоста\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "дублікат запиту автентифікації GSS\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "недостатньо пам'яті для буфера SSPI (%d)\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "Помилка продовження SSPI"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "дублікат запиту автентифікації SSPI\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "не вдалось отримати облікові дані SSPI"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "необхідно зв’язування каналів, але SSL не використовується\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "дублікат запиту автентифікації SASL\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "потрібно зв'язування каналів, але клієнт не підтримує його\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "сервер запропонував автентифікацію SCRAM-SHA-256-PLUS через підключення без SSL\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "жоден з серверних механізмів автентифікації SASL не підтримується\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "потрібно зв'язування каналів, але сервер не запропонував метод аутентифікації, який підтримує зв’язування каналів\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "недостатньо пам'яті для буфера SASL (%d)\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "Від сервера отримано AuthenticationSASLFinal, але автентифікація SASL не була завершена\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "Спосіб автентифікації SCM_CRED не підтримується\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "потрібно зв'язування каналів, але сервер автентифікував клієнта без зв’язування каналів\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "потрібно зв'язування каналів, але не підтримується запитом на аутентифікацію сервера\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Автентифікація Kerberos 4 не підтримується\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Автентифікація Kerberos 5 не підтримується\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "Автентифікація GSSAPI не підтримується\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "Автентифікація SSPI не підтримується\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "Автентифікація Crypt не підтримується\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "спосіб автентифікації %u не підтримується\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "невдала підстановка імені користувача: код помилки %lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2856
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "не вдалося знайти локального користувача за ідентифікатором: %d: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2861
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "локального користувача з ідентифікатором %d не існує\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "неочікувану форму набору результатів повернуто для SHOW\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "занадто довге значення password_encryption \n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "нерозпізнаний алгоритм шифрування пароля \"%s\"\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "не вдалося зіставити %d імен хостів зі %d значеннями hostaddr\n"
+
+#: fe-connect.c:1180
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "не вдалося зіставити %d номерів портів з %d хостами\n"
+
+#: fe-connect.c:1273 fe-connect.c:1299 fe-connect.c:1341 fe-connect.c:1350
+#: fe-connect.c:1383 fe-connect.c:1427
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "неприпустиме значення %s : \"%s\"\n"
+
+#: fe-connect.c:1320
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "значення sslmode \"%s\" неприпустиме, якщо підтримку протоколу SSL не скомпільовано\n"
+
+#: fe-connect.c:1368
+msgid "invalid SSL protocol version range\n"
+msgstr "неприпустимий діапазон версії протоколу SSL\n"
+
+#: fe-connect.c:1393
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "значення gssencmode \"%s\" неприпустиме, якщо підтримку протоколу GSSAPI не скомпільовано\n"
+
+#: fe-connect.c:1653
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "не вдалося встановити сокет у TCP-режим без затримки: %s\n"
+
+#: fe-connect.c:1715
+#, c-format
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "помилка при з'єднанні з сервером через сокет \"%s\": "
+
+#: fe-connect.c:1742
+#, c-format
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "підключення до серверу \"%s\" (%s), порт %s провалено: "
+
+#: fe-connect.c:1747
+#, c-format
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "підключення до серверу \"%s\", порт %s провалено: "
+
+#: fe-connect.c:1772
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\tЧи працює сервер локально і приймає підключення до цього сокету?\n"
+
+#: fe-connect.c:1776
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\tЧи працює сервер на цьому хості і приймає TCP/IP підключення?\n"
+
+#: fe-connect.c:1840
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "неприпустиме ціле значення \"%s\" для параметра з'єднання \"%s\"\n"
+
+#: fe-connect.c:1870 fe-connect.c:1905 fe-connect.c:1941 fe-connect.c:2030
+#: fe-connect.c:2644
+#, c-format
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s) помилка: %s\n"
+
+#: fe-connect.c:1995
+#, c-format
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) помилка: код помилки %d\n"
+
+#: fe-connect.c:2310
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "неприпустимий стан підключення, можливо, пошкоджена пам'ять\n"
+
+#: fe-connect.c:2389
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "неприпустимий номер порту: \"%s\"\n"
+
+#: fe-connect.c:2405
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "не вдалося перекласти ім’я хоста \"%s\" в адресу: %s\n"
+
+#: fe-connect.c:2418
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "не вдалося проаналізувати адресу мережі \"%s\": %s\n"
+
+#: fe-connect.c:2431
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Шлях Unix-сокету \"%s\" занадто довгий (максимум %d байтів)\n"
+
+#: fe-connect.c:2446
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "не вдалося перекласти шлях Unix-сокету \"%s\" в адресу: %s\n"
+
+#: fe-connect.c:2572
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "не вдалося створити сокет: %s\n"
+
+#: fe-connect.c:2603
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "не вдалося встановити сокет у режим без блокування: %s\n"
+
+#: fe-connect.c:2613
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "не вдалося встановити сокет у режим закриття по виконанню: %s\n"
+
+#: fe-connect.c:2631
+msgid "keepalives parameter must be an integer\n"
+msgstr "параметр keepalives має бути цілим числом\n"
+
+#: fe-connect.c:2772
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "не вдалося отримати статус помилки сокету: %s\n"
+
+#: fe-connect.c:2800
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "не вдалося отримати адресу клієнта з сокету: %s\n"
+
+#: fe-connect.c:2842
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "параметр requirepeer не підтримується на цій платформі\n"
+
+#: fe-connect.c:2845
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "не вдалося отримати облікові дані сервера: %s\n"
+
+#: fe-connect.c:2869
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer вказує на \"%s\", але фактичне ім'я вузла \"%s\"\n"
+
+#: fe-connect.c:2909
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "не вдалося передати пакет узгодження протоколу GSSAPI: %s\n"
+
+#: fe-connect.c:2921
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "вимагалося шифрування GSSAPI, але не було неможливим (можливо, без кешу облікових даних, підтримки сервера, або використання локального сокета)\n"
+
+#: fe-connect.c:2963
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "не вдалося передати пакет узгодження протоколу SSL: %s\n"
+
+#: fe-connect.c:2994
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "не вдалося передати стартовий пакет: %s\n"
+
+#: fe-connect.c:3070
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "сервер не підтримує протокол SSL, але протокол SSL вимагається\n"
+
+#: fe-connect.c:3097
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "отримано неприпустиму відповідь на узгодження SSL: %c\n"
+
+#: fe-connect.c:3118
+msgid "received unencrypted data after SSL response\n"
+msgstr "отримані незашифровані дані після відповіді SSL\n"
+
+#: fe-connect.c:3199
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "сервер не підтримує шифрування GSSAPI, але це було необхідно\n"
+
+#: fe-connect.c:3211
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "отримано неприпустиму відповідь на узгодження GSSAPI: %c\n"
+
+#: fe-connect.c:3230
+msgid "received unencrypted data after GSSAPI encryption response\n"
+msgstr "отримані незашифровані дані після відповіді шифрування GSSAPI\n"
+
+#: fe-connect.c:3290 fe-connect.c:3315
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "очікувався запит автентифікації від сервера, але отримано %c\n"
+
+#: fe-connect.c:3522
+msgid "unexpected message from server during startup\n"
+msgstr "неочікуване повідомлення від сервера під час запуску\n"
+
+#: fe-connect.c:3614
+msgid "session is read-only\n"
+msgstr "сесія доступна тільки для читання\n"
+
+#: fe-connect.c:3617
+msgid "session is not read-only\n"
+msgstr "сесія доступна не лише для читання\n"
+
+#: fe-connect.c:3671
+msgid "server is in hot standby mode\n"
+msgstr "сервер знаходиться у режимі hot standby\n"
+
+#: fe-connect.c:3674
+msgid "server is not in hot standby mode\n"
+msgstr "сервер не в режимі hot standby\n"
+
+#: fe-connect.c:3792 fe-connect.c:3844
+#, c-format
+msgid "\"%s\" failed\n"
+msgstr "\"%s\" помилка\n"
+
+#: fe-connect.c:3858
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "неприпустимий стан підключення %d, можливо, пошкоджена пам'ять\n"
+
+#: fe-connect.c:4304 fe-connect.c:4364
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "Помилка у PGEventProc \"%s\" під час події PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4724
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": схема має бути ldap://\n"
+
+#: fe-connect.c:4739
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": відсутнє унікальне ім'я\n"
+
+#: fe-connect.c:4751 fe-connect.c:4809
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": має бути лише один атрибут\n"
+
+#: fe-connect.c:4763 fe-connect.c:4825
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": відсутня область пошуку (base/one/sub)\n"
+
+#: fe-connect.c:4775
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": відсутній фільтр\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": неприпустимий номер порту\n"
+
+#: fe-connect.c:4835
+msgid "could not create LDAP structure\n"
+msgstr "не вдалося створити структуру протоколу LDAP\n"
+
+#: fe-connect.c:4911
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "помилка підстановки на сервері протоколу LDAP: %s\n"
+
+#: fe-connect.c:4922
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "знайдено більше одного входження при підстановці протоколу LDAP\n"
+
+#: fe-connect.c:4923 fe-connect.c:4935
+msgid "no entry found on LDAP lookup\n"
+msgstr "не знайдено входження при підстановці протоколу LDAP\n"
+
+#: fe-connect.c:4946 fe-connect.c:4959
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "атрибут не має значення при підстановці протоколу LDAP\n"
+
+#: fe-connect.c:5011 fe-connect.c:5030 fe-connect.c:5562
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "відсутній \"=\" після \"%s\" у рядку інформації про підключення\n"
+
+#: fe-connect.c:5103 fe-connect.c:5747 fe-connect.c:6523
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "неприпустимий параметр підключення \"%s\"\n"
+
+#: fe-connect.c:5119 fe-connect.c:5611
+msgid "unterminated quoted string in connection info string\n"
+msgstr "відкриті лапки у рядку інформації про підключення\n"
+
+#: fe-connect.c:5200
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "не знайдено визначення сервера \"%s\"\n"
+
+#: fe-connect.c:5226
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "не знайдено сервісний файл \"%s\"\n"
+
+#: fe-connect.c:5240
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "рядок %d занадто довгий у сервісному файлі \"%s\"\n"
+
+#: fe-connect.c:5311 fe-connect.c:5355
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "синтаксична помилка у сервісному файлі \"%s\", рядок %d\n"
+
+#: fe-connect.c:5322
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "вкладені сервісні специфікації не підтримуються у сервісному файлі \"%s\", рядок %d\n"
+
+#: fe-connect.c:6043
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "у внутрішню процедуру аналізу рядка передано помилковий URI: \"%s\"\n"
+
+#: fe-connect.c:6120
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "досягнуто кінця рядка під час пошуку відповідного \"]\" в адресі IPv6 URI: \"%s\"\n"
+
+#: fe-connect.c:6127
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6, що знаходиться в URI, не може бути пустим: \"%s\"\n"
+
+#: fe-connect.c:6142
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "неочікуваний символ \"%c\" на позиції %d в URI (очікувалося \":\" або \"/\"): \"%s\"\n"
+
+#: fe-connect.c:6272
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "зайвий розділювач ключа/значення \"=\" в параметрі запиту URI: \"%s\"\n"
+
+#: fe-connect.c:6292
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "відсутній розділювач ключа/значення \"=\" у параметрі запиту URI: \"%s\"\n"
+
+#: fe-connect.c:6344
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "неприпустимий параметр запиту URI: \"%s\"\n"
+
+#: fe-connect.c:6418
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "неприпустимий токен, закодований відсотками: \"%s\"\n"
+
+#: fe-connect.c:6428
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "неприпустиме значення %%00 для значення, закодованого відсотками: \"%s\"\n"
+
+#: fe-connect.c:6798
+msgid "connection pointer is NULL\n"
+msgstr "нульове значення вказівника підключення \n"
+
+#: fe-connect.c:7086
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ПОПЕРЕДЖЕННЯ: файл паролів \"%s\" не є простим файлом\n"
+
+#: fe-connect.c:7095
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "ПОПЕРЕДЖЕННЯ: до файлу паролів \"%s\" мають доступ група або всі; дозволи мають бути u=rw (0600) або менше\n"
+
+#: fe-connect.c:7203
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "пароль отримано з файлу \"%s\"\n"
+
+#: fe-exec.c:449 fe-exec.c:3304
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "число рядків %d поза діапазоном 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:219 fe-protocol3.c:244 fe-protocol3.c:273
+#: fe-protocol3.c:291 fe-protocol3.c:371 fe-protocol3.c:743
+msgid "out of memory"
+msgstr "недостатньо пам'яті"
+
+#: fe-exec.c:511 fe-protocol3.c:1939
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "записати на сервер не вдалося\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "ПОВІДОМЛЕННЯ"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult не може підтримувати більше ніж INT_MAX кортежів"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "переповнення size_t"
+
+#: fe-exec.c:1349 fe-exec.c:1454 fe-exec.c:1503
+msgid "command string is a null pointer\n"
+msgstr "рядок команди є нульовим вказівником\n"
+
+#: fe-exec.c:1460 fe-exec.c:1509 fe-exec.c:1605
+#, c-format
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "кількість параметрів має бути між 0 і %d\n"
+
+#: fe-exec.c:1497 fe-exec.c:1599
+msgid "statement name is a null pointer\n"
+msgstr "ім’я оператора є пустим вказівником\n"
+
+#: fe-exec.c:1641 fe-exec.c:3157
+msgid "no connection to the server\n"
+msgstr "немає підключення до сервера\n"
+
+#: fe-exec.c:1650 fe-exec.c:3166
+msgid "another command is already in progress\n"
+msgstr "інша команда уже в прогресі\n"
+
+#: fe-exec.c:1679
+msgid "cannot queue commands during COPY\n"
+msgstr "не можна поставити в чергу команди під час COPY\n"
+
+#: fe-exec.c:1797
+msgid "length must be given for binary parameter\n"
+msgstr "для бінарного параметра має бути надана довжина\n"
+
+#: fe-exec.c:2121
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "неочікуваний asyncStatus: %d\n"
+
+#: fe-exec.c:2141
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "Помилка у PGEventProc \"%s\" під час події PGEVT_RESULTCREAT\n"
+
+#: fe-exec.c:2289
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "функції синхронного виконання команд заборонені в режимі конвеєра\n"
+
+#: fe-exec.c:2311
+msgid "COPY terminated by new PQexec"
+msgstr "COPY завершено новим PQexec"
+
+#: fe-exec.c:2328
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec не дозволяється під час COPY BOTH\n"
+
+#: fe-exec.c:2556 fe-exec.c:2612 fe-exec.c:2681 fe-protocol3.c:1870
+msgid "no COPY in progress\n"
+msgstr "Немає COPY у процесі\n"
+
+#: fe-exec.c:2858
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "PQfn заборонено в режимі конвеєра\n"
+
+#: fe-exec.c:2866
+msgid "connection in wrong state\n"
+msgstr "підключення у неправильному стані\n"
+
+#: fe-exec.c:2910
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "не можна увійти в режим конвеєра, підключення не в очікуванні\n"
+
+#: fe-exec.c:2944 fe-exec.c:2961
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "не можна вийти з режиму конвеєра з незібраними результатами\n"
+
+#: fe-exec.c:2949
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "не можна вийти з режиму конвеєра, коли зайнято\n"
+
+#: fe-exec.c:3091
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "неможливо скористатися конвеєром не у режимі конвеєра\n"
+
+#: fe-exec.c:3193
+msgid "invalid ExecStatusType code"
+msgstr "неприпустимий код ExecStatusType"
+
+#: fe-exec.c:3220
+msgid "PGresult is not an error result\n"
+msgstr "PGresult не є помилковим результатом\n"
+
+#: fe-exec.c:3288 fe-exec.c:3311
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "число стовпців %d поза діапазоном 0..%d"
+
+#: fe-exec.c:3326
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "число параметрів %d поза діапазоном 0..%d"
+
+#: fe-exec.c:3636
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "не вдалося інтерпретувати результат від сервера: %s"
+
+#: fe-exec.c:3896 fe-exec.c:3985
+msgid "incomplete multibyte character\n"
+msgstr "неповний мультибайтний символ\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "Помилка імпорту імені у GSSAPI"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+#, c-format
+msgid "cannot determine OID of function %s\n"
+msgstr "неможливо визначити ідентифікатор OID функції %s\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "аргумент lo_truncate перевищує діапазон цілого числа\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "аргумент lo_read перевищує діапазон цілого числа\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "аргумент lo_write перевищує діапазон цілого числа\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "не вдалося відкрити файл \"%s\": %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "не вдалося прочитати з файлу \"%s\": %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "не вдалося записати у файл \"%s\": %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "запит на ініціалізацію функцій для великих об’єктів не повернув дані\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "pqGetInt не підтримує ціле число розміром %lu"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "pqPutInt не підтримує ціле число розміром %lu"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "підключення не відкрито\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid "server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr "сервер неочікувано закрив підключення\n"
+" Це може означати, що сервер завершив роботу ненормально до або під час обробки запиту.\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "тайм-аут минув\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "неприпустимий сокет\n"
+
+#: fe-misc.c:1083
+#, c-format
+msgid "%s() failed: %s\n"
+msgstr "%s() помилка: %s\n"
+
+#: fe-protocol3.c:196
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "отримано тип повідомлення 0x%02x від сервера під час бездіяльності"
+
+#: fe-protocol3.c:403
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "сервер передав дані (повідомлення \"D\") без попереднього опису рядка (повідомлення \"T\")\n"
+
+#: fe-protocol3.c:446
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "неочікувана відповідь від сервера; перший отриманий символ був \"%c\"\n"
+
+#: fe-protocol3.c:471
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "вміст повідомлення не відповідає довжині у типі повідомлення \"%c\"\n"
+
+#: fe-protocol3.c:491
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "втрачено синхронізацію з сервером: отримано тип повідомлення \"%c\", довжина %d\n"
+
+#: fe-protocol3.c:543 fe-protocol3.c:583
+msgid "insufficient data in \"T\" message"
+msgstr "недостатньо даних у повідомленні \"T\""
+
+#: fe-protocol3.c:654 fe-protocol3.c:860
+msgid "out of memory for query result"
+msgstr "недостатньо пам'яті для результату запиту"
+
+#: fe-protocol3.c:723
+msgid "insufficient data in \"t\" message"
+msgstr "недостатньо даних у повідомленні \"t\""
+
+#: fe-protocol3.c:782 fe-protocol3.c:814 fe-protocol3.c:832
+msgid "insufficient data in \"D\" message"
+msgstr "зайві дані у повідомленні \"D\""
+
+#: fe-protocol3.c:788
+msgid "unexpected field count in \"D\" message"
+msgstr "неочікувана кількість полів у повідомленні \"D\""
+
+#: fe-protocol3.c:1036
+msgid "no error message available\n"
+msgstr "немає доступного повідомлення про помилку\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1084 fe-protocol3.c:1103
+#, c-format
+msgid " at character %s"
+msgstr " в символі %s"
+
+#: fe-protocol3.c:1116
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "ДЕТАЛІ: %s\n"
+
+#: fe-protocol3.c:1119
+#, c-format
+msgid "HINT: %s\n"
+msgstr "ПІДКАЗКА: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "ЗАПИТ: %s\n"
+
+#: fe-protocol3.c:1129
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "КОНТЕКСТ: %s\n"
+
+#: fe-protocol3.c:1138
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "ІМ'Я СХЕМИ: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "ІМ'Я ТАБЛИЦІ: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "ІМ'Я СТОВПЦЯ: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "ІМ'Я ТИПУ ДАНИХ: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "ІМ'Я ОБМЕЖЕННЯ: %s\n"
+
+#: fe-protocol3.c:1166
+msgid "LOCATION: "
+msgstr "РОЗТАШУВАННЯ: "
+
+#: fe-protocol3.c:1168
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1170
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1365
+#, c-format
+msgid "LINE %d: "
+msgstr "РЯДОК %d: "
+
+#: fe-protocol3.c:1764
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline можна викликати лише під час COPY OUT\n"
+
+#: fe-protocol3.c:2130
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "помилка протоколу: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "Ім'я сертифікату SSL містить вбудоване Null-значення\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "має бути вказано ім'я хосту для перевіреного SSL підключення\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "серверний сертифікат \"%s\" не співпадає з іменем хосту \"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "не вдалося отримати ім'я хосту від серверного сертифікату\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "помилка при згортанні GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "вихідне повідомлення GSSAPI не буде використовувати конфіденційність\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "клієнт намагався відправити переповнений пакет GSSAPI: (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "переповнений пакет GSSAPI відправлений сервером: (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "помилка при розгортанні GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "вхідне повідомлення GSSAPI не використовувало конфіденційність\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "не вдалося ініціювати контекст безпеки GSSAPI"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "помилка перевірки розміру GSSAPI"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "помилка встановлення контексту GSSAPI"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1367
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "Помилка SSL SYSCALL: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1371
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "Помилка SSL SYSCALL: виявлено EOF\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1380
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "Помилка SSL: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL підключення було неочікувано перервано\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1430
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "нерозпізнаний код помилки SSL: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "не вдалося визначити алгоритм підпису серверного сертифікату\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "не вдалося знайти дайджест для NID %s\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "не вдалося згенерувати хеш сертифікату вузла\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "Відсутня ім'я в сертифікаті SSL\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "не вдалося створити контекст SSL: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "неприпустиме значення \"%s\" для мінімальної версії протоколу SSL\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "не вдалося встановити мінімальну версію протоколу SSL: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "неприпустиме значення \"%s\" для максимальної версії протоколу SSL\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "не вдалося встановити максимальну версію протоколу SSL: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "не вдалося прочитати файл кореневого сертифікату \"%s\": %s\n"
+
+#: fe-secure-openssl.c:990
+msgid "could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr "не вдалося отримати домашній каталог, щоб знайти файл кореневого сертифікату\n"
+"Надайте файл або змініть sslmode, щоб вимкнути перевірку серверного сертифікату.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid "root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr "файлу кореневого сертифікату \"%s\" не існує\n"
+"Вкажіть повний шлях до файлу або вимкніть перевірку сертифікату сервера, змінивши sslmode.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "не вдалося відкрити файл сертифікату \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "не вдалося прочитати файл сертифікату \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "не вдалося встановити SSL-підключення: %s\n"
+
+#: fe-secure-openssl.c:1103
+#, c-format
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "не вдалося встановити Індикацію Імені Сервера протокол SSL (SNI): %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "не вдалося завантажити модуль SSL \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "не вдалося ініціалізувати модуль SSL \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "не вдалося прочитати закритий ключ SSL \"%s\" з модуля \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "не вдалося завантажити закритий ключ SSL \"%s\" з модуля \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "сертифікат присутній, але файл закритого ключа \"%s\" ні\n"
+
+#: fe-secure-openssl.c:1237
+#, c-format
+msgid "private key file \"%s\" is not a regular file\n"
+msgstr "файл закритого ключа \"%s\" не є звичайним файлом\n"
+
+#: fe-secure-openssl.c:1270
+#, c-format
+msgid "private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root\n"
+msgstr "файл закритого ключа \"%s\" має груповий або загальний доступ; файл повинен мати права u=rw (0600) або менше, якщо він належить поточному користувачу, або права u=rw,g=r (0640) або менше, якщо належить root\n"
+
+#: fe-secure-openssl.c:1295
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "не вдалося завантажити файл закритого ключа \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1313
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "сертифікат не відповідає файлу закритого ключа \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1413
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "Це може вказувати, що сервер не підтримує жодної версії протоколу SSL між %s і %s.\n"
+
+#: fe-secure-openssl.c:1449
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "не вдалося отримати сертифікат: %s\n"
+
+#: fe-secure-openssl.c:1555
+#, c-format
+msgid "no SSL error reported"
+msgstr "немає повідомлення про помилку SSL"
+
+#: fe-secure-openssl.c:1564
+#, c-format
+msgid "SSL error code %lu"
+msgstr "Код помилки SSL %lu"
+
+#: fe-secure-openssl.c:1812
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ПОПЕРЕДЖЕННЯ: sslpassword скорочено\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "не вдалося отримати дані з серверу: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "не вдалося передати дані серверу: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "нерозпізнана помилка сокету: 0x%08X/%d"
+
diff --git a/src/interfaces/libpq/po/zh_CN.po b/src/interfaces/libpq/po/zh_CN.po
new file mode 100644
index 0000000..34a34a8
--- /dev/null
+++ b/src/interfaces/libpq/po/zh_CN.po
@@ -0,0 +1,1193 @@
+# simplified Chinese translation file for libpq
+# Bao Wei <weibao@forevertek.com>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 05:40+0000\n"
+"PO-Revision-Date: 2021-08-15 16:25+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@fujitsu.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: fe-auth-scram.c:213
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "错误的SCRAM消息(空消息)\n"
+
+#: fe-auth-scram.c:219
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "错误的SCRAM消息(长度不匹配)\n"
+
+#: fe-auth-scram.c:263
+msgid "could not verify server signature\n"
+msgstr "无法验证服务器签名\n"
+
+#: fe-auth-scram.c:270
+msgid "incorrect server signature\n"
+msgstr "服务器签名不正确\n"
+
+#: fe-auth-scram.c:279
+msgid "invalid SCRAM exchange state\n"
+msgstr "SCRAM交换状态无效\n"
+
+#: fe-auth-scram.c:306
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "错误的SCRAM消息(应为属性\"%c\")\n"
+
+#: fe-auth-scram.c:315
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "错误的SCRAM消息(属性\"%c\"需要字符\"=\")\n"
+
+#: fe-auth-scram.c:356
+msgid "could not generate nonce\n"
+msgstr "无法生成nonce\n"
+
+#: fe-auth-scram.c:366 fe-auth-scram.c:441 fe-auth-scram.c:595
+#: fe-auth-scram.c:616 fe-auth-scram.c:642 fe-auth-scram.c:657
+#: fe-auth-scram.c:707 fe-auth-scram.c:746 fe-auth.c:290 fe-auth.c:362
+#: fe-auth.c:398 fe-auth.c:615 fe-auth.c:774 fe-auth.c:1132 fe-auth.c:1282
+#: fe-connect.c:911 fe-connect.c:1455 fe-connect.c:1624 fe-connect.c:2976
+#: fe-connect.c:4657 fe-connect.c:4918 fe-connect.c:5037 fe-connect.c:5289
+#: fe-connect.c:5370 fe-connect.c:5469 fe-connect.c:5725 fe-connect.c:5754
+#: fe-connect.c:5826 fe-connect.c:5850 fe-connect.c:5868 fe-connect.c:5969
+#: fe-connect.c:5978 fe-connect.c:6336 fe-connect.c:6486 fe-connect.c:6752
+#: fe-exec.c:686 fe-exec.c:876 fe-exec.c:1223 fe-exec.c:3043 fe-exec.c:3226
+#: fe-exec.c:3999 fe-exec.c:4164 fe-gssapi-common.c:111 fe-lobj.c:881
+#: fe-protocol3.c:975 fe-protocol3.c:990 fe-protocol3.c:1023
+#: fe-protocol3.c:1731 fe-secure-common.c:110 fe-secure-gssapi.c:504
+#: fe-secure-openssl.c:440 fe-secure-openssl.c:1133
+msgid "out of memory\n"
+msgstr "内存不足\n"
+
+#: fe-auth-scram.c:374
+msgid "could not encode nonce\n"
+msgstr "无法编码nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not calculate client proof\n"
+msgstr "无法计算客户端证明\n"
+
+#: fe-auth-scram.c:579
+msgid "could not encode client proof\n"
+msgstr "无法对客户端证明进行编码\n"
+
+#: fe-auth-scram.c:634
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "SCRAM响应无效(非匹配)\n"
+
+#: fe-auth-scram.c:667
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "错误的SCRAM消息 (无效的salt)\n"
+
+#: fe-auth-scram.c:681
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "错误的SCRAM消息(迭代计数无效)\n"
+
+#: fe-auth-scram.c:687
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "错误的SCRAM消息 (服务器第一条消息结束时为垃圾消息)\n"
+
+#: fe-auth-scram.c:723
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "在SCRAM交换中从服务器接收到错误: %s\n"
+
+#: fe-auth-scram.c:739
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "错误的SCRAM消息 (服务器最后一条消息结束时为垃圾消息)\n"
+
+#: fe-auth-scram.c:758
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "错误的SCRAM消息 (服务器签名无效)\n"
+
+#: fe-auth.c:76
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "在分配GSSAPI缓冲区(%d)时内存用尽\n"
+
+#: fe-auth.c:131
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI连续出现错误"
+
+#: fe-auth.c:158 fe-auth.c:391 fe-gssapi-common.c:98 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "必须指定主机名\n"
+
+#: fe-auth.c:165
+msgid "duplicate GSS authentication request\n"
+msgstr "重复的GSS认证请求\n"
+
+#: fe-auth.c:230
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "在分配SSPI缓冲区(%d)时内存用尽\n"
+
+#: fe-auth.c:278
+msgid "SSPI continuation error"
+msgstr "SSPI连续出现错误"
+
+#: fe-auth.c:351
+msgid "duplicate SSPI authentication request\n"
+msgstr "重复的SSPI认证请求\n"
+
+#: fe-auth.c:377
+msgid "could not acquire SSPI credentials"
+msgstr "无法获得SSPI证书"
+
+#: fe-auth.c:433
+msgid "channel binding required, but SSL not in use\n"
+msgstr "需要通道绑定,但未使用SSL\n"
+
+#: fe-auth.c:440
+msgid "duplicate SASL authentication request\n"
+msgstr "重复的SASL认证请求\n"
+
+#: fe-auth.c:496
+msgid "channel binding is required, but client does not support it\n"
+msgstr "通道绑定是必需的,但客户端不支持它\n"
+
+#: fe-auth.c:513
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "服务器通过非SSL连接提供了SCRAM-SHA-256-PLUS身份验证\n"
+
+#: fe-auth.c:525
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "不支持服务器的SASL身份验证机制\n"
+
+#: fe-auth.c:533
+msgid "channel binding is required, but server did not offer an authentication method that supports channel binding\n"
+msgstr "需要通道绑定,但服务器未提供支持通道绑定的身份验证方法\n"
+
+#: fe-auth.c:639
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "在分配SASL缓冲区(%d)时内存用尽\n"
+
+#: fe-auth.c:664
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "从服务器接收到AuthenticationSASLFinal,但未完成SASL身份验证\n"
+
+#: fe-auth.c:741
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "不支持 SCM_CRED 认证方式\n"
+
+#: fe-auth.c:836
+msgid "channel binding required, but server authenticated client without channel binding\n"
+msgstr "需要通道绑定,但服务器验证的客户端没有通道绑定\n"
+
+#: fe-auth.c:842
+msgid "channel binding required but not supported by server's authentication request\n"
+msgstr "服务器的身份验证请求需要但不支持通道绑定\n"
+
+#: fe-auth.c:877
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "不支持 Kerberos 4 认证\n"
+
+#: fe-auth.c:882
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "不支持 Kerberos 5 认证\n"
+
+#: fe-auth.c:953
+msgid "GSSAPI authentication not supported\n"
+msgstr "不支持GSSAPI认证\n"
+
+#: fe-auth.c:985
+msgid "SSPI authentication not supported\n"
+msgstr "不支持SSPI认证\n"
+
+#: fe-auth.c:993
+msgid "Crypt authentication not supported\n"
+msgstr "不支持Crypt认证\n"
+
+#: fe-auth.c:1060
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "不支持 %u 认证方式\n"
+
+#: fe-auth.c:1107
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "用户名查找失败:错误代码%lu\n"
+
+#: fe-auth.c:1117 fe-connect.c:2851
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "无法查找本地用户ID %d: %s\n"
+
+#: fe-auth.c:1122 fe-connect.c:2856
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "ID 为 %d 的本地用户不存在\n"
+
+#: fe-auth.c:1226
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW出现意外的结果状态\n"
+
+#: fe-auth.c:1235
+msgid "password_encryption value too long\n"
+msgstr "密码_加密值太长\n"
+
+#: fe-auth.c:1275
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "无法识别的密码加密算法 \"%s\"\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "无法将主机名 %d 与主机地址 %d匹配\n"
+
+#: fe-connect.c:1175
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "无法将端口号 %d与主机%d匹配\n"
+
+#: fe-connect.c:1268 fe-connect.c:1294 fe-connect.c:1336 fe-connect.c:1345
+#: fe-connect.c:1378 fe-connect.c:1422
+msgid "invalid %s value: \"%s\"\n"
+msgstr "无效的 %s值: \"%s\"\n"
+
+#: fe-connect.c:1315
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "无效的 sslmode 值 \"%s\" 当没有把 SSL 支持编译进来时\n"
+
+#: fe-connect.c:1363
+msgid "invalid SSL protocol version range\n"
+msgstr "无效的SSL协议版本范围\n"
+
+#: fe-connect.c:1388
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "无效的 gssencmode 值 \"%s\" 当没有把 GSSAPI 支持编译进来时\n"
+
+#: fe-connect.c:1648
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "无法将套接字设置为 TCP 无延迟模式: %s\n"
+
+#: fe-connect.c:1710
+msgid "connection to server on socket \"%s\" failed: "
+msgstr "连接到套接字\"%s\"上的服务器失败:"
+
+#: fe-connect.c:1737
+msgid "connection to server at \"%s\" (%s), port %s failed: "
+msgstr "连接到\"%s\" (%s)上的服务器,端口%s失败:"
+
+#: fe-connect.c:1742
+msgid "connection to server at \"%s\", port %s failed: "
+msgstr "连接到\"%s\"上的服务器,端口%s失败:"
+
+#: fe-connect.c:1767
+msgid "\tIs the server running locally and accepting connections on that socket?\n"
+msgstr "\t服务器是否在本地运行并接受该套接字上的连接?\n"
+
+#: fe-connect.c:1771
+msgid "\tIs the server running on that host and accepting TCP/IP connections?\n"
+msgstr "\t服务器是否在该主机上运行并接受TCP/IP连接?\n"
+
+#: fe-connect.c:1835
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "连接选项\"%2$s\"的整数值\"%1$s\"无效\n"
+
+#: fe-connect.c:1865 fe-connect.c:1900 fe-connect.c:1936 fe-connect.c:2025
+#: fe-connect.c:2639
+msgid "%s(%s) failed: %s\n"
+msgstr "%s(%s)失败: %s\n"
+
+#: fe-connect.c:1990
+msgid "%s(%s) failed: error code %d\n"
+msgstr "%s(%s) 失败: 错误码为 %d\n"
+
+#: fe-connect.c:2305
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "无效的联接状态, 可能是存储器数据被破坏的标志\n"
+
+#: fe-connect.c:2384
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "无效端口号: \"%s\"\n"
+
+#: fe-connect.c:2400
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "无法解释主机名 \"%s\" 到地址: %s\n"
+
+#: fe-connect.c:2413
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "无法分析网络地址\"%s\": %s\n"
+
+#: fe-connect.c:2426
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unix域的套接字路径\"%s\"超长(最大为%d字节)\n"
+
+#: fe-connect.c:2441
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "无法解释 Unix-domian 套接字路径 \"%s\" 到地址: %s\n"
+
+#: fe-connect.c:2567
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "无法创建套接字: %s\n"
+
+#: fe-connect.c:2598
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "无法设置套接字为非阻塞模式: %s\n"
+
+#: fe-connect.c:2608
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "无法将套接字设置为执行时关闭 (close-on-exec) 模式: %s\n"
+
+#: fe-connect.c:2626
+msgid "keepalives parameter must be an integer\n"
+msgstr "参数keepalives必须是一个整数\n"
+
+#: fe-connect.c:2767
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "无法获取套接字错误状态: %s\n"
+
+#: fe-connect.c:2795
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "无法从套接字获取客户端地址: %s\n"
+
+#: fe-connect.c:2837
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "在此平台上不支持requirepeer参数\n"
+
+#: fe-connect.c:2840
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "无法获得对等(peer)证书:%s\n"
+
+#: fe-connect.c:2864
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "期望对方用户指定值为 \"%s\", 但实际的对方用户名为 \"%s\"\n"
+
+#: fe-connect.c:2904
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "无法发送 GSSAPI 握手包: %s\n"
+
+#: fe-connect.c:2916
+msgid "GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)\n"
+msgstr "需要GSSAPI加密,但不可能(可能没有凭据缓存、服务器不支持或使用本地套接字)\n"
+
+#: fe-connect.c:2958
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "无法发送 SSL 握手包: %s\n"
+
+#: fe-connect.c:2989
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "无法发送启动包: %s\n"
+
+#: fe-connect.c:3065
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "服务器不支持 SSL, 但是要求使用 SSL\n"
+
+#: fe-connect.c:3092
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "收到对 SSL 握手的无效响应: %c\n"
+
+#: fe-connect.c:3181
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "服务器不支持 GSSAPI, 但这是必须的\n"
+
+#: fe-connect.c:3193
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "收到对 GSSAPI 握手的无效响应: %c\n"
+
+#: fe-connect.c:3259 fe-connect.c:3284
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "期待来自服务器的认证请求, 却收到 %c\n"
+
+#: fe-connect.c:3491
+msgid "unexpected message from server during startup\n"
+msgstr "启动过程中收到来自服务器的非预期信息\n"
+
+#: fe-connect.c:3583
+msgid "session is read-only\n"
+msgstr "会话是只读的\n"
+
+#: fe-connect.c:3586
+msgid "session is not read-only\n"
+msgstr "会话不是只读的\n"
+
+#: fe-connect.c:3640
+msgid "server is in hot standby mode\n"
+msgstr "服务器处于热备份模式\n"
+
+#: fe-connect.c:3643
+msgid "server is not in hot standby mode\n"
+msgstr "服务器不处于热备份模式\n"
+
+#: fe-connect.c:3754 fe-connect.c:3806
+msgid "\"%s\" failed\n"
+msgstr "\"%s\" 失败\n"
+
+#: fe-connect.c:3820
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "无效的连接状态 %d, 这可能表示内存出现问题\n"
+
+#: fe-connect.c:4266 fe-connect.c:4326
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "在PGEVT_CONNRESET事件触发期间执行PGEventProc \"%s\"错误\n"
+
+#: fe-connect.c:4670
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "无效LDAP URL\"%s\": 模式必须是ldap://\n"
+
+#: fe-connect.c:4685
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "无效LDAP URL \"%s\": 丢失可区分的名称\n"
+
+#: fe-connect.c:4697 fe-connect.c:4755
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "无效LDAP URL \"%s\": 只能有一个属性\n"
+
+#: fe-connect.c:4709 fe-connect.c:4771
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "无效LDAP URL \"%s\": 必须有搜索范围(base/one/sub)\n"
+
+#: fe-connect.c:4721
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "无效的 LDAP URL \"%s\": 没有过滤器\n"
+
+#: fe-connect.c:4743
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "无效LDAP URL \"%s\": 无效端口号\n"
+
+#: fe-connect.c:4781
+msgid "could not create LDAP structure\n"
+msgstr "无法创建LDAP结构\n"
+
+#: fe-connect.c:4857
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "在LDAP服务器上的查找失败: %s\n"
+
+#: fe-connect.c:4868
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "在LDAP搜索上找到多个入口\n"
+
+#: fe-connect.c:4869 fe-connect.c:4881
+msgid "no entry found on LDAP lookup\n"
+msgstr "在LDAP查找上没有发现入口\n"
+
+#: fe-connect.c:4892 fe-connect.c:4905
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "在LDAP查找上的属性没有值\n"
+
+#: fe-connect.c:4957 fe-connect.c:4976 fe-connect.c:5508
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "在联接信息字串里的 \"%s\" 后面缺少 \"=\"\n"
+
+#: fe-connect.c:5049 fe-connect.c:5693 fe-connect.c:6469
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "非法联接选项 \"%s\"\n"
+
+#: fe-connect.c:5065 fe-connect.c:5557
+msgid "unterminated quoted string in connection info string\n"
+msgstr "联接信息字串中未结束的引号字串\n"
+
+#: fe-connect.c:5146
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "错误:没有找到服务\"%s\"的定义\n"
+
+#: fe-connect.c:5172
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "错误:没有找到服务文件\"%s\"\n"
+
+#: fe-connect.c:5186
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "在服务文件\"%2$s\"中的第%1$d行的长度太长\n"
+
+#: fe-connect.c:5257 fe-connect.c:5301
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "在服务文件\"%s\"的第%d行出现语法错误\n"
+
+#: fe-connect.c:5268
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "在服务文件\"%s\"的第%d行出现不支持的嵌套服务说明\n"
+
+#: fe-connect.c:5989
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "无效的URI传入内部解析器处理程序: \"%s\"\n"
+
+#: fe-connect.c:6066
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "在 URI: \"%s\"中的IPv6主机地址里查找匹配符\"]\"时遇到了字符串结束符\n"
+
+#: fe-connect.c:6073
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "URI:\"%s\"中的IPv6主机地址可能不为空\n"
+
+#: fe-connect.c:6088
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "非预期的字符\"%c\"出现在在位置%d, URI (expected \":\" or \"/\"):\"%s\"\n"
+
+#: fe-connect.c:6218
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "遇到多余的键/值分隔符\"=\"在URI查询参数里: \"%s\"\n"
+
+#: fe-connect.c:6238
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "缺少相应的键/值分隔符\"=\"在URI查询参数里: \"%s\"\n"
+
+#: fe-connect.c:6290
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "无效的URI查询参数: \"%s\"\n"
+
+#: fe-connect.c:6364
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "无效的百分号编码令牌: \"%s\"\n"
+
+#: fe-connect.c:6374
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "在百分值编码的值: \"%s\"里禁止使用 %%00\n"
+
+#: fe-connect.c:6744
+msgid "connection pointer is NULL\n"
+msgstr "联接指针是 NULL\n"
+
+#: fe-connect.c:7032
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "警告: 口令文件\"%s\"不是普通文本文件\n"
+
+#: fe-connect.c:7041
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "警告: 口令文件\"%s\"的访问权限过大; 权限应设置 为 u=rw (0600)或更少\n"
+
+#: fe-connect.c:7149
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "从文件\"%s\"中获取口令\n"
+
+#: fe-exec.c:449 fe-exec.c:3300
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "行号码 %d 超出了范围 0..%d"
+
+#: fe-exec.c:510 fe-protocol3.c:219 fe-protocol3.c:244 fe-protocol3.c:273
+#: fe-protocol3.c:291 fe-protocol3.c:371 fe-protocol3.c:743
+msgid "out of memory"
+msgstr "内存不足"
+
+#: fe-exec.c:511 fe-protocol3.c:1939
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:792
+msgid "write to server failed\n"
+msgstr "写入服务器失败\n"
+
+#: fe-exec.c:864
+msgid "NOTICE"
+msgstr "注意"
+
+#: fe-exec.c:922
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult不能支持超过INT_MAX元组"
+
+#: fe-exec.c:934
+msgid "size_t overflow"
+msgstr "size_t溢出"
+
+#: fe-exec.c:1349 fe-exec.c:1454 fe-exec.c:1503
+msgid "command string is a null pointer\n"
+msgstr "命令字串是一个空指针\n"
+
+#: fe-exec.c:1460 fe-exec.c:1509 fe-exec.c:1605
+msgid "number of parameters must be between 0 and %d\n"
+msgstr "参数的个数必须介于0到%d之间\n"
+
+#: fe-exec.c:1497 fe-exec.c:1599
+msgid "statement name is a null pointer\n"
+msgstr "声明名字是一个空指针\n"
+
+#: fe-exec.c:1641 fe-exec.c:3153
+msgid "no connection to the server\n"
+msgstr "没有到服务器的联接\n"
+
+#: fe-exec.c:1650 fe-exec.c:3162
+msgid "another command is already in progress\n"
+msgstr "已经有另外一条命令在处理\n"
+
+#: fe-exec.c:1679
+msgid "cannot queue commands during COPY\n"
+msgstr "复制期间无法对命令排队\n"
+
+#: fe-exec.c:1797
+msgid "length must be given for binary parameter\n"
+msgstr "对于2进制参数必须指定长度\n"
+
+#: fe-exec.c:2117
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "意外的 asyncStatus(异步状态): %d\n"
+
+#: fe-exec.c:2137
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "在PGEVT_CONNRESET事件触发期间执行PGEventProc \"%s\"错误\n"
+
+#: fe-exec.c:2285
+msgid "synchronous command execution functions are not allowed in pipeline mode\n"
+msgstr "管道模式下不允许使用同步命令执行函数\n"
+
+#: fe-exec.c:2307
+msgid "COPY terminated by new PQexec"
+msgstr "COPY 被一个新的 PQexec 终止"
+
+#: fe-exec.c:2324
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "在 COPY BOTH时不允许调用PQexec\n"
+
+#: fe-exec.c:2552 fe-exec.c:2608 fe-exec.c:2677 fe-protocol3.c:1870
+msgid "no COPY in progress\n"
+msgstr "没有正在处理的 COPY\n"
+
+#: fe-exec.c:2854
+msgid "PQfn not allowed in pipeline mode\n"
+msgstr "管道模式下不允许使用PQfn\n"
+
+#: fe-exec.c:2862
+msgid "connection in wrong state\n"
+msgstr "联接处于错误状态\n"
+
+#: fe-exec.c:2906
+msgid "cannot enter pipeline mode, connection not idle\n"
+msgstr "无法进入管道模式,连接未空闲\n"
+
+#: fe-exec.c:2940 fe-exec.c:2957
+msgid "cannot exit pipeline mode with uncollected results\n"
+msgstr "无法退出具有未收集结果的管道模式\n"
+
+#: fe-exec.c:2945
+msgid "cannot exit pipeline mode while busy\n"
+msgstr "忙时无法退出管道模式\n"
+
+#: fe-exec.c:3087
+msgid "cannot send pipeline when not in pipeline mode\n"
+msgstr "不处于管道模式时无法发送管道\n"
+
+#: fe-exec.c:3189
+msgid "invalid ExecStatusType code"
+msgstr "非法 ExecStatusType 代码"
+
+#: fe-exec.c:3216
+msgid "PGresult is not an error result\n"
+msgstr "PGresult不是错误的结果\n"
+
+#: fe-exec.c:3284 fe-exec.c:3307
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "列号码 %d 超出了范围 0..%d"
+
+#: fe-exec.c:3322
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "参数号%d超出了范围 0..%d"
+
+#: fe-exec.c:3632
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "无法解释来自服务器的结果: %s"
+
+#: fe-exec.c:3892 fe-exec.c:3981
+msgid "incomplete multibyte character\n"
+msgstr "无效的多字节字符\n"
+
+#: fe-gssapi-common.c:124
+msgid "GSSAPI name import error"
+msgstr "GSSAPI名称导入错误"
+
+#: fe-lobj.c:145 fe-lobj.c:210 fe-lobj.c:403 fe-lobj.c:494 fe-lobj.c:568
+#: fe-lobj.c:969 fe-lobj.c:977 fe-lobj.c:985 fe-lobj.c:993 fe-lobj.c:1001
+#: fe-lobj.c:1009 fe-lobj.c:1017 fe-lobj.c:1025
+msgid "cannot determine OID of function %s\n"
+msgstr "无法判断函数%s的 OID\n"
+
+#: fe-lobj.c:162
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "lo_truncate的参数超出整数范围\n"
+
+#: fe-lobj.c:266
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "lo_read的参数值已超出整数范围\n"
+
+#: fe-lobj.c:318
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "lo_write的参数值已超出整数范围\n"
+
+#: fe-lobj.c:678 fe-lobj.c:789
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "无法打开文件 \"%s\": %s\n"
+
+#: fe-lobj.c:734
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "无法读取文件 \"%s\": %s\n"
+
+#: fe-lobj.c:810 fe-lobj.c:834
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "无法写入文件 \"%s\": %s\n"
+
+#: fe-lobj.c:920
+msgid "query to initialize large object functions did not return data\n"
+msgstr "初始化大对象函数的查询没有返回数据\n"
+
+#: fe-misc.c:242
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "pqGetInt 不支持大小为 %lu 的整数"
+
+#: fe-misc.c:275
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "pqPutInt 不支持大小为 %lu 的整数"
+
+#: fe-misc.c:576 fe-misc.c:822
+msgid "connection not open\n"
+msgstr "联接未打开\n"
+
+#: fe-misc.c:755 fe-secure-openssl.c:209 fe-secure-openssl.c:316
+#: fe-secure.c:260 fe-secure.c:373
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"服务器意外地关闭了联接\n"
+"\t这种现象通常意味着服务器在处理请求之前\n"
+"或者正在处理请求的时候意外中止\n"
+
+#: fe-misc.c:1015
+msgid "timeout expired\n"
+msgstr "超时满\n"
+
+#: fe-misc.c:1060
+msgid "invalid socket\n"
+msgstr "无效套接字\n"
+
+#: fe-misc.c:1083
+msgid "%s() failed: %s\n"
+msgstr "%s()失败: %s\n"
+
+#: fe-protocol3.c:196
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "当空闲时收到服务起发送过来的消息类型 0x%02x"
+
+#: fe-protocol3.c:403
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+
+#: fe-protocol3.c:446
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "来自服务器意外的回执, 第一个收到的字符是 \"%c\"\n"
+
+#: fe-protocol3.c:471
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "在消息类型 \"%c\" 中, 消息内容与长度不匹配\n"
+
+#: fe-protocol3.c:491
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "失去与服务器同步: 获取到消息类型 \"%c\", 长度 %d\n"
+
+#: fe-protocol3.c:543 fe-protocol3.c:583
+msgid "insufficient data in \"T\" message"
+msgstr "\"T\"消息中剩下的数据不够"
+
+#: fe-protocol3.c:654 fe-protocol3.c:860
+msgid "out of memory for query result"
+msgstr "查询结果时内存耗尽"
+
+#: fe-protocol3.c:723
+msgid "insufficient data in \"t\" message"
+msgstr "\"t\"消息中剩下的数据不够"
+
+#: fe-protocol3.c:782 fe-protocol3.c:814 fe-protocol3.c:832
+msgid "insufficient data in \"D\" message"
+msgstr "\"D\"消息中剩下的数据不够"
+
+#: fe-protocol3.c:788
+msgid "unexpected field count in \"D\" message"
+msgstr "在 \"D\" 消息中, 意外的字段个数"
+
+#: fe-protocol3.c:1036
+msgid "no error message available\n"
+msgstr "没有可用的错误消息\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1084 fe-protocol3.c:1103
+#, c-format
+msgid " at character %s"
+msgstr " 在字符 %s"
+
+#: fe-protocol3.c:1116
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "描述: %s\n"
+
+#: fe-protocol3.c:1119
+#, c-format
+msgid "HINT: %s\n"
+msgstr "提示: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "查询: %s\n"
+
+#: fe-protocol3.c:1129
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "背景: %s\n"
+
+#: fe-protocol3.c:1138
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "方案名: %s\n"
+
+#: fe-protocol3.c:1142
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "表名: %s\n"
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "列名: %s\n"
+
+#: fe-protocol3.c:1150
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "数据类型名: %s\n"
+
+#: fe-protocol3.c:1154
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "约束名: %s\n"
+
+#: fe-protocol3.c:1166
+msgid "LOCATION: "
+msgstr "位置: "
+
+#: fe-protocol3.c:1168
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1170
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1365
+#, c-format
+msgid "LINE %d: "
+msgstr "第%d行"
+
+#: fe-protocol3.c:1764
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: not doing text COPY OUT\n"
+
+#: fe-protocol3.c:2130
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "协议错误: id=0x%x\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "SSL证书的名称包含嵌入的空值\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "必须为一个已验证的SSL连接指定主机名\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "\"%s\"的服务器证书与主机名不匹配\"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "无法从服务器证书得到服务器的主机名\n"
+
+#: fe-secure-gssapi.c:201
+msgid "GSSAPI wrap error"
+msgstr "GSSAPI包装错误"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "传出的GSSAPI消息将不使用机密性\n"
+
+#: fe-secure-gssapi.c:217
+#, c-format
+msgid "client tried to send oversize GSSAPI packet (%zu > %zu)\n"
+msgstr "客户端试图发送过大的GSSAPI数据包 (%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:354 fe-secure-gssapi.c:596
+#, c-format
+msgid "oversize GSSAPI packet sent by the server (%zu > %zu)\n"
+msgstr "服务器端发送的超大GSSAPI数据包(%zu > %zu)\n"
+
+#: fe-secure-gssapi.c:393
+msgid "GSSAPI unwrap error"
+msgstr "GSSAPI展开错误"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "传入的GSSAPI消息未使用机密性\n"
+
+#: fe-secure-gssapi.c:642
+msgid "could not initiate GSSAPI security context"
+msgstr "无法初始化GSSAPI安全上下文"
+
+#: fe-secure-gssapi.c:670
+msgid "GSSAPI size check error"
+msgstr "GSSAPI大小检查错误"
+
+#: fe-secure-gssapi.c:681
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI上下文创建错误"
+
+#: fe-secure-openssl.c:214 fe-secure-openssl.c:321 fe-secure-openssl.c:1333
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL 错误: %s\n"
+
+#: fe-secure-openssl.c:221 fe-secure-openssl.c:328 fe-secure-openssl.c:1337
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL 错误: 发现结束符\n"
+
+#: fe-secure-openssl.c:232 fe-secure-openssl.c:339 fe-secure-openssl.c:1346
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL 错误: %s\n"
+
+#: fe-secure-openssl.c:247 fe-secure-openssl.c:354
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL连接异常关闭\n"
+
+#: fe-secure-openssl.c:253 fe-secure-openssl.c:360 fe-secure-openssl.c:1396
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "未知的 SSL 错误码: %d\n"
+
+#: fe-secure-openssl.c:400
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "无法确定服务器证书签名算法\n"
+
+#: fe-secure-openssl.c:421
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "找不到NID %s的摘要\n"
+
+#: fe-secure-openssl.c:431
+msgid "could not generate peer certificate hash\n"
+msgstr "无法生成对等证书哈希\n"
+
+#: fe-secure-openssl.c:488
+msgid "SSL certificate's name entry is missing\n"
+msgstr "SSL证书的名称项缺失\n"
+
+#: fe-secure-openssl.c:822
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "无法创建 SSL 环境: %s\n"
+
+#: fe-secure-openssl.c:861
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "最小SSL协议版本的值\"%s\"无效\n"
+
+#: fe-secure-openssl.c:872
+#, c-format
+msgid "could not set minimum SSL protocol version: %s\n"
+msgstr "无法设置最低SSL协议版本: %s\n"
+
+#: fe-secure-openssl.c:890
+#, c-format
+msgid "invalid value \"%s\" for maximum SSL protocol version\n"
+msgstr "最大SSL协议版本的值\"%s\"无效\n"
+
+#: fe-secure-openssl.c:901
+#, c-format
+msgid "could not set maximum SSL protocol version: %s\n"
+msgstr "无法设置最大SSL协议版本: %s\n"
+
+#: fe-secure-openssl.c:937
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "无法读取根证书文件 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:990
+msgid ""
+"could not get home directory to locate root certificate file\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"无法获取home目录以定位根认证文件\n"
+"可以提供该文件或者将sslmode改为禁用服务器证书认证.\n"
+
+#: fe-secure-openssl.c:994
+#, c-format
+msgid ""
+"root certificate file \"%s\" does not exist\n"
+"Either provide the file or change sslmode to disable server certificate verification.\n"
+msgstr ""
+"根认证文件\"%s\"不存在\n"
+"可以提供这个文件或者将sslmode改为禁用服务器认证检验.\n"
+
+#: fe-secure-openssl.c:1025
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "无法打开证书文件 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1044
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "无法读取证书文件 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "无法建立 SSL 联接: %s\n"
+
+#: fe-secure-openssl.c:1103
+msgid "could not set SSL Server Name Indication (SNI): %s\n"
+msgstr "无法设置SSL服务器名称指示(SNI): %s\n"
+
+#: fe-secure-openssl.c:1149
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "无法加载SSL引擎 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1161
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "无法初始化SSL引擎\"%s\": %s\n"
+
+#: fe-secure-openssl.c:1177
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "无法从引擎\"%2$s\"读取私有SSL钥\"%1$s\": %3$s\n"
+
+#: fe-secure-openssl.c:1191
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "无法从引擎\"%2$s\"读取私有SSL钥\"%1$s\": %3$s\n"
+
+#: fe-secure-openssl.c:1228
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "有证书, 但不是私钥文件 \"%s\"\n"
+
+#: fe-secure-openssl.c:1236
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "警告: 私钥文件 \"%s\"的访问权限过大; 权限应设置 为 u=rw (0600)或更小\n"
+
+#: fe-secure-openssl.c:1261
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "无法装载私钥文件 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1279
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "证书不匹配私钥文件 \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1379
+#, c-format
+msgid "This may indicate that the server does not support any SSL protocol version between %s and %s.\n"
+msgstr "这可能表示服务器不支持%s和%s之间的任何SSL协议版本.\n"
+
+#: fe-secure-openssl.c:1415
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "无法获得证书: %s\n"
+
+#: fe-secure-openssl.c:1521
+#, c-format
+msgid "no SSL error reported"
+msgstr "没有报告SSL错误"
+
+#: fe-secure-openssl.c:1530
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL错误代码 %lu"
+
+#: fe-secure-openssl.c:1777
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "警告:ssl密码被截断\n"
+
+#: fe-secure.c:267
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "无法从服务器接收数据: %s\n"
+
+#: fe-secure.c:380
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "无法向服务器发送数据: %s\n"
+
+#: win32.c:314
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "不可识别的套接字错误: 0x%08X/%d"
+
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
new file mode 100644
index 0000000..a57f753
--- /dev/null
+++ b/src/interfaces/libpq/pqexpbuffer.c
@@ -0,0 +1,414 @@
+/*-------------------------------------------------------------------------
+ *
+ * pqexpbuffer.c
+ *
+ * PQExpBuffer provides an indefinitely-extensible string data type.
+ * It can be used to buffer either ordinary C strings (null-terminated text)
+ * or arbitrary binary data. All storage is allocated with malloc().
+ *
+ * This module is essentially the same as the backend's StringInfo data type,
+ * but it is intended for use in frontend libpq and client applications.
+ * Thus, it does not rely on palloc() nor elog(), nor psprintf.c which
+ * will exit() on error.
+ *
+ * It does rely on vsnprintf(); if configure finds that libc doesn't provide
+ * a usable vsnprintf(), then a copy of our own implementation of it will
+ * be linked into libpq.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/pqexpbuffer.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <limits.h>
+
+#include "pqexpbuffer.h"
+
+#ifdef WIN32
+#include "win32.h"
+#endif
+
+
+/* All "broken" PQExpBuffers point to this string. */
+static const char oom_buffer[1] = "";
+
+/* Need a char * for unconstify() compatibility */
+static const char *oom_buffer_ptr = oom_buffer;
+
+static bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
+
+
+/*
+ * markPQExpBufferBroken
+ *
+ * Put a PQExpBuffer in "broken" state if it isn't already.
+ */
+static void
+markPQExpBufferBroken(PQExpBuffer str)
+{
+ if (str->data != oom_buffer)
+ free(str->data);
+
+ /*
+ * Casting away const here is a bit ugly, but it seems preferable to not
+ * marking oom_buffer const. We want to do that to encourage the compiler
+ * to put oom_buffer in read-only storage, so that anyone who tries to
+ * scribble on a broken PQExpBuffer will get a failure.
+ */
+ str->data = unconstify(char *, oom_buffer_ptr);
+ str->len = 0;
+ str->maxlen = 0;
+}
+
+/*
+ * createPQExpBuffer
+ *
+ * Create an empty 'PQExpBufferData' & return a pointer to it.
+ */
+PQExpBuffer
+createPQExpBuffer(void)
+{
+ PQExpBuffer res;
+
+ res = (PQExpBuffer) malloc(sizeof(PQExpBufferData));
+ if (res != NULL)
+ initPQExpBuffer(res);
+
+ return res;
+}
+
+/*
+ * initPQExpBuffer
+ *
+ * Initialize a PQExpBufferData struct (with previously undefined contents)
+ * to describe an empty string.
+ */
+void
+initPQExpBuffer(PQExpBuffer str)
+{
+ str->data = (char *) malloc(INITIAL_EXPBUFFER_SIZE);
+ if (str->data == NULL)
+ {
+ str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
+ str->maxlen = 0;
+ str->len = 0;
+ }
+ else
+ {
+ str->maxlen = INITIAL_EXPBUFFER_SIZE;
+ str->len = 0;
+ str->data[0] = '\0';
+ }
+}
+
+/*
+ * destroyPQExpBuffer(str);
+ *
+ * free()s both the data buffer and the PQExpBufferData.
+ * This is the inverse of createPQExpBuffer().
+ */
+void
+destroyPQExpBuffer(PQExpBuffer str)
+{
+ if (str)
+ {
+ termPQExpBuffer(str);
+ free(str);
+ }
+}
+
+/*
+ * termPQExpBuffer(str)
+ * free()s the data buffer but not the PQExpBufferData itself.
+ * This is the inverse of initPQExpBuffer().
+ */
+void
+termPQExpBuffer(PQExpBuffer str)
+{
+ if (str->data != oom_buffer)
+ free(str->data);
+ /* just for luck, make the buffer validly empty. */
+ str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
+ str->maxlen = 0;
+ str->len = 0;
+}
+
+/*
+ * resetPQExpBuffer
+ * Reset a PQExpBuffer to empty
+ *
+ * Note: if possible, a "broken" PQExpBuffer is returned to normal.
+ */
+void
+resetPQExpBuffer(PQExpBuffer str)
+{
+ if (str)
+ {
+ if (str->data != oom_buffer)
+ {
+ str->len = 0;
+ str->data[0] = '\0';
+ }
+ else
+ {
+ /* try to reinitialize to valid state */
+ initPQExpBuffer(str);
+ }
+ }
+}
+
+/*
+ * enlargePQExpBuffer
+ * Make sure there is enough space for 'needed' more bytes in the buffer
+ * ('needed' does not include the terminating null).
+ *
+ * Returns 1 if OK, 0 if failed to enlarge buffer. (In the latter case
+ * the buffer is left in "broken" state.)
+ */
+int
+enlargePQExpBuffer(PQExpBuffer str, size_t needed)
+{
+ size_t newlen;
+ char *newdata;
+
+ if (PQExpBufferBroken(str))
+ return 0; /* already failed */
+
+ /*
+ * Guard against ridiculous "needed" values, which can occur if we're fed
+ * bogus data. Without this, we can get an overflow or infinite loop in
+ * the following.
+ */
+ if (needed >= ((size_t) INT_MAX - str->len))
+ {
+ markPQExpBufferBroken(str);
+ return 0;
+ }
+
+ needed += str->len + 1; /* total space required now */
+
+ /* Because of the above test, we now have needed <= INT_MAX */
+
+ if (needed <= str->maxlen)
+ return 1; /* got enough space already */
+
+ /*
+ * We don't want to allocate just a little more space with each append;
+ * for efficiency, double the buffer size each time it overflows.
+ * Actually, we might need to more than double it if 'needed' is big...
+ */
+ newlen = (str->maxlen > 0) ? (2 * str->maxlen) : 64;
+ while (needed > newlen)
+ newlen = 2 * newlen;
+
+ /*
+ * Clamp to INT_MAX in case we went past it. Note we are assuming here
+ * that INT_MAX <= UINT_MAX/2, else the above loop could overflow. We
+ * will still have newlen >= needed.
+ */
+ if (newlen > (size_t) INT_MAX)
+ newlen = (size_t) INT_MAX;
+
+ newdata = (char *) realloc(str->data, newlen);
+ if (newdata != NULL)
+ {
+ str->data = newdata;
+ str->maxlen = newlen;
+ return 1;
+ }
+
+ markPQExpBufferBroken(str);
+ return 0;
+}
+
+/*
+ * printfPQExpBuffer
+ * Format text data under the control of fmt (an sprintf-like format string)
+ * and insert it into str. More space is allocated to str if necessary.
+ * This is a convenience routine that does the same thing as
+ * resetPQExpBuffer() followed by appendPQExpBuffer().
+ */
+void
+printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+{
+ int save_errno = errno;
+ va_list args;
+ bool done;
+
+ resetPQExpBuffer(str);
+
+ if (PQExpBufferBroken(str))
+ return; /* already failed */
+
+ /* Loop in case we have to retry after enlarging the buffer. */
+ do
+ {
+ errno = save_errno;
+ va_start(args, fmt);
+ done = appendPQExpBufferVA(str, fmt, args);
+ va_end(args);
+ } while (!done);
+}
+
+/*
+ * appendPQExpBuffer
+ *
+ * Format text data under the control of fmt (an sprintf-like format string)
+ * and append it to whatever is already in str. More space is allocated
+ * to str if necessary. This is sort of like a combination of sprintf and
+ * strcat.
+ */
+void
+appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+{
+ int save_errno = errno;
+ va_list args;
+ bool done;
+
+ if (PQExpBufferBroken(str))
+ return; /* already failed */
+
+ /* Loop in case we have to retry after enlarging the buffer. */
+ do
+ {
+ errno = save_errno;
+ va_start(args, fmt);
+ done = appendPQExpBufferVA(str, fmt, args);
+ va_end(args);
+ } while (!done);
+}
+
+/*
+ * appendPQExpBufferVA
+ * Shared guts of printfPQExpBuffer/appendPQExpBuffer.
+ * Attempt to format data and append it to str. Returns true if done
+ * (either successful or hard failure), false if need to retry.
+ *
+ * Caution: callers must be sure to preserve their entry-time errno
+ * when looping, in case the fmt contains "%m".
+ */
+static bool
+appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args)
+{
+ size_t avail;
+ size_t needed;
+ int nprinted;
+
+ /*
+ * Try to format the given string into the available space; but if there's
+ * hardly any space, don't bother trying, just enlarge the buffer first.
+ */
+ if (str->maxlen > str->len + 16)
+ {
+ avail = str->maxlen - str->len;
+
+ nprinted = vsnprintf(str->data + str->len, avail, fmt, args);
+
+ /*
+ * If vsnprintf reports an error, fail (we assume this means there's
+ * something wrong with the format string).
+ */
+ if (unlikely(nprinted < 0))
+ {
+ markPQExpBufferBroken(str);
+ return true;
+ }
+
+ if ((size_t) nprinted < avail)
+ {
+ /* Success. Note nprinted does not include trailing null. */
+ str->len += nprinted;
+ return true;
+ }
+
+ /*
+ * We assume a C99-compliant vsnprintf, so believe its estimate of the
+ * required space, and add one for the trailing null. (If it's wrong,
+ * the logic will still work, but we may loop multiple times.)
+ *
+ * Choke if the required space would exceed INT_MAX, since str->maxlen
+ * can't represent more than that.
+ */
+ if (unlikely(nprinted > INT_MAX - 1))
+ {
+ markPQExpBufferBroken(str);
+ return true;
+ }
+ needed = nprinted + 1;
+ }
+ else
+ {
+ /*
+ * We have to guess at how much to enlarge, since we're skipping the
+ * formatting work. Fortunately, because of enlargePQExpBuffer's
+ * preference for power-of-2 sizes, this number isn't very sensitive;
+ * the net effect is that we'll double the buffer size before trying
+ * to run vsnprintf, which seems sensible.
+ */
+ needed = 32;
+ }
+
+ /* Increase the buffer size and try again. */
+ if (!enlargePQExpBuffer(str, needed))
+ return true; /* oops, out of memory */
+
+ return false;
+}
+
+/*
+ * appendPQExpBufferStr
+ * Append the given string to a PQExpBuffer, allocating more space
+ * if necessary.
+ */
+void
+appendPQExpBufferStr(PQExpBuffer str, const char *data)
+{
+ appendBinaryPQExpBuffer(str, data, strlen(data));
+}
+
+/*
+ * appendPQExpBufferChar
+ * Append a single byte to str.
+ * Like appendPQExpBuffer(str, "%c", ch) but much faster.
+ */
+void
+appendPQExpBufferChar(PQExpBuffer str, char ch)
+{
+ /* Make more room if needed */
+ if (!enlargePQExpBuffer(str, 1))
+ return;
+
+ /* OK, append the character */
+ str->data[str->len] = ch;
+ str->len++;
+ str->data[str->len] = '\0';
+}
+
+/*
+ * appendBinaryPQExpBuffer
+ *
+ * Append arbitrary binary data to a PQExpBuffer, allocating more space
+ * if necessary.
+ */
+void
+appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
+{
+ /* Make more room if needed */
+ if (!enlargePQExpBuffer(str, datalen))
+ return;
+
+ /* OK, append the data */
+ memcpy(str->data + str->len, data, datalen);
+ str->len += datalen;
+
+ /*
+ * Keep a trailing null in place, even though it's probably useless for
+ * binary data...
+ */
+ str->data[str->len] = '\0';
+}
diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h
new file mode 100644
index 0000000..0251095
--- /dev/null
+++ b/src/interfaces/libpq/pqexpbuffer.h
@@ -0,0 +1,182 @@
+/*-------------------------------------------------------------------------
+ *
+ * pqexpbuffer.h
+ * Declarations/definitions for "PQExpBuffer" functions.
+ *
+ * PQExpBuffer provides an indefinitely-extensible string data type.
+ * It can be used to buffer either ordinary C strings (null-terminated text)
+ * or arbitrary binary data. All storage is allocated with malloc().
+ *
+ * This module is essentially the same as the backend's StringInfo data type,
+ * but it is intended for use in frontend libpq and client applications.
+ * Thus, it does not rely on palloc() nor elog().
+ *
+ * It does rely on vsnprintf(); if configure finds that libc doesn't provide
+ * a usable vsnprintf(), then a copy of our own implementation of it will
+ * be linked into libpq.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/interfaces/libpq/pqexpbuffer.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PQEXPBUFFER_H
+#define PQEXPBUFFER_H
+
+/*-------------------------
+ * PQExpBufferData holds information about an extensible string.
+ * data is the current buffer for the string (allocated with malloc).
+ * len is the current string length. There is guaranteed to be
+ * a terminating '\0' at data[len], although this is not very
+ * useful when the string holds binary data rather than text.
+ * maxlen is the allocated size in bytes of 'data', i.e. the maximum
+ * string size (including the terminating '\0' char) that we can
+ * currently store in 'data' without having to reallocate
+ * more space. We must always have maxlen > len.
+ *
+ * An exception occurs if we failed to allocate enough memory for the string
+ * buffer. In that case data points to a statically allocated empty string,
+ * and len = maxlen = 0.
+ *-------------------------
+ */
+typedef struct PQExpBufferData
+{
+ char *data;
+ size_t len;
+ size_t maxlen;
+} PQExpBufferData;
+
+typedef PQExpBufferData *PQExpBuffer;
+
+/*------------------------
+ * Test for a broken (out of memory) PQExpBuffer.
+ * When a buffer is "broken", all operations except resetting or deleting it
+ * are no-ops.
+ *------------------------
+ */
+#define PQExpBufferBroken(str) \
+ ((str) == NULL || (str)->maxlen == 0)
+
+/*------------------------
+ * Same, but for use when using a static or local PQExpBufferData struct.
+ * For that, a null-pointer test is useless and may draw compiler warnings.
+ *------------------------
+ */
+#define PQExpBufferDataBroken(buf) \
+ ((buf).maxlen == 0)
+
+/*------------------------
+ * Initial size of the data buffer in a PQExpBuffer.
+ * NB: this must be large enough to hold error messages that might
+ * be returned by PQrequestCancel().
+ *------------------------
+ */
+#define INITIAL_EXPBUFFER_SIZE 256
+
+/*------------------------
+ * There are two ways to create a PQExpBuffer object initially:
+ *
+ * PQExpBuffer stringptr = createPQExpBuffer();
+ * Both the PQExpBufferData and the data buffer are malloc'd.
+ *
+ * PQExpBufferData string;
+ * initPQExpBuffer(&string);
+ * The data buffer is malloc'd but the PQExpBufferData is presupplied.
+ * This is appropriate if the PQExpBufferData is a field of another
+ * struct.
+ *-------------------------
+ */
+
+/*------------------------
+ * createPQExpBuffer
+ * Create an empty 'PQExpBufferData' & return a pointer to it.
+ */
+extern PQExpBuffer createPQExpBuffer(void);
+
+/*------------------------
+ * initPQExpBuffer
+ * Initialize a PQExpBufferData struct (with previously undefined contents)
+ * to describe an empty string.
+ */
+extern void initPQExpBuffer(PQExpBuffer str);
+
+/*------------------------
+ * To destroy a PQExpBuffer, use either:
+ *
+ * destroyPQExpBuffer(str);
+ * free()s both the data buffer and the PQExpBufferData.
+ * This is the inverse of createPQExpBuffer().
+ *
+ * termPQExpBuffer(str)
+ * free()s the data buffer but not the PQExpBufferData itself.
+ * This is the inverse of initPQExpBuffer().
+ *
+ * NOTE: some routines build up a string using PQExpBuffer, and then
+ * release the PQExpBufferData but return the data string itself to their
+ * caller. At that point the data string looks like a plain malloc'd
+ * string.
+ */
+extern void destroyPQExpBuffer(PQExpBuffer str);
+extern void termPQExpBuffer(PQExpBuffer str);
+
+/*------------------------
+ * resetPQExpBuffer
+ * Reset a PQExpBuffer to empty
+ *
+ * Note: if possible, a "broken" PQExpBuffer is returned to normal.
+ */
+extern void resetPQExpBuffer(PQExpBuffer str);
+
+/*------------------------
+ * enlargePQExpBuffer
+ * Make sure there is enough space for 'needed' more bytes in the buffer
+ * ('needed' does not include the terminating null).
+ *
+ * Returns 1 if OK, 0 if failed to enlarge buffer. (In the latter case
+ * the buffer is left in "broken" state.)
+ */
+extern int enlargePQExpBuffer(PQExpBuffer str, size_t needed);
+
+/*------------------------
+ * printfPQExpBuffer
+ * Format text data under the control of fmt (an sprintf-like format string)
+ * and insert it into str. More space is allocated to str if necessary.
+ * This is a convenience routine that does the same thing as
+ * resetPQExpBuffer() followed by appendPQExpBuffer().
+ */
+extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+
+/*------------------------
+ * appendPQExpBuffer
+ * Format text data under the control of fmt (an sprintf-like format string)
+ * and append it to whatever is already in str. More space is allocated
+ * to str if necessary. This is sort of like a combination of sprintf and
+ * strcat.
+ */
+extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+
+/*------------------------
+ * appendPQExpBufferStr
+ * Append the given string to a PQExpBuffer, allocating more space
+ * if necessary.
+ */
+extern void appendPQExpBufferStr(PQExpBuffer str, const char *data);
+
+/*------------------------
+ * appendPQExpBufferChar
+ * Append a single byte to str.
+ * Like appendPQExpBuffer(str, "%c", ch) but much faster.
+ */
+extern void appendPQExpBufferChar(PQExpBuffer str, char ch);
+
+/*------------------------
+ * appendBinaryPQExpBuffer
+ * Append arbitrary binary data to a PQExpBuffer, allocating more space
+ * if necessary.
+ */
+extern void appendBinaryPQExpBuffer(PQExpBuffer str,
+ const char *data, size_t datalen);
+
+#endif /* PQEXPBUFFER_H */
diff --git a/src/interfaces/libpq/pthread-win32.c b/src/interfaces/libpq/pthread-win32.c
new file mode 100644
index 0000000..6dbb0a3
--- /dev/null
+++ b/src/interfaces/libpq/pthread-win32.c
@@ -0,0 +1,60 @@
+/*-------------------------------------------------------------------------
+*
+* pthread-win32.c
+* partial pthread implementation for win32
+*
+* Copyright (c) 2004-2021, PostgreSQL Global Development Group
+* IDENTIFICATION
+* src/interfaces/libpq/pthread-win32.c
+*
+*-------------------------------------------------------------------------
+*/
+
+#include "postgres_fe.h"
+
+#include "pthread-win32.h"
+
+DWORD
+pthread_self(void)
+{
+ return GetCurrentThreadId();
+}
+
+void
+pthread_setspecific(pthread_key_t key, void *val)
+{
+}
+
+void *
+pthread_getspecific(pthread_key_t key)
+{
+ return NULL;
+}
+
+int
+pthread_mutex_init(pthread_mutex_t *mp, void *attr)
+{
+ *mp = (CRITICAL_SECTION *) malloc(sizeof(CRITICAL_SECTION));
+ if (!*mp)
+ return 1;
+ InitializeCriticalSection(*mp);
+ return 0;
+}
+
+int
+pthread_mutex_lock(pthread_mutex_t *mp)
+{
+ if (!*mp)
+ return 1;
+ EnterCriticalSection(*mp);
+ return 0;
+}
+
+int
+pthread_mutex_unlock(pthread_mutex_t *mp)
+{
+ if (!*mp)
+ return 1;
+ LeaveCriticalSection(*mp);
+ return 0;
+}
diff --git a/src/interfaces/libpq/test/.gitignore b/src/interfaces/libpq/test/.gitignore
new file mode 100644
index 0000000..5387b3b
--- /dev/null
+++ b/src/interfaces/libpq/test/.gitignore
@@ -0,0 +1,3 @@
+/uri-regress
+/regress.diff
+/regress.out
diff --git a/src/interfaces/libpq/test/Makefile b/src/interfaces/libpq/test/Makefile
new file mode 100644
index 0000000..4832fab
--- /dev/null
+++ b/src/interfaces/libpq/test/Makefile
@@ -0,0 +1,22 @@
+subdir = src/interfaces/libpq/test
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
+
+ifeq ($(PORTNAME), win32)
+LDFLAGS += -lws2_32
+endif
+
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
+LDFLAGS_INTERNAL += $(libpq_pgport)
+
+PROGS = uri-regress
+
+all: $(PROGS)
+
+installcheck: all
+ SRCDIR='$(top_srcdir)' SUBDIR='$(subdir)' \
+ $(PERL) $(top_srcdir)/$(subdir)/regress.pl
+
+clean distclean maintainer-clean:
+ rm -f $(PROGS) *.o
+ rm -f regress.out regress.diff
diff --git a/src/interfaces/libpq/test/README b/src/interfaces/libpq/test/README
new file mode 100644
index 0000000..a05eb6b
--- /dev/null
+++ b/src/interfaces/libpq/test/README
@@ -0,0 +1,7 @@
+This is a testsuite for testing libpq URI connection string syntax.
+
+To run the suite, use 'make installcheck' command. It works by
+running 'regress.pl' from this directory with appropriate environment
+set up, which in turn feeds up lines from 'regress.in' to
+'uri-regress' test program and compares the output against the correct
+one in 'expected.out' file.
diff --git a/src/interfaces/libpq/test/expected.out b/src/interfaces/libpq/test/expected.out
new file mode 100644
index 0000000..d375e82
--- /dev/null
+++ b/src/interfaces/libpq/test/expected.out
@@ -0,0 +1,171 @@
+trying postgresql://uri-user:secret@host:12345/db
+user='uri-user' password='secret' dbname='db' host='host' port='12345' (inet)
+
+trying postgresql://uri-user@host:12345/db
+user='uri-user' dbname='db' host='host' port='12345' (inet)
+
+trying postgresql://uri-user@host/db
+user='uri-user' dbname='db' host='host' (inet)
+
+trying postgresql://host:12345/db
+dbname='db' host='host' port='12345' (inet)
+
+trying postgresql://host/db
+dbname='db' host='host' (inet)
+
+trying postgresql://uri-user@host:12345/
+user='uri-user' host='host' port='12345' (inet)
+
+trying postgresql://uri-user@host/
+user='uri-user' host='host' (inet)
+
+trying postgresql://uri-user@
+user='uri-user' (local)
+
+trying postgresql://host:12345/
+host='host' port='12345' (inet)
+
+trying postgresql://host:12345
+host='host' port='12345' (inet)
+
+trying postgresql://host/db
+dbname='db' host='host' (inet)
+
+trying postgresql://host/
+host='host' (inet)
+
+trying postgresql://host
+host='host' (inet)
+
+trying postgresql://
+(local)
+
+trying postgresql://?hostaddr=127.0.0.1
+hostaddr='127.0.0.1' (inet)
+
+trying postgresql://example.com?hostaddr=63.1.2.4
+host='example.com' hostaddr='63.1.2.4' (inet)
+
+trying postgresql://%68ost/
+host='host' (inet)
+
+trying postgresql://host/db?user=uri-user
+user='uri-user' dbname='db' host='host' (inet)
+
+trying postgresql://host/db?user=uri-user&port=12345
+user='uri-user' dbname='db' host='host' port='12345' (inet)
+
+trying postgresql://host/db?u%73er=someotheruser&port=12345
+user='someotheruser' dbname='db' host='host' port='12345' (inet)
+
+trying postgresql://host/db?u%7aer=someotheruser&port=12345
+uri-regress: invalid URI query parameter: "uzer"
+
+trying postgresql://host:12345?user=uri-user
+user='uri-user' host='host' port='12345' (inet)
+
+trying postgresql://host?user=uri-user
+user='uri-user' host='host' (inet)
+
+trying postgresql://host?
+host='host' (inet)
+
+trying postgresql://[::1]:12345/db
+dbname='db' host='::1' port='12345' (inet)
+
+trying postgresql://[::1]/db
+dbname='db' host='::1' (inet)
+
+trying postgresql://[2001:db8::1234]/
+host='2001:db8::1234' (inet)
+
+trying postgresql://[200z:db8::1234]/
+host='200z:db8::1234' (inet)
+
+trying postgresql://[::1]
+host='::1' (inet)
+
+trying postgres://
+(local)
+
+trying postgres:///
+(local)
+
+trying postgres:///db
+dbname='db' (local)
+
+trying postgres://uri-user@/db
+user='uri-user' dbname='db' (local)
+
+trying postgres://?host=/path/to/socket/dir
+host='/path/to/socket/dir' (local)
+
+trying postgresql://host?uzer=
+uri-regress: invalid URI query parameter: "uzer"
+
+trying postgre://
+uri-regress: missing "=" after "postgre://" in connection info string
+
+trying postgres://[::1
+uri-regress: end of string reached when looking for matching "]" in IPv6 host address in URI: "postgres://[::1"
+
+trying postgres://[]
+uri-regress: IPv6 host address may not be empty in URI: "postgres://[]"
+
+trying postgres://[::1]z
+uri-regress: unexpected character "z" at position 17 in URI (expected ":" or "/"): "postgres://[::1]z"
+
+trying postgresql://host?zzz
+uri-regress: missing key/value separator "=" in URI query parameter: "zzz"
+
+trying postgresql://host?value1&value2
+uri-regress: missing key/value separator "=" in URI query parameter: "value1"
+
+trying postgresql://host?key=key=value
+uri-regress: extra key/value separator "=" in URI query parameter: "key"
+
+trying postgres://host?dbname=%XXfoo
+uri-regress: invalid percent-encoded token: "%XXfoo"
+
+trying postgresql://a%00b
+uri-regress: forbidden value %00 in percent-encoded value: "a%00b"
+
+trying postgresql://%zz
+uri-regress: invalid percent-encoded token: "%zz"
+
+trying postgresql://%1
+uri-regress: invalid percent-encoded token: "%1"
+
+trying postgresql://%
+uri-regress: invalid percent-encoded token: "%"
+
+trying postgres://@host
+host='host' (inet)
+
+trying postgres://host:/
+host='host' (inet)
+
+trying postgres://:12345/
+port='12345' (local)
+
+trying postgres://otheruser@?host=/no/such/directory
+user='otheruser' host='/no/such/directory' (local)
+
+trying postgres://otheruser@/?host=/no/such/directory
+user='otheruser' host='/no/such/directory' (local)
+
+trying postgres://otheruser@:12345?host=/no/such/socket/path
+user='otheruser' host='/no/such/socket/path' port='12345' (local)
+
+trying postgres://otheruser@:12345/db?host=/path/to/socket
+user='otheruser' dbname='db' host='/path/to/socket' port='12345' (local)
+
+trying postgres://:12345/db?host=/path/to/socket
+dbname='db' host='/path/to/socket' port='12345' (local)
+
+trying postgres://:12345?host=/path/to/socket
+host='/path/to/socket' port='12345' (local)
+
+trying postgres://%2Fvar%2Flib%2Fpostgresql/dbname
+dbname='dbname' host='/var/lib/postgresql' (local)
+
diff --git a/src/interfaces/libpq/test/regress.in b/src/interfaces/libpq/test/regress.in
new file mode 100644
index 0000000..de034f3
--- /dev/null
+++ b/src/interfaces/libpq/test/regress.in
@@ -0,0 +1,57 @@
+postgresql://uri-user:secret@host:12345/db
+postgresql://uri-user@host:12345/db
+postgresql://uri-user@host/db
+postgresql://host:12345/db
+postgresql://host/db
+postgresql://uri-user@host:12345/
+postgresql://uri-user@host/
+postgresql://uri-user@
+postgresql://host:12345/
+postgresql://host:12345
+postgresql://host/db
+postgresql://host/
+postgresql://host
+postgresql://
+postgresql://?hostaddr=127.0.0.1
+postgresql://example.com?hostaddr=63.1.2.4
+postgresql://%68ost/
+postgresql://host/db?user=uri-user
+postgresql://host/db?user=uri-user&port=12345
+postgresql://host/db?u%73er=someotheruser&port=12345
+postgresql://host/db?u%7aer=someotheruser&port=12345
+postgresql://host:12345?user=uri-user
+postgresql://host?user=uri-user
+postgresql://host?
+postgresql://[::1]:12345/db
+postgresql://[::1]/db
+postgresql://[2001:db8::1234]/
+postgresql://[200z:db8::1234]/
+postgresql://[::1]
+postgres://
+postgres:///
+postgres:///db
+postgres://uri-user@/db
+postgres://?host=/path/to/socket/dir
+postgresql://host?uzer=
+postgre://
+postgres://[::1
+postgres://[]
+postgres://[::1]z
+postgresql://host?zzz
+postgresql://host?value1&value2
+postgresql://host?key=key=value
+postgres://host?dbname=%XXfoo
+postgresql://a%00b
+postgresql://%zz
+postgresql://%1
+postgresql://%
+postgres://@host
+postgres://host:/
+postgres://:12345/
+postgres://otheruser@?host=/no/such/directory
+postgres://otheruser@/?host=/no/such/directory
+postgres://otheruser@:12345?host=/no/such/socket/path
+postgres://otheruser@:12345/db?host=/path/to/socket
+postgres://:12345/db?host=/path/to/socket
+postgres://:12345?host=/path/to/socket
+postgres://%2Fvar%2Flib%2Fpostgresql/dbname
diff --git a/src/interfaces/libpq/test/regress.pl b/src/interfaces/libpq/test/regress.pl
new file mode 100644
index 0000000..de705cf
--- /dev/null
+++ b/src/interfaces/libpq/test/regress.pl
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+use strict;
+use warnings;
+
+# use of SRCDIR/SUBDIR is required for supporting VPath builds
+my $srcdir = $ENV{'SRCDIR'} or die 'SRCDIR environment variable is not set';
+my $subdir = $ENV{'SUBDIR'} or die 'SUBDIR environment variable is not set';
+
+my $regress_in = "$srcdir/$subdir/regress.in";
+my $expected_out = "$srcdir/$subdir/expected.out";
+
+# the output file should land in the build_dir of VPath, or just in
+# the current dir, if VPath isn't used
+my $regress_out = "regress.out";
+
+# open input file first, so possible error isn't sent to redirected STDERR
+open(my $regress_in_fh, "<", $regress_in)
+ or die "can't open $regress_in for reading: $!";
+
+# save STDOUT/ERR and redirect both to regress.out
+open(my $oldout_fh, ">&", \*STDOUT) or die "can't dup STDOUT: $!";
+open(my $olderr_fh, ">&", \*STDERR) or die "can't dup STDERR: $!";
+
+open(STDOUT, ">", $regress_out)
+ or die "can't open $regress_out for writing: $!";
+open(STDERR, ">&", \*STDOUT) or die "can't dup STDOUT: $!";
+
+# read lines from regress.in and run uri-regress on them
+while (<$regress_in_fh>)
+{
+ chomp;
+ print "trying $_\n";
+ system("./uri-regress \"$_\"");
+ print "\n";
+}
+
+# restore STDOUT/ERR so we can print the outcome to the user
+open(STDERR, ">&", $olderr_fh)
+ or die; # can't complain as STDERR is still duped
+open(STDOUT, ">&", $oldout_fh) or die "can't restore STDOUT: $!";
+
+# just in case
+close $regress_in_fh;
+
+my $diff_status = system(
+ "diff -c \"$srcdir/$subdir/expected.out\" regress.out >regress.diff");
+
+print "=" x 70, "\n";
+if ($diff_status == 0)
+{
+ print "All tests passed\n";
+ exit 0;
+}
+else
+{
+ print <<EOF;
+FAILED: the test result differs from the expected output
+
+Review the difference in "$subdir/regress.diff"
+EOF
+ exit 1;
+}
diff --git a/src/interfaces/libpq/test/uri-regress.c b/src/interfaces/libpq/test/uri-regress.c
new file mode 100644
index 0000000..84fc52a
--- /dev/null
+++ b/src/interfaces/libpq/test/uri-regress.c
@@ -0,0 +1,84 @@
+/*
+ * uri-regress.c
+ * A test program for libpq URI format
+ *
+ * This is a helper for libpq conninfo regression testing. It takes a single
+ * conninfo string as a parameter, parses it using PQconninfoParse, and then
+ * prints out the values from the parsed PQconninfoOption struct that differ
+ * from the defaults (obtained from PQconndefaults).
+ *
+ * Portions Copyright (c) 2012-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/test/uri-regress.c
+ */
+
+#include "postgres_fe.h"
+
+#include "libpq-fe.h"
+
+int
+main(int argc, char *argv[])
+{
+ PQconninfoOption *opts;
+ PQconninfoOption *defs;
+ PQconninfoOption *opt;
+ PQconninfoOption *def;
+ char *errmsg = NULL;
+ bool local = true;
+
+ if (argc != 2)
+ return 1;
+
+ opts = PQconninfoParse(argv[1], &errmsg);
+ if (opts == NULL)
+ {
+ fprintf(stderr, "uri-regress: %s", errmsg);
+ return 1;
+ }
+
+ defs = PQconndefaults();
+ if (defs == NULL)
+ {
+ fprintf(stderr, "uri-regress: cannot fetch default options\n");
+ return 1;
+ }
+
+ /*
+ * Loop on the options, and print the value of each if not the default.
+ *
+ * XXX this coding assumes that PQconninfoOption structs always have the
+ * keywords in the same order.
+ */
+ for (opt = opts, def = defs; opt->keyword; ++opt, ++def)
+ {
+ if (opt->val != NULL)
+ {
+ if (def->val == NULL || strcmp(opt->val, def->val) != 0)
+ printf("%s='%s' ", opt->keyword, opt->val);
+
+ /*
+ * Try to detect if this is a Unix-domain socket or inet. This is
+ * a bit grotty but it's the same thing that libpq itself does.
+ *
+ * Note that we directly test for '/' instead of using
+ * is_absolute_path, as that would be considerably more messy.
+ * This would fail on Windows, but that platform doesn't have
+ * Unix-domain sockets anyway.
+ */
+ if (*opt->val &&
+ (strcmp(opt->keyword, "hostaddr") == 0 ||
+ (strcmp(opt->keyword, "host") == 0 && *opt->val != '/')))
+ {
+ local = false;
+ }
+ }
+ }
+
+ if (local)
+ printf("(local)\n");
+ else
+ printf("(inet)\n");
+
+ return 0;
+}
diff --git a/src/interfaces/libpq/win32.c b/src/interfaces/libpq/win32.c
new file mode 100644
index 0000000..f6cf9dc
--- /dev/null
+++ b/src/interfaces/libpq/win32.c
@@ -0,0 +1,324 @@
+/*
+ * src/interfaces/libpq/win32.c
+ *
+ *
+ * FILE
+ * win32.c
+ *
+ * DESCRIPTION
+ * Win32 support functions.
+ *
+ * Contains table and functions for looking up win32 socket error
+ * descriptions. But will/may contain other win32 helper functions
+ * for libpq.
+ *
+ * The error constants are taken from the Frambak Bakfram LGSOCKET
+ * library guys who in turn took them from the Winsock FAQ.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ */
+
+/* Make stuff compile faster by excluding not used stuff */
+
+#define VC_EXTRALEAN
+#ifndef __MINGW32__
+#define NOGDI
+#endif
+#define NOCRYPT
+
+#include "postgres_fe.h"
+
+#include "win32.h"
+
+/* Declared here to avoid pulling in all includes, which causes name collisions */
+#ifdef ENABLE_NLS
+extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
+#else
+#define libpq_gettext(x) (x)
+#endif
+
+
+static struct WSErrorEntry
+{
+ DWORD error;
+ const char *description;
+} WSErrors[] =
+
+{
+ {
+ 0, "No error"
+ },
+ {
+ WSAEINTR, "Interrupted system call"
+ },
+ {
+ WSAEBADF, "Bad file number"
+ },
+ {
+ WSAEACCES, "Permission denied"
+ },
+ {
+ WSAEFAULT, "Bad address"
+ },
+ {
+ WSAEINVAL, "Invalid argument"
+ },
+ {
+ WSAEMFILE, "Too many open sockets"
+ },
+ {
+ WSAEWOULDBLOCK, "Operation would block"
+ },
+ {
+ WSAEINPROGRESS, "Operation now in progress"
+ },
+ {
+ WSAEALREADY, "Operation already in progress"
+ },
+ {
+ WSAENOTSOCK, "Socket operation on non-socket"
+ },
+ {
+ WSAEDESTADDRREQ, "Destination address required"
+ },
+ {
+ WSAEMSGSIZE, "Message too long"
+ },
+ {
+ WSAEPROTOTYPE, "Protocol wrong type for socket"
+ },
+ {
+ WSAENOPROTOOPT, "Bad protocol option"
+ },
+ {
+ WSAEPROTONOSUPPORT, "Protocol not supported"
+ },
+ {
+ WSAESOCKTNOSUPPORT, "Socket type not supported"
+ },
+ {
+ WSAEOPNOTSUPP, "Operation not supported on socket"
+ },
+ {
+ WSAEPFNOSUPPORT, "Protocol family not supported"
+ },
+ {
+ WSAEAFNOSUPPORT, "Address family not supported"
+ },
+ {
+ WSAEADDRINUSE, "Address already in use"
+ },
+ {
+ WSAEADDRNOTAVAIL, "Cannot assign requested address"
+ },
+ {
+ WSAENETDOWN, "Network is down"
+ },
+ {
+ WSAENETUNREACH, "Network is unreachable"
+ },
+ {
+ WSAENETRESET, "Net connection reset"
+ },
+ {
+ WSAECONNABORTED, "Software caused connection abort"
+ },
+ {
+ WSAECONNRESET, "Connection reset by peer"
+ },
+ {
+ WSAENOBUFS, "No buffer space available"
+ },
+ {
+ WSAEISCONN, "Socket is already connected"
+ },
+ {
+ WSAENOTCONN, "Socket is not connected"
+ },
+ {
+ WSAESHUTDOWN, "Cannot send after socket shutdown"
+ },
+ {
+ WSAETOOMANYREFS, "Too many references, cannot splice"
+ },
+ {
+ WSAETIMEDOUT, "Connection timed out"
+ },
+ {
+ WSAECONNREFUSED, "Connection refused"
+ },
+ {
+ WSAELOOP, "Too many levels of symbolic links"
+ },
+ {
+ WSAENAMETOOLONG, "File name too long"
+ },
+ {
+ WSAEHOSTDOWN, "Host is down"
+ },
+ {
+ WSAEHOSTUNREACH, "No route to host"
+ },
+ {
+ WSAENOTEMPTY, "Directory not empty"
+ },
+ {
+ WSAEPROCLIM, "Too many processes"
+ },
+ {
+ WSAEUSERS, "Too many users"
+ },
+ {
+ WSAEDQUOT, "Disc quota exceeded"
+ },
+ {
+ WSAESTALE, "Stale NFS file handle"
+ },
+ {
+ WSAEREMOTE, "Too many levels of remote in path"
+ },
+ {
+ WSASYSNOTREADY, "Network system is unavailable"
+ },
+ {
+ WSAVERNOTSUPPORTED, "Winsock version out of range"
+ },
+ {
+ WSANOTINITIALISED, "WSAStartup not yet called"
+ },
+ {
+ WSAEDISCON, "Graceful shutdown in progress"
+ },
+ {
+ WSAHOST_NOT_FOUND, "Host not found"
+ },
+ {
+ WSATRY_AGAIN, "NA Host not found / SERVFAIL"
+ },
+ {
+ WSANO_RECOVERY, "Non recoverable FORMERR||REFUSED||NOTIMP"
+ },
+ {
+ WSANO_DATA, "No host data of that type was found"
+ },
+ {
+ 0, 0
+ } /* End of table */
+};
+
+
+/*
+ * Returns 0 if not found, linear but who cares, at this moment
+ * we're already in pain :)
+ */
+
+static int
+LookupWSErrorMessage(DWORD err, char *dest)
+{
+ struct WSErrorEntry *e;
+
+ for (e = WSErrors; e->description; e++)
+ {
+ if (e->error == err)
+ {
+ strcpy(dest, e->description);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+struct MessageDLL
+{
+ const char *dll_name;
+ void *handle;
+ int loaded; /* BOOL */
+} dlls[] =
+
+{
+ {
+ "netmsg.dll", 0, 0
+ },
+ {
+ "winsock.dll", 0, 0
+ },
+ {
+ "ws2_32.dll", 0, 0
+ },
+ {
+ "wsock32n.dll", 0, 0
+ },
+ {
+ "mswsock.dll", 0, 0
+ },
+ {
+ "ws2help.dll", 0, 0
+ },
+ {
+ "ws2thk.dll", 0, 0
+ },
+ {
+ 0, 0, 1
+ } /* Last one, no dll, always loaded */
+};
+
+#define DLLS_SIZE (sizeof(dlls)/sizeof(struct MessageDLL))
+
+/*
+ * Returns a description of the socket error by first trying
+ * to find it in the lookup table, and if that fails, tries
+ * to load any of the winsock dlls to find that message.
+ * The DLL thing works from Nt4 (spX ?) up, but some special
+ * versions of winsock might have this as well (seen on Win98 SE
+ * special install) / Magnus Naeslund (mag@fbab.net)
+ *
+ */
+
+const char *
+winsock_strerror(int err, char *strerrbuf, size_t buflen)
+{
+ unsigned long flags;
+ int offs,
+ i;
+ int success = LookupWSErrorMessage(err, strerrbuf);
+
+ for (i = 0; !success && i < DLLS_SIZE; i++)
+ {
+
+ if (!dlls[i].loaded)
+ {
+ dlls[i].loaded = 1; /* Only load once */
+ dlls[i].handle = (void *) LoadLibraryEx(dlls[i].dll_name,
+ 0,
+ LOAD_LIBRARY_AS_DATAFILE);
+ }
+
+ if (dlls[i].dll_name && !dlls[i].handle)
+ continue; /* Didn't load */
+
+ flags = FORMAT_MESSAGE_FROM_SYSTEM
+ | FORMAT_MESSAGE_IGNORE_INSERTS
+ | (dlls[i].handle ? FORMAT_MESSAGE_FROM_HMODULE : 0);
+
+ success = 0 != FormatMessage(flags,
+ dlls[i].handle, err,
+ MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
+ strerrbuf, buflen - 64,
+ 0);
+ }
+
+ if (!success)
+ sprintf(strerrbuf, libpq_gettext("unrecognized socket error: 0x%08X/%d"), err, err);
+ else
+ {
+ strerrbuf[buflen - 1] = '\0';
+ offs = strlen(strerrbuf);
+ if (offs > (int) buflen - 64)
+ offs = buflen - 64;
+ sprintf(strerrbuf + offs, " (0x%08X/%d)", err, err);
+ }
+ return strerrbuf;
+}
diff --git a/src/interfaces/libpq/win32.h b/src/interfaces/libpq/win32.h
new file mode 100644
index 0000000..fcce1e0
--- /dev/null
+++ b/src/interfaces/libpq/win32.h
@@ -0,0 +1,23 @@
+/*
+ * src/interfaces/libpq/win32.h
+ */
+#ifndef __win32_h_included
+#define __win32_h_included
+
+/*
+ * Some compatibility functions
+ */
+
+/* open provided elsewhere */
+#define close(a) _close(a)
+#define read(a,b,c) _read(a,b,c)
+#define write(a,b,c) _write(a,b,c)
+
+#undef EAGAIN /* doesn't apply on sockets */
+
+/*
+ * support for handling Windows Socket errors
+ */
+extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen);
+
+#endif